mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
cmd/tailscale, ipn: WIP XXX: show ACL tags in tailscale status
DO NOT SUBMIT; server doesn't send tags back anywhere Updates #576 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
da1bad51cd
commit
1ad82db95a
@ -70,6 +70,11 @@ type PeerStatus struct {
|
||||
// etc by default.
|
||||
ShareeNode bool `json:",omitempty"`
|
||||
|
||||
// ACLTags, if non-empty, are the ACL identity the node is running as.
|
||||
// When present, the UserID is then just who created it, but doesn't represent
|
||||
// the effective user for ACL purposes.
|
||||
ACLTags []string `json:",omitempty"`
|
||||
|
||||
// InNetworkMap means that this peer was seen in our latest network map.
|
||||
// In theory, all of InNetworkMap and InMagicSock and InEngine should all be true.
|
||||
InNetworkMap bool
|
||||
@ -170,6 +175,9 @@ func (sb *StatusBuilder) AddPeer(peer key.Public, st *PeerStatus) {
|
||||
return
|
||||
}
|
||||
|
||||
if len(st.ACLTags) != 0 {
|
||||
e.ACLTags = st.ACLTags
|
||||
}
|
||||
if v := st.HostName; v != "" {
|
||||
e.HostName = v
|
||||
}
|
||||
|
@ -223,6 +223,7 @@ func (b *LocalBackend) UpdateStatus(sb *ipnstate.StatusBuilder) {
|
||||
Created: p.Created,
|
||||
LastSeen: lastSeen,
|
||||
ShareeNode: p.Hostinfo.ShareeNode,
|
||||
ACLTags: p.Hostinfo.RequestTags,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user