Etcd访问控制
1. ETCD资源类型
2. 权限资源
3. ETCD访问控制
3.1. 访问控制相关命令
NAME:
etcdctl - A simple command line client for etcd.
USAGE:
etcdctl [global options] command [command options] [arguments...]
VERSION:
2.2.0
COMMANDS:
user user add, grant and revoke subcommands
role role add, grant and revoke subcommands
auth overall auth controls
GLOBAL OPTIONS:
--peers, -C a comma-delimited list of machine addresses in the cluster (default: "http://127.0.0.1:4001,http://127.0.0.1:2379")
--endpoint a comma-delimited list of machine addresses in the cluster (default: "http://127.0.0.1:4001,http://127.0.0.1:2379")
--cert-file identify HTTPS client using this SSL certificate file
--key-file identify HTTPS client using this SSL key file
--ca-file verify certificates of HTTPS-enabled servers using this CA bundle
--username, -u provide username[:password] and prompt if password is not supplied.
--timeout '1s' connection timeout per request3.2. user相关命令
3.2.1. 添加root用户并设置密码
3.2.2. 添加非root用户并设置密码
3.2.3. 查看当前所有用户
3.2.4. 将用户添加到对应角色
3.2.5. 查看用户拥有哪些角色
3.3. role相关命令
3.3.1. 添加角色
3.3.2. 查看所有角色
3.3.3. 给角色分配权限
3.3.4. 查看角色所拥有的权限
3.4. auth相关操作
3.4.1. 开启认证
4. 访问控制设置步骤
顺序
步骤
命令
5. 访问认证的API调用
最后更新于