Skip to content

feat: exchange an OIDC ID token for an Octopus access token - #268

Merged
matt-richardson merged 1 commit into
mainfrom
mr/octopus-token-exchange
Oct 16, 2026
Merged

matt-richardson merged 1 commit into
mainfrom
mr/octopus-token-exchange

Conversation

@matt-richardson

Copy link
Copy Markdown
Contributor

Part of DPT-3630 (Renaming an Octopus space breaks TeamCity configurations that name it). Split out of #265 (feat: list spaces for a connection that authenticates with OIDC) to keep that PR to the OIDC work.

Why

A connection that authenticates with OIDC has no API key. To list such a connection's spaces, the server exchanges an OIDC ID token for an Octopus access token at Octopus's /token/v1 endpoint. Nothing calls the exchange yet; #265 does.

Notes

  • The token-exchange POST does not follow redirects; the ID token is only ever sent to the connection's own URL.
  • A non-2xx response now throws OctopusHttpStatusException, an IOException that carries the status. Existing callers get the same messages as before.
  • A 404 gets its own message, pointing at the connection's URL rather than at the service account's OIDC identity.

🤖 Generated with Claude Code

Octopus's token-exchange endpoint turns an OIDC ID token into an access token.
Listing spaces for an OIDC connection needs one, since such a connection has
no API key. Nothing calls the exchange yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matt-richardson
matt-richardson merged commit ba53b8d into main Oct 16, 2026
7 checks passed
@matt-richardson
matt-richardson deleted the mr/octopus-token-exchange branch October 16, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants