Access requestor information via HTTP headers
mainUnless the -suppressWhois flag is used, tsnsrv automatically identifies the Tailscale user and node making the request and attaches identity information as HTTP headers. This allows your upstream service to perform authentication or authorization based on Tailscale identity.
Headers attached to upstream requests:
- X-Tailscale-User: numeric ID of the user
- X-Tailscale-User-LoginName: login name (e.g., foo@example.com)
- X-Tailscale-User-LoginName-Localpart: local part of login name (e.g., foo)
- X-Tailscale-User-LoginName-Domain: domain part of login name (e.g., example.com)
- X-Tailscale-User-DisplayName: display name of the user
- X-Tailscale-User-ProfilePicURL: URL of the user's profile picture
- X-Tailscale-Caps: user capabilities
- X-Tailscale-Node: numeric ID of the originating node
- X-Tailscale-Node-Name: name of the originating node
- X-Tailscale-Node-Caps: node device capabilities
- X-Tailscale-Node-Tags: ACL tags on the origin node