Don't follow redirects in credential plugins

This commit is contained in:
Graham Mainwaring
2020-07-06 15:26:39 -04:00
parent 8aa11f4848
commit d14aee70a1
3 changed files with 12 additions and 3 deletions

View File

@@ -63,7 +63,8 @@ def conjur_backend(**kwargs):
auth_kwargs = {
'headers': {'Content-Type': 'text/plain'},
'data': api_key
'data': api_key,
'allow_redirects': False,
}
if cacert:
auth_kwargs['verify'] = create_temporary_fifo(cacert.encode())
@@ -78,6 +79,7 @@ def conjur_backend(**kwargs):
lookup_kwargs = {
'headers': {'Authorization': 'Token token="{}"'.format(token)},
'allow_redirects': False,
}
if cacert:
lookup_kwargs['verify'] = create_temporary_fifo(cacert.encode())