[Apiman-user] Using property placeholder in policy configuration which evaluate at runtime using system properties

Ton Swieb ton at finalist.nl
Wed Dec 9 14:31:56 EST 2015


Hi Eric,

That would be great.
I created: https://issues.jboss.org/browse/APIMAN-831 and
https://issues.jboss.org/browse/APIMAN-832

The last one is a seperate issue for property placeholders in the gateway
configuration endpoint.

Regards,

Ton


2015-12-09 17:35 GMT+01:00 Eric Wittmann <eric.wittmann at redhat.com>:

> Unfortunately that isn't currently supported.  However it would be a
> relatively simple feature to add.  Perhaps you could submit a JIRA feature
> request?  If you do I'm sure we can have that included in 1.2.0.Final (due
> by the end of the month).
>
> -Eric
>
> On 12/9/2015 11:19 AM, Ton Swieb wrote:
>
>> Hi,
>>
>> Is it possible to use property placeholders in policy configuration. The
>> property placeholders should be evaluated at runtime based on a Java
>> system property.
>>
>> For example.
>> I have configured the realm property in the Keycloak Oauth policy to be:
>> http://localhost:8080/auth/realms/apiman
>>
>> But instead of setting protocol://host:port hardcoded I want to use
>> something like:
>> {{protocol}}://{{host}:{port}/auth/realms/apiman
>> or
>> {{baseUrl}}/auth/realms/apiman
>>
>> The reason I want to use property placeholders is because of our Docker
>> build.
>> The Docker image is setup with a preconfigured Apiman installation. So
>> the image already has some service published an policies applied. Only
>> when building the image it is unknown on which host the image will run.
>>
>> In particular. The Keycloak OAuth policy is complaining as follows:
>>
>> {
>>    "type": "Authentication",
>>    "failureCode": 11004,
>>    "responseCode": 401,
>>    "message": "Token audience doesn't match domain. Token issuer ishttp://
>> 192.168.99.100:8080/auth/realms/apiman, but URL from configuration
>> ishttp://localhost:8080/auth/realms/apiman",
>>    "headers": {}
>> }
>>
>> I hope to solve this by using property placeholders which evaluate at
>> runtime using a system property.
>>
>> Regards,
>>
>> Ton
>>
>>
>>
>>
>> _______________________________________________
>> Apiman-user mailing list
>> Apiman-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/apiman-user
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20151209/21e4c9d4/attachment-0001.html 


More information about the Apiman-user mailing list