I've created a global JKS that has "changeme" as the keystore password. I created the JKS using the Keystore Explorer.
The idea behind using the global JKS is that apps can pull down the JKS from S3 and then reset the JKS with their own string password. We do alot of SpringBoot APIs and we use the JKSs to secure Tomcat in the container so we can get HTTPS connected.
But here's the problem I'm running into, when I change the JKS keystore password I start getting java.security.UnrecoverableKeyException: Cannot recover key
errors being thrown.
In the Keystore Explorer I didn't specify a password for the alias. When I go into the Keystore Explorer to change the alias password, it accepts "changeme" as the password. So, I assume the Keystore Explorer is automatically using changeme as the password since I supplied it for the JKS keystore password.
Admittedly, I'm no expert with using JKS and understanding the intricacies of security but this one has me stumped.
I've also tried changing both the keystore password with the Keytool using the following command:
keytool -storepasswd -keystore myJKS.jks
and
keytool -keypasswd -alias myalias -keystore myJKS.jks
But when I try to change the alias I get:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
What am I doing wrong?
Thanks