Open
Description
Client works but hvac won't bind.
hvac.exceptions.Unauthorized: Unable to authenticate to the Vault service, on None None
print ('Retrieving a vault (hvac) client...')
vault_client = hvac.Client(
url=url,
cert=certs,
namespace=namespace,
)
if certs:
# When use a self-signed certificate for the vault service itself, we need to
# include our local ca bundle here for the underlying requests module.
rs = requests.Session()
vault_client.session = rs
rs.verify = certs
vault_client.token = auth_token(vault_client,token)
if not vault_client.is_authenticated():
error_msg = 'Unable to authenticate to the Vault service'
raise hvac.exceptions.Unauthorized(error_msg)
return vault_client
The CA bundle i have the cert and key plus private CA. The token I am using is a root token and binds correctly using the client. The bundle I am using is the same bundle that I am using for the cli. Not sure if its a namespace/sub-namespace issue I don't see in the docs that the client supports sub namespaces. Is there an option to get higher logging to better understand what is being denied?
Instead of just printing a msg stating i couldn't connect doesn't the hvac client get any type of exception error or error description from vault itself I can display to help troubleshoot my issue?