Repository navigation
fix: allow exact in-cluster HTTP MCP credential origins - #10
Merged
Merged
Conversation
Add controller.auth.serviceToken.cleartextMCPOrigins (default empty). Each entry must be an exact lowercase http origin on a .svc.cluster.local host, optional port, with no path, query, fragment, userinfo or wildcard; duplicates are rejected at startup. Only approved MCP-purpose credential tuples may use a listed origin; everything else still requires HTTPS, and the control API transport is unchanged. Signed-off-by: James Olds <12104969+oldsj@users.noreply.github.com>
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.
Lets service-token policy approve the Mainloop MCP credential tuple at its in-cluster HTTP origin (
http://mainloop-mcp.mainloop.svc.cluster.local). Without this, control auth cannot be activated: the policy requiredhttpsfor every credential origin.What changes
cleartextMCPOriginsin the service policy (Helmcontroller.auth.serviceToken.cleartextMCPOrigins), empty by default.http://<name>.svc.cluster.local[:port], no path/query/fragment/userinfo/wildcards, valid port, no duplicates. Bad config fails startup.Verification
go test/go vet ./core/internal/service/controlauth,go build ./..., Helm configmap unittest (17 passed).