cmd/tailscale: annotate tailnet-lock keys which wrap pre-auth keys

Signed-off-by: Tom DNetto <tom@tailscale.com>
pull/7523/head
Tom DNetto 2 years ago committed by Tom
parent 3471fbf8dc
commit 92fc243755

@ -232,6 +232,15 @@ func runNetworkLockStatus(ctx context.Context, args []string) error {
if k.Key == st.PublicKey {
line.WriteString("(self)")
}
if k.Metadata["purpose"] == "pre-auth key" {
if preauthKeyID := k.Metadata["authkey_stableid"]; preauthKeyID != "" {
line.WriteString("(pre-auth key ")
line.WriteString(preauthKeyID)
line.WriteString(")")
} else {
line.WriteString("(pre-auth key)")
}
}
fmt.Println(line.String())
}
}

Loading…
Cancel
Save