Slide 97
Slide 97 text
守りかたの理解と実践
(参考) GitHub ActionsのOIDC Token
● Flow
● ID Tokenの構造 (repository: rung/actions-test, branch: test-run)
97
Actions ID Provider
curl -H "Authorization: bearer ${ACTIONS_ID_TOKEN_REQUEST_TOKEN}"
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience="
ID Token
Format: JWT(JWS)
Header: {"typ":"JWT","alg":"RS256","x5t":"...","kid":"..."}
Payload:
{"jti":"..."","sub":"repo:rung/actions-test:ref:refs/heads/test-run","aud":"","ref":"refs/heads/test-run","sha":"...","repo
sitory":"rung/actions-test","repository_owner":"rung","repository_owner_id":"...","run_id":"...","run_number":"...","run_attempt":"1"
,"repository_visibility":"private","repository_id":"...","actor_id":"...","actor":"rung","workflow":"...","head_ref":"","base_ref":""
,"event_name":"push","ref_type":"branch","job_workflow_ref":"rung/actions-test/.github/workflows/cron.yml@refs/heads/test-run","iss":
"https://token.actions.githubusercontent.com","nbf":...,"exp":<300sec>,"iat":...}
Spec of Claims
Configuring OpenID Connect in cloud providers - GitHub Docs