Example application for using Keycloak
Steps to setup:
- Download the tar.gz / zip
- extract it
- find the line containing 'port-offset="${jboss.socket.binding.port-offset:0}"'
- change ':0' into ':500'
- now you can start the server using either Eclipse (add a server) or manually by using ./bin/standalone.sh in the WildFly-home-dir
Steps to setup:
- download Keycloak 1.9.1
- extract it
- start it using ./bin/standalone.sh
- visit http://localhost:8080/auth
- add admin-user as requested
- visit the admin-page from the main page (http://localhost:8080/auth/admin/)
- Add a realm
- select the file 'keycloak-realm.json' for import
- select 'Create'
Steps to setup:
- download the adapter for WildFly (keycloak-wildfly-adapter-dist-1.9.1.Final.tar.gz)
- extract it in the WildFly dir created above
- add the items mentioned in the manual (8.2.1. Adapter Installation) to you ./standalone/configuration/standalone.xml
<server xmlns="urn:jboss:domain:1.4">
<extensions>
<extension module="org.keycloak.keycloak-adapter-subsystem"/>
...
</extensions>
<profile>
<subsystem xmlns="urn:jboss:domain:keycloak:1.1"/>
...
</profile>
<subsystem xmlns="urn:jboss:domain:security:1.2">
<security-domains>
...
<security-domain name="keycloak">
<authentication>
<login-module code="org.keycloak.adapters.jboss.KeycloakLoginModule"
flag="required"/>
</authentication>
</security-domain>
</security-domains>
Note: the cli-scripts have not worked for me.
Check that the REST-API is still accesable: http://localhost:8580/kiteclub/rest/kites should yield nice json.
The article speaks about the theme. Due to an upgrade of Keycloak (from 1.6.0 to 1.9.1) the themes dir hase been moved from ‘standalone/configuration/themes’ to ‘themes’. The theme can be set in the admin page http://localhost:8080/auth/admin/master/console/#/realms/J-Fall-2015/theme-settings.
Note: in the article steps are given to start the ApacheDS LDAP-server using docker. These are hard to copy. Here are the steps in a copyable fashion:
docker run \
-e "DOMAIN_NAME=first8" \
-e "DOMAIN_SUFFIX=nl" \
--name apacheds -d -p 10389:10389 \
-v /path/to/first8.nl.ldif:/tmp/first8.nl.ldif:ro \
jjhughes57/apacheds-docker
docker exec -i -t apacheds bash
ldapmodify -c -a \
-f /tmp/first8.nl.ldif \
-h localhost -p 10389 \
-D "uid=admin,ou=system" -w secret