You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vault CLI is unable to connect to Vault cluster using the Consul service address.
The error I get when the Vault CLI tries to connect to the Vault cluster is the same regardless of the request. E.g. try logging in or try accessing a secret.
The Vault UI, a curl call to the API, and a Go client utilizing github.com/hashicorp/vault/api are able to connect to the Vault cluster utilizing the Consul service address.
To reproduce
Run Vault cluster with a Consul storage backend.
Run: VAULT_ADDR=<Vault Consul Service Address> vault <command>.
For example: VAULT_ADDR=https://vault.service.consul:8200 vault secrets list
See error.
Expected behavior
The expectation is that the Vault CLI would connect to the Vault cluster and return the response from the Vault cluster.
Environment
Vault Server Version 1.4.0+prem.
Vault CLI Version Vault v1.4.0+prem. Also tested with Vault OSS and older versions of Vault CLI.
Consul storage backend uses Consul version Consul v1.7.2+ent.
Server Operating System/Architecture: Ubuntu 18.04 / arm64.
This is the error I get when Vault CLI tries to connect to Consul service address for the Vault cluster.
$ VAULT_ADDR=https://vault.service.consul.example.com:8200 vault kv get kv/demo/app2
Get https://vault.service.consul.example.com:8200/v1/sys/internal/ui/mounts/kv/demo/app2: dial tcp: lookup vault.service.consul.example.com on 192.168.1.2:53: no such host
DNS returns:
$ host vault.service.consul.example.com
vault.service.consul.example.com is an alias for ns2.home.example.com.
The Vault CLI is able to connect to the address of one of the Vault servers.
$ VAULT_ADDR=https://ns2.home.example.com:8200 vault kv get kv/demo/app2
====== Metadata ======
Key Value
--- -----
created_time 2020-05-08T20:45:23.466680696Z
deletion_time n/a
destroyed false
version 1
======== Data ========
Key Value
--- -----
api_token E5145E36-F180-477A-BF56-E63DFC9D15BB
foo bar
service_name widget
The Vault CLI is also able to connect to the Consul node address of the Vault servers.
$ VAULT_ADDR=https://ns2.node.consul.example.com:8200 vault kv get kv/demo/app2
====== Metadata ======
Key Value
--- -----
created_time 2020-05-08T20:45:23.466680696Z
deletion_time n/a
destroyed false
version 1
======== Data ========
Key Value
--- -----
api_token E5145E36-F180-477A-BF56-E63DFC9D15BB
foo bar
service_name widget
Curl is able to connect to the Consul service address for the Vault cluster.
An app written in go that utilizes the github.com/hashicorp/vault/api package is also able to talk to the Consul service address for the Vault cluster.
$ ./vgc -vault_path kv/data/demo/app2
INFO: vault_addr is https://vault.service.consul.example.com:8200
INFO: auth is token
INFO: vault_path is kv/data/demo/app2
Requested secret at path kv/data/demo/app2:
api_token → E5145E36-F180-477A-BF56-E63DFC9D15BB
foo → bar
service_name → widget
Thanks so much!
The text was updated successfully, but these errors were encountered:
Issue
Vault CLI is unable to connect to Vault cluster using the Consul service address.
The error I get when the Vault CLI tries to connect to the Vault cluster is the same regardless of the request. E.g. try logging in or try accessing a secret.
The Vault UI, a curl call to the API, and a Go client utilizing
github.com/hashicorp/vault/api
are able to connect to the Vault cluster utilizing the Consul service address.To reproduce
Run Vault cluster with a Consul storage backend.
Run:
VAULT_ADDR=<Vault Consul Service Address> vault <command>
.For example:
VAULT_ADDR=https://vault.service.consul:8200 vault secrets list
Expected behavior
The expectation is that the Vault CLI would connect to the Vault cluster and return the response from the Vault cluster.
Environment
Vault Server Version
1.4.0+prem
.Vault CLI Version
Vault v1.4.0+prem
. Also tested with Vault OSS and older versions of Vault CLI.Consul storage backend uses Consul version
Consul v1.7.2+ent
.Server Operating System/Architecture:
Ubuntu 18.04 / arm64
.Vault server configuration:
Consul Server Configuration
Additional Detail
This is the error I get when Vault CLI tries to connect to Consul service address for the Vault cluster.
DNS returns:
The Vault CLI is able to connect to the address of one of the Vault servers.
The Vault CLI is also able to connect to the Consul
node
address of the Vault servers.Curl is able to connect to the Consul service address for the Vault cluster.
An app written in go that utilizes the
github.com/hashicorp/vault/api
package is also able to talk to the Consul service address for the Vault cluster.Thanks so much!
The text was updated successfully, but these errors were encountered: