Document OIDC auth for the thv API server#935
Merged
Conversation
The api-server page stated the API server "doesn't implement any authentication or authorization mechanisms," which is no longer accurate: thv serve supports OIDC token validation. Correct the note to explain that the server is unauthenticated by default (bound to localhost) and add a section covering the --oidc-* flags, how OIDC validation is enabled, JWKS discovery from the issuer, and a realistic example. Cross-link the auth framework concept page. Addresses #654 (high-priority gap #3). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the ToolHive CLI API server guide to reflect current thv serve behavior now that the server can validate OIDC tokens, clarifying the default unauthenticated localhost-only posture and documenting how to enable authentication when exposing the server.
Changes:
- Replaces the outdated “no auth/authz” note with a more accurate explanation of the default localhost + unauthenticated behavior.
- Adds an “Authenticate API requests with OIDC” section covering when OIDC validation is enabled, the relevant flags, and example
thv serve/curlusage. - Adds a cross-link to the authentication and authorization framework concepts page for background context.
jhrozek
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This page previously stated that the API server "doesn't implement any authentication or authorization mechanisms," which is no longer accurate now that
thv servesupports OIDC token validation. This change corrects the opening note to explain that the API server is unauthenticated by default (bound tolocalhost), and adds an "Authenticate API requests with OIDC" section documenting the--oidc-issuer,--oidc-audience,--oidc-jwks-url,--oidc-introspection-url,--oidc-client-id,--oidc-client-secret, and--oidc-scopesflags, how OIDC validation is enabled (set any of issuer, JWKS URL, or introspection URL), JWKS discovery from the issuer, and a realistic example command. It also cross-links the authentication and authorization framework concept page. All flag names, defaults, and behaviors were verified againstcmd/thv/app/server.go,cmd/thv/app/common.go,pkg/auth/token.go, and the auto-generatedthv servereference.Type of change
Related issues/PRs
Addresses #654 (high-priority gap 3: thv serve OIDC authentication, and the related api-server.mdx inaccuracy)
🤖 Generated with Claude Code