Read the policy console
About 797 words
The frontend plugin shows each policy in a console: at /tailscale, and as the Policy tab on every policy entity. This guide goes through what each part shows and how to link to it. The data comes from GET /api/tailscale/overview, which the backend renders from the catalog at most once a minute; the frontend keeps it for another minute, so a catalog change can take a couple of minutes to show.
The header
The header names the policy and its tailnet, says when it was rendered, and shows where the file is published: Pull request in acme/network or Pushes to acme/network, linked to the last pull request or commit. If the repository isn't in tailscale.allowedRepos, it says Not published and why. With more than one policy in the catalog, the header has a picker. You can copy or download the rendered file from it too.
Overview
The overview counts grants, SSH rules, groups, tags, auto-approved targets and tests, and has three cards:
- Access map. Every grant: sources on the left, destinations on the right, grouped by class. Capability grants are dashed lines. Hover a selector to trace its grants; click it to open Grants filtered by it. A tag reached as a device without a reason is marked.
- Health. Every error and warning of the policy, and every Tailscale entity whose
spec.targetisn't a policy. Problems explains each message. - From the catalog. Shown when
catalogGrantsis on: how many grants came from API consumptions andtailnet-allow, which consumptions a grant entity already allows (Already allowed), and which stay inside a Kubernetes cluster (Inside a cluster).
The sections
The navigation on the left has the policy's sections, each with a count:
| Group | Section | Shows |
|---|---|---|
| Access | Grants | every grant, with a filter and a switch between grant entities and catalog grants |
| Tailscale SSH | every SSH rule | |
| Preview access | what someone reaches, or who reaches something | |
| Identity | Groups | the tailnet groups, their Backstage Groups and their members' logins |
| Tags | each tag, its owners, and how many rules use it | |
| Hosts | the names from the policy's spec.hosts | |
| Devices | Node attributes | the node attributes, by device |
| Auto approvers | the Services, routes and exit nodes devices may advertise | |
| Verify | Tests | the tests and sshTests, grouped by entity |
| Policy file | the rendered file |
Rules link to the entity they come from. The filter box takes selectors and ports, such as tag:ceph, group:admins or 443.
Preview access
Preview answers two questions, rule by rule:
- From: pick a user, group or tag and see what it can reach. A user is also every group they're in and
autogroup:member; a group is alsoautogroup:member; a tag is alsoautogroup:tagged. - To: pick a destination and see who reaches it.
It shows the grants and Tailscale SSH rules that apply, with the line of the file each comes from.
Policy file
The rendered file, with line numbers. On the right, the policy's entities are listed by type; pick one to highlight the lines it rendered to.
Link to a section
The console keeps its state in the URL, so you can link to any view. The query parameters are:
| Parameter | Value |
|---|---|
policy | a policy's metadata.name (on /tailscale only; the Policy tab always shows its own entity) |
section | overview, grants, ssh, preview, groups, tags, hosts, nodeAttrs, autoApprovers, tests or file |
q | the filter text |
origin | on grants: entity or catalog |
focus | on file: an entity reference to highlight |
lines | on file: a line or range to highlight, such as 27 or 27-34 |
For example, /tailscale?policy=my-tailnet§ion=file&focus=tailscale:default/grant-admins-grafana opens the file with that grant's lines highlighted.
Entity cards
On the overview page of a Component, API, Resource, Group or User, a Tailscale card shows how the entity is on the tailnet, per policy. It lists what the entity is on the tailnet (its tags, Services, group or login, and where each comes from), then:
- the grants it is a source of (Reaches) and a destination of (Reached by);
- SSH rules into it and from it;
- the Services, routes and exit nodes it may advertise, node attributes, and the tags it may give devices;
- tests that name it, and the Tailscale entities that list it in
appliesTo.
An entity that's nowhere on the tailnet gets no card.
A Tailscale entity other than the policy gets a card with the rule it is, its problems, and the lines it renders to, with a link to them in the policy file. If its target isn't a policy, the card says so.
