Skip to content

#3235: Infra GA5: the token service runs as a main-only Actions workflow in the owner's private repository, sealed per #3085 - #3301

Open
jparker2006 wants to merge 3 commits into
mainfrom
builder/3235-actions-token-service
Open

jparker2006 wants to merge 3 commits into
mainfrom
builder/3235-actions-token-service

Conversation

@jparker2006

Copy link
Copy Markdown
Member

Closes #3235

Summary

Adds the actions route for the token service so cloud agents can mint sealed openwiz[bot] installation tokens through a main-only GitHub Actions workflow in the owner's private repository:

agent-token.py (OPENWIZ_TOKEN_SERVICE_ROUTE=actions)
  ├─ generates one-time RSA-3072 key pair (private half stays in memory)
  ├─ dispatches mint-workflow.yml on main (inputs: request, nonce)
  ├─ mint-workflow.yml (workflow_dispatch only, environment: token-service, refs/heads/main only)
  │    ├─ checks out openwizdev/OpenWiz at pinned commit sha
  │    ├─ pipes base64-decoded OPENWIZ_GITHUB_APP_KEY to OpenSSL via /dev/fd (never a file)
  │    ├─ runs token-service.py sealing (#3085) & writes mint-log fields only to job summary
  │    └─ uploads single 1-day artifact named <nonce> (out/answer.json)
  └─ downloads artifact, deletes it immediately, opens & checks sealed answer

Evidence

  • Before: At red commit 5f360ee4, test_mint_workflow.py failed because tools/github-app/mint-workflow.yml was missing, test_agent_token.py ActionsRoute failed because agent-token.py had no actions route, and test_fixtures.py failed on the missing actions route and key-location rules (docs/evidence/3235/red-run.txt).
    After: At head 93e1955b5ca381286d731783866ccbaf5d273d13, all 3 tests in test_mint_workflow.py, all 4 tests (including 8 failure subTests) in test_agent_token.py ActionsRoute, all 19 tests in test_fixtures.py, all 14 tests in test_token_service.py, and all 5 tests in test_app_select.py pass (docs/evidence/3235/green-run.txt).

Merge danger

Door: two-way

Blast radius: narrow

Existing pairing and local routes are unchanged; the actions route activates only when OPENWIZ_TOKEN_SERVICE_ROUTE=actions and OPENWIZ_TOKEN_SERVICE_REPOSITORY are explicitly configured, and live execution waits on the owner's GA5 (#1849) setup steps.

Facts

  • Branch: builder/3235-actions-token-service. Head: 93e1955b5ca381286d731783866ccbaf5d273d13. Tree: cf7b7c35a1f8e55e7206b81accfc035255576bf8
  • Changed paths:
    • Owned: tools/github-app/mint-workflow.yml, tools/github-app/agent-token.py, tools/github-app/test_agent_token.py, tools/github-app/test_mint_workflow.py, contracts/token-service.v1.md, contracts/fixtures/token-service/fallback.json, contracts/fixtures/token-service/test_fixtures.py, docs/github-app.md, changes/3235.md
    • Standing supporting edit (docs/agents/fleet.md item 3): docs/evidence/3235/red-run.txt, docs/evidence/3235/green-run.txt
  • Tests:
    • python3 -I tools/github-app/test_mint_workflow.py -v (3 tests, OK)
    • python3 -I tools/github-app/test_agent_token.py ActionsRoute -v (4 tests, OK)
    • python3 -I contracts/fixtures/token-service/test_fixtures.py -v (19 tests, OK)
    • python3 -I tools/github-app/test_token_service.py (14 tests, OK)
    • python3 -I tools/github-app/test_app_select.py (5 tests, OK)
    • python3 -I tools/owned-paths/check.py --ticket 3235 (ok: 11 files)
    • python3 -I tools/privacy-check/check.py --tree . (exit 0)
    • Test budget allowance: 482 net new test lines across test_mint_workflow.py (240), test_agent_token.py (+223), and test_fixtures.py (+19). Why: covers both the full fake GitHub Actions HTTP server (dispatch, runs, redirect-checked artifact download, deletion, 403/429 backoff, 8 fallback modes, never-exposed check) and the security-critical template guard + planted-violation + end-to-end pipe-signing execution proof.
  • Red run: docs/evidence/3235/red-run.txt (committed at 5f360ee4 before the implementation)
  • Claims:
    • Actions route round trip, 403/429 backoff, artifact deletion, and all 8 failure fallbacks: fixture test (test_agent_token.py ActionsRoute)
    • Never-exposed plaintext token and pipe-only App key delivery: fixture test (test_agent_token.py ActionsRoute, test_mint_workflow.py)
    • Main-only workflow template guards and planted-violation detection: fixture test (test_mint_workflow.py)
    • Contract pin, fixtures, and owner setup docs: fixture test (test_fixtures.py, test_token_service.py) and review
  • Seams: tools/github-app/mint-workflow.yml and OPENWIZ_TOKEN_SERVICE_ROUTE=actions + OPENWIZ_TOKEN_SERVICE_REPOSITORY for GA5 (Infra GA5: live: the owner installs the App and a cloud agent writes as openwiz[bot] #1849) live check
  • Helpers: none
  • CI: running on 93e1955b5ca381286d731783866ccbaf5d273d13 (required ci and privacy checks must pass)
  • Gaps: Live GitHub Actions minting is not exercised here; the first live run is GA5 (Infra GA5: live: the owner installs the App and a cloud agent writes as openwiz[bot] #1849) after the owner's environment and ruleset setup steps.

Built with Cloudroom

@jparker2006

Copy link
Copy Markdown
Member Author

First successful push: 93e1955 at 2026-11-25T04:42:28Z

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.

Infra GA5: the token service runs as a main-only Actions workflow in the owner's private repository, sealed per #3085

1 participant