Can't authenticate with Certificate method - client certificate must be supplied

Hi,

I enable the Certificate Auth module in Vault but can’t login with it.

  • I activated TLS on my instance,
  • I ensured I got the VAULT_CACERT env set,
  • I created a role under my cert auth endpoint
  • My client cert and key are PEM encoded not ciphered
  • I can connect through token and LDAP

Still when I do vault login -method=cert -client-cert=client.crt -client-key=client.key name=myuser I got the following error:

Code: 400. Errors:

* client certificate must be supplied

any thought?

Jeff

1 Like

I think you need to remove the dash from in front of client-cert and client-key.

Stolen from https://stackoverflow.com/a/52405154/591064 (upvote the question and answer, he deserves it)

You must add tls_client_ca_file in your Vault’s HCL configuration file.