Consul 配置ACLs

我怕爱的太早我们不能终老 提交于 2019-12-17 23:55:38

比如consul.exe 在D:\consul
来个json配置文件在 D:\consul\config.json
json 格式
{

"acl_datacenter": "dc1",
"acl_master_token": "xxxhelloworldxxx",
"acl_default_policy": "deny",
"data_dir": "/data"
}

acl_datacenter:数据中心,可以用ALL
acl_master_token:ui在设置中加上

 

acl_default_policy:默认是allow,允许allow,deny

cd D:\consul
consul.exe agent -dev -config-file xx.json
consul.exe agent -dev -config-dir .


匿名登陆的赋权限
Anonymous Token
key "" { policy = "read" }
key "" { policy = "write" }

agent、event、key、keyring、node、operator、query、service、session。
read、write、deny是规则权限。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!