From 1eead2df70e1bdaae120b0532bf40f1b2dd33040 Mon Sep 17 00:00:00 2001 From: Pierce Bartine Date: Tue, 6 Apr 2021 14:28:43 -0700 Subject: [PATCH 1/4] Add ServerName to Vault Agent template config --- command/agent/template/template.go | 13 +++++++------ command/agent/template/template_test.go | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/command/agent/template/template.go b/command/agent/template/template.go index 6591e9a18920..9396d1f82116 100644 --- a/command/agent/template/template.go +++ b/command/agent/template/template.go @@ -274,12 +274,13 @@ func newRunnerConfig(sc *ServerConfig, templates ctconfig.TemplateConfigs) (*ctc skipVerify := sc.AgentConfig.Vault.TLSSkipVerify verify := !skipVerify conf.Vault.SSL = &ctconfig.SSLConfig{ - Enabled: pointerutil.BoolPtr(true), - Verify: &verify, - Cert: &sc.AgentConfig.Vault.ClientCert, - Key: &sc.AgentConfig.Vault.ClientKey, - CaCert: &sc.AgentConfig.Vault.CACert, - CaPath: &sc.AgentConfig.Vault.CAPath, + Enabled: pointerutil.BoolPtr(true), + Verify: &verify, + Cert: &sc.AgentConfig.Vault.ClientCert, + Key: &sc.AgentConfig.Vault.ClientKey, + CaCert: &sc.AgentConfig.Vault.CACert, + CaPath: &sc.AgentConfig.Vault.CAPath, + ServerName: &sc.AgentConfig.Vault.TLSServerName, } } enabled := attempts > 0 diff --git a/command/agent/template/template_test.go b/command/agent/template/template_test.go index 52f7692a3787..f591bf373c9c 100644 --- a/command/agent/template/template_test.go +++ b/command/agent/template/template_test.go @@ -13,6 +13,7 @@ import ( ctconfig "github.com/hashicorp/consul-template/config" "github.com/hashicorp/go-hclog" + "github.com/hashicorp/vault/command/agent/config" "github.com/hashicorp/vault/internalshared/configutil" "github.com/hashicorp/vault/sdk/helper/logging" From 7477322a31939cdb0fe41db8ef2353448bb63362 Mon Sep 17 00:00:00 2001 From: Pierce Bartine Date: Tue, 6 Apr 2021 14:30:58 -0700 Subject: [PATCH 2/4] Remove newline --- command/agent/template/template_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/command/agent/template/template_test.go b/command/agent/template/template_test.go index f591bf373c9c..52f7692a3787 100644 --- a/command/agent/template/template_test.go +++ b/command/agent/template/template_test.go @@ -13,7 +13,6 @@ import ( ctconfig "github.com/hashicorp/consul-template/config" "github.com/hashicorp/go-hclog" - "github.com/hashicorp/vault/command/agent/config" "github.com/hashicorp/vault/internalshared/configutil" "github.com/hashicorp/vault/sdk/helper/logging" From 2549f35ad6c3f03554b325e9ee336f5d86fc8757 Mon Sep 17 00:00:00 2001 From: Pierce Bartine Date: Wed, 12 May 2021 12:43:55 -0700 Subject: [PATCH 3/4] Add changelog for 11288 --- changelog/11288.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/11288.txt diff --git a/changelog/11288.txt b/changelog/11288.txt new file mode 100644 index 000000000000..8f099f78ddcc --- /dev/null +++ b/changelog/11288.txt @@ -0,0 +1,4 @@ +```release-note:bug +agent: Fixed agent templating to use configured tls servername values +``` + From f5900688a41b08538ff5d1175f85ef47dfe2c29f Mon Sep 17 00:00:00 2001 From: Pierce Bartine Date: Wed, 12 May 2021 14:17:11 -0700 Subject: [PATCH 4/4] Update changelog/11288.txt Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com> --- changelog/11288.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/changelog/11288.txt b/changelog/11288.txt index 8f099f78ddcc..6f0e95c8f53a 100644 --- a/changelog/11288.txt +++ b/changelog/11288.txt @@ -1,4 +1,3 @@ ```release-note:bug agent: Fixed agent templating to use configured tls servername values ``` -