mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 13:05:46 +00:00
cmd/tailscale: annotate tailnet-lock keys which wrap pre-auth keys
Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
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…
Reference in New Issue
Block a user