Skip to content

Control MCP identity and auditing

Every MCP request runs as the owner of its API key. Role changes take effect without replacing the key.

Use Varroa RBAC to grant access to Varroa resources. Check the result with get_my_permissions, optionally scoped to a namespace and controller.

Calling a managed controller requires both:

CheckRequired grant
Varroa can expose the controllercontrollers:read in the controller scope
Jenkins can run the requested toolA matching JenkinsRoleBinding or linked Jenkins role

The request reaches Jenkins as the caller’s subject, username, email, and groups. Jenkins applies its normal role-strategy authorization. Varroa does not send the API key to the controller.

This example grants one group global Jenkins read access on controllers in one namespace:

apiVersion: varroa.dev/v1alpha1
kind: JenkinsRole
metadata:
name: mcp-reader
spec:
roleType: Global
permissions:
- hudson.model.Hudson.Read
---
apiVersion: varroa.dev/v1alpha1
kind: JenkinsRoleBinding
metadata:
name: platform-mcp-readers
spec:
roleRef: mcp-reader
subjects:
- kind: Group
name: platform-team
controllerScope:
namespaces: [teams-platform]
jenkinsScope:
type: Global

Use Jenkins RBAC for folder, pattern, or agent scope.

Successful mutating MCP tools publish activity with source: mcp and an actor resolved from the calling identity. Filter the activity API or feed by that source when reviewing agent actions.

Some controller lifecycle requests also produce a later operator event. The MCP event records who requested the change. The operator event records the result of reconciliation.