-
Couldn't load subscription status.
- Fork 134
Add SecretKeyRef support to InlineOIDCConfig for enhanced secret management #2324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2324 +/- ##
=======================================
Coverage 54.10% 54.11%
=======================================
Files 239 239
Lines 23400 23453 +53
=======================================
+ Hits 12660 12691 +31
- Misses 9541 9560 +19
- Partials 1199 1202 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
385bb12 to
6a962ef
Compare
…gement Add Kubernetes-native secret reference support to InlineOIDCConfig, following the pattern established by MCPExternalAuthConfig. This enables secure OIDC client secret management without exposing secrets in YAML manifests or ConfigMaps. Changes: - Add ClientSecretRef field to InlineOIDCConfig CRD type - Deprecate plaintext ClientSecret field (backward compatible) - Update OIDC resolver to skip embedding secrets when using SecretKeyRef - Create GenerateOIDCClientSecretEnvVar function for secret validation - Integrate secret injection in MCPServer and MCPRemoteProxy controllers - Update token validator to load secrets from TOOLHIVE_OIDC_CLIENT_SECRET - Bump CRD chart version from 0.0.43 to 0.0.44 - Update architecture documentation and add example manifests Security benefits: - Secrets managed via Kubernetes RBAC - Integration with external secret operators (Vault, AWS Secrets Manager) - Secrets not exposed in YAML manifests or Git history - Consistent pattern across all ToolHive secret management Resolves: #2321 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The operator chart version needs to be bumped when CRDs are updated to ensure compatibility during Helm chart testing. This fixes the Helm chart test failure where the operator pod was crashing due to CRD version mismatch.
Add unit tests to verify: - GenerateOIDCClientSecretEnvVar function with various scenarios - OIDC resolver behavior with ClientSecretRef - Precedence when both ClientSecret and ClientSecretRef are provided - Backward compatibility with existing ClientSecret field All tests pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
8a96756 to
1e47b3a
Compare
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Summary
Add Kubernetes-native secret reference support to
InlineOIDCConfig, following the pattern established byMCPExternalAuthConfig. This enables secure OIDC client secret management without exposing secrets in YAML manifests or ConfigMaps.Note: This PR builds on #2325 which was merged to add runtime environment variable support.
Changes
API Changes
ClientSecretRef *SecretKeyReffield toInlineOIDCConfigClientSecretfield (backward compatible)Implementation
GenerateOIDCClientSecretEnvVar()function for secret validation and env var generationTOOLHIVE_OIDC_CLIENT_SECRETenvironment variable (added in Add environment variable support for OIDC client secret #2325)Infrastructure
docs/arch/04-secrets-management.md)Examples
mcpserver_with_inline_oidc_secretref.yamlmcpremoteproxy_with_inline_oidc_secretref.yamlmcpserver_with_inline_oidc.yamlwith notes about new approachSecurity Benefits
✅ Secrets managed via Kubernetes RBAC
✅ Integration with external secret operators (Vault, AWS Secrets Manager)
✅ Secrets not exposed in YAML manifests or Git history
✅ Secrets not stored in ConfigMaps
✅ Namespace isolation enforced
✅ Audit trail via Kubernetes audit logs
✅ Consistent pattern across all ToolHive secret management
Example Usage
Testing
Related
Builds on #2325
Resolves #2321
🤖 Generated with Claude Code