Skip to content

Commit

Permalink
Merge pull request #53 from firstnevyn/fix_get_secret_options
Browse files Browse the repository at this point in the history
Feat: support retrieving secrets from non-puppet signed Vault listener
  • Loading branch information
bastelfreak authored Aug 4, 2022
2 parents ea9bae4 + 8c0fce7 commit 373729b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/puppet/functions/vault_lookup/lookup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def auth_login_body(vault_cert_role)

def get_secret(client, uri, token, namespace)
headers = { 'X-Vault-Token' => token, 'X-Vault-Namespace' => namespace }.delete_if { |_key, value| value.nil? }
secret_response = client.get(uri, headers: headers)
secret_response = client.get(uri,
headers: headers,
options: { include_system_store: true })
unless secret_response.success?
message = "Received #{secret_response.code} response code from vault at #{uri} for secret lookup"
raise Puppet::Error, append_api_errors(message, secret_response)
Expand Down

0 comments on commit 373729b

Please sign in to comment.