Skip to content

Instantly share code, notes, and snippets.

@timmc-edx
Last active May 18, 2023 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timmc-edx/1d7df8d5eae588cf0d27b3dc6bc5466c to your computer and use it in GitHub Desktop.
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.
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