Skip to content

docs: OIDC-preferred + GitHub App token recommendations (Phases 2 + 3)#25

Merged
kurok merged 1 commit into
feat/al2023-supportfrom
docs/8-9-oidc-and-token-preferences
Apr 21, 2026
Merged

docs: OIDC-preferred + GitHub App token recommendations (Phases 2 + 3)#25
kurok merged 1 commit into
feat/al2023-supportfrom
docs/8-9-oidc-and-token-preferences

Conversation

@kurok
Copy link
Copy Markdown

@kurok kurok commented Apr 21, 2026

Closes #8 and #9. Documentation-only — no code change.

Phase 2 (#8)

README's 'How to start' step 1 now leads with GitHub OIDC as the preferred AWS credential path. Static access keys become Option B, explicitly labelled legacy. Includes Terraform for the trust role (with repo-scoped sub condition), the unchanged least-privilege permissions policy, and a workflow snippet showing permissions: id-token: write + role-to-assume.

The action's code needs no change — it reads AWS creds from env, which aws-actions/configure-aws-credentials@v6 populates identically under both paths.

Phase 3 (#9)

README's 'How to start' step 2 replaced. Three token options ranked by preference:

Option Token type Permission model Use when
A (preferred) GitHub App installation token Repository Administration: read/write You can create an App in the org
B Fine-grained PAT Repository Administration: read/write, scoped to specific repos No App; still want fine-grained
C (deprecated) Classic PAT repo scope (over-broad) Nothing else available

The action accepts any token with permission to manage self-hosted runners on the target repo — the change is purely in the README's guidance.

Not included here

  • An optional role-to-assume input on the action itself (so consumers skip the separate configure-aws-credentials step). Deferred — the current dual-step pattern is standard and documented everywhere. Convenience feature, not a blocker.
  • A docs/github-app.md end-to-end App setup walkthrough. The README section points at the upstream docs; standalone walkthrough is nice-to-have but not part of Phase 3: recommend GitHub App token / fine-grained PAT over classic PAT #9's acceptance criteria.

Test plan

  • CI green (lint + verify-dist + verify-runner-url + unit-tests — the unit-tests job is orthogonal to docs).
  • Spot-render the README locally to confirm no broken links or malformed code fences.

Closes #8 and #9. Documentation-only; no code change.

## Phase 2 (#8) — OIDC for AWS credentials

README's 'How to start' step 1 now leads with GitHub OIDC as the
preferred path and relegates static IAM access keys to a 'legacy'
Option B. Rationale: static keys don't rotate, live in GitHub
secrets indefinitely (permanent attack surface), and can't be
scoped to a specific repo/branch/environment. OIDC issues
short-lived STS tokens per run, scoped by repo/branch/environment.

Includes:
- A Terraform example for the trust-relationship IAM role with
  a repo-scoped 'sub' StringLike condition.
- The minimum permissions policy (unchanged — attaches to role
  or user).
- A workflow snippet showing 'permissions: id-token: write' and
  'role-to-assume' instead of access-key secrets.

No changes to the action's code — it already reads AWS creds from
env, which configure-aws-credentials@v6 populates identically under
both paths.

## Phase 3 (#9) — GitHub token type preferences

README's 'How to start' step 2 replaced. Three token options
ordered by preference:

- A (preferred): GitHub App installation token via
  actions/create-github-app-token. No human identity, short-lived,
  minimal permission (Repository Administration: read/write).
- B: fine-grained PAT scoped to specific repos with just Repository
  Administration. Better than classic PAT but still tied to a
  human.
- C (deprecated): classic PAT with 'repo' scope. Over-permissive
  and human-tied; kept in docs as a fallback for environments
  that don't allow Apps or fine-grained PATs.

No code change — the action accepts any token that has permission
to manage self-hosted runners on the target repo. Docs change
only.

## Not included in this PR

- Phase 2's optional 'role-to-assume' input on the action itself
  (so consumers don't need the separate configure-aws-credentials
  step). Deferred — the current dual-step pattern is standard and
  works fine. Convenience feature, not urgency.

Signed-off-by: yuriyryabikov <22548029+kurok@users.noreply.github.com>
@kurok kurok merged commit fd15768 into feat/al2023-support Apr 21, 2026
4 checks passed
@kurok kurok deleted the docs/8-9-oidc-and-token-preferences branch April 21, 2026 10:39
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