From eb666e94bdb416f49ede71f4f6a4212aebb2683f Mon Sep 17 00:00:00 2001 From: Jim Kalafut Date: Mon, 8 Jun 2020 08:16:03 -0700 Subject: [PATCH] Add namespace parameter to ssh helper config (#9160) --- api/ssh_agent.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/ssh_agent.go b/api/ssh_agent.go index a4348ca2ed..fda70bcddd 100644 --- a/api/ssh_agent.go +++ b/api/ssh_agent.go @@ -60,6 +60,7 @@ type SSHVerifyResponse struct { type SSHHelperConfig struct { VaultAddr string `hcl:"vault_addr"` SSHMountPoint string `hcl:"ssh_mount_point"` + Namespace string `hcl:"namespace"` CACert string `hcl:"ca_cert"` CAPath string `hcl:"ca_path"` AllowedCidrList string `hcl:"allowed_cidr_list"` @@ -123,6 +124,11 @@ func (c *SSHHelperConfig) NewClient() (*Client, error) { return nil, err } + // Configure namespace + if c.Namespace != "" { + client.SetNamespace(c.Namespace) + } + return client, nil } @@ -155,6 +161,7 @@ func ParseSSHHelperConfig(contents string) (*SSHHelperConfig, error) { valid := []string{ "vault_addr", "ssh_mount_point", + "namespace", "ca_cert", "ca_path", "allowed_cidr_list",