Repository navigation
feat(controller): wire OIDC issuer/clientId env and OIDC CA trust - #109
Conversation
The Gateway controller previously only emitted AUTH_ENABLE and a mis-named OIDC_CLIENT_SECRET env var, so spec.auth.oidc.issuerUrl and clientId never reached the gateway pod and OIDC authentication could not function. - Emit AUTH_OIDC_ISSUER and AUTH_OIDC_CLIENT_ID from the spec, and rename OIDC_CLIENT_SECRET -> AUTH_OIDC_CLIENT_SECRET to match the env var names the gateway actually reads. - Add OIDCSpec.caCertRef (ConfigMapKeySelector): when set, mount the PEM-encoded CA into the gateway pod and point SSL_CERT_FILE at it so a self-signed issuer (e.g. Keycloak) is trusted during OIDC discovery. - Regenerate deepcopy, CRDs and install manifests; extend controller tests for the new env vars and CA mount. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Companion PR: inference-gateway/inference-gateway#369 — migrates the Kubernetes examples to the operator. The authentication example there depends on releasing this change (it pins |
|
@infer Can you review this? use /maintainer |
Todos
Pull Request✅ Infer Result: SuccessThe PR implementation is complete. Here's everything that's been verified: All checks pass ✅
What about the maintainer checklist?
The task is complete. The PR is ready for review/merge — all functional changes are implemented, tests cover the new functionality, and generated files (deepcopy, CRDs, manifests) are correctly committed. Model: Tokens: 2,989,774 in · 13,453 out · 3,003,227 total (41 requests) Tool calls: 45 total · 98% success rate
|
|
@claude Can you review this? use /maintainer Is it ready for a merge? |
|
Claude finished @edenreich's task in 9m 34s —— View job Maintainer Review — OIDC env wiring + CA trustVerdict: ✅ Ready to merge. The implementation is correct, the env-var bug is genuinely fixed (verified against the gateway's own config surface), the CA-trust concern resolves favorably on the current base image, generated files are in sync, and tests cover the new behavior. Remaining items are non-blocking follow-ups.
Verification
The env-var rename fixes a real bug ✅I cross-checked the names the gateway actually reads. Its The
|
|
🎉 This PR is included in version 0.17.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
The Gateway controller advertised OIDC auth but never made it work: it emitted only
AUTH_ENABLEand a mis-namedOIDC_CLIENT_SECRET, sospec.auth.oidc.issuerUrlandclientIdnever reached the gateway pod, and there was no way to trust a self-signed issuer (e.g. Keycloak) over HTTPS.Changes
AUTH_OIDC_ISSUER,AUTH_OIDC_CLIENT_ID, andAUTH_OIDC_CLIENT_SECRET(renamed fromOIDC_CLIENT_SECRET).spec.auth.oidc.caCertRef(aConfigMapKeySelector): when set, the operator mounts the PEM-encoded CA into the gateway pod and pointsSSL_CERT_FILEat it so OIDC discovery over HTTPS is trusted.Testing
task test✅ (controller suite incl. the new CA-mount test)task lint✅ (0 issues)task generate manifests✅ (working tree clean afterwards)Validation note
SSL_CERT_FILEis set to the single mounted CA file (mirrors the prior Helm-based example). If a deployment also calls public provider APIs over HTTPS, confirm system roots remain trusted on the gateway image; the fallback is an init-container that concatenates system roots + the custom CA.Cross-repo impact
inference-gateway/inference-gateway(companion PR linked below), which usesspec.auth.oidc+caCertRef. That example needs a release of this change to function (the other six examples pin the current operator release).Docs follow-up (draft — not filed)
New public CRD surface (
spec.auth.oidc.caCertRef) + corrected OIDC env wiring warrants a[DOCS]issue forinference-gateway/docs:[DOCS] Operator: document spec.auth.oidc (issuerUrl / clientId / clientSecretRef / caCertRef)