File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -102,10 +102,10 @@ func (v *DefaultValidator) validateIncomingAuth(auth *IncomingAuthConfig) error
102102return fmt .Errorf ("incoming_auth.oidc.audience is required" )
103103}
104104
105- // Client secret env var should be set (references a Kubernetes Secret mounted as env var)
106- if auth . OIDC . ClientSecretEnv == "" {
107- return fmt . Errorf ( "incoming_auth.oidc.client_secret_env is required" )
108- }
105+ // ClientSecretEnv is optional - some OIDC flows don't require client secrets:
106+ // - PKCE flows (public clients)
107+ // - Token validation without introspection
108+ // - Kubernetes service account token validation
109109}
110110
111111// Validate authorization configuration
Original file line number Diff line number Diff line change @@ -127,6 +127,18 @@ func TestValidator_ValidateIncomingAuth(t *testing.T) {
127127},
128128wantErr : false ,
129129},
130+ {
131+ name : "valid OIDC auth without client secret (public client)" ,
132+ auth : & IncomingAuthConfig {
133+ Type : "oidc" ,
134+ OIDC : & OIDCConfig {
135+ Issuer : "https://example.com" ,
136+ ClientID : "public-client" ,
137+ Audience : "vmcp" ,
138+ },
139+ },
140+ wantErr : false ,
141+ },
130142{
131143name : "invalid auth type" ,
132144auth : & IncomingAuthConfig {
You can’t perform that action at this time.
0 commit comments