<div dir="ltr"><div><div><div>Hi,<br><br></div><div>Is it possible to use property placeholders in policy configuration. The property placeholders should be evaluated at runtime based on a Java system property.<br><br>For example.<br>I have configured the realm property in the Keycloak Oauth policy to be:<br><a href="http://localhost:8080/auth/realms/apiman">http://localhost:8080/auth/realms/apiman</a><br><br></div><div>But instead of setting protocol://host:port hardcoded I want to use something like:<br></div><div>{{protocol}}://{{host}:{port}/auth/realms/apiman<br></div><div>or<br></div><div>{{baseUrl}}/auth/realms/apiman<br><br></div><div>The reason I want to use property placeholders is because of our Docker build.<br></div><div>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.<br></div><div><br></div>In particular. The Keycloak OAuth policy is complaining as follows:<br><pre style="background-color:rgb(221,221,221);border:1px solid rgb(204,204,204);padding:10px" id="output">{
"type": "Authentication",
"failureCode": 11004,
"responseCode": 401,
"message": "Token audience doesn't match domain. Token issuer is <a href="http://192.168.99.100:8080/auth/realms/apiman">http://192.168.99.100:8080/auth/realms/apiman</a>, but URL from configuration is <a href="http://localhost:8080/auth/realms/apiman">http://localhost:8080/auth/realms/apiman</a>",
"headers": {}
}</pre>I hope to solve this by using property placeholders which evaluate at runtime using a system property.<br><br></div>Regards,<br><br></div>Ton<br><div><div><div><div><div><br><div><br></div></div></div></div></div></div></div>