Wildfly 8 AdapterWildfly Adapter Installation
The Wildfly 8 Adapter is contained in the Keycloak distribution within the adapters/keycloak-wildfly-adapter-dist.zip
file. To install it:
$ cd $WILDFLY_HOME
$ unzip keycloak-wildfly-adapter-dist.zip
This zip file creates new JBoss Modules specific to the Wildfly Keycloak Adapter within your Wildfly distro.
Wildfly 8 Adapter Configuration
The Wildfly 8 Adapter is enabled per WAR application. The adapter code is contained in a JBoss Module
so you must first create a jboss-deployment-structure.xml within your WAR's
WEB-INF directory that imports the Wildfly Keycloak Adapter.
]]>
It is possible to add the adapter jars directory to your WAR, but its best to do module imports because
the adapter's dependencies may conflict with your application's.
After creating the jboss-deployment-structure.xml configuration file, you must create
a keycloak.json adapter config file within the WEB-INF directory
of your WAR. The format of this config file is describe in the general adapter configuration
section.
Finally you must set the auth-method to KEYCLOAK in web.xml. You also
have to use standard servlet security to specify role-base constraints on your URLs. Here's an example
pulled from one of the examples that comes distributed with Keycloak.
customer-portalAdmins/admin/*adminCustomers/customers/*user/*CONFIDENTIALKEYCLOAKthis is ignored currently/realm-name>
adminuser
]]>
]