<div dir="ltr">Hi Tim, <div><br></div><div>Check the Realm in <span style="color:rgb(51,51,51);font-family:&#39;Open Sans&#39;,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.1">Keycloak OAuth Policy Configuration page it should match the one in the token. </span></div><div><span style="color:rgb(51,51,51);font-family:&#39;Open Sans&#39;,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.1"><br></span></div><div><span style="color:rgb(51,51,51);font-family:&#39;Open Sans&#39;,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.1">i hope this help. </span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 12, 2015 at 7:43 AM, Tim Dudgeon <span dir="ltr">&lt;<a href="mailto:tdudgeon.ml@gmail.com" target="_blank">tdudgeon.ml@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I&#39;ve been following this blog on using the OAuth policy:<br>
<a href="http://www.apiman.io/blog/gateway/security/oauth2/keycloak/authentication/authorization/2015/06/09/keycloak-oauth2.html" rel="noreferrer" target="_blank">http://www.apiman.io/blog/gateway/security/oauth2/keycloak/authentication/authorization/2015/06/09/keycloak-oauth2.html</a><br>
<br>
When I do this with Apiman running in a Docker container<br>
(jboss/apiman-wildfly from Dockerhub) I&#39;m getting an error when I try to<br>
access the echo service:<br>
<br>
$ curl -k -H &quot;Authorization: Bearer eyJhbGciO...&lt;snip&gt;&quot; -s<br>
<a href="https://192.168.59.103:8443/apiman-gateway/Newcastle/EchoService/1.0" rel="noreferrer" target="_blank">https://192.168.59.103:8443/apiman-gateway/Newcastle/EchoService/1.0</a> | jq<br>
{<br>
   &quot;type&quot;: &quot;Authentication&quot;,<br>
   &quot;failureCode&quot;: 11004,<br>
   &quot;responseCode&quot;: 401,<br>
   &quot;message&quot;: &quot;Token audience doesn&#39;t match domain. Token issuer is<br>
<a href="http://192.168.59.103:8080/auth/realms/stottie" rel="noreferrer" target="_blank">http://192.168.59.103:8080/auth/realms/stottie</a>, but URL from<br>
configuration is <a href="http://127.0.0.1:8080/auth/realms/stottie" rel="noreferrer" target="_blank">http://127.0.0.1:8080/auth/realms/stottie</a>&quot;,<br>
   &quot;headers&quot;: {}<br>
}<br>
$<br>
<br>
(192.168.59.103 is the IP address of the Docker host running in<br>
Boot2Docker).<br>
Any ideas where the wrong &quot;URL from configuration&quot; part is coming from?<br>
<br>
Tim<br>
_______________________________________________<br>
Apiman-user mailing list<br>
<a href="mailto:Apiman-user@lists.jboss.org">Apiman-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/apiman-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/apiman-user</a><br>
</blockquote></div><br></div>