Skip to content

fix(ci): load E2E role from Secrets Manager - #45

Closed
Hweinstock wants to merge 1 commit into
refactorfrom
fix/e2e-role-secret
Closed

Hweinstock wants to merge 1 commit into
refactorfrom
fix/e2e-role-secret

Conversation

@Hweinstock

@Hweinstock Hweinstock commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fetch E2E_AWS_ROLE_ARN from Secrets Manager inside each E2E matrix job.
  • Pass the fetched value to aws-actions/configure-aws-credentials@v6.
  • Clear the reader-role credentials before assuming the E2E execution role.
  • Remove the dependency on the unverified vars.E2E_ROLE_ARN configuration.

This mirrors the established main E2E workflow.

Resulting flow

authorize job
  -> assume workflow Secrets Manager reader role
  -> fetch AUTHORIZED_USERS
  -> output is-authorized=true|false

each authorized E2E matrix job
  -> assume workflow Secrets Manager reader role
  -> fetch E2E_AWS_ROLE_ARN
  -> configure-aws-credentials assumes that E2E role
  -> run tests with temporary E2E credentials

GitHub matrix jobs do not share process environments, so Linux, Windows, and macOS each fetch the role ARN independently.

Evidence

The shared workflow previously used:

role-to-assume: ${{ vars.E2E_ROLE_ARN }}

E2E_ROLE_ARN is not defined as a repository variable or as an e2e-testing environment variable. Organization-variable visibility requires organization-admin permission, so its availability could not be verified.

The established main workflow instead fetches E2E_AWS_ROLE_ARN with the same pinned fetch-secrets action and then uses:

role-to-assume: ${{ env.E2E_AWS_ROLE_ARN }}
unset-current-credentials: true

This PR adopts that known path.

Separate IAM prerequisite

The original failing e2e / authorize job failed before E2E-role retrieval because the workflow Secrets Manager reader role did not trust the refactor branch's OIDC subject. This code change does not broaden that role's trust policy; the reader role must permit every branch or environment expected to call fetch-secrets.

Validation

  • Workflow YAML parsed and structural assertions passed
  • bunx prettier --check .github/workflows/e2e-test.yml
  • bun run lint:check
  • bun run typecheck
  • bun run build
  • git diff --check
  • The same implementation shape received independent review with no blocking findings

@Hweinstock Hweinstock changed the title fix(ci): load E2E role from Secrets Manager fix(ci): use trusted environment for e2e authorization Sep 21, 2026
@Hweinstock Hweinstock changed the title fix(ci): use trusted environment for e2e authorization fix(ci): load E2E role from Secrets Manager Sep 21, 2026
@Hweinstock Hweinstock closed this Sep 22, 2026
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