Skip to content

Expose the token exchange code in thv proxy and thv run code #2066

@jhrozek

Description

@jhrozek

Summary

Expose token exchange functionality through CLI flags in thv proxy and thv run commands to enable command-line users to configure token exchange.

What We're Doing

Adding command-line flags to configure token exchange parameters and integrating the token exchange middleware into the proxy and run commands.

Deliverables

  • CLI flags for token exchange configuration:
    • OAuth 2.0 token endpoint URL
    • Client credentials (ID and secret)
    • Target audience or scope
    • Optional custom header name for token injection
  • Integration with runner configuration
  • Automatic header strategy selection based on provided flags
  • Documentation via flag help text

Acceptance Criteria

  • Token exchange can be enabled via CLI flag
  • All required OAuth parameters configurable via flags
  • Custom header injection works when specified
  • Default behavior replaces Authorization header
  • Token exchange is optional (omitting flags disables it)
  • Works with both thv proxy and thv run commands
  • Flag help text clearly describes each parameter
  • Configuration validated at startup

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions