Merge pull request #13172 from infamousjoeg/fix-12846-conjur-versioning

Add proper declaration of secret version if present
This commit is contained in:
Cesar Francisco San Nicolas Martinez 2022-11-08 18:41:20 +01:00 committed by GitHub
commit 9ca554ce75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,8 @@ def conjur_backend(**kwargs):
# https://www.conjur.org/api.html#secrets-retrieve-a-secret-get
path = urljoin(url, '/'.join(['api', 'secrets', account, 'variable', secret_path]))
if version:
path = '?'.join([path, version])
ver = "version={}".format(version)
path = '?'.join([path, ver])
with CertFiles(cacert) as cert:
lookup_kwargs['verify'] = cert