keycloak-scim/examples/fuse/external-config
2016-11-22 14:56:21 +01:00
..
src/main KEYCLOAK-2805 Minor changes - cleanup and docs 2016-05-05 22:55:53 +02:00
external-config-keycloak.json KEYCLOAK-905 Realm keys rotation support on adapters 2016-09-12 21:24:04 +02:00
pom.xml Bump version to 2.4.1.Final-SNAPSHOT 2016-11-22 14:56:21 +01:00
README.md KEYCLOAK-2805 Minor changes - cleanup and docs 2016-05-05 22:55:53 +02:00

Keycloak Example - Externalized keycloak.json

The following example was tested on JBoss Fuse 6.3 and shows a way to package an OSGi compatible .war file that does not include keycloak.json file in the .war archive but that automatically loads it based on a naming convention.

To enable the functionality you need to add this section to your web.xml:

    <context-param>
        <param-name>keycloak.config.resolver</param-name>
        <param-value>org.keycloak.adapters.osgi.PathBasedKeycloakConfigResolver</param-value>
    </context-param>

That component will use keycloak.config or karaf.etc java properties to look for a base folder to look for the configuration.

Inside one of those folders it will look for a file called <your_web_context>-keycloak.json.

For this example you need to copy the file external-config-keycloak.json to your JBoss Fuse etc/ folder.

Once you have done that and once you added feature keycloak-fuse-6.3-example (See here for more details), you can try to access the endpoint: http://localhost:8181/external-config/index.html