mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-21 06:01:42 +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 {
|
if k.Key == st.PublicKey {
|
||||||
line.WriteString("(self)")
|
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())
|
fmt.Println(line.String())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user