Created
September 2, 2025 23:44
-
-
Save Recodify/f0f6785a58df630606778be873e74027 to your computer and use it in GitHub Desktop.
Dump OpenId Connect Token Claims From Github Action
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
## Useful for debugging aws deploy role/perm issues | |
- name: Dump OIDC token claims | |
id: oidc | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const token = await core.getIDToken('sts.amazonaws.com'); | |
const payload = JSON.parse(Buffer.from(token.split('.')[1], 'base64').toString()); | |
core.info(`sub=${payload.sub}`); | |
core.info(`aud=${payload.aud}`); | |
core.info(`repository=${payload.repository}`); | |
core.info(`ref=${payload.ref}`); | |
core.info(`job_workflow_ref=${payload.job_workflow_ref}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment