Skip to content

Document OIDC auth for the thv API server#935

Merged
danbarr merged 1 commit into
mainfrom
docs-cli-serve-oidc
Jun 12, 2026
Merged

Document OIDC auth for the thv API server#935
danbarr merged 1 commit into
mainfrom
docs-cli-serve-oidc

Conversation

@danbarr

@danbarr danbarr commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

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 serve supports OIDC token validation. This change corrects the opening note to explain that the API server is unauthenticated by default (bound to localhost), 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-scopes flags, 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 against cmd/thv/app/server.go, cmd/thv/app/common.go, pkg/auth/token.go, and the auto-generated thv serve reference.

Type of change

  • Documentation update

Related issues/PRs

Addresses #654 (high-priority gap 3: thv serve OIDC authentication, and the related api-server.mdx inaccuracy)

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 12, 2026 03:19
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Jun 12, 2026 3:20am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/curl usage.
  • Adds a cross-link to the authentication and authorization framework concepts page for background context.

@danbarr danbarr marked this pull request as ready for review June 12, 2026 04:16
@danbarr danbarr merged commit e1b8656 into main Jun 12, 2026
5 checks passed
@danbarr danbarr deleted the docs-cli-serve-oidc branch June 12, 2026 13:20
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.

3 participants