mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-27 02:37:38 +00:00
cmd/k8s-operator: drop trailing dot in tagged node name
Also update tailcfg docs. Updates #5055 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
parent
09e0ccf4c2
commit
c87782ba9d
@ -88,7 +88,7 @@ func runAuthProxy(s *tsnet.Server, rt http.RoundTripper, logf logger.Logf) {
|
|||||||
if who.Node.IsTagged() {
|
if who.Node.IsTagged() {
|
||||||
// Use the nodes FQDN as the username, and the nodes tags as the groups.
|
// Use the nodes FQDN as the username, and the nodes tags as the groups.
|
||||||
// "Impersonate-Group" requires "Impersonate-User" to be set.
|
// "Impersonate-Group" requires "Impersonate-User" to be set.
|
||||||
r.Header.Set("Impersonate-User", who.Node.Name)
|
r.Header.Set("Impersonate-User", strings.TrimSuffix(who.Node.Name, "."))
|
||||||
for _, tag := range who.Node.Tags {
|
for _, tag := range who.Node.Tags {
|
||||||
r.Header.Add("Impersonate-Group", tag)
|
r.Header.Add("Impersonate-Group", tag)
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,12 @@ func (emptyStructJSONSlice) UnmarshalJSON([]byte) error { return nil }
|
|||||||
type Node struct {
|
type Node struct {
|
||||||
ID NodeID
|
ID NodeID
|
||||||
StableID StableNodeID
|
StableID StableNodeID
|
||||||
Name string // DNS
|
|
||||||
|
// Name is the FQDN of the node.
|
||||||
|
// It is also the MagicDNS name for the node.
|
||||||
|
// It has a trailing dot.
|
||||||
|
// e.g. "host.tail-scale.ts.net."
|
||||||
|
Name string
|
||||||
|
|
||||||
// User is the user who created the node. If ACL tags are in
|
// User is the user who created the node. If ACL tags are in
|
||||||
// use for the node then it doesn't reflect the ACL identity
|
// use for the node then it doesn't reflect the ACL identity
|
||||||
|
Loading…
x
Reference in New Issue
Block a user