Repository navigation
Add insecure HTTP OIDC support for local development - #2292
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2292 +/- ##
=======================================
Coverage 53.61% 53.61%
=======================================
Files 239 239
Lines 30704 30733 +29
=======================================
+ Hits 16463 16479 +16
- Misses 13071 13083 +12
- Partials 1170 1171 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JAORMX
force-pushed
the
add-insecure-http-oidc-support
branch
from
October 23, 2025 06:54
c82c6ce to
3f69f22
Compare
Adds `insecureAllowHTTP` configuration option to allow HTTP (non-HTTPS) OIDC issuers for local development and testing scenarios. This addresses the issue where MCPRemoteProxy requires HTTPS for OIDC issuer URLs even in local development environments with tools like Keycloak. The new field is available in the MCPServer CRD under inline OIDC configuration and is disabled by default for security. When enabled, a warning is logged to alert operators of the security implications. Changes: - Add InsecureAllowHTTP field to InlineOIDCConfig CRD type - Update OIDC resolver to propagate the flag through all config types - Add ValidateEndpointURLWithInsecure() for conditional validation - Update OIDC discovery to allow HTTP when flag is enabled - Add security warning logs when insecure mode is active - Preserve CA certificate and auth token support - Update all function signatures and call sites - Add tests and fix linting issues Security: This flag defaults to false and is clearly marked as insecure in all documentation and warning messages. It should only be used for local development, testing, or trusted internal networks. Fixes #2288 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> Signed-off-by: Juan Antonio Osorio <[email protected]>
Bumps the operator-crds Helm chart version from 0.0.41 to 0.0.42 to reflect CRD changes (addition of insecureAllowHTTP field). Also regenerates: - CRD API documentation (crd-api.md) - Swagger/OpenAPI documentation for the server API - Helm chart README with updated version badge 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
JAORMX
force-pushed
the
add-insecure-http-oidc-support
branch
from
October 23, 2025 09:09
3f69f22 to
d756310
Compare
blkt
previously approved these changes
Oct 23, 2025
blkt
left a comment
Contributor
There was a problem hiding this comment.
Minor nit, just trying to reduce the amount of dead code.
Contributor
|
So I said on Slack that I was using a similar approach..but different, the thing I was using was your patch, but also setting |
This addresses PR feedback from blkt and jhrozek: 1. Remove unused DiscoverOIDCEndpointsInsecure function - This public API was added but never used - The actual functionality works through internal functions 2. Fix critical bug: propagate insecureAllowHTTP to transport layer - The original PR only validated URLs at the application layer - The HTTP transport layer (ValidatingTransport) still enforced HTTPS - This would cause HTTP OIDC connections to fail at runtime Changes: - Add InsecureAllowHTTP field to ValidatingTransport struct - Update RoundTrip to skip HTTPS check when flag is true - Add insecureAllowHTTP to HttpClientBuilder with WithInsecureAllowHTTP() - Update discoverOIDCConfiguration to pass flag to HTTP client builder - Update NewTokenValidator to pass flag when creating JWKS HTTP client This ensures HTTP OIDC URLs are allowed at both validation AND transport layers when the insecureAllowHTTP flag is enabled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…HTTP This addresses the critical gap identified by the code review agents where the insecureAllowHTTP feature was missing from the CLI. CLI Integration: - Add InsecureAllowHTTP field to RunFlags struct - Add --oidc-insecure-allow-http CLI flag with security warning - Pass runFlags.InsecureAllowHTTP instead of hardcoded false Test Coverage: - Add ConfigMap test case for insecureAllowHTTP in resolver_test.go - Add inline OIDC config test case for insecureAllowHTTP - Add ValidatingTransport tests for InsecureAllowHTTP field - Verify HTTP URLs work with flag enabled - Verify HTTPS URLs still work with flag enabled This ensures feature parity between Kubernetes operator and CLI usage, allowing developers to use HTTP OIDC providers for local development via both interfaces. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
blkt
previously approved these changes
Oct 23, 2025
Signed-off-by: Juan Antonio Osorio <[email protected]>
blkt
approved these changes
Oct 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
insecureAllowHTTPconfiguration option to allow HTTP (non-HTTPS) OIDC issuers for local development and testing scenarios with MCPRemoteProxy.This addresses the issue where MCPRemoteProxy requires HTTPS for OIDC issuer URLs even when
jwksAllowPrivateIP: trueis set, making local development with tools like Keycloak difficult.Changes
InsecureAllowHTTPbool field toInlineOIDCConfigCRD type with+kubebuilder:default=falseValidateEndpointURLWithInsecure()function for conditional URL scheme validationDiscoverOIDCEndpointsInsecure()to allow HTTP URLs when flag is enabledWithOIDCConfig()function signature to includeinsecureAllowHTTPparameterSecurity Considerations
false(HTTPS required) - secure by defaultExample Configuration
Testing
Backward Compatibility
This change is fully backward compatible:
omitemptyJSON tagfalse(secure behavior)ValidateEndpointURL()function unchangedFixes #2288
🤖 Generated with Claude Code