8000 HVAC authentication fail with self-signed certificate but works with vault API/CLI · Issue #672 · hvac/hvac · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
HVAC authentication fail with self-signed certificate but works with vault API/CLI #672
Open
@schall8

Description

@schall8

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    adaptersrelated to the Adapter systembugclientrelated to the hvac Clienthelp wantedContributions welcome!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0