Sample Springboot Based Authentication Application leveraging SpringSecurity
Create Public and Private Keys
Create PrivateKey and Public Cert for 10 years
openssl req -newkey rsa:2048 -x509 -keyout cakey.pem -out cacert.pem -days 3650
Add the Key and Certificate in a JKS
- Step 1 : create PKCS12 using keys generated , -name is alias for private key
openssl pkcs12 -export -in cacert.pem -inkey cakey.pem -out identity-new.p12 -name "mykey"
- Step 2 : Import PKCS12 to JKS
keytool -importkeystore -destkeystore identity.jks -deststorepass password -srckeystore identity.p12 -srcstoretype PKCS12 -srcstorepass password
- Step 3 : Create a Truststore with Public key
keytool -import -file cacert.pem -keystore trust.jks -storepass password
###Authentication Controller Sequence Flows
I am using Junit5 dependency to run the tests
- For more info on ArchUnit --> https://www.archunit.org/
- Documentation --> https://www.archunit.org/userguide/html/000_Index.html