Skip to content

GH-50899: [CI][C++] Use OIDC instead of ACCESS_KEY and SECRET_KEY for sccache's s3 creds - #51028

Draft
paultiq wants to merge 1 commit into
apache:mainfrom
paultiq:oidc_credentials_sccache
Draft

GH-50899: [CI][C++] Use OIDC instead of ACCESS_KEY and SECRET_KEY for sccache's s3 creds#51028
paultiq wants to merge 1 commit into
apache:mainfrom
paultiq:oidc_credentials_sccache

Conversation

@paultiq

@paultiq paultiq commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR moves crossbow builds to short-lived S3 credentials. It does this via GitHub's OIDC provider and an AWS ROLE_ARN with a trust relationship configured. This configuration is detailed here:

The benefits of short-lived / temporary credentials discussed further here: AWS Well-architected Framework Best Practices SEC02-BP02 Use temporary credentials

sccache supports a variety of S3 creds: S3 credentials

What changes are included in this PR?

Use AssumeRoleWithWebIdentity for sccache S3 credentials.

By assuming the AWS_ROLE_ARN, the sccache session relies on credentials that expire*, issued only to workflows in the trusted repository, and scoped to the sccache bucket.

Specific tasks:

  • create a role in IAM with the bucket and object level permissions,
  • trust the github oidc-provider,
  • define AWS_ROLE_ARN and set id-token permission
  • grant sts:AssumeRoleWithWebIdentity for the specific repositories or organization.
  • pass AWS_SESSION_TOKEN
  • add a aws-actions/configure-aws-credentials@v4 step to the workflow.

Separately, someone will need to add the role and trust to AWS:

* I can share an example if needed

Are these changes tested?

Yes, locally and on a fork.

Are there any user-facing changes?

No

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50899 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions Bot added the awaiting review Awaiting review label Aug 28, 2026
@paultiq
paultiq marked this pull request as draft August 29, 2026 00:18
@paultiq

paultiq commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Per @kou 's comment #50899 (comment), leaving as draft.

I only made change to one workflow file. The other github.*.yml files will need the same change.

I tested this with archery crossbow submit test-ubuntu-24.04-cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review Awaiting review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant