Last active
May 18, 2023 16:49
-
-
Save timmc-edx/1d7df8d5eae588cf0d27b3dc6bc5466c to your computer and use it in GitHub Desktop.
Check that the JWT public keys are readable and identical across all of the configs, per environment.
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
grep -Prl 'JWT_PUBLIC_SIGNING_JWK_SET(?!.*\}\})' ~/edx-repos/*-internal | while IFS= read -r fp; do | |
cat -- "$fp" | yq '.. | .JWT_PUBLIC_SIGNING_JWK_SET? | select(. != null)' -r | jq . -c --sort-keys || echo "Error in file $fp" | |
done | sort | uniq -c | sort -rn | less -Sn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment