<div dir="ltr"><div>Thanks for the info.</div><div><br></div>I&#39;ve tried configuring cors-exposed-headers in a JBOSS EAP 6 adapter like this:<div><br></div><div>keycloak.json:</div><div>{</div><div>...</div><div>















<p class="">  &quot;enable-<span class="">cors</span>&quot; : true,</p><p class="">  &quot;<span class="">cors</span>-allowed-methods&quot; : &quot;POST,PUT,DELETE,GET&quot;,</p>
<p class="">  &quot;<span class="">cors</span>-allowed-headers&quot; : &quot;Accept,Content-Type,If-Match,If-None-Match,Origin&quot;,</p>
<p class="">  &quot;<span class="">cors</span>-exposed-headers&quot; : &quot;ETag,Location&quot;,</p><p class="">...</p><p class="">}</p><p class=""><br></p><p class="">But the adapter does not recognise this config and fails to start:</p><p class=""><span class="">10:57:15,923 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 69) JBWEB001097: Error starting context /data: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field &quot;cors-exposed-headers&quot; (class org.keycloak.representations.adapters.config.AdapterConfig), not marked as ignorable (32 known properties: &quot;ssl-required&quot;, &quot;cors-allowed-headers&quot;, &quot;register-node-period&quot;, &quot;turn-off-change-session-id-on-login&quot;, &quot;truststore&quot;, &quot;always-refresh-token&quot;, &quot;client-key-password&quot;, &quot;policy-enforcer&quot;, &quot;token-store&quot;, &quot;resource&quot;, &quot;realm&quot;, &quot;proxy-url&quot;, &quot;disable-trust-manager&quot;, &quot;bearer-only&quot;, &quot;truststore-password&quot;, &quot;use-resource-role-mappings&quot;, &quot;connection-pool-size&quot;, &quot;client-keystore&quot;, &quot;register-node-at-startup&quot;, &quot;client-keystore-password&quot;, &quot;auth-server-url&quot;, &quot;cors-allowed-methods&quot;, &quot;public-client&quot;, &quot;expose-token&quot;, &quot;token-minimum-time-to-live&quot;, &quot;enable-basic-auth&quot;, &quot;cors-max-age&quot;, &quot;enable-cors&quot;, &quot;allow-any-hostname&quot;, &quot;realm-public-key&quot;, &quot;credentials&quot;, &quot;principal-attribute&quot;])</span></p><p class=""><span class=""> at [Source: java.io.ByteArrayInputStream@67593e31; line: 14, column: 29] (through reference chain: org.keycloak.representations.adapters.config.AdapterConfig[&quot;cors-exposed-headers&quot;])</span></p><p class=""><span class=""><span class="">        </span>at org.keycloak.adapters.KeycloakDeploymentBuilder.loadAdapterConfig(KeycloakDeploymentBuilder.java:137) [keycloak-adapter-core-2.0.0.Final.jar:2.0.0.Final]</span></p><p class=""><span class=""><span class="">        </span>at org.keycloak.adapters.KeycloakDeploymentBuilder.build(KeycloakDeploymentBuilder.java:126) [keycloak-adapter-core-2.0.0.Final.jar:2.0.0.Final]</span></p><p class=""><span class=""><span class="">        </span>at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.keycloakInit(AbstractKeycloakAuthenticatorValve.java:133) [keycloak-tomcat-core-adapter-2.0.0.Final.jar:2.0.0.Final]</span></p><p class=""><span class=""><span class="">        </span>at org.keycloak.adapters.tomcat.AbstractKeycloakAuthenticatorValve.lifecycleEvent(AbstractKeycloakAuthenticatorValve.java:75) [keycloak-tomcat-core-adapter-2.0.0.Final.jar:2.0.0.Final]</span></p><p class=""><span class=""><span class="">        </span>at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]</span></p><p class=""><span class=""><span class="">        </span>at org.apache.catalina.core.StandardContext.start(StandardContext.java:3775) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]</span></p><p class=""><span class=""><span class="">        </span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.threads.JBossThread.run(JBossThread.java:122)</span></p><p class=""><span class="">Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field &quot;cors-exposed-headers&quot; (class org.keycloak.representations.adapters.config.AdapterConfig), not marked as ignorable (32 known properties: &quot;ssl-required&quot;, &quot;cors-allowed-headers&quot;, &quot;register-node-period&quot;, &quot;turn-off-change-session-id-on-login&quot;, &quot;truststore&quot;, &quot;always-refresh-token&quot;, &quot;client-key-password&quot;, &quot;policy-enforcer&quot;, &quot;token-store&quot;, &quot;resource&quot;, &quot;realm&quot;, &quot;proxy-url&quot;, &quot;disable-trust-manager&quot;, &quot;bearer-only&quot;, &quot;truststore-password&quot;, &quot;use-resource-role-mappings&quot;, &quot;connection-pool-size&quot;, &quot;client-keystore&quot;, &quot;register-node-at-startup&quot;, &quot;client-keystore-password&quot;, &quot;auth-server-url&quot;, &quot;cors-allowed-methods&quot;, &quot;public-client&quot;, &quot;expose-token&quot;, &quot;token-minimum-time-to-live&quot;, &quot;enable-basic-auth&quot;, &quot;cors-max-age&quot;, &quot;enable-cors&quot;, &quot;allow-any-hostname&quot;, &quot;realm-public-key&quot;, &quot;credentials&quot;, &quot;principal-attribute&quot;])</span></p><p class=""><span class=""> at [Source: java.io.ByteArrayInputStream@67593e31; line: 14, column: 29] (through reference chain: org.keycloak.representations.adapters.config.AdapterConfig[&quot;cors-exposed-headers&quot;])</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:817)</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:958)</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1324)</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1302)</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:249)</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136)</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3564)</span></p><p class=""><span class=""><span class="">        </span>at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2650)</span></p><p class=""><span class=""><span class="">        </span>at org.keycloak.adapters.KeycloakDeploymentBuilder.loadAdapterConfig(KeycloakDeploymentBuilder.java:135) [keycloak-adapter-core-2.0.0.Final.jar:2.0.0.Final]</span></p><p class=""><span class=""><span class="">        </span>... 14 more</span></p><p class=""><span class=""></span><br></p><p class=""><span class="">10:57:15,973 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 69) JBWEB001103: Error detected during context /data start, will stop it</span></p><p class=""><span class="">10:57:15,985 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 69) MSC000001: Failed to start service jboss.web.deployment.default-host./data: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./data: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:99)</span></p><p class=""><span class=""><span class="">        </span>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.threads.JBossThread.run(JBossThread.java:122)</span></p><p class=""><span class="">Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:168)</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61)</span></p><p class=""><span class=""><span class="">        </span>at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)</span></p><p class=""><span class=""><span class="">        </span>... 6 more</span></p><p class=""><span class=""></span><br></p><p class=""><span class="">10:57:16,019 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation (&quot;deploy&quot;) failed - address: ([(&quot;deployment&quot; =&gt; &quot;webims-jcom-data-1.3.1-SNAPSHOT-secure-keycloak.war&quot;)]) - failure description: {&quot;JBAS014671: Failed services&quot; =&gt; {&quot;jboss.web.deployment.default-host./data&quot; =&gt; &quot;org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./data: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context</span></p><p class="">






















































</p><p class=""><span class="">    Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context&quot;}}</span></p><p class=""><br></p><p class=""><br></p></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 9, 2016 at 7:38 AM, Bruno Oliveira <span dir="ltr">&lt;<a href="mailto:bruno@abstractj.org" target="_blank">bruno@abstractj.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As far as I can tell, yes.<br>
<br>
See:<br>
<a href="https://keycloak.gitbooks.io/server-adminstration-guide/content/topics/clients/client-oidc.html" rel="noreferrer" target="_blank">https://keycloak.gitbooks.io/server-adminstration-guide/content/topics/clients/client-oidc.html</a><br>
<a href="https://github.com/keycloak/keycloak/blob/5c98b8c6ae7052b2d906156d8fc212ccd9dfd57d/services/src/main/java/org/keycloak/services/resources/Cors.java#L143" rel="noreferrer" target="_blank">https://github.com/keycloak/keycloak/blob/5c98b8c6ae7052b2d906156d8fc212ccd9dfd57d/services/src/main/java/org/keycloak/services/resources/Cors.java#L143</a><br>
<div><div class="h5"><br>
On 2016-07-08, Hubert Przybysz wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Is configuration of CORS Access-Control-Expose-Headers supported in<br>
&gt; 2.0.0.Final adapters?<br>
&gt;<br>
&gt; Best regards / Hubert.<br>
<br>
</div></div>&gt; _______________________________________________<br>
&gt; keycloak-user mailing list<br>
&gt; <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
<br>
<br>
--<br>
<br>
abstractj<br>
PGP: 0x84DC9914<br>
</blockquote></div><br></div>