-
-
Save reflexdemon/59f3e7d21f33455ab08844e783937dd5 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