fabio icon indicating copy to clipboard operation
fabio copied to clipboard

Vault CA Certificate

Open calvinmorrow opened this issue 10 years ago • 5 comments

Is there any way to specify a supplemental certificate authority file for connections to Vault? Our Vault is configured with a self-signed certificate and Fabio is throwing x509: certificate signed by unknown authority on connections to it.

The Vault api vendor code looks like it uses the env var VAULT_CACERT but as far as I can tell only the VAULT_TOKEN and VAULT_ADDR are used by Fabio.

Other than adding that certificate to the list of Go's trusted root certs ... any way to get that connection to succeed? We're using the Docker image so I'd rather avoid monkey patching the trusted cert file if possible.

calvinmorrow avatar Nov 03 '16 19:11 calvinmorrow

Traveling now. I'll have a look later

magiconair avatar Nov 03 '16 21:11 magiconair

@calvinmorrow I think I'm not initializing the Vault client properly. I've pushed a change that might do what you need. Would be great if you could test it since I'm shooting from the hip.

magiconair avatar Nov 04 '16 08:11 magiconair

@magiconair Thanks. I can confirm your commit solves the issue. Fabio is now pulling certificates from Vault.

calvinmorrow avatar Nov 04 '16 13:11 calvinmorrow

Cool. I'll merge it.

magiconair avatar Nov 04 '16 19:11 magiconair

Merged to master.

magiconair avatar Nov 04 '16 19:11 magiconair