You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/cmd/tailscale/cli
Anton Tolchanov 32120932a5 cmd/tailscale/cli: print node signature in `tailscale lock status`
- Add current node signature to `ipnstate.NetworkLockStatus`;
- Print current node signature in a human-friendly format as part
  of `tailscale lock status`.

Examples:

```
$ tailscale lock status
Tailnet lock is ENABLED.

This node is accessible under tailnet lock. Node signature:
SigKind: direct
Pubkey: [OTB3a]
KeyID: tlpub:44a0e23cd53a4b8acc02f6732813d8f5ba8b35d02d48bf94c9f1724ebe31c943
WrappingPubkey: tlpub:44a0e23cd53a4b8acc02f6732813d8f5ba8b35d02d48bf94c9f1724ebe31c943

This node's tailnet-lock key: tlpub:44a0e23cd53a4b8acc02f6732813d8f5ba8b35d02d48bf94c9f1724ebe31c943

Trusted signing keys:
	tlpub:44a0e23cd53a4b8acc02f6732813d8f5ba8b35d02d48bf94c9f1724ebe31c943	1	(self)
	tlpub:6fa21d242a202b290de85926ba3893a6861888679a73bc3a43f49539d67c9764	1	(pre-auth key kq3NzejWoS11KTM59)
```

For a node created via a signed auth key:

```
This node is accessible under tailnet lock. Node signature:
SigKind: rotation
Pubkey: [e3nAO]
Nested:
  SigKind: credential
  KeyID: tlpub:6fa21d242a202b290de85926ba3893a6861888679a73bc3a43f49539d67c9764
  WrappingPubkey: tlpub:3623b0412cab0029cb1918806435709b5947ae03554050f20caf66629f21220a
```

For a node that rotated its key a few times:

```
This node is accessible under tailnet lock. Node signature:
SigKind: rotation
Pubkey: [DOzL4]
Nested:
  SigKind: rotation
  Pubkey: [S/9yU]
  Nested:
    SigKind: rotation
    Pubkey: [9E9v4]
    Nested:
      SigKind: direct
      Pubkey: [3QHTJ]
      KeyID: tlpub:44a0e23cd53a4b8acc02f6732813d8f5ba8b35d02d48bf94c9f1724ebe31c943
      WrappingPubkey: tlpub:2faa280025d3aba0884615f710d8c50590b052c01a004c2b4c2c9434702ae9d0
```

Updates tailscale/corp#19764

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
2 years ago
..
ffcomplete cmd/tailscale/cli/ffcomplete: remove fullstop from ShortHelp 2 years ago
bugreport.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
cert.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
cli.go cmd/tailscale/cli: set localClient.UseSocketOnly during flag parsing 2 years ago
cli_test.go various: disable stateful filtering by default (#12197) 2 years ago
configure-kube.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
configure-kube_test.go cmd/tailscale/cli: fix configuring partially empty kubeconfig (#11417) 2 years ago
configure-synology-cert.go cmd/tailscale/cli: Add CLI command to update certs on Synology devices. 2 years ago
configure-synology-cert_test.go cmd/tailscale/cli: Add CLI command to update certs on Synology devices. 2 years ago
configure-synology.go cmd/tailscale: add shell tab-completion 2 years ago
configure.go cmd/tailscale/cli: fix "subcommand required" errors when typod 2 years ago
debug.go cmd/tailscale: add shell tab-completion 2 years ago
diag.go various: add detection and Taildrop for Unraid 3 years ago
diag_other.go all: update copyright and license headers 3 years ago
down.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
drive.go cmd/tailscale: clarify Taildrive grants in help text 2 years ago
exitnode.go cmd/tailscale/cli: fix "subcommand required" errors when typod 2 years ago
exitnode_test.go cli: introduce exit-node subcommand to list and filter exit nodes 2 years ago
file.go cmd/tailscale: add shell tab-completion 2 years ago
funnel.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
id-token.go cmd/tailscale: add shell tab-completion 2 years ago
ip.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
licenses.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
login.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
logout.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
nc.go cmd/tailscale: add shell tab-completion 2 years ago
netcheck.go net/netcheck: remove hairpin probes 2 years ago
network-lock.go cmd/tailscale/cli: print node signature in `tailscale lock status` 2 years ago
ping.go cmd/tailscale: add shell tab-completion 2 years ago
risks.go util/testenv: add new package to hold InTest 2 years ago
serve_legacy.go all: use Go 1.22 range-over-int 2 years ago
serve_legacy_test.go cmd/tailscale/cli: stop spamming os.Stdout/os.Stderr in tests 2 years ago
serve_v2.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
serve_v2_test.go {ipn/serve,cmd/tailscale/cli}: move some shared funcs to ipn 2 years ago
set.go various: disable stateful filtering by default (#12197) 2 years ago
set_test.go all: update copyright and license headers 3 years ago
ssh.go cmd/tailscale/cli: set localClient.UseSocketOnly during flag parsing 2 years ago
ssh_exec.go all: update copyright and license headers 3 years ago
ssh_exec_js.go all: update copyright and license headers 3 years ago
ssh_exec_windows.go all: update copyright and license headers 3 years ago
ssh_unix.go types/logger, cmd/tailscale/cli: flesh out, simplify some non-unix build tags 2 years ago
status.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
switch.go cmd/tailscale: add shell tab-completion 2 years ago
up.go various: disable stateful filtering by default (#12197) 2 years ago
update.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
version.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
web.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago
web_test.go client/web: extract web client from cli package 2 years ago
whois.go cmd/tailscale/cli: prefix all --help usages with "tailscale ...", some tidying 2 years ago