We plan to use orchestrator coupled with Consul KV in order to support Service discovery with proxy. In order to protect Consul KV keys from unauthorized access, it is a good idea to use consul ACL (https://www.consul.io/docs/guides/acl.html). In order to use it, we first need to create ACL token for orchestrator:
curl --request PUT --data '{"Name": "orchestrator-token", "Type": "client", "Rules": "key \"\" { policy = \"read\" } key \"mysql/\" { policy = \"write\" } operator = \"read\""}' http://localhost:8500/v1/acl/create?token=b1gs33cr3t
And later use it when connecting to orchestrator.
In order to achieve it, we need to add following changes:
Add new config parameter ConsulAclToken
Add following lines to kv/consul.go in order to use ACL token when connecting to Consul
if len(config.Config.ConsulAclToken) > 0 { consulConfig.Token = config.Config.ConsulAclToken }
Hello,
We plan to use orchestrator coupled with Consul KV in order to support Service discovery with proxy. In order to protect Consul KV keys from unauthorized access, it is a good idea to use consul ACL (https://www.consul.io/docs/guides/acl.html). In order to use it, we first need to create ACL token for orchestrator:
curl --request PUT --data '{"Name": "orchestrator-token", "Type": "client", "Rules": "key \"\" { policy = \"read\" } key \"mysql/\" { policy = \"write\" } operator = \"read\""}' http://localhost:8500/v1/acl/create?token=b1gs33cr3t
And later use it when connecting to orchestrator. In order to achieve it, we need to add following changes:if len(config.Config.ConsulAclToken) > 0 { consulConfig.Token = config.Config.ConsulAclToken }
I've already implemented and tested this small changes in https://github.com/MaxFedotov/orchestrator/tree/consul-acl-token
Thanks, Max