hashicorp / hashicorp/consul

Consul KV PUT is not working in cross datacenter setup

Open
#11,953 2 comments 0 reactions 0 assignees View on GitHub
theme/kv type/bug
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

## Consul KV put is not working in cross datacenter setup
When I tried to put a KV from the datacenter A consul-client to datacenter B consul cluster, Im seeing below permission error. But I have given enough permissions for all the datacenter consul clusters

#### Reproduction Steps

Steps to reproduce this issue, eg:

gave below permission in both datacenter A and datacenter B consul clusters
```
agent_prefix "" {
policy = "read"
}
node_prefix "" {
policy = "read"
}
service_prefix "" {
policy = "read"
}
query_prefix "" {
policy = "read"
}
key_prefix "test_path/" {
policy = "write"
}
```

Below is the error I got when i tried to put a KV from the datacenter A consul-client to datacenter B consul cluster,
```
+ consul kv put -datacenter=datacenterB "test_path/test_key" "test_value"
Error! Failed writing data: Unexpected response code: 403 (rpc error making call: rpc error making call: ACL not found)
```

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are mentioned. Start by reproducing the shown consul kv put command with the supplied ACL policy across datacenter A and datacenter B, then trace the cross-datacenter ACL handling; done means the permitted KV write succeeds without the 403 ACL-not-found error.

Written by the indexing model from the issue text.

Assessment

Domain
distributed-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.