1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-20 02:39:02 +00:00

Fix hashi_vault lookup approle authentication (#1138) (#1315)

As per the plugin documentation and the Hashicorp Vault documentation (https://www.vaultproject.io/docs/auth/approle#secretid)
secret_id is not mandatory.
Moreover, using this lookup plugin without a secret_id used to work in
Ansible 2.9.

Co-authored-by: Jonathan Piron <jonathanpiron@gmail.com>
(cherry picked from commit 6cec8759d0)

Co-authored-by: Jonathan Piron <jonathan@piron.at>
This commit is contained in:
patchback[bot] 2020-11-16 16:40:54 +00:00 committed by GitHub
parent ca97eb6f93
commit 2fe6a34e3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 75 additions and 1 deletions

View file

@ -588,7 +588,7 @@ class LookupModule(LookupBase):
self.validate_by_required_fields(auth_method, 'username', 'password')
def validate_auth_approle(self, auth_method):
self.validate_by_required_fields(auth_method, 'role_id', 'secret_id')
self.validate_by_required_fields(auth_method, 'role_id')
def validate_auth_token(self, auth_method):
if auth_method == 'token':