-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
So, I have a config that has Consul and Vault communicating with one another over TLS, having setup a Certificate Authority built for our app, which Vault utiliizes to handshake between it and Consul. Vault, itself, also has TLS enabled on incoming requests. Now, this system works flawlessly for token and TLS based authentication. However, for the ease of our developers, I would love to get Vault authentication working with Github Auth as well.
My problem is it appears that the TLS handshake is not actually happening between Vault and Consul when I utilize the Github Auth method...
==> WARNING: VAULT_TOKEN environment variable set!
The environment variable takes precedence over the value
set by the auth command. Either update the value of the
environment variable or unset it to use the new token.
Error making API request.
URL: PUT http://vault.hi:8200/v1/auth/github/login
Code: 500. Errors:
* Get https://api.github.com/user: x509: certificate is valid for *.github.com, github.com, not consul.hi
....while Vault should be performing the handshake, it appears that Github may be trying to access Consul to verify information? This is problematic, as consul is set to verify a x509 certificate generated by my own CA. As such, Github is not able to retrieve the information I assume it needs, ?regarding "org"?, to verify the authentication.
Any ideas from the community?
My Consul Config and Vault Config Below:
_VAULT:_
backend "consul" {
address = "consul.hi"
path = "vault"
scheme = "https"
datacenter = "test-hi"
tls_ca_file = "/vault/ssl/test.crt"
tls_cert_file= "/vault/ssl/vault.hi.crt"
tls_key_file = "/vault/ssl/vault.hi.key"
}
listener "tcp" {
address = "vault.hi:8200"
tls_cert_file = "/vault/ssl/vault.hi.crt"
tls_key_file = "/vault/ssl/vault.hi.key"
tls_min_version = "tls12"
}
_CONSUL:_
{
"bootstrap_expect": 1,
"datacenter": "test-hi",
"data_dir": "/consul",
"ui_dir": "/consul/dist",
"log_level": "INFO",
"node_name": "test",
"server": true,
"verify_outgoing": true,
"verify_incoming": true,
"ca_file": "/consul/ssl/test.crt",
"cert_file": "/consul/ssl/consul.hi.crt",
"key_file": "/consul/ssl/consul.hi.key",
"client_addr": "10.0.0.1",
"ports": {
"https": 443
},
"enable_syslog": true
}