mirror of https://github.com/status-im/consul.git
add domain and nodeName to agent cert request
This commit is contained in:
parent
82ae7caf3e
commit
a4312d2e6e
|
@ -536,7 +536,7 @@ func (a *Agent) setupClientAutoEncryptCache(reply *structs.SignedResponse) (*str
|
||||||
QueryOptions: structs.QueryOptions{Token: a.tokens.AgentToken()},
|
QueryOptions: structs.QueryOptions{Token: a.tokens.AgentToken()},
|
||||||
}
|
}
|
||||||
|
|
||||||
// prepolutate roots cache
|
// prepopulate roots cache
|
||||||
rootRes := cache.FetchResult{Value: &reply.ConnectCARoots, Index: reply.ConnectCARoots.QueryMeta.Index}
|
rootRes := cache.FetchResult{Value: &reply.ConnectCARoots, Index: reply.ConnectCARoots.QueryMeta.Index}
|
||||||
if err := a.cache.Prepopulate(cachetype.ConnectCARootName, rootRes, a.config.Datacenter, a.tokens.AgentToken(), rootsReq.CacheInfo().Key); err != nil {
|
if err := a.cache.Prepopulate(cachetype.ConnectCARootName, rootRes, a.config.Datacenter, a.tokens.AgentToken(), rootsReq.CacheInfo().Key); err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
@ -546,9 +546,11 @@ func (a *Agent) setupClientAutoEncryptCache(reply *structs.SignedResponse) (*str
|
||||||
Datacenter: a.config.Datacenter,
|
Datacenter: a.config.Datacenter,
|
||||||
Token: a.tokens.AgentToken(),
|
Token: a.tokens.AgentToken(),
|
||||||
Agent: a.config.NodeName,
|
Agent: a.config.NodeName,
|
||||||
|
Domain: a.config.DNSDomain,
|
||||||
|
NodeName: a.config.NodeName,
|
||||||
}
|
}
|
||||||
|
|
||||||
// prepolutate leaf cache
|
// prepopulate leaf cache
|
||||||
certRes := cache.FetchResult{Value: &reply.IssuedCert, Index: reply.ConnectCARoots.QueryMeta.Index}
|
certRes := cache.FetchResult{Value: &reply.IssuedCert, Index: reply.ConnectCARoots.QueryMeta.Index}
|
||||||
if err := a.cache.Prepopulate(cachetype.ConnectCALeafName, certRes, a.config.Datacenter, a.tokens.AgentToken(), leafReq.Key()); err != nil {
|
if err := a.cache.Prepopulate(cachetype.ConnectCALeafName, certRes, a.config.Datacenter, a.tokens.AgentToken(), leafReq.Key()); err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
|
|
Loading…
Reference in New Issue