-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1351 from gtroitsk/oidc-client-mtls-pkcs12-fips
Enable OIDC mTLS tests on OpenJDK 17 and FIPS using PKCS12 keystore
- Loading branch information
Showing
7 changed files
with
72 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# PKCS12 keystore and truststore generation for server and client | ||
|
||
|
||
1. Create a keystore for the client | ||
|
||
`keytool -genkey -alias Client -validity 3650 -keyalg RSA -keystore client-keystore.p12 -keysize 2048 -storetype PKCS12 -storepass password -dname "cn=localhost, ou=QuarkusQE, o=Redhat, L=Brno, st=BR, c=CZ"` | ||
|
||
2. Export the public certificate of the client | ||
|
||
`keytool -export -keystore client-keystore.p12 -alias Client -file client.crt` | ||
|
||
3. Create a keystore for the server | ||
|
||
`keytool -genkey -alias Server -validity 3650 -keyalg RSA -keystore server-keystore.p12 -keysize 2048 -storetype PKCS12 -storepass password -dname "cn=localhost, ou=QuarkusQE, o=Redhat, L=Brno, st=BR, c=CZ"` | ||
|
||
4. Export the public certificate of the server | ||
|
||
`keytool -export -keystore server-keystore.p12 -alias Server -file server.crt` | ||
|
||
5. Create a truststore for the client | ||
|
||
`keytool -genkey -alias ClientTrust -validity 3650 -keyalg RSA -keystore client-truststore.p12 -keysize 2048 -storetype PKCS12 -storepass password -dname "cn=localhost, ou=QuarkusQE, o=Redhat, L=Brno, st=BR, c=CZ"` | ||
|
||
6. Create a truststore for the server | ||
|
||
`keytool -genkey -alias ServerTrust -validity 3650 -keyalg RSA -keystore server-truststore.p12 -keysize 2048 -storetype PKCS12 -storepass password -dname "cn=localhost, ou=QuarkusQE, o=Redhat, L=Brno, st=BR, c=CZ"` | ||
|
||
7. Import the client public certificate into the server truststore | ||
|
||
`keytool -import -keystore server-truststore.p12 -alias Client -file client.crt` | ||
|
||
8. Import the server public certificate into the client truststore | ||
|
||
`keytool -import -keystore client-truststore.p12 -alias Server -file server.crt` | ||
|
||
9. Delete the existing private key of the server truststore | ||
|
||
`keytool -delete -alias serverTrust -keystore server-truststore.p12 -storepass password` | ||
|
||
10. Delete the existing private key of the client truststore | ||
|
||
`keytool -delete -alias clientTrust -keystore client-truststore.p12 -storepass password` |
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
Binary file modified
BIN
+15 Bytes
(100%)
security/oidc-client-mutual-tls/src/main/resources/client-keystore.p12
Binary file not shown.
Binary file modified
BIN
+15 Bytes
(100%)
security/oidc-client-mutual-tls/src/main/resources/client-truststore.p12
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
Binary file modified
BIN
+15 Bytes
(100%)
security/oidc-client-mutual-tls/src/test/resources/server-keystore.p12
Binary file not shown.
Binary file modified
BIN
+31 Bytes
(100%)
security/oidc-client-mutual-tls/src/test/resources/server-truststore.p12
Binary file not shown.