<div dir="ltr"><div><div><div>Keycloak Users,<br><br></div>I am attempting to configure Keycloak with Tomcat 8 and have deployed the following:<br><br></div>/WEB-INF/web.xml<br>&lt;web-app xmlns=&quot;<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a>&quot;<br>xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>xsi:schemaLocation=&quot;<a href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</a> <a href="http://java.sun.com/">http://java.sun.com/</a><br>xml/ns/javaee/web-app_3_0.xsd&quot;<br>version=&quot;3.0&quot;&gt;<br>&lt;module-name&gt;customer-portal&lt;/module-name&gt;<br>&lt;security-constraint&gt;<br>&lt;web-resource-collection&gt;<br>&lt;web-resource-name&gt;mprworktrac&lt;/web-resource-name&gt;<br>&lt;url-pattern&gt;/mprworktrac&lt;/url-pattern&gt;<br>&lt;/web-resource-collection&gt;<br>&lt;auth-constraint&gt;<br>&lt;role-name&gt;user&lt;/role-name&gt;<br>&lt;/auth-constraint&gt;<br>&lt;/security-constraint&gt;<br>&lt;security-constraint&gt;<br>&lt;web-resource-collection&gt;<br>&lt;url-pattern&gt;/mprworktrac&lt;/url-pattern&gt;<br>&lt;/web-resource-collection&gt;<br>&lt;user-data-constraint&gt;<br>&lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;<br>&lt;/user-data-constraint&gt;<br>&lt;/security-constraint&gt;<br>&lt;login-config&gt;<br>&lt;auth-method&gt;BASIC&lt;/auth-method&gt;<br>&lt;realm-name&gt;this is ignored currently&lt;/realm-name&gt;<br>&lt;/login-config&gt;<br>&lt;security-role&gt;<br>&lt;role-name&gt;admin&lt;/role-name&gt;<br>&lt;/security-role&gt;<br>&lt;security-role&gt;<br>&lt;role-name&gt;user&lt;/role-name&gt;<br>&lt;/security-role&gt;<br>&lt;/web-app&gt;<br><br></div>/META-INF/content.xml<br>&lt;Context path=&quot;/mprworktrac&quot;&gt;<br>&lt;Valve className=&quot;org.keycloak.adapters.tomcat.KeycloakAuthenticatorValve&quot;/&gt;<br>&lt;/Context&gt;<br><br><br clear="all"><div><div><div><div><div>/WEB-INF/keyloak.json<br>{<br>&quot;realm&quot; : &quot;worktrac&quot;,<br>&quot;resource&quot; : &quot;customer-portal&quot;,<br>&quot;realm-public-key&quot; : &quot;MIGfMA0GCSqGSIb3D...31LwIDAQAB&quot;,<br>&quot;auth-server-url&quot; : &quot;<a href="https://localhost:8443/auth">https://localhost:8443/auth</a>&quot;,<br>&quot;ssl-required&quot; : &quot;external&quot;,<br>&quot;use-resource-role-mappings&quot; : false,<br>&quot;enable-cors&quot; : true,<br>&quot;cors-max-age&quot; : 1000,<br>&quot;cors-allowed-methods&quot; : [ &quot;POST&quot;, &quot;PUT&quot;, &quot;DELETE&quot;, &quot;GET&quot; ],<br>&quot;bearer-only&quot; : false,<br>&quot;expose-token&quot; : true,<br>&quot;credentials&quot; : {<br>&quot;secret&quot; : &quot;234234-234234-234234&quot;<br>},<br>&quot;connection-pool-size&quot; : 20,<br>&quot;disable-trust-manager&quot;: false,<br>&quot;allow-any-hostname&quot; : false,<br>&quot;truststore&quot; : &quot;/opt/keycloak-appliance-dist-all-1.1.0.Final/keycloak/standalone/configuration/secret.jks&quot;,<br>&quot;truststore-password&quot; : &quot;secret&quot;,<br>&quot;client-keystore&quot; : &quot;/opt/keycloak-appliance-dist-all-1.1.0.Final/keycloak/standalone/configuration/secret.jks&quot;,<br>&quot;client-keystore-password&quot; : &quot;secret&quot;,<br>&quot;client-key-password&quot; : &quot;secret&quot;<br>}<br><br></div><div>Extracted keycloak-tomcat8-adapter-dist-1.1.0.Final.zip to $CATALINA_HOME/lib<br></div><div><br></div><div>I receive the following in catalina.out on startup:<br>java.lang.RuntimeException: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token<br> at [Source: java.io.FileInputStream@7ff0e2e8; line: 9, column: 22] (through reference chain: org.keycloak.representations.adapters.config.AdapterConfig[&quot;cors-allowed-methods&quot;])<br>    at org.keycloak.adapters.KeycloakDeploymentBuilder.loadAdapterConfig(KeycloakDeploymentBuilder.java:104)<br>    at org.keycloak.adapters.KeycloakDeploymentBuilder.build(KeycloakDeploymentBuilder.java:93)<br>    at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.keycloakInit(AbstractKeycloakAuthenticatorValve.java:116)<br>    at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.lifecycleEvent(AbstractKeycloakAuthenticatorValve.java:65)<br>    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)<br>    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)<br>    at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)<br>    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168)<br>    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)<br>    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)<br>    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)<br>    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1069)<br>    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1719)<br>    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)<br>    at java.util.concurrent.FutureTask.run(FutureTask.java:266)<br>    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>    at java.lang.Thread.run(Thread.java:745)<br>Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token<br> at [Source: java.io.FileInputStream@7ff0e2e8; line: 9, column: 22] (through reference chain: org.keycloak.representations.adapters.config.AdapterConfig[&quot;cors-allowed-methods&quot;])<br>    at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163)<br>    at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:219)<br>    at org.codehaus.jackson.map.deser.std.StringDeserializer.deserialize(StringDeserializer.java:44)<br>    at org.codehaus.jackson.map.deser.std.StringDeserializer.deserialize(StringDeserializer.java:13)<br>    at org.codehaus.jackson.map.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:299)<br>    at org.codehaus.jackson.map.deser.SettableBeanProperty$MethodProperty.deserializeAndSet(SettableBeanProperty.java:414)<br>    at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:697)<br>    at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)<br>    at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732)<br>    at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1909)<br>    at org.keycloak.adapters.KeycloakDeploymentBuilder.loadAdapterConfig(KeycloakDeploymentBuilder.java:102)<br>    ... 17 more<br><br></div><div>Your help is greatly appreciated as I am excited to get this working :-)<br></div><div><br></div><div>-- <br><div class="gmail_signature">Chris Wallace<br><a href="mailto:cjwallac@gmail.com" target="_blank">cjwallac@gmail.com</a><br></div>
</div></div></div></div></div></div>