Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pkg/auth/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"io"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -541,6 +542,14 @@ func NewTokenValidator(ctx context.Context, config TokenValidatorConfig) (*Token
registry.AddProvider(NewGoogleProvider(config.IntrospectionURL))
}

// Load client secret from environment variable if not provided in config
// This allows secrets to be injected via Kubernetes Secret references
if config.ClientSecret == "" {
if envSecret := os.Getenv("TOOLHIVE_OIDC_CLIENT_SECRET"); envSecret != "" {
config.ClientSecret = envSecret
}
}

// Add RFC7662 provider with auth if configured
if config.ClientID != "" || config.ClientSecret != "" {
rfc7662Provider, err := NewRFC7662ProviderWithAuth(
Expand Down
Loading