This episode covers the identity layer of a tailnet: SSO authentication via Google, GitHub, Microsoft, or Okta with MFA, the use of auth keys for automated provisioning, API keys for integration, and Tailnet Lock to protect the tailnet from compromise.

In episode 12 you understood the encryption layer. But before encryption speaks, there's a question that must be answered: who are the devices and who are the people joining the tailnet? This is the identity layer — and the answer comes from authentication and SSO.
Episode 13 covers how a tailnet verifies identity: logging in via Google, GitHub, Microsoft, or Okta with multi-factor authentication, using auth keys for automated provisioning without human interaction, API keys for integration, and Tailnet Lock to protect the tailnet even if an admin is compromised.
The first time you run tailscale up, you're directed to the login page of your chosen provider — this is Single Sign-On (SSO). Human identity comes from a corporate or personal identity provider, not from Tailscale's own database:
tailscale loginThe tailscale login command re-opens the authentication flow, useful when you want to switch providers or reconnect an expired node.
MFA happens at the identity provider level: if your Google or Okta has MFA enabled, Tailscale login uses it automatically. That means one extra security layer with no additional configuration in the tailnet. For organizations, enforce MFA in the provider policy to protect tailnet access from compromised accounts.
For cloud servers, containers, and headless devices, there's no browser to log in with. The solution is auth keys — single-use keys generated in the admin console:
sudo tailscale up --auth-key=tskey-auth-kEYmPLdExampleAuth keys can be one-shot (used up once) or ephemeral (node automatically removed when it goes down). The sudo tailscale up --auth-key=... command enables provisioning without human interaction — an important pattern for episodes 17 and 21.
An API key is used to call the Tailscale API — managing devices, ACLs, and configuration from code. The difference from an auth key: an API key is an admin credential for the API, not for node login:
curl -s https://api.tailscale.com/api/v2/tailnet/example.com/devices \
-H "Authorization: Bearer tskey-api-xxxxx"The curl -s ... -H "Authorization: Bearer ..." command retrieves the device list via the API. API keys must be stored securely and given a validity period — never commit them to a repository.
Tailnet Lock adds signature approval: significant tailnet changes — like adding a new node — require signatures from a designated set of keys. Even if admin credentials are hacked, an attacker still can't add nodes without keys meeting the threshold:
sudo tailscale lock init
sudo tailscale lock signThe sudo tailscale lock init command enables the lock and shows your key. tailscale lock sign signs pending operations. Tailnet Lock is a strong last line of defense for production tailnets.
Humans -> SSO (Google/GitHub/Microsoft/Okta) + MFA
Devices -> auth keys (one-shot/ephemeral)
Integration -> API keys / OAuth
Defense -> Tailnet Lock (signature approval)1. Create a one-shot auth key with a short validity period
2. Provision the node with the auth key
3. Verify the node appears in the admin console
4. Manual SSO login for workstations
5. Rotate the auth key after provisioning is doneThis sequence ensures no auth key sits idle for too long. For workstations, let the SSO flow run — human interaction actually ensures device ownership is identifiable.
Tailnet identity isn't something configured once and forgotten. Key expiry forces nodes to re-authenticate periodically, and Tailnet Lock keeps changes controlled. Treating identity as an ongoing process is the key to long-term security.
Authentication is the gate that keeps the encryption layer meaningful. With SSO plus MFA for humans, auth keys for automated devices, API keys for integration, and Tailnet Lock as a safety net, your tailnet has a complete identity layer.
Episode 13 completed the first layer of the security model: identity. You understand the SSO and MFA flow, provisioning with auth keys, API key integration, and the extra protection of Tailnet Lock.
Key takeaways:
In the next episode, episode 14, we'll cover security hardening and advanced ACLs — granular per-node and per-user ACL rules, tag-based policies with least privilege, plus a hardening checklist like key expiry, device monitoring, Taildrop and SSH restrictions, and securing public server nodes.