Skip to content

Commit 6087d3c

Browse files
committed
Clarify installation strategy
The provider won't be loaded when installed in the modules directory, but should be deployed by Keycloak Deployer. Updated README which contains updated instructions.
1 parent 29a1c48 commit 6087d3c

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This module depends on `de.mkammerer.argon2`, more can be found on the [GitHub Project](https://github.com/phxql/argon2-jvm).
33

44
## Dependency installation
5-
Build the project once with `mvn install`, this will generate the `target/jboss-modules/` directory, with two dependencies:
5+
Build the project once with `mvn install`, this will generate the `./target/jboss-modules/` directory, with two dependencies:
66
* de.mkammerer.argon2-jvm
77
* net.java.dev.jna
88

@@ -13,10 +13,13 @@ layers=keycloak,custom
1313

1414
And create the directory in `./modules/`:
1515
```
16-
mkdir -p ./modules/system/layers/custom
16+
mkdir -p ./modules/system/layers/custom;
1717
```
1818

19-
Now simply copy the 2 jboss modules folders into the `custom` directory in Keycloak modules.
19+
Now simply copy the 2 dependencies (generated in `./target/jboss-modules`) folders into the `custom` directory in Keycloak modules, e.g.:
20+
```
21+
cp -R ./target/jboss-modules/de ./target/jboss-modules/net /opt/keycloak/modules/system/layers/custom/;
22+
```
2023

2124
# System Dependencies
2225
When running Keycloak on CentOS 7 (or another EL7), install argon2 system library:
@@ -27,8 +30,13 @@ yum install -y argon2;
2730

2831
Once this is complete, restart Keycloak.
2932

30-
# Module deployment
31-
Once the dependencies are in order, you can deploy the module either via the `modules` directory, or hot deployment.
33+
# Provider deployment
34+
Once the dependencies are in order, the provider can be deployed by the [Keycloak Deployer](https://www.keycloak.org/docs/latest/server_development/index.html#using-the-keycloak-deployer), e.g.:
35+
```
36+
cp ./target/argon2-password-hash-provider-9.0.0.jar /opt/keycloak/standalone/deployments/;
37+
```
38+
39+
Keycloak will then load the provider when started (it also supports hot-deployments).
3240

3341
# Keycloak configuration
3442
Finally, in the Keycloak realm of your choosing, activate the Argon2 password hashing via:

0 commit comments

Comments
 (0)