diff --git a/docbook/auth-server-docs/reference/en/en-US/modules/proxy.xml b/docbook/auth-server-docs/reference/en/en-US/modules/proxy.xml index ed87d6532b..4a79ef2f9d 100755 --- a/docbook/auth-server-docs/reference/en/en-US/modules/proxy.xml +++ b/docbook/auth-server-docs/reference/en/en-US/modules/proxy.xml @@ -364,7 +364,7 @@ $ java -jar bin/launcher.jar [your-config.json] OIDC identity token it received for authentication. - KEYCLOAK-SUBJECT + KEYCLOAK_SUBJECT User id. Corresponds to JWT sub and will be the user id Keycloak uses to store @@ -373,7 +373,7 @@ $ java -jar bin/launcher.jar [your-config.json] - KEYCLOAK-USERNAME + KEYCLOAK_USERNAME Username. Corresponds to JWT preferred_username @@ -381,7 +381,7 @@ $ java -jar bin/launcher.jar [your-config.json] - KEYCLOAK-EMAIL + KEYCLOAK_EMAIL Email address of user if set. @@ -389,7 +389,7 @@ $ java -jar bin/launcher.jar [your-config.json] - KEYCLOAK-NAME + KEYCLOAK_NAME Full name of user if set. @@ -397,7 +397,7 @@ $ java -jar bin/launcher.jar [your-config.json] - KEYCLOAK-ACCESS-TOKEN + KEYCLOAK_ACCESS_TOKEN Send the access token in this header if the proxy was configured to send it. This token can @@ -410,7 +410,7 @@ $ java -jar bin/launcher.jar [your-config.json] diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/LogChecker.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/LogChecker.java index 8e16b3492e..ac1b059eb9 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/LogChecker.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/LogChecker.java @@ -1,9 +1,10 @@ package org.keycloak.testsuite.util; +import org.apache.commons.io.FileUtils; +import org.jboss.logging.Logger; + import java.io.File; import java.io.IOException; -import org.apache.commons.io.FileUtils; -import org.jboss.logging.Logger; /** * @@ -14,20 +15,30 @@ public class LogChecker { private static final Logger log = Logger.getLogger(LogChecker.class); + private static final String[] IGNORED = new String[] { ".*Jetty ALPN support not found.*" }; + public static void checkServerLog(File logFile) throws IOException { log.info(String.format("Checking server log: '%s'", logFile.getAbsolutePath())); - String logContent = FileUtils.readFileToString(logFile); + String[] logContent = FileUtils.readFileToString(logFile).split("\n"); - boolean containsError - = logContent.contains("ERROR") - || logContent.contains("SEVERE") - || logContent.contains("Exception "); - - //There is expected string "Exception" in server log: Adding provider - //singleton org.keycloak.services.resources.ModelExceptionMapper - if (containsError) { - throw new RuntimeException(String.format("Server log file contains ERROR: '%s'", logFile.getPath())); + for (String log : logContent) { + boolean containsError = log.contains("ERROR") || log.contains("SEVERE") || log.contains("Exception "); + //There is expected string "Exception" in server log: Adding provider + //singleton org.keycloak.services.resources.ModelExceptionMapper + if (containsError) { + boolean ignore = false; + for (String i : IGNORED) { + if (log.matches(i)) { + ignore = true; + break; + } + } + if (!ignore) { + throw new RuntimeException(String.format("Server log file contains ERROR: '%s'", log)); + } + } } + } public static void checkJBossServerLog(String jbossHome) throws IOException {