From e56982f782981046c929067f14e7fd4cfb23f078 Mon Sep 17 00:00:00 2001 From: Pierce Bartine Date: Thu, 13 May 2021 07:18:15 -0700 Subject: [PATCH] Add ServerName to Vault Agent template config (#11288) * Add ServerName to Vault Agent template config * Remove newline * Add changelog for 11288 * Update changelog/11288.txt Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com> Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com> --- changelog/11288.txt | 3 +++ command/agent/template/template.go | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 changelog/11288.txt diff --git a/changelog/11288.txt b/changelog/11288.txt new file mode 100644 index 000000000..6f0e95c8f --- /dev/null +++ b/changelog/11288.txt @@ -0,0 +1,3 @@ +```release-note:bug +agent: Fixed agent templating to use configured tls servername values +``` diff --git a/command/agent/template/template.go b/command/agent/template/template.go index 6591e9a18..9396d1f82 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