feat: add mcp_server_auth_mode and OAuth 2.1 gateway auth docs with gateway-auth page - #4522
Conversation
|
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds a new MCP Gateway authentication page, updates MCP auth-related schema fields, and revises related gateway, Claude Code, and navigation documentation. ChangesMCP Gateway OAuth Authentication Documentation and Schema
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/mcp/gateway.mdx (1)
314-352:⚠️ Potential issue | 🔴 CriticalComplete documentation of
mcp_external_base_urlsplit and missingmcp_external_server_url.The field refactor is more significant than a simple rename:
mcp_external_base_urlwas split into two distinct fields (mcp_external_server_urlandmcp_external_client_url) in the database migrations (framework/configstore/migrations.go). The current documentation only coversmcp_external_client_urland omitsmcp_external_server_urlentirely. Additionally, this breaking change is not documented in the v1.5.0 migration guide (docs/migration-guides/v1.5.0.mdx), which covers many other breaking changes. The breaking change warning in gateway.mdx correctly applies tomcp_external_client_url, but the documentation should clarify the split, define the purpose of both resulting fields, and ensure the migration guide covers this change.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/mcp/gateway.mdx` around lines 314 - 352, The current documentation in gateway.mdx only describes mcp_external_client_url and completely omits mcp_external_server_url, even though mcp_external_base_url was split into these two distinct fields. Add documentation for mcp_external_server_url in the "Public URL configuration when behind a proxy" section that explains its distinct purpose compared to mcp_external_client_url, clarify that this was a split from the original mcp_external_base_url field, and specify when each field should be used. Additionally, add a breaking change entry to docs/migration-guides/v1.5.0.mdx documenting this split and providing migration guidance for users upgrading from previous versions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/docs.json`:
- Around line 531-533: Fix the indentation of the
"deployment-guides/config-json/source-of-truth" entry in the docs.json file by
adjusting its leading whitespace to align with the adjacent array entries
"deployment-guides/config-json" and
"deployment-guides/config-json/schema-reference" to ensure consistent
indentation throughout the array.
---
Outside diff comments:
In `@docs/mcp/gateway.mdx`:
- Around line 314-352: The current documentation in gateway.mdx only describes
mcp_external_client_url and completely omits mcp_external_server_url, even
though mcp_external_base_url was split into these two distinct fields. Add
documentation for mcp_external_server_url in the "Public URL configuration when
behind a proxy" section that explains its distinct purpose compared to
mcp_external_client_url, clarify that this was a split from the original
mcp_external_base_url field, and specify when each field should be used.
Additionally, add a breaking change entry to docs/migration-guides/v1.5.0.mdx
documenting this split and providing migration guidance for users upgrading from
previous versions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ea0ba857-deb5-467d-ac5f-00861ae1def8
⛔ Files ignored due to path filters (3)
docs/media/ui-mcp-server-auth-mode.pngis excluded by!**/*.pngdocs/media/ui-oauth-consent.pngis excluded by!**/*.pngdocs/media/ui-oauth-grants.pngis excluded by!**/*.png
📒 Files selected for processing (6)
docs/cli-agents/claude-code.mdxdocs/docs.jsondocs/mcp/gateway-auth.mdxdocs/mcp/gateway.mdxdocs/openapi/openapi.jsondocs/openapi/schemas/management/config.yaml
8bff02e to
93724be
Compare
91623fa to
045411d
Compare
93724be to
5da157b
Compare
045411d to
7cae97e
Compare
5da157b to
7d99b9a
Compare
736beb4 to
f48f3dd
Compare
4e3262a to
bf4762b
Compare
f48f3dd to
47877f6
Compare
bf4762b to
72599fb
Compare
5d4ddd9 to
2dca03f
Compare
2dca03f to
fd8fa9f
Compare
e143956 to
8a77f80
Compare
fd8fa9f to
caf8e29
Compare
8a77f80 to
110d3b7
Compare
caf8e29 to
c2b0c9c
Compare
110d3b7 to
110c0aa
Compare
c2b0c9c to
c1d6601
Compare
110c0aa to
1736ff8
Compare
Merge activity
|
The base branch was changed.
c1d6601 to
8872519
Compare
… `gateway-auth` page (#4522) ## Summary Adds a new `mcp/gateway-auth.mdx` documentation page covering how inbound MCP clients authenticate to Bifrost's `/mcp` endpoint, and introduces the `mcp_server_auth_mode` configuration field (`headers`, `both`, `oauth`) along with an `oauth2_server_config` block for controlling Bifrost's OAuth 2.1 authorization server behavior. ## Changes - **New `mcp/gateway-auth.mdx` page** — documents the three auth modes, the full OAuth 2.1 connect flow (with sequence diagram), identity modes at consent (virtual key, session, user), configuration via UI/API/config.json, grant management, token lifetime and revocation behavior, discovery endpoints, and troubleshooting guidance. - **`mcp_server_auth_mode` and `oauth2_server_config` fields** — added to the OpenAPI schema and config YAML. `mcp_server_auth_mode` controls whether `/mcp` accepts header credentials, Bifrost-issued JWTs, or both. `oauth2_server_config` exposes `issuer_url`, `auth_code_ttl`, and `access_token_ttl`. - **`mcp_external_base_url` renamed to `mcp_external_client_url`** — clarifies that this field governs Bifrost's outbound OAuth client redirect URI (to upstream servers like Notion/Jira), not the inbound server-side discovery URL. - **`mcp/gateway.mdx` updated** — the per-user auth section now references the gateway auth mode and notes that identity establishment differs between `headers` and `both`/`oauth` modes. The Claude Code DCR probe note is updated to reflect that in `both`/`oauth` mode the probe is handled correctly and the error doesn't appear. - **`cli-agents/claude-code.mdx` updated** — the "Method Not Allowed" troubleshooting note is scoped to the default `headers` mode and clarifies that `both`/`oauth` mode serves real Dynamic Client Registration. - **`docs.json` updated** — `mcp/gateway-auth` added to the MCP Gateway navigation group; indentation normalized to tabs throughout. - **New UI screenshots** — `ui-mcp-server-auth-mode.png`, `ui-oauth-consent.png`, and `ui-oauth-grants.png` added. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Navigate to the MCP Gateway section of the docs and verify the new **Gateway Authentication** page renders correctly, including the sequence diagram, configuration tabs, and screenshots. Confirm the `mcp/gateway.mdx` cross-links to `gateway-auth` resolve. Verify the renamed `mcp_external_client_url` field appears correctly in the API reference. ## Screenshots/Recordings New page includes screenshots of the OAuth consent UI (`ui-oauth-consent.png`), the MCP server auth mode config panel (`ui-mcp-server-auth-mode.png`), and the OAuth grants table (`ui-oauth-grants.png`). ## Breaking changes - [x] Yes - [ ] No The `mcp_external_base_url` config field is renamed to `mcp_external_client_url`. Any existing configuration using the old field name will need to be updated. ## Related issues Related to the Claude Code DCR probe error reported at anthropics/claude-code#46640. ## Security considerations The new OAuth 2.1 authorization server surface (when `mcp_server_auth_mode` is `both` or `oauth`) issues short-lived JWTs signed with an auto-generated RSA key. Refresh tokens rotate on each use. Grants can be revoked from the UI. In `oauth` mode, header-based credentials (virtual keys, API keys) are rejected on `/mcp`, tightening the inbound auth surface. The `access_token_ttl` default of 600 seconds bounds the window between a revoke and full enforcement. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
… `gateway-auth` page (maximhq#4522) ## Summary Adds a new `mcp/gateway-auth.mdx` documentation page covering how inbound MCP clients authenticate to Bifrost's `/mcp` endpoint, and introduces the `mcp_server_auth_mode` configuration field (`headers`, `both`, `oauth`) along with an `oauth2_server_config` block for controlling Bifrost's OAuth 2.1 authorization server behavior. ## Changes - **New `mcp/gateway-auth.mdx` page** — documents the three auth modes, the full OAuth 2.1 connect flow (with sequence diagram), identity modes at consent (virtual key, session, user), configuration via UI/API/config.json, grant management, token lifetime and revocation behavior, discovery endpoints, and troubleshooting guidance. - **`mcp_server_auth_mode` and `oauth2_server_config` fields** — added to the OpenAPI schema and config YAML. `mcp_server_auth_mode` controls whether `/mcp` accepts header credentials, Bifrost-issued JWTs, or both. `oauth2_server_config` exposes `issuer_url`, `auth_code_ttl`, and `access_token_ttl`. - **`mcp_external_base_url` renamed to `mcp_external_client_url`** — clarifies that this field governs Bifrost's outbound OAuth client redirect URI (to upstream servers like Notion/Jira), not the inbound server-side discovery URL. - **`mcp/gateway.mdx` updated** — the per-user auth section now references the gateway auth mode and notes that identity establishment differs between `headers` and `both`/`oauth` modes. The Claude Code DCR probe note is updated to reflect that in `both`/`oauth` mode the probe is handled correctly and the error doesn't appear. - **`cli-agents/claude-code.mdx` updated** — the "Method Not Allowed" troubleshooting note is scoped to the default `headers` mode and clarifies that `both`/`oauth` mode serves real Dynamic Client Registration. - **`docs.json` updated** — `mcp/gateway-auth` added to the MCP Gateway navigation group; indentation normalized to tabs throughout. - **New UI screenshots** — `ui-mcp-server-auth-mode.png`, `ui-oauth-consent.png`, and `ui-oauth-grants.png` added. ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Navigate to the MCP Gateway section of the docs and verify the new **Gateway Authentication** page renders correctly, including the sequence diagram, configuration tabs, and screenshots. Confirm the `mcp/gateway.mdx` cross-links to `gateway-auth` resolve. Verify the renamed `mcp_external_client_url` field appears correctly in the API reference. ## Screenshots/Recordings New page includes screenshots of the OAuth consent UI (`ui-oauth-consent.png`), the MCP server auth mode config panel (`ui-mcp-server-auth-mode.png`), and the OAuth grants table (`ui-oauth-grants.png`). ## Breaking changes - [x] Yes - [ ] No The `mcp_external_base_url` config field is renamed to `mcp_external_client_url`. Any existing configuration using the old field name will need to be updated. ## Related issues Related to the Claude Code DCR probe error reported at anthropics/claude-code#46640. ## Security considerations The new OAuth 2.1 authorization server surface (when `mcp_server_auth_mode` is `both` or `oauth`) issues short-lived JWTs signed with an auto-generated RSA key. Refresh tokens rotate on each use. Grants can be revoked from the UI. In `oauth` mode, header-based credentials (virtual keys, API keys) are rejected on `/mcp`, tightening the inbound auth surface. The `access_token_ttl` default of 600 seconds bounds the window between a revoke and full enforcement. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Adds a new
mcp/gateway-auth.mdxdocumentation page covering how inbound MCP clients authenticate to Bifrost's/mcpendpoint, and introduces themcp_server_auth_modeconfiguration field (headers,both,oauth) along with anoauth2_server_configblock for controlling Bifrost's OAuth 2.1 authorization server behavior.Changes
mcp/gateway-auth.mdxpage — documents the three auth modes, the full OAuth 2.1 connect flow (with sequence diagram), identity modes at consent (virtual key, session, user), configuration via UI/API/config.json, grant management, token lifetime and revocation behavior, discovery endpoints, and troubleshooting guidance.mcp_server_auth_modeandoauth2_server_configfields — added to the OpenAPI schema and config YAML.mcp_server_auth_modecontrols whether/mcpaccepts header credentials, Bifrost-issued JWTs, or both.oauth2_server_configexposesissuer_url,auth_code_ttl, andaccess_token_ttl.mcp_external_base_urlrenamed tomcp_external_client_url— clarifies that this field governs Bifrost's outbound OAuth client redirect URI (to upstream servers like Notion/Jira), not the inbound server-side discovery URL.mcp/gateway.mdxupdated — the per-user auth section now references the gateway auth mode and notes that identity establishment differs betweenheadersandboth/oauthmodes. The Claude Code DCR probe note is updated to reflect that inboth/oauthmode the probe is handled correctly and the error doesn't appear.cli-agents/claude-code.mdxupdated — the "Method Not Allowed" troubleshooting note is scoped to the defaultheadersmode and clarifies thatboth/oauthmode serves real Dynamic Client Registration.docs.jsonupdated —mcp/gateway-authadded to the MCP Gateway navigation group; indentation normalized to tabs throughout.ui-mcp-server-auth-mode.png,ui-oauth-consent.png, andui-oauth-grants.pngadded.Type of change
Affected areas
How to test
Navigate to the MCP Gateway section of the docs and verify the new Gateway Authentication page renders correctly, including the sequence diagram, configuration tabs, and screenshots. Confirm the
mcp/gateway.mdxcross-links togateway-authresolve. Verify the renamedmcp_external_client_urlfield appears correctly in the API reference.Screenshots/Recordings
New page includes screenshots of the OAuth consent UI (
ui-oauth-consent.png), the MCP server auth mode config panel (ui-mcp-server-auth-mode.png), and the OAuth grants table (ui-oauth-grants.png).Breaking changes
The
mcp_external_base_urlconfig field is renamed tomcp_external_client_url. Any existing configuration using the old field name will need to be updated.Related issues
Related to the Claude Code DCR probe error reported at anthropics/claude-code#46640.
Security considerations
The new OAuth 2.1 authorization server surface (when
mcp_server_auth_modeisbothoroauth) issues short-lived JWTs signed with an auto-generated RSA key. Refresh tokens rotate on each use. Grants can be revoked from the UI. Inoauthmode, header-based credentials (virtual keys, API keys) are rejected on/mcp, tightening the inbound auth surface. Theaccess_token_ttldefault of 600 seconds bounds the window between a revoke and full enforcement.Checklist
docs/contributing/README.mdand followed the guidelines