Last active
October 7, 2020 10:19
-
-
Save p-karanthaker/0878c227e9b02aa70eda36ead330ab26 to your computer and use it in GitHub Desktop.
Base64 encode an entire keystore to store within Hashicorp Vault kv store
This file contains hidden or 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
Creating a keystore with a keypair: | |
keytool -genkeypair -alias boguscert -storepass storePassword -keypass secretPassword -keystore emptyStore.keystore -dname "CN=Developer, OU=Department, L=City, ST=State, C=CA" | |
Deleting a keypair to make an empty keystore: | |
keytool -delete -alias boguscert -storepass storePassword -keystore emptyStore.keystore | |
Listing the keystore: | |
keytool -list -keystore emptyStore.keystore -storepass storePassword | |
Base64 encode the keystore (this can be stored within Vault): | |
openssl base64 -in emptyStore.keystore -out base64.keystore | |
Decode the keystore (for use outside of vault): | |
openssl base64 -d -in base64.keystore -out decoded.keystore | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment