Skip to content

feat(egress): add operator_credential mode to inject the shared backend credential - #1686

Open
doppelc wants to merge 2 commits into
agentic-community:mainfrom
doppelc:feat/operator-credential-egress
Open

feat(egress): add operator_credential mode to inject the shared backend credential#1686
doppelc wants to merge 2 commits into
agentic-community:mainfrom
doppelc:feat/operator-credential-egress

Conversation

@doppelc

@doppelc doppelc commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

If you register an MCP server that uses a static bearer token or API key (Backend Authentication), health checks pass, but user tool calls don't. The proxy hop strips the caller's gateway auth and injects nothing.

This was reported in #1598, where the patch was declined in favor of an explicit egress mode. This PR builds that mode. Credit to @hochbit for the original patch and for surfacing the gap.

This PR adds one new egress mode: operator_credential. An admin sets it on a server, and from then on the gateway injects that server's stored Backend Authentication credential for every caller it authorizes. It works with both bearer and api_key schemes and reuses the configured header name, exactly like PAT mode.

It's strictly opt-in: auth_scheme=bearer alone changes nothing, an admin has to set the mode per server, and the deployment needs EGRESS_AUTH_ENABLED=true. Clients never see the credential. Connect configs stop emitting the server-auth placeholder.

@codecov-commenter

codecov-commenter commented Aug 25, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 96.34146% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
registry/api/egress_auth_routes.py 94.82% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants