Hello,
I need some help with our vault setup.
My confugration, 3 consul servers, 3 vault servers with consul client configured. Vault is connecting to loop back address which we put an alias instead of loop back IP so the certificate won't complain. Config below;
$ cat /opt/vault/etc/vault.hcl
backend "consul" {
address = "client.<dc>.consul:8500"
path = "vault/"
scheme = "https"
datacenter = "ndc_as_a"
token = "vault_token"
}
listener "tcp" {
address = "
0.0.0.0:8200"
tls_cert_file = "/opt/vault/cert/vault.crt"
tls_key_file = "/opt/vault/cert/vault.key"
}
steps i used to test secret backends;
$ vault mount consul
$ vault write consul/config/access address=client.<dc>.consul:8500 scheme=https token=vault_management_token
Success! Data written to: consul/config/access
$ POLICY='key "" { policy = "read" }'
$ echo $POLICY | base64 | vault write consul/roles/readonly policy=-
Success! Data written to: consul/roles/readonly
$vault read consul/roles/readonly
Key Value
lease 1h0m0s
policy a2V5ICIiIHsgcG9saWN5ID0gInJlYWQiIH0K
$vault read consul/creds/readonly
Error reading consul/creds/readonly: Error making API request.
URL: GET https://server.<dc>.vault:8200/v1/consul/creds/readonly
Code: 400. Errors:
* Unexpected response code: 401 (ACL support disabled)
Any help you on how to fix this 401 issue is greatly appreciated.
thanks!