Repository navigation
feat(tests): Add RBAC + multi-transport MCP protocol E2E tests - #3424
Merged
Merged
Conversation
Add 40 new E2E tests covering multi-user RBAC visibility, token scope enforcement, SSE transport, per-server MCP endpoints, and security deny paths through the MCP JSON-RPC protocol via mcpgateway.wrapper. - Extract shared helpers into tests/e2e/mcp_test_helpers.py - Add tests/e2e/test_mcp_rbac_transport.py with 9 test classes: TestServerVisibilityViaAPI, TestMcpToolsVisibilityByRole, TestMcpResourcesPromptsByRole, TestMcpToolCallByRole, TestMcpScopedTokenPermissions, TestMcpSSETransport, TestMcpPerServerEndpoint, TestDenyPaths, TestCrossTransportConsistency - Add register_fast_time_sse docker-compose service for SSE gateway - Add make test-mcp-rbac target - Refactor test_mcp_cli_protocol.py to import from shared helpers Signed-off-by: Mihai Criveti <[email protected]>
…ering The docker-compose stack now pre-registers an SSE gateway at http://fast_time_server:8080/sse. The E2E RBAC test fixture cleanup only matched by name, missing the docker-compose gateway and hitting a GatewayDuplicateConflictError (409) on re-registration. Signed-off-by: Mihai Criveti <[email protected]>
MohanLaksh
pushed a commit
that referenced
this pull request
Mar 12, 2026
* feat(tests): Add RBAC + multi-transport MCP protocol E2E tests Add 40 new E2E tests covering multi-user RBAC visibility, token scope enforcement, SSE transport, per-server MCP endpoints, and security deny paths through the MCP JSON-RPC protocol via mcpgateway.wrapper. - Extract shared helpers into tests/e2e/mcp_test_helpers.py - Add tests/e2e/test_mcp_rbac_transport.py with 9 test classes: TestServerVisibilityViaAPI, TestMcpToolsVisibilityByRole, TestMcpResourcesPromptsByRole, TestMcpToolCallByRole, TestMcpScopedTokenPermissions, TestMcpSSETransport, TestMcpPerServerEndpoint, TestDenyPaths, TestCrossTransportConsistency - Add register_fast_time_sse docker-compose service for SSE gateway - Add make test-mcp-rbac target - Refactor test_mcp_cli_protocol.py to import from shared helpers Signed-off-by: Mihai Criveti <[email protected]> * fix(tests): clean up pre-existing SSE gateway by URL before re-registering The docker-compose stack now pre-registers an SSE gateway at http://fast_time_server:8080/sse. The E2E RBAC test fixture cleanup only matched by name, missing the docker-compose gateway and hitting a GatewayDuplicateConflictError (409) on re-registration. Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
msureshkumar88
pushed a commit
that referenced
this pull request
May 13, 2026
* feat(tests): Add RBAC + multi-transport MCP protocol E2E tests Add 40 new E2E tests covering multi-user RBAC visibility, token scope enforcement, SSE transport, per-server MCP endpoints, and security deny paths through the MCP JSON-RPC protocol via mcpgateway.wrapper. - Extract shared helpers into tests/e2e/mcp_test_helpers.py - Add tests/e2e/test_mcp_rbac_transport.py with 9 test classes: TestServerVisibilityViaAPI, TestMcpToolsVisibilityByRole, TestMcpResourcesPromptsByRole, TestMcpToolCallByRole, TestMcpScopedTokenPermissions, TestMcpSSETransport, TestMcpPerServerEndpoint, TestDenyPaths, TestCrossTransportConsistency - Add register_fast_time_sse docker-compose service for SSE gateway - Add make test-mcp-rbac target - Refactor test_mcp_cli_protocol.py to import from shared helpers Signed-off-by: Mihai Criveti <[email protected]> * fix(tests): clean up pre-existing SSE gateway by URL before re-registering The docker-compose stack now pre-registers an SSE gateway at http://fast_time_server:8080/sse. The E2E RBAC test fixture cleanup only matched by name, missing the docker-compose gateway and hitting a GatewayDuplicateConflictError (409) on re-registration. Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/e2e/mcp_test_helpers.py(used by both existing and new tests)register_fast_time_ssedocker-compose service for always-available SSE gatewaymake test-mcp-rbactargetTest classes (tests/e2e/test_mcp_rbac_transport.py)
TestServerVisibilityViaAPITestMcpToolsVisibilityByRoletools/listper user roleTestMcpResourcesPromptsByRoleresources/list+prompts/listTestMcpToolCallByRoleTestMcpScopedTokenPermissionsTestMcpSSETransportTestMcpPerServerEndpoint/servers/{UUID}/mcpscoped accessTestDenyPathsTestCrossTransportConsistencyKey design decisions
APIRequestContext), not JWT shortcutsPOST /teams/{id}/members(admin direct add) for reliabilitytools.executeon the default/mcpendpoint because it checks global scope onlyscope.permissions) are correctly blocked at HTTP middleware when missingservers.useTest plan
make test-mcp-cli— 22 existing tests pass (no regression)make test-mcp-rbac— 40 new tests pass