Add userpass and LDAP support for HashiCorp vault credential_plugin (#14654)

* Add username and password to handle_auth and update exception message

Revise naming of ldap username and password

* Add url for LDAP and userpass to method_auth

* Add information regarding LDAP and username and password to credential plugins documentation

Revise ldap_auth to userpass_auth and revised exception to better reflect functionality

* Revise method_auth to ensure certs can be used with username and ensure namespace functionality is not hindered
This commit is contained in:
Lila Yasin
2024-01-25 09:50:13 -05:00
committed by GitHub
parent d4f7bfef18
commit 2e168d8177
3 changed files with 33 additions and 3 deletions

View File

@@ -60,6 +60,13 @@ def test_hashivault_client_cert_auth_no_role():
assert res == expected_res
def test_hashivault_userpass_auth():
kwargs = {'username': 'the_username', 'password': 'the_password'}
expected_res = {'username': 'the_username', 'password': 'the_password'}
res = hashivault.userpass_auth(**kwargs)
assert res == expected_res
def test_hashivault_handle_auth_token():
kwargs = {
'token': 'the_token',