Created
January 18, 2021 12:22
-
-
Save srimaln91/dfffb69e6519ba35d9530987f65f832f to your computer and use it in GitHub Desktop.
ETCD User/Role Management Commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ETCD User/Role Management Commands | |
# Users | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} user list | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} user add <user_name> | |
# Roles | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} role list | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} role add {role_name} | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} role grant-permission {role_name} --prefix=true read /system/delivery-services/ | |
# Grant permissions to a role | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} role grant-permission {role_name} --prefix=true {read/write/readwrite} /system/delivery-services/ | |
# Delete a role | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} role delete {role_name} | |
# Assign role to a user | |
etcdctl --endpoints {etcd_host}:2379 --user root --password {pass} user grant-role {user_name} {role_name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment