Skip to content

Instantly share code, notes, and snippets.

@timmc-edx
Last active May 18, 2023 16:49
Show Gist options
  • Select an option

  • Save timmc-edx/1d7df8d5eae588cf0d27b3dc6bc5466c to your computer and use it in GitHub Desktop.

Select an option

Save timmc-edx/1d7df8d5eae588cf0d27b3dc6bc5466c to your computer and use it in GitHub Desktop.

Revisions

  1. timmc-edx revised this gist May 18, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion check-jwt-keys.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    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 | grep lmsstage002
    done | sort | uniq -c | sort -rn | less -Sn
  2. timmc-edx revised this gist May 18, 2023. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion check-jwt-keys.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,3 @@
    ack -l .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
    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 | grep lmsstage002
  3. timmc-edx created this gist May 18, 2023.
    1 change: 1 addition & 0 deletions check-jwt-keys.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ack -l .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