<div dir="ltr"><div><div><div>Hi Eric,<br><br></div>I see in JIRA that you found the bug. Good catch. Thanks for the quick response.<br></div>Looking forward to Apiman v1.2.1.Final<br><br></div>Regards, Ton</div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-19 15:28 GMT+01:00 Eric Wittmann <span dir="ltr"><<a href="mailto:eric.wittmann@redhat.com" target="_blank">eric.wittmann@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, environment variables are expected to work. Let me write up a bug and I can look into the problem today.<br>
<br>
Note that this is the code being used to resolve a single property by key:<br>
<br>
<a href="https://github.com/apiman/apiman/blob/master/common/util/src/main/java/io/apiman/common/util/ApimanStrLookup.java" rel="noreferrer" target="_blank">https://github.com/apiman/apiman/blob/master/common/util/src/main/java/io/apiman/common/util/ApimanStrLookup.java</a><br>
<br>
Here is a JIRA issue for tracking purposes:<br>
<br>
<a href="https://issues.jboss.org/browse/APIMAN-904" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/APIMAN-904</a><br>
<br>
-Eric<br>
<br>
On 1/19/2016 5:44 AM, Ton Swieb wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I just tried it with a system property instead of a environment<br>
property. With a system property it works, but they are a bit cumbersome<br>
to supply to the apiman-wildfly docker image.<br>
Are environment variables expected to work?<br>
<br>
Regards, Ton<br>
<br>
<br>
<br>
2016-01-19 11:25 GMT+01:00 Ton Swieb <<a href="mailto:ton@finalist.nl" target="_blank">ton@finalist.nl</a><br>
<mailto:<a href="mailto:ton@finalist.nl" target="_blank">ton@finalist.nl</a>>>:<br>
<br>
Hi,<br>
<br>
I tried to take the property placeholder functionality for a test<br>
drive, which should be available as of v1.2.0.Final. See JIRA:<br>
<a href="https://issues.jboss.org/browse/APIMAN-831" rel="noreferrer" target="_blank">https://issues.jboss.org/browse/APIMAN-831</a><br>
<br>
But for some reason I do not get it to work. Did I configure<br>
something wrong or am I running into a bug?<br>
<br>
I use the property placeholder in the keycloak plugin which is<br>
preconfigured in a Docker image.<br>
I defined the realm property of the Keycloak plugin as<br>
${external_url}/auth/realms/apiman<br>
<br>
I started my Docker image with the -e<br>
external_url=<a href="https://192.168.99.100:8443" rel="noreferrer" target="_blank">https://192.168.99.100:8443</a> parameter to set the<br>
environment variable within the Docker container.<br>
<br>
When I try to access the API I get a failure in Keycloak Plugin saying:<br>
<br>
{<br>
"type": "Authentication",<br>
"failureCode": 11004,<br>
"responseCode": 401,<br>
"message": "Token audience doesn't match domain. Token issuer ishttps://<a href="http://192.168.99.100:8443/auth/realms/apiman" rel="noreferrer" target="_blank">192.168.99.100:8443/auth/realms/apiman</a>, but URL from configuration is ${external_url}/auth/realms/apiman",<br>
"headers": {}<br>
}<br>
<br>
It looks like the property placeholder did not get resolved correctly.<br>
<br>
When I have a look in the Docker image using docker exec -ti <name><br>
/binbash and do a list of the environment variables. The environment<br>
variable is correctly defined:<br>
MacBook-Pro-van-Ton:~ ton$ docker exec -ti tiny_wilson /bin/bash<br>
[jboss@43c099aae441 ~]$ export<br>
declare -x APIMAN_VERSION="1.2.0.Final"<br>
....<br>
declare -x external_url="<a href="https://192.168.99.100:8443" rel="noreferrer" target="_blank">https://192.168.99.100:8443</a>"<br>
<br>
I also tried setting the property to ${external_url} without the<br>
'/auth/realms/apiman' suffix. I figured that it might perhaps will<br>
do a full String comparison, but that did not work either.<br>
<br>
Any ideas?<br>
<br>
Regards, Ton<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Apiman-user mailing list<br>
<a href="mailto:Apiman-user@lists.jboss.org" target="_blank">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>
<br>
</blockquote>
</blockquote></div><br></div>