Retire the mcp:Access action - #1344
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
53f3e6d to
3540fc9
Compare
c320243 to
f8942b2
Compare
The action mapped to exactly one path, /mcp, and ext_authz is disabled on that route, so it was never evaluated. A role granting it therefore implied an access control that did not run -- worse than not having the action at all. The wholesale gate is the identity-provider scope: JWTVerifier rejects a token without it, so a caller cannot reach the protocol endpoint at all. Per-operation authorization is unchanged, because every tool call reaches OSMO through /api where gateway JWT validation and semantic RBAC apply exactly as they do for the CLI and UI. resourceTypeMCP and ResourceTypeMCP go too; nothing outside the registry referenced either. The two tests removed existed only to assert this action's path mapping. Existing deployments need no migration. IsValidAction has no callers, so nothing validates stored role actions against the registry: a role row still granting mcp:Access keeps an action that matches no path, which is already true today.
3540fc9 to
2ef969b
Compare
f8942b2 to
4233d13
Compare
|
Consolidated into #1342 to reduce the number of PRs in this stack for review. Retiring No content is lost: the cumulative diff of the stack against |
Stacked on #1343. Retires an RBAC action that is never evaluated.
Issue #None
+2 / -100.
Why
mcp:Accessmapped to exactly one path,/mcp, andext_authzis disabled on that route, so it was never evaluated. A role granting it implied an access control that did not run, which is worse than not having the action at all.The wholesale gate is the identity-provider scope:
JWTVerifierrejects a token without it, so a caller cannot reach the protocol endpoint. Per-operation authorization is unchanged, because every tool call reaches OSMO through/api, where gateway JWT validation and semantic RBAC apply exactly as they do for the CLI and UI.resourceTypeMCPandResourceTypeMCPgo with it; nothing outside the registry referenced either. The two removed tests existed only to assert this action's path mapping.No migration needed
IsValidActionhas no callers, so nothing validates stored role actions against the registry. A role row still grantingmcp:Accesssimply keeps an action matching no path, which is already the case today since the route bypassesext_authz. Removing it from the seeded default role means the grant stops being handed out; it does not need clearing from existing rows.Verification
bazel test //src/utils/roles/...passes 2/2, including the integration testbazel test //src/utils/connectors/tests:test_default_rolespassesrender-tests.shpassesLeft alone
deployments/charts/osmo/tests/control-mcp-values.yamlalso contains the stringmcp:Access, but underscopes:. That is an OAuth scope in the direct-mode fixture, a different concept that happens to share the spelling. It belongs with the direct-mode removal, not here.🤖 Generated with Claude Code