Created
December 3, 2025 22:18
-
-
Save Markbnj/fec52068fcc46c926efd754824ad98fb to your computer and use it in GitHub Desktop.
Github workflow step to dump an OIDC JWT
This file contains hidden or 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
| - name: Decode OIDC Token | |
| run: | | |
| # Request the OIDC token | |
| OIDC_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \ | |
| "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sts.amazonaws.com" | jq -r '.value') | |
| # Decode the JWT (it's base64url encoded) | |
| echo "=== OIDC Token Header ===" | |
| echo $OIDC_TOKEN | cut -d. -f1 | base64 -d 2>/dev/null | jq . | |
| echo "=== OIDC Token Payload ===" | |
| echo $OIDC_TOKEN | cut -d. -f2 | base64 -d 2>/dev/null | jq . | |
| env: | |
| ACTIONS_ID_TOKEN_REQUEST_TOKEN: ${{ env.ACTIONS_ID_TOKEN_REQUEST_TOKEN }} | |
| ACTIONS_ID_TOKEN_REQUEST_URL: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment