Skip to content

KeyOps

Defined in: packages/core/src/ops.ts:73

create(options): Promise<AuthKey>

Defined in: packages/core/src/ops.ts:89

Issues an auth key. The secret is returned once and never again.

CreateAuthKeyOptions

Promise<AuthKey>

Risk: write. Anyone holding the secret can add a machine to the tailnet with the key’s tags.


fetch(userId?): Promise<AuthKey[]>

Defined in: packages/core/src/ops.ts:80

Lists auth keys.

string

Required by Headscale, which scopes keys per user. Ignored by Tailscale.

Promise<AuthKey[]>


revoke(key): Promise<void>

Defined in: packages/core/src/ops.ts:101

Revokes a key.

Takes the whole key because the two control planes identify keys differently: Tailscale by id, Headscale by owner plus secret.

AuthKey

Promise<void>

Risk: write. Machines already registered stay on the tailnet; only new registrations are blocked.