比如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是规则权限。
原文:https://www.cnblogs.com/wangzhanbo/p/9445084.html