[keycloak-dev] Provider modules

Bill Burke bburke at redhat.com
Tue Jan 20 11:15:55 EST 2015



On 1/20/2015 10:54 AM, Stian Thorgersen wrote:
> As I said to make sure we're all on the same page here's my view on what we've just discussed:
>
> 1. A user creates a module for the provider
> 2. The user copies the module into '/modules'
> 3. The user registers the module with the auth-server subsystem. This can be done either by directly editing standalone.xml or through CLI. Example snippet from standalone.xml would look like:
>
>      <subsystem xmlns="urn:jboss:domain:keycloak:1.0">
>          <auth-server name="main-auth-server">
>              <enabled>true</enabled>
>              <web-context>auth</web-context>
>              <providers>
>                  <module name="org.acme.userprovider" />
>                  <module name="org.acme.anotherprovider" />
>              </providers>
>          </auth-server>
>      </subsystem>
>
> 4. When a new provider module is registered Keycloak would need to be reloaded
>

Don't you have to restart the entire server if you add a new module?


This should work too, with no code changes, no funky classloading:

1. Move all keycloak archives to modules
2. add jboss-deployment-structure.xml to embedded WAR
3. add a "keycloak-providers" module that only contains a module.xml 
definition
4. User creates a module for the provider
5. User edits keycloak-providers module.xml file importing the user module
6. restart server.



-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-dev mailing list