Skip to content

Add CEL Validation to Existing Union Types #4247

Closed
2 of 2 issues completed
Closed

Description

@ChrisJBurns

As a platform operator,
I want OIDCConfigRef and AuthzConfigRef to reject invalid combinations at admission time,
so that misconfigurations are caught immediately by the API server instead of surfacing as confusing controller errors.

Size: S
Dependencies: None
Labels: operator, api

Context

OIDCConfigRef uses a type discriminator field (kubernetes, configMap, inline) but has no CEL validation rules — nothing prevents setting both configMap and inline simultaneously. AuthzConfigRef has the same gap. Validation only happens at controller reconciliation time, producing confusing error conditions instead of immediate API rejection.

Compare with MCPExternalAuthConfig which already has CEL rules (mcpexternalauthconfig_types.go:44-51).

Acceptance Criteria

  • OIDCConfigRef has CEL rules enforcing that the populated field matches the type discriminator (kubernetes, configMap, inline)
  • AuthzConfigRef has CEL rules enforcing that the populated field matches the type discriminator (configMap, inline)
  • Applying a manifest with a type/field mismatch (e.g., type: kubernetes but configMap set) is rejected by the API server
  • Applying a manifest with neither set is rejected by the API server
  • Existing valid manifests continue to work unchanged
  • Unit tests cover all valid/invalid combinations

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    enhancement
    kubernetes
    size/S
    on Mar 19, 2026
  2. added a commit that references this issue on Mar 20, 2026
    370de69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementkubernetesoperatorsize/S

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions