.jks file in custom idP .jar?

Good afternoon,

I successfully created custom idP, which reads .jks file. Problem arises when I create JAR file: .jks file is not included in it.
Is it reasonable to put .jks file in a JAR file? If so, how to do it? Or should .jks file content be set as Base64 environmental variable instead?

Any suggestions, ideas?

I use it like this in my code:

KeyStore keyStore = KeyStore.getInstance(“JKS”);
keyStore.load(new FileInputStream(“keystore.jks”), PASSWORD);

at the moment

Both sound like reasonable approaches. Why not just try one? You could also mount the file in the /opt/keycloak/conf directory if you are using the Docker image.

1 Like