|
|
@@ -961,25 +961,42 @@ RPC: RoleGrantPermission
|
|
|
|
|
|
#### Options
|
|
|
|
|
|
+- from-key -- grant a permission of keys that are greater than or equal to the given key using byte compare
|
|
|
+
|
|
|
- prefix -- grant a prefix permission
|
|
|
|
|
|
-#### Ouptut
|
|
|
+#### Output
|
|
|
|
|
|
`Role <role name> updated`.
|
|
|
|
|
|
#### Examples
|
|
|
|
|
|
+Grant read and write permission on the key `foo` to role `myrole`:
|
|
|
+
|
|
|
```bash
|
|
|
./etcdctl --user=root:123 role grant-permission myrole readwrite foo
|
|
|
# Role myrole updated
|
|
|
```
|
|
|
|
|
|
+Grant read permission on the wildcard key pattern `foo/*` to role `myrole`:
|
|
|
+
|
|
|
+```bash
|
|
|
+./etcdctl --user=root:123 role grant-permission --prefix myrole readwrite foo/
|
|
|
+# Role myrole updated
|
|
|
+```
|
|
|
+
|
|
|
### ROLE REVOKE-PERMISSION \<role name\> \<permission type\> \<key\> [endkey]
|
|
|
|
|
|
`role revoke-permission` revokes a key from a role.
|
|
|
|
|
|
RPC: RoleRevokePermission
|
|
|
|
|
|
+#### Options
|
|
|
+
|
|
|
+- from-key -- revoke a permission of keys that are greater than or equal to the given key using byte compare
|
|
|
+
|
|
|
+- prefix -- revoke a prefix permission
|
|
|
+
|
|
|
#### Output
|
|
|
|
|
|
`Permission of key <key> is revoked from role <role name>` for single key. `Permission of range [<key>, <endkey>) is revoked from role <role name>` for a key range. Exit code is zero.
|