Hi,
I’m hitting a weird issue with AWS KMS auto-unseal after enabling TLS
Here is what I see from the vault logs:
[INFO] core: [DEBUG] discover-aws: Found ip addresses: [10.20.4.176 10.20.4.240 10.20.4.73 10.20.4.42]
[INFO] core: security barrier not initialized
[INFO] core: attempting to join possible raft leader node: leader_addr=https://10.20.4.176:8200
[INFO] core.cluster-listener.tcp: starting listener: listener_address=10.20.4.240:8201
[INFO] core.cluster-listener.tcp: starting listener: listener_address=127.0.0.1:8201
[INFO] core.cluster-listener: serving cluster requests: cluster_listen_address=10.20.4.240:8201
[INFO] core.cluster-listener: serving cluster requests: cluster_listen_address=127.0.0.1:8201
[INFO] storage.raft: creating Raft: config="&raft.Config{ProtocolVersion:3, HeartbeatTimeout:5000000000, ElectionTimeout:5000000000, CommitTimeout:50000000, MaxAppendEntries:64, BatchApplyCh:true, Shutdow
[INFO] storage.raft: initial configuration: index=1 servers="[{Suffrage:Voter ID:a14449-vault Address:a14449-vault.mylab.com:8201} {Suffrage:Voter ID:a144b0-vault Address:a144b0-vault.mylab.com:8201} {Suffr
[INFO] core: successfully joined the raft cluster: leader_addr=""
[INFO] storage.raft: entering follower state: follower="Node at a144f0-vault.mylab.com:8201 [Follower]" leader=
[INFO] core: stored unseal keys supported, attempting fetch
[WARN] failed to unseal core: error="stored unseal keys are supported, but none were found"
[INFO] core: stored unseal keys supported, attempting fetch
[WARN] failed to unseal core: error="stored unseal keys are supported, but none were found"
[WARN] storage.raft: heartbeat timeout reached, starting election: last-leader=
[INFO] storage.raft: entering candidate state: node="Node at a144f0-vault.mylab.com:8201 [Candidate]" term=2
[INFO] storage.raft: entering follower state: follower="Node at a144f0-vault.mylab.com:8201 [Follower]" leader=
[INFO] core: security barrier not initialized
This doesn’t always happen, and I’m not sure why…
Here is my Vault server config
listener "tcp" {
address = "a144f0-vault.mylab.com:8200"
cluster_address = "a144f0-vault.mylab.com:8201"
tls_cert_file = "/etc/pki/tls/private/vault.crt"
tls_key_file = "/etc/pki/tls/private/vault.key"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = true
}
# HA config
storage "raft" {
path = "/opt/vault"
node_id = "a144f0-vault"
retry_join {
auto_join = "provider=aws region=us-east-1 tag_key=Name tag_value=VaultServer"
auto_join_scheme = "https"
leader_tls_servername = "vault.mylab.com"
leader_client_cert_file = "/etc/pki/tls/private/vault.crt"
leader_client_key_file = "/etc/pki/tls/private/vault.key"
}
}
# Recommended for using integrated storage
disable_mlock = true
# cluster config
api_addr = "https://a144f0-vault.mylab.com:8200"
cluster_addr = "https://a144f0-vault.mylab.com:8201"
ui = true
# seal/unseal the vault using KMS
seal "awskms" {
region = "us-east-1"
kms_key_id = "<MY KMS KEY>"
}