Skip to content

Run the project-level acceptance tests with workload identity federation - #122

Merged
rgarcia merged 2 commits into
mainfrom
hypeship/acceptance-workload-identity
Nov 25, 2026
Merged

rgarcia merged 2 commits into
mainfrom
hypeship/acceptance-workload-identity

Conversation

@rgarcia

@rgarcia rgarcia commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Three of the eight acceptance jobs no longer use the stored KERNEL_API_KEY secret: the profile, proxy and extension data sources. They move to a new project-level job that has id-token: write, exchanges the job's GitHub OIDC token for a Kernel access token, and passes it to the provider as its API key. The token lasts about five minutes and is limited to the acceptance project.

  • .github/workflows/acceptance.yml
    • new project-level job with those three matrix entries. It reads the rule ID from vars.KERNEL_FEDERATION_RULE_ID_ACCEPTANCE, takes KERNEL_PROJECT_ID from the token response so the tests use the project the token is bound to, compiles the tests before the exchange, and runs go test with a four-minute timeout because the token cannot be renewed mid-test;
    • durable-resource keeps the other five entries and is otherwise unchanged.
  • docs/acceptance.md describes the split.

The provider and the tests are unchanged. The job names shown in checks stay the same.

Why the other five stay on the key

  • Project, Project data source (its fixture creates a project) and Audit log export destination act on the organization. A federated token is limited to one project.
  • Telemetry destination: Kernel refuses telemetry destination changes from any credential that is limited to one project.
  • Browser pool uses a second project and acquires a browser from a pool, which a federated token cannot do.

Before merging

Acceptance runs on every push to main, so the three moved jobs fail until both exist:

  1. An enabled federation rule that accepts this repository, .github/workflows/acceptance.yml, refs/heads/main, and the push and workflow_dispatch events, with a policy that covers profiles, proxies and extensions in the acceptance project.
  2. The repository variable KERNEL_FEDERATION_RULE_ID_ACCEPTANCE set to the rule's ID.

To roll back, revert this PR; the secret is not removed.

Verification

  • The workflow parses, and the eight matrix entries are the same eight packages as before.
  • go test -run '^$' compiles the moved packages with no credentials set, and the exchange script returned a token and a project ID against a local stand-in for the runner's OIDC endpoint and the token endpoint.
  • Not run: the three moved jobs. They need the rule, and the rule accepts main only, so the first real run is the push that merges this.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 509713e. Configure here.

Comment thread .github/workflows/acceptance.yml Resolved
@rgarcia
rgarcia merged commit 5f07b80 into main Nov 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant