forked from keycloak/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial support for running testsuite in BCFIPS approved mode
Closes keycloak#16429
- Loading branch information
Showing
8 changed files
with
102 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...rquillian/servers/auth-server/common/fips/README-keystores-format-conversion.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
How to convert keystores and truststores | ||
---------------------------------------- | ||
Magic command to import PKCS12 keystore to BCFKS | ||
|
||
``` | ||
keytool -importkeystore -srckeystore keycloak-fips.keystore.pkcs12 -destkeystore keycloak-fips.keystore.bcfks \ | ||
-srcstoretype PKCS12 -deststoretype BCFKS -deststorepass passwordpassword \ | ||
-providername BCFIPS \ | ||
-providerclass org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider \ | ||
-provider org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider \ | ||
-providerpath $MAVEN_REPO_HOME/org/bouncycastle/bc-fips/1.0.2.3/bc-fips-1.0.2.3.jar \ | ||
-J-Djava.security.properties=$KEYCLOAK_SOURCES/testsuite/integration-arquillian/servers/auth-server/common/fips/kc.keystore-create.java.security | ||
``` | ||
Default password is `passwordpassword`. | ||
|
||
When converting from `JKS` to `PKCS12` on non-FIPS host, only first 2 lines from this command are needed (no need to use BCFIPS provider). | ||
Original JKS keystore, which was used to create `PKCS12` (and transitively also `BCFKS`) keystore is [keycloak.jks](../keystore/keycloak.jks). | ||
Original JKS truststore is [keycloak.truststore](../keystore/keycloak.truststore). |
3 changes: 3 additions & 0 deletions
3
...e/integration-arquillian/servers/auth-server/common/fips/kc.keystore-create.java.security
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This property is needed when creating keystore with BCFIPS provider on FIPS enabled RHEL 8.6 due the issue https://bugzilla.redhat.com/show_bug.cgi?id=2155060 | ||
# once that is fixed in the OpenJDK, we should be good. | ||
securerandom.strongAlgorithms=PKCS11:SunPKCS11-NSS-FIPS |
Binary file added
BIN
+2.68 KB
...suite/integration-arquillian/servers/auth-server/common/fips/keycloak-fips.keystore.bcfks
Binary file not shown.
Binary file added
BIN
+214 KB
...ite/integration-arquillian/servers/auth-server/common/fips/keycloak-fips.truststore.bcfks
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters