Cannot use strings for the certificate login call. #1112
Labels
auth methods
generally related to a Vault auth method
bug
patch
Used as part of release-drafter's version-resolver configuration
tls-cert-auth
Related to TLS Certificates Auth Method
When using the community.hashi_vault.vault_login ansible task to authenticate with a certificate, you are unable to utilize strings in the 'cert_auth_public_key' and 'cert_auth_private_key' parameters. If you pass strings in those parameters, it will throw the following error
I am using the following versions
I went through the code in
hvac/api/auth_methods/cert.py
andhvac/utils.py
and found two issues.Issue 1
file: hvac/api/auth_methods/cert.py
method: def login(self,name="",cacert=False,cert_pem="",key_pem="",mount_point="cert",use_token=True,):
The local variable
tls_update
is not initialized. It appears that this variable is being used two different ways. One way is to be a boolean with a value ofTrue
. The other way is to be a dictionary containing the crt/key values. Resolving the next issue should technically fix this issue, but thetls_update
variable should probably still set toFalse
by default.Issue 2
file: hvac/utils.py
method: def validate_pem_format(param_name, param_argument):
The method is used as a conditional, but it does not return a boolean value; instead, it returns
None
.The text was updated successfully, but these errors were encountered: