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
I'm currently working a on Consul's ACL functions. While evaluating it I stumbled upon a this problem:
We currently have 6 datacenters running with Consul while one is the acl_datacenter. I wanted to find out what happens to ACL's wen the acl_datacenter gets crushed. So in the acl_datacenter I added a dummy ACL, stopped Consul, deleted the data folder on each server and started it again. As expected the ACL was gone there and in all other datacenters too. Activating ACL replication did not changed something here.
So I evaluated consul snapshot but was not happy with it as it can contain old data (kv, service, acl, ...) which was deleted some when after taking the snapshot.
Then I found (consul_acl)[https://docs.ansible.com/ansible/latest/consul_acl_module.html], a Ansible module to maintain Consul ACLs. It would allow the user to define all ACLs he needs in YAML as source of truth. This would ease the need of handling/stroing of json files and omitting curl commands on update/change, no non-producible ACL adjustments made via consul-ui.
Problem
I'm stuck at creating the ACL's in Consul with consul_acl. Each time it runs only the last rule defined wins. I guess I'm handling the with_ item wrong. With the example below, one ACL is created with name "Foo access" and the key "private/foo" + its policy is attached. The "foo" key gets overwritten.
Do you have an idea on that?
Basically it would be sufficient to set the ACL's on only one server in acl_datacenter but the role currently does not allow that. All server's in a DC need to be in play in order to build the retry_join array.
Thank you for your help and
Best regards
Jard
The text was updated successfully, but these errors were encountered:
I just found out that consul-cli does not support newer ACL features. This includes the node ACL's which makes the tool currently useless for full range ACL config.
Meas this attempt here becomes more valuable as it uses native API calls.
Hello @mrlesmithjr
Trivia
I'm currently working a on Consul's ACL functions. While evaluating it I stumbled upon a this problem:
We currently have 6 datacenters running with Consul while one is the
acl_datacenter
. I wanted to find out what happens to ACL's wen theacl_datacenter
gets crushed. So in theacl_datacenter
I added a dummy ACL, stopped Consul, deleted the data folder on each server and started it again. As expected the ACL was gone there and in all other datacenters too. Activating ACL replication did not changed something here.So I evaluated consul snapshot but was not happy with it as it can contain old data (kv, service, acl, ...) which was deleted some when after taking the snapshot.
Then I found (consul_acl)[https://docs.ansible.com/ansible/latest/consul_acl_module.html], a Ansible module to maintain Consul ACLs. It would allow the user to define all ACLs he needs in YAML as source of truth. This would ease the need of handling/stroing of json files and omitting curl commands on update/change, no non-producible ACL adjustments made via consul-ui.
Problem
I'm stuck at creating the ACL's in Consul with consul_acl. Each time it runs only the last rule defined wins. I guess I'm handling the
with_
item wrong. With the example below, one ACL is created with name "Foo access" and the key "private/foo" + its policy is attached. The "foo" key gets overwritten.Do you have an idea on that?
Code
Additional tasks
acl_datacenter
but the role currently does not allow that. All server's in a DC need to be in play in order to build theretry_join
array.Thank you for your help and
Best regards
Jard
The text was updated successfully, but these errors were encountered: