I am trying to setup a consul backed vault cluster. My consul cluster is working fine however when I am setting up my vault consul agent, I need to give an agent token with policy to have write access on node.
Basically, I want that my vault consul agents should be able to register nodes with name starting only with "vault-".
For this I tried policy below
agent_prefix "" {
policy = "write"
}
node "vault-*" {
policy = "write"
}
node_prefix "" {
policy = "read"
}
service_prefix "" {
policy = "read"
}
session_prefix "" {
policy = "read"
}
And in my consul config I gave node_name=vault-0/1/2
I tried using a wildcard in my policy for write access for a specific node name and read for all, I am getting below error
agent: Coordinate update blocked by ACLs: accessorID=3db5e2e7-3264-50a9-c8f1-a5c955c5bec0
Actually I want that my agents should be able to register their nodes with specific names only to identify them. And for each service there will be separate agent token with specific policy.