How Aperture grants work
Last validated:
Aperture controls which users and groups can access which models and MCP capabilities through grants. This topic explains the model behind grants so you can reason about access before you write configuration. For step-by-step instructions, refer to the grant how-tos linked under Next steps.
The grants model
Aperture grants build on the Tailscale grants framework, so they inherit two properties that shape everything else:
- Deny-by-default. Without a matching grant, a user can connect to the Aperture device but cannot access any models or MCP capabilities. Access exists only where a grant explicitly provides it.
- Additive and allow-only. Each grant only adds access. There is no deny rule. A user's effective access is the union of every grant whose
srcmatches their identity. To take access away, you remove or narrow the grants that provide it rather than writing a rule that subtracts it.
If you are coming from Tailscale network ACLs, this is the key difference to internalize: there is no deny in grants. You express policy entirely through what you allow.
Anatomy of a grant
A grant pairs a set of identities with a set of capabilities:
{
"grants": [
{
"src": ["group:ai-users"],
"app": {
"tailscale.com/cap/aperture": [
{ "role": "user" },
{ "models": "anthropic/**" }
]
}
}
]
}
srclists who the grant applies to. Entries can be individual users ("alice@example.com"), SCIM groups by email, or Tailscale groups ("group:ai-users"). Matching agroup:entry requires visible groups.app["tailscale.com/cap/aperture"]is an array of capability objects describing what the matched identities can do. Common capabilities includerole(the user's permission level),models(a glob overprovider/modelnames), and the MCP fieldsmcp_tools,mcp_resources, andmcp_templates. Operational fields such as custom headers, quotas, hooks, and CORS settings also live here.
For the complete list of capability fields and their syntax, refer to the grants configuration reference.
How Aperture evaluates a request
Aperture resolves access at request time using the connecting user's Tailscale identity:
- Identify the user. Aperture authenticates every connection through Tailscale identity, so there is no separate login step.
- Collect matching grants. Aperture gathers every grant whose
srcmatches the user's login, email, or group membership. - Merge capabilities. The capabilities from all matching grants combine into the user's effective access.
- Check the requested action. Aperture matches the requested model name against the merged
modelspatterns (and MCP items against themcp_*patterns), then applies the precedence rules below. - Allow or deny. If a capability grants the requested access, the request proceeds. If nothing matches, Aperture denies the request, consistent with deny-by-default.
Precedence and conflicts
Because grants are additive, multiple grants commonly apply to the same user. Two resolution rules determine the outcome when they overlap:
- Roles: the highest permission wins. If matching grants assign different roles, admin takes precedence over user. A user who matches both an admin grant and a user grant receives admin-level permissions.
- Model patterns: the most specific glob wins. When several
modelspatterns match a requested model, Aperture uses the most specific one. For example,"anthropic/claude-opus-4-7"beats"anthropic/**", which beats"**". When two patterns are equally specific, the entry that appears earlier in the configuration wins.
These rules apply within the additive union; they decide which matching entry takes effect, not whether to subtract access.
Groups in grants
To use group: identifiers in a grant's src, the Aperture device needs group membership information, which the Tailscale control plane does not send by default. Enable visible groups by adding the tailscale.com/visible-groups node attribute to the Aperture device in your tailnet policy file. Aperture then evaluates group membership at request time using the connecting user's identity.
Next steps
- Grant access to models: Configure grants that control which models each user or group can use.
- Grant access to MCP tools: Extend grants to MCP tools, resources, and templates.
- Set up admin access: Assign the admin role for dashboard and configuration management.
- How Aperture works: Understand how identity, routing, and telemetry fit together.