Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
node: /oauth/revoke accepts a verifying Biscuit without a token
Tomas Tormo45765f317cb8
diff --git a/internal/node/sts.go b/internal/node/sts.goindex 6adbdb1e..2ce4adf0 100644--- a/internal/node/sts.go+++ b/internal/node/sts.go@@ -706,9 +706,8 @@ func authenticateSidecarCaller(node *AgentMeshNode, sidecarToken string, r *http}// handleNodeOAuthRevoke implements RFC 7009 Token Revocation (POST /oauth/revoke)-// on agentmesh-node, adding the Biscuit's root Block 0 revocation ID to the local-// revocation cache so any call carrying it (or any child attenuated from it)-// is immediately rejected.+// on agentmesh-node. It caches the revocation ID of the Biscuit's last block, so+// the token and its attenuated children are rejected and its parent is not.func handleNodeOAuthRevoke(node *AgentMeshNode, sidecarToken string, w http.ResponseWriter, r *http.Request) {if r.Method != http.MethodPost {writeNodeOAuthError(w, http.StatusMethodNotAllowed, "invalid_request", "Method not allowed")diff --git a/site/content/docs/reference/node-api.md b/site/content/docs/reference/node-api.mdindex 26230634..8335eb7a 100644--- a/site/content/docs/reference/node-api.md+++ b/site/content/docs/reference/node-api.md@@ -50,7 +50,7 @@ Authorization Server.| `GET /.well-known/oauth-protected-resource` | none | RFC 9728 OAuth 2.1 Protected Resource Metadata naming the Agent Mesh control plane in `authorization_servers`. || `GET /.well-known/oauth-authorization-server` | none | RFC 8414 metadata for this node's token endpoint: the grant types and client authentication methods it accepts. || `POST /oauth/token` | token or client assertion | Token endpoint: RFC 8693 token exchange, RFC 7523 client assertion and JWT authorization grants. Every grant returns a Delegated or Task-Attenuated Biscuit. See [Token endpoint (`/oauth/token`)](#token-endpoint-oauthtoken). |-| `POST /oauth/revoke` | token | RFC 7009 Token Revocation: revokes a task Biscuit in this node's local revocation cache. |+| `POST /oauth/revoke` | token, or none when the Biscuit verifies | RFC 7009 Token Revocation: revokes a task Biscuit in this node's local revocation cache. || `GET /metrics` | token | Prometheus metrics (`agentmesh_node_*`). || `POST /mcp` | token | The MCP server (Streamable HTTP, sessionless: no `Mcp-Session-Id`, `GET` answers `405`). `/` is an alias. || `GET /v1/models` | token | Models served by every reachable inference provider. |@@ -117,6 +117,8 @@ token_grant:`POST /oauth/revoke` accepts `token=<base64-biscuit>` and records its leafrevocation ID in the node's local revocation cache until the token expires.+When the Biscuit verifies under a trusted control plane key, the node revokes+the Biscuit without authenticating the caller.## Envoy `ext_authz` and `ext_proc` gateway integration