Skip to content

Document trusted publishing setup, including immutable subject claims - #73

Open
nealrichardson wants to merge 1 commit into
mainfrom
claude-issue-72
Open

Document trusted publishing setup, including immutable subject claims#73
nealrichardson wants to merge 1 commit into
mainfrom
claude-issue-72

Conversation

@nealrichardson

Copy link
Copy Markdown
Contributor

Fixes #72.

GitHub repos created on or after 2026-07-15 issue OIDC tokens with immutable subject claims (my-org@123456/my-repo@789012 instead of my-org/my-repo). Connect accepts either form in a trusted publisher's Repository field, but it has to match what the repo actually produces — get it wrong and the token exchange fails with an HTTP 400 while the configuration looks correct. Nothing in this repo said so.

README

New Trusted publishing section, linked from the prerequisites list, the feature-support table, and the deploy auth docs:

  • What to enter when adding a trusted publisher in the Connect UI (Repository, Audience).
  • Immutable subject claims — both claim formats, which repos use which, and how to get the value. The reliable way is gh api repos/$ORG/$REPO/actions/oidc/customization/sub (reports what the repo actually produces, needs admin); the fallback builds the immutable form from owner/repo IDs, as in the issue.
  • Configuring a trusted publisher from the command lineposit connect login as a human (a trusted-publishing credential can't manage trusted publishers), then POST v1/content/$GUID/trusted-publishers via posit connect api, plus list/revoke.

setup-connect-deploy skill

New Step 3a, reached only when the user chooses trusted publishing, that offers to authorize the repository on Connect:

  1. Determine repository by asking GitHub for the subject claim prefix, with the ID-based fallback when the endpoint 403s. If the prefix isn't repo:-shaped (customized claim template), it stops and points at a Custom OpenID Connect publisher instead of registering something that can't match.
  2. Have the user run the interactive posit connect login themselves.
  3. POST the publisher, confirming the JSON first.

Error handling maps 402/403/404 to license, permissions, and server-too-old respectively, recommending API-key auth in each case. Step 6's summary now reports the registered repository value so a later repo rename is a known breaking change.

Docs only — no action or package code changed.

🤖 Generated with Claude Code

Adds a "Trusted publishing" section to the README covering how to authorize
a repository on Connect, how to determine the `repository` subject-claim value
(name-only vs. the immutable `owner@id/repo@id` form), and how to configure a
trusted publisher from the command line with `posit connect api`.

Extends the setup-connect-deploy skill with a new Step 3a that offers to
authorize the repository on Connect when the user chooses trusted publishing,
reading the subject-claim format from GitHub rather than guessing it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Preview deployed to Connect (localhost:3942): http://localhost:3942/connect/#/apps/505762aa-9db3-42a9-8e8a-317d17801400/draft/8

Deployed from commit be439e9.

@github-actions

Copy link
Copy Markdown
Contributor

Cleaned up 1 preview bundle(s) on http://localhost:3942: 8

@github-actions

Copy link
Copy Markdown
Contributor

Preview deployed to Connect (localhost:3941): http://localhost:3941/connect/#/apps/db8b421e-c603-4988-b39d-ed775bafb9c9/draft/8

Deployed from commit be439e9.

@github-actions

Copy link
Copy Markdown
Contributor

Cleaned up 1 preview bundle(s) on http://localhost:3941: 8

@github-actions

Copy link
Copy Markdown
Contributor

Preview deployed to Connect (localhost:3940): http://localhost:3940/connect/#/apps/3830da33-9120-4e24-a35f-825c085f6684/draft/8

Deployed from commit be439e9.

@github-actions

Copy link
Copy Markdown
Contributor

Cleaned up 1 preview bundle(s) on http://localhost:3940: 8

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.

Document and add to skill for GitHub OIDC changes

1 participant