Skip to content

vault_read module shows an error when disabling certificate validation #456

Open
@imaximov89

Description

@imaximov89
SUMMARY

When using vault_read module with cert auth_method and validate_certs: false parameter an error message is shown

The error was: hvac.api.auth_methods.cert.CertificateAuthError: cacert must be True, a file_path, or valid CA Certificate.
ISSUE TYPE
  • Bug Report
COMPONENT NAME

vault_read

ANSIBLE VERSION
ansible [core 2.15.9]
COLLECTION VERSION
community.hashi_vault         6.2.0 
STEPS TO REPRODUCE
    - name: Read secret
      community.hashi_vault.vault_read:
        url: "https://vault:8200"
        path: secret/test
        auth_method: cert
        cacert: /home/user/certs/ca.crt
        cert_auth_private_key: /home/user/certs/psa.key
        cert_auth_public_key: /home/user/certs/psa.cer
        validate_certs: false
EXPECTED RESULTS

Vault secret information is displayed.

ACTUAL RESULTS

Error message is shown

hvac.api.auth_methods.cert.CertificateAuthError: cacert must be True, a file_path, or valid CA Certificate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions