I have followed multiple guides but I just can't seem to get Vault
working correctly. This is quite aggravating. You may have seen I've
posted 2 other issues, hopefully this one is easier to fix (and maybe
the root of the problem).
I'm just trying to run a simple vault status command, but I keep getting:
I've followed these guides:
That is, I've run exactly these commands (pulled from my history):
cfssl gencert -initca config/ca-csr.json | cfssljson -bare ca
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=config/ca-config.json -profile=default config/consul-csr.json | cfssljson -bare consul
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=config/ca-config.json -profile=default config/vault-csr.json | cfssljson -bare vault
I've also created a "combined" or "full chain"(???) file by running:
cat vault.pem ca.pem > vault-combined.pem
(This was in Kelsey Hightowers guide)
Additionally, I've used openssl to verify my vault certificates:
$ openssl verify -verbose -CAfile certs/ca.pem certs/vault.pem
certs/vault.pem: OK
$ openssl verify -verbose -CAfile certs/ca.pem certs/vault-combined.pem
certs/vault-combined.pem: OK
For my vault configuration, the listener looks like so:
"listener": [{
"tcp":{
"address":"[::]:8200",
"cluster_address":"[::]:8201",
"tls_cert_file": "/etc/vault/tls/vault-combined.pem",
"tls_key_file": "/etc/vault/tls/vault-key.pem",
},
}]
Note that for
tls_cert_file I've tried both
vault.pem and
vault-combined.pem. Both of them cause the "signed by unknown authority" error.
For my local environment, I've set:
export VAULT_ADDR="https://vault.our.internal.domain.io"
export VAULT_CACERT="/path/to/certs/ca.pem"
#export VAULT_CLIENT_CERT="/path/to/certs/vault.pem"
#export VAULT_CLIENT_KEY="/path/to/certs/vault-key.pem"
export VAULT_TOKEN=<redacted> Note that I've tried commenting/uncommenting those VAULT_CLIENT_CERT/KEY values and both fail.
I'm
at a loss here. I've followed multiple guides exactly, I've regenerated
certificates, I've tried every combination of settings I can think of.
Can anybody help point me in the right direction?