OIDC Federation - CI/CD用語集の定義
OIDC federationは、CI workflowが短命のOpenID Connectトークンをクラウドの資格情報と交換できるようにします。これにより、保存された秘密情報ではなく信頼関係がアクセスを認可します。クラウドは、roleを付与する前にトークンの発行者とclaimを検証します。
秘密情報を排除する理由
長命のクラウドキーをCIのsecretsに保存する代わりに、プロバイダー(例えばAWS IAM)はGitHubのOIDC発行者を信頼し、subとrepositoryのclaimが設定された条件に一致するトークンにのみroleを付与します。静的なものは何も保存されません。
AWSの例
.github/workflows/ci.yml
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/ci-deploy
aws-region: us-east-1
permissions:
id-token: write関連ガイド
Workload Identity - CI/CD Glossary DefinitionWorkload Identity: Workload identity is the broad pattern of giving a running workload (a CI job, a pod, a fu…
Secret Rotation - CI/CD Glossary DefinitionSecret Rotation: Secret rotation is the practice of replacing credentials (tokens, keys, passwords) on a regu…
Least Privilege - CI/CD Glossary DefinitionLeast Privilege: Least privilege is the principle that an identity (user, service, or CI job) should hold onl…