Skip to content

Grant id-token: write to the agentic workflow callers - #8991

Merged
theletterf merged 1 commit into
mainfrom
ci/grant-id-token-to-agentic-callers
Oct 26, 2026
Merged

theletterf merged 1 commit into
mainfrom
ci/grant-id-token-to-agentic-callers

Conversation

@theletterf

Copy link
Copy Markdown
Member

Summary

IT is moving our docs agentic workflows from OpenRouter to Agent Router, and the new versions of the reusable workflows in elastic/docs-actions (elastic/docs-actions#426, still a draft) reach the gateway with a Google ID token. That token comes from the job's GitHub OIDC token, and GitHub only issues one to a job that has id-token: write.

A reusable workflow cannot get more permissions than the calling job grants. So once v1 moves to the new versions, a caller without this permission would fail at startup, even for runs that would not need it. I checked all the callers, and none of the three docs repos grant it today.

This PR adds id-token: write next to copilot-requests: write in the callers of the five workflows that use Agent Router:

  • docs-triage.yml, docs-auto-triage.yml, docs-scope.yml and docs-project-metadata.yml (workflow-level permissions)
  • docs-ai-menu.yml (the run-docs-issue-scope job)
  • docs-pr-ai-menu.yml (the run-docs-review job)

It is safe to merge now. The current v1 workflows do not use the permission, so nothing changes until the release. The permission only lets a job ask for a token that describes itself. Google decides what that token can do, and IT's identity pool only accepts tokens from gh-aw-* workflows in elastic/docs-actions, from the repos on the service account's list (elastic/centralized-it-infra#1636).

Where a file keeps its permissions at the workflow level, the new line sits in that block and covers every job that inherits it. I only added it to the jobs or blocks that call the reusable workflow.

Related to elastic/docs-eng-team#1056

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No

Tool(s) and model(s) used: Claude Code (Claude Sonnet 5.5)

🤖 Generated with Claude Code

The docs agentic workflows are moving from OpenRouter to Agent Router, which
they reach with a Google ID token minted from the job's GitHub OIDC token. A
reusable workflow cannot get more permissions than its caller grants, so the
calling jobs need id-token: write.

Related to elastic/docs-eng-team#1056

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

  • Review docs changes (docs-review). Status: not started.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

@theletterf
theletterf marked this pull request as ready for review October 26, 2026 10:01
@theletterf
theletterf requested a review from a team as a code owner October 26, 2026 10:01
@theletterf
theletterf requested a review from akira28 October 26, 2026 10:01
@theletterf
theletterf added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 630919e Oct 26, 2026
13 checks passed
@theletterf
theletterf deleted the ci/grant-id-token-to-agentic-callers branch October 26, 2026 10:06
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.

2 participants