mirror of https://github.com/status-im/consul.git
agent: dns uses the configured token during queries
This commit is contained in:
parent
b1c04e7660
commit
fb3938d88e
|
@ -186,7 +186,10 @@ func (d *DNSServer) handlePtr(resp dns.ResponseWriter, req *dns.Msg) {
|
|||
|
||||
args := structs.DCSpecificRequest{
|
||||
Datacenter: datacenter,
|
||||
QueryOptions: structs.QueryOptions{AllowStale: d.config.AllowStale},
|
||||
QueryOptions: structs.QueryOptions{
|
||||
Token: d.agent.config.ACLToken,
|
||||
AllowStale: d.config.AllowStale,
|
||||
},
|
||||
}
|
||||
var out structs.IndexedNodes
|
||||
|
||||
|
@ -348,7 +351,10 @@ func (d *DNSServer) nodeLookup(network, datacenter, node string, req, resp *dns.
|
|||
args := structs.NodeSpecificRequest{
|
||||
Datacenter: datacenter,
|
||||
Node: node,
|
||||
QueryOptions: structs.QueryOptions{AllowStale: d.config.AllowStale},
|
||||
QueryOptions: structs.QueryOptions{
|
||||
Token: d.agent.config.ACLToken,
|
||||
AllowStale: d.config.AllowStale,
|
||||
},
|
||||
}
|
||||
var out structs.IndexedNodeServices
|
||||
RPC:
|
||||
|
@ -450,7 +456,10 @@ func (d *DNSServer) serviceLookup(network, datacenter, service, tag string, req,
|
|||
ServiceName: service,
|
||||
ServiceTag: tag,
|
||||
TagFilter: tag != "",
|
||||
QueryOptions: structs.QueryOptions{AllowStale: d.config.AllowStale},
|
||||
QueryOptions: structs.QueryOptions{
|
||||
Token: d.agent.config.ACLToken,
|
||||
AllowStale: d.config.AllowStale,
|
||||
},
|
||||
}
|
||||
var out structs.IndexedCheckServiceNodes
|
||||
RPC:
|
||||
|
|
Loading…
Reference in New Issue