I’m trying to get Boundary to work with a Vault transit KMS using ansible-role-boundary
When launching with systemd on centos7 I see the error: Worker Auth KMS not found after parsing KMS blocks
My /etc/boundary.d/boundary-controller.hcl
disable_mlock = true
controller {
name = "client-controller"
description = "Boundary controller."
database {
url = "postgresql://boundary:Qwerty67@client.consul/boundary"
}
}
# API listener configuration block
listener "tcp" {
# Should be the address of the NIC that the controller server will be reached on
address = "10.0.3.98:9200"
# The purpose of this listener block
purpose = "api"
tls_disable = true
# Enable CORS for the Admin UI
cors_enabled = false
}
# Data-plane listener configuration block (used for worker coordination)
listener "tcp" {
# Should be the IP of the NIC that the worker will connect on
address = "10.0.3.98:9201"
# The purpose of this listener
purpose = "cluster"
tls_disable = true
}
kms "transit" {
purpose = "root"
address = "https://server01.consul:8200"
token = "s.gibbersish"
disable_renewal = "false"
// Key configuration
key_name = "transit_key_name"
mount_path = "transit/"
namespace = "ns1/"
// TLS Configuration
tls_ca_cert = "/etc/boundary.d/tls/consul-agent-ca.pem"
tls_client_cert = "/etc/boundary.d/tls/dc1-client-consul-0.pem"
tls_client_key = "/etc/boundary.d/tls/dc1-client-consul-0-key.pem"
tls_server_name = "server01.consul"
tls_skip_verify = "false"
}
I’m still trying to get it to work with a Vault transit KMS, mostly by trial and error because of lacking documentation. I got a transit engine, but it should get Vault policy (?) and a token tied to it that can be renewed by Boundary.
Generally speaking the best method of consuming Vault is to use Vault Agent and have Boundary simply connect to the local Agent listener. That way Agent is responsible for the lifecycle of the token, including reauthentication and renewals.
# Root KMS configuration block: this is the root key for Boundary
# Use a production KMS such as AWS KMS in production installs
kms "transit" {
purpose = "root"
address = "https://xxxx"
token = "s.xxxx"
disable_renewal = "false"
// Key configuration
key_name = "boundary-root"
mount_path = "transit/"
namespace = "ns1/"
}
# Worker authorization KMS
# Use a production KMS such as AWS KMS for production installs
# This key is the same key used in the worker configuration
kms "transit" {
purpose = "worker-auth"
address = "https://xxxx"
token = "s.xxxx"
disable_renewal = "false"
// Key configuration
key_name = "boundary-worker-auth"
mount_path = "transit/"
namespace = "ns1/"
}
# Recovery KMS block: configures the recovery key for Boundary
# Use a production KMS such as AWS KMS for production installs
kms "transit" {
purpose = "recovery"
address = "https://xxxx"
token = "s.xxxx"
disable_renewal = "false"
// Key configuration
key_name = "boundary-recovery"
mount_path = "transit/"
namespace = "ns1/"
}
I had to add “create” capabilities to each path in the vault policy to get it working. In case someone else are unable to set this up like me. Just having “update” was not enough for my setup.