You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(oauth): env vars override profile config; fix envelope restart-recovery gaps
- MCP4_ALLOW_UNREGISTERED_CLIENTS/MCP4_ALLOWED_UNREGISTERED_REDIRECT_URIS/
MCP4_ALLOWED_ORIGINS now take full precedence over profile JSON when set;
previously ?? meant allow_unregistered_clients=false in profile blocked env var
- Envelope restart-recovery: populate inboundAuthTokenStore after createSession
so enterprise enforcement works for restored sessions; move oauthTokensByAccessToken
population post-createSession to prevent map leaks on init failure
- Stale envelope (>30 days) now returns HTTP 401 instead of creating scopeless session
- Fix entry guard: !tokenData instead of !refreshToken to skip recovery when
oauthTokensByAccessToken already populated (non-rotating IdPs with no refresh token)
Co-Authored-By: Agent <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
-`ClientAuthGate` orchestrator wired into HTTP transport session init: validates inbound client API key before session establishment; resolves `AuthorizedPrincipal` (authType=`token`) and attaches it as `session.clientPrincipal`; mode-aware (`required` rejects with HTTP 401 when no identity is resolved, `optional` allows anonymous sessions); when configured, the gate becomes the inbound auth authority and bypasses the legacy `authConfigs` token-required guard so `mode='optional'` can permit anonymous initialization (AUTH-02; partial AUTH-03). JWT/OIDC gate added in Phase 4.
16
16
17
17
### Fixed
18
+
-`MCP4_ALLOW_UNREGISTERED_CLIENTS`, `MCP4_ALLOWED_UNREGISTERED_REDIRECT_URIS`, and `MCP4_ALLOWED_ORIGINS` env vars now act as operator overrides: when set, they take full precedence over profile JSON values (previously `??` meant `allow_unregistered_clients: false` in profile silently blocked the env var).
19
+
- Encrypted token envelope restart-recovery: `inboundAuthTokenStore` now populated after session creation (fixes enterprise enforcement on restored sessions); stale envelopes (>30 days) now return HTTP 401 instead of silently creating a scopeless session; map population moved post-`createSession` to prevent map leaks on init failure; entry guard changed from `!refreshToken` to `!tokenData` to correctly skip recovery when OAuth map already populated for non-rotating IdPs.
18
20
- Invalid supplied tokens during HTTP session initialization now return HTTP 403 instead of 401, preventing VS Code from misclassifying bearer-token failures as OAuth discovery and showing an irrelevant dynamic client registration prompt.
19
21
- Tenant OAuth degradation: auth gate now checks `isOAuthConfigOperational` on the effective OAuth config (which may be tenant-specific) so an inoperational tenant OAuth config no longer sends an uncompletable 401 OAuth challenge.
20
22
- Server-side env token validation at session init: when a profile auth config has both `value_from_env` and `validation_endpoint`, the resolved env token is validated via the endpoint before the session is established, failing fast with HTTP 401 instead of accepting the connection and returning 401 on every tool call.
0 commit comments