bharos opened a new pull request, #15108:
URL: https://github.com/apache/gravitino/pull/15108

   > Draft: the pages call the gateway's current API paths, which move under 
`/api/v1` before the gateway's first release. This PR switches to them then. 
The tracking issue will be linked.
   
   ### What changes were proposed in this pull request?
   
   Adds an **MCP** section to web-v2 for the [Apache Gravitino MCP 
Gateway](https://github.com/apache/gravitino-mcp-gateway), which controls who 
may use which MCP servers and keeps an audit log of their calls:
   
   - **My Servers**: the gateway's MCP servers, each person's access to each, 
and the URL MCP clients use. People ask for access here, and connect to servers 
that have their own sign-in.
   - **Manage Servers** (gateway admins): register, edit, deactivate and delete 
MCP servers.
   - **Access Requests** (gateway admins): approve or deny requests, and revoke 
granted access.
   - **Audit Log**: a person's own calls, or everyone's for gateway admins, 
with filters, details and CSV export.
   - **Service Accounts** (gateway admins): register workloads that call MCP 
servers with their GKE, GCE or EKS identity.
   
   The section appears only when `gravitino.mcpGateway.uri` is set and listed 
in `gravitino.server.visibleConfigs`, and the web UI signs in with OIDC. The 
server needs no change: the existing `/configs` endpoint already serves any key 
that `visibleConfigs` lists. The pages call the gateway's REST API from the 
browser with the person's Gravitino sign-in. `docs/webui-v2.md` describes the 
pages and the setup on both sides.
   
   ### Why are the changes needed?
   
   The MCP gateway, in its own repository, has a REST API and a CLI but no UI. 
These pages let people and admins use it from Gravitino's web UI.
   
   Fix: #(to be filed)
   
   ### Does this PR introduce _any_ user-facing change?
   
   A new **MCP** section in web-v2, hidden unless `gravitino.mcpGateway.uri` is 
configured as above.
   
   ### How was this patch tested?
   
   - New unit tests for the gateway API client and the pages' helpers. `pnpm 
lint`, `pnpm prettier` and the production build pass.
   - Manually, against a local gateway, Keycloak and Gravitino 1.3.1:
     - as an admin: registered, edited and deleted a server, registered a 
service account, and read the audit log and its details;
     - as a user: saw only My Servers and the Audit Log, and requested access;
     - as the admin again: approved the request with an expiry, then revoked it.
   
     The gateway answered every call without an error.
   
   To try it:
   
   ```bash
   # The gateway, with Keycloak, Gravitino and Gravitino's MCP server
   git clone https://github.com/apache/gravitino-mcp-gateway && cd 
gravitino-mcp-gateway
   docker compose -f dev/keycloak/docker-compose.yaml up -d
   # Set the variables from the README's "Try it with Keycloak", plus:
   export CORS_ALLOWED_ORIGINS=http://localhost:3000
   uv sync && uv run uvicorn mcp_gateway.main:app --port 8000
   
   # This PR's web UI; sign in as alice (an admin) or bob, whose passwords are 
their names
   cd web-v2/web && pnpm install && pnpm dev
   ```
   
   One existing test, `src/lib/store/auth/index.test.js`, fails on `main` too: 
it uses `loginApi` without importing it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to