-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send the Namespace/Partition as gRPC metadata headers in the request to the Consul DNS service. #172
Conversation
… to the Consul DNS service.
…ervice This can be used to enable authenticated DNS and prevent needing to set the default token on the servers.
// store the final resolved service for others to use. | ||
cdp.resolvedProxyConfig = ProxyConfig{ | ||
NodeName: rsp.NodeName, | ||
ProxyID: cdp.cfg.Proxy.ProxyID, | ||
Namespace: rsp.Namespace, | ||
Partition: rsp.Partition, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you expect that the node, namespace + partition would sometimes differ between rsp
and cdp.cfg.Proxy
? I ask because I was curious why we can't use cfg.cfg.Proxy
directly vs. hanging an additional ProxyConfig
on the struct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matt might know differently, but I assumed it was that the serviceaccount/Token used to make the bootstrapping could imply a namespace/partition that wasn't specified using the config flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👏
Description
By passing along the tenant of the service being proxied we can more intelligently select the correct partition/namespace to use as defaults for DNS.
This also passes along the Consul ACL token as the x-consul-token grpc metadata. Eventually Consul should be able to use this token instead of the servers default token for authorizing access.
TODO