The policy as catalog entities
One kind Tailscale entity per grant, SSH rule, tag, node attribute, auto approver or test, each with an owner. The catalog validates them and relates them to their policy, owner, system and the entities they are about.
Grants come from what the catalog already knows, such as which Component consumes which API and where that API is reached. Everything else comes from kind Tailscale entities. Backstage renders the policy file, shows who reaches what, and keeps a pull request open with it.

Four npm packages for the new backend and frontend systems of Backstage.
The same tailnet, kept two ways.
Edited by hand, reviewed as text
Rendered from entities, reviewed as a pull request
An API says where it is reached. A Component that consumes it says which tag its traffic comes from. Backstage writes the grant.
Annotate the API and the consuming Component
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: payments-api
annotations:
specht-labs.de/tailnet-dst: svc:payments
specht-labs.de/tailnet-ports: tcp:443
spec:
type: openapi
lifecycle: production
owner: group:platform
definition: '{}'
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: reporting
annotations:
specht-labs.de/tailnet-src: tag:reporting
spec:
type: service
lifecycle: production
owner: group:platform
consumesApis: [payments-api]Turn on catalog grants in the policy entity
apiVersion: specht-labs.de/v1alpha1
kind: Tailscale
metadata:
name: my-tailnet
spec:
type: policy
owner: group:platform
tailnet: example.ts.net
catalogGrants: trueBackstage renders the grant into the policy file
"grants": [
// From the catalog: payments-api
// Consumed by reporting.
{
"src": ["tag:reporting"],
"dst": ["svc:payments"],
"ip": ["tcp:443"],
},
],Your first policy builds a complete policy from scratch, and Grants from the catalog covers the annotations in full.
Not affiliated with Tailscale Inc.
This is a community plugin by SpechtLabs. It is not made, endorsed or supported by Tailscale Inc. "Tailscale" is a trademark of Tailscale Inc.
tailscale.css.esm.js) is listed as a side effect, so webpack no longer drops its import. Until now, every page and card rendered unstyled, and the access map's lines filled black.https://www.npmjs.com/package/@spechtlabs/backstage-plugin-tailscale/v/0.1.2
backstage-tailscale-diff says which path doesn't exist, or isn't a directory, instead of failing with spawnSync git ENOENT.https://www.npmjs.com/package/@spechtlabs/backstage-plugin-tailscale-backend/v/0.1.1
https://www.npmjs.com/package/@spechtlabs/backstage-plugin-tailscale/v/0.1.1
https://www.npmjs.com/package/@spechtlabs/backstage-plugin-catalog-backend-module-tailscale/v/0.1.1
https://www.npmjs.com/package/@spechtlabs/backstage-plugin-tailscale-common/v/0.1.1