diff --git a/.changelog/10432.txt b/.changelog/10432.txt new file mode 100644 index 0000000000..513335f78b --- /dev/null +++ b/.changelog/10432.txt @@ -0,0 +1,3 @@ +```release-note:bug +license: **(Enterprise only)** Fixed an issue that would cause client agents on versions before 1.10 to not be able to retrieve the license from a 1.10+ server. +``` \ No newline at end of file diff --git a/agent/consul/client.go b/agent/consul/client.go index 8d701a3b58..7b387a3a42 100644 --- a/agent/consul/client.go +++ b/agent/consul/client.go @@ -12,6 +12,7 @@ import ( "github.com/hashicorp/consul/agent/pool" "github.com/hashicorp/consul/agent/router" "github.com/hashicorp/consul/agent/structs" + "github.com/hashicorp/consul/agent/token" "github.com/hashicorp/consul/lib" "github.com/hashicorp/consul/logging" "github.com/hashicorp/consul/tlsutil" @@ -87,6 +88,9 @@ type Client struct { EnterpriseClient tlsConfigurator *tlsutil.Configurator + + // tokens is the agent wide token store + tokens *token.Store } // NewClient creates and returns a Client @@ -131,6 +135,7 @@ func NewClient(config *Config, options ...ConsulOption) (*Client, error) { logger: logger, shutdownCh: make(chan struct{}), tlsConfigurator: tlsConfigurator, + tokens: flat.tokens, } c.rpcLimiter.Store(rate.NewLimiter(config.RPCRate, config.RPCMaxBurst))