Skip to content

fix: allow exact in-cluster HTTP MCP credential origins - #10

Merged
oldsj merged 1 commit into
mainloop-substrate-0-4from
mcp-http-origin
Oct 7, 2026
Merged

oldsj merged 1 commit into
mainloop-substrate-0-4from
mcp-http-origin

Conversation

@oldsj

@oldsj oldsj commented Oct 7, 2026

Copy link
Copy Markdown
Owner

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 required https for every credential origin.

What changes

  • New cleartextMCPOrigins in the service policy (Helm controller.auth.serviceToken.cleartextMCPOrigins), empty by default.
  • Entries are validated at startup: exact lowercase http://<name>.svc.cluster.local[:port], no path/query/fragment/userinfo/wildcards, valid port, no duplicates. Bad config fails startup.
  • Only MCP-purpose tuples that already match an approved tuple can use a listed origin. All other tuples still require HTTPS. Control API transport is unchanged.
  • Docs: this only admits the tuple. The egress gateway must separately inject credentials for that exact host and actor traffic must route through it; the injected header crosses the cluster network unencrypted, so use HTTPS where that boundary is not acceptable.

Verification

  • go test / go vet ./core/internal/service/controlauth, go build ./..., Helm configmap unittest (17 passed).
  • Final review requested a docs clarification and duplicate rejection; both fixed and re-reviewed (accept).

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>
@github-actions github-actions Bot added the bug Something isn't working label Oct 7, 2026
@oldsj
oldsj merged commit d842a1f into mainloop-substrate-0-4 Oct 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant