[keycloak-dev] Propagating system props to keycloak.json on WildFly

Tomas Kyjovsky tkyjovsk at redhat.com
Mon Jun 15 13:14:03 EDT 2015


While working on arquillian adapter tests I hit a problem when deploying some of the test servlets to standalone WF.

The original AdapterTest sets some system props that are later used by "session-portal" and "input-portal": [1-3].

AdapterTest.java:
// Test that replacing system properties works for adapters
   System.setProperty("app.server.base.url", "http://localhost:8081");
   System.setProperty("my.host.name", "localhost");

App's keycloak.json:
  "auth-server-url" : "http://${my.host.name}:8081/auth",


While this works on embedded container, with a standalone WF I get this error during deployment:

   IllegalArgumentException: Illegal character in authority at index 7: http://${my.host.name}:8180/auth

Any ideas on how to proceed?
Do I just need to set the actual values in keycloak.json before test as it is done for the other test apps?


Regards,
Tomas


[1] https://github.com/keycloak/keycloak/blob/master/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTest.java#L81
[2] https://github.com/keycloak/keycloak/blob/master/testsuite/integration/src/test/resources/adapter-test/session-keycloak.json#L5
[3] https://github.com/keycloak/keycloak/blob/master/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/InputServlet.java#L18
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stack-trace.txt
Url: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20150615/f6078097/attachment.txt 


More information about the keycloak-dev mailing list