Tailnet Key Authority JSON Model (tslockjsonv1/tka.go)

tailscale · cmd/tailscale/tslockjsonv1/tka.go · go · BSD-3-Clause
security, infra, tag:tailnetlock, tag:json, tag:key-authority, tag:serialization

Defines JSON-serializable structs for Tailnet Key Authority AUMs, enabling external tools to read and manipulate Tailnet Lock state without internal CBOR definitions.

// Source: https://github.com/tailscale/tailscale | License: BSD-3-Clause | Copyright 2020 Tailscale Inc & contributors
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause

//go:build !ts_omit_tailnetlock

package tslockjsonv1

// AUM is the expanded version of a [tka.AUM], designed so external tools
// can read the AUM without knowing our CBOR definitions.
type AUM struct {
	MessageKind string
	PrevAUMHash string `json:",omitzero"`

	// Key encodes a public key to be added to the key authority.
	// This field is used for AddKey AUMs.
	Key Key `json:",omitzero"`

	// KeyID references a public key which is part of the key authority.
	// This field is used for RemoveKey and UpdateKey AUMs.
	Ke

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key