Created
February 11, 2018 05:45
-
-
Save bijukunjummen/cd8db7b93b1cf347c3e87bb74d718ce2 to your computer and use it in GitHub Desktop.
Generate a Signing Key and Verification Key for Cloud Foundry UAA
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
#!/bin/bash | |
openssl genrsa -out privkey.pem 2048 | |
openssl rsa -pubout -in privkey.pem -out pubkey.pem | |
SIGNING_KEY=$(cat privkey.pem) | |
VERIFICATION_KEY=$(cat pubkey.pem) | |
JWT_SIGNING_KEYS=$(cat <<EOF | |
jwt: | |
token: | |
signing-key: | | |
$(echo "$SIGNING_KEY" | awk '{printf " %s\n", $0}') | |
verification-key: | | |
$(echo "$VERIFICATION_KEY" | awk '{printf " %s\n", $0}') | |
EOF | |
) | |
echo "$JWT_SIGNING_KEYS" > uaa_config.yml | |
rm privkey.pem | |
rm pubkey.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment