-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
auth: support accessing all keys for non-root roles #7468
Milestone
Comments
I see, the case of [a, '\x0') should be supported, too. Anyway, I want to refine current permission check mechanism of auth code with interval tree. Can I assign it to myself? |
mitake
added a commit
to mitake/etcd
that referenced
this issue
Apr 3, 2017
This commit adds a new option --open-ended to the command etcdctl role grant-permission. If the option is passed, an open ended permission will be granted to a role e.g. from start-key to any keys those are larger than start-key. Example: $ ETCDCTL_API=3 bin/etcdctl --user root:p role grant r1 readwrite a b $ ETCDCTL_API=3 bin/etcdctl --user root:p role grant --open-ended r1 readwrite c $ ETCDCTL_API=3 bin/etcdctl --user root:p role get r1 Role r1 KV Read: [a, b) (prefix a) [c, <open ended> KV Write: [a, b) (prefix a) [c, <open ended> Note that a closed parenthesis doesn't follow the above <open ended> for indicating that the role has an open ended permission ("<open ended>" is a valid range end). Fixes etcd-io#7468
mitake
added a commit
to mitake/etcd
that referenced
this issue
Apr 4, 2017
This commit adds a new option --from-key to the command etcdctl role grant-permission. If the option is passed, an open ended permission will be granted to a role e.g. from start-key to any keys those are larger than start-key. Example: $ ETCDCTL_API=3 bin/etcdctl --user root:p role grant r1 readwrite a b $ ETCDCTL_API=3 bin/etcdctl --user root:p role grant --from-key r1 readwrite c $ ETCDCTL_API=3 bin/etcdctl --user root:p role get r1 Role r1 KV Read: [a, b) (prefix a) [c, <open ended> KV Write: [a, b) (prefix a) [c, <open ended> Note that a closed parenthesis doesn't follow the above <open ended> for indicating that the role has an open ended permission ("<open ended>" is a valid range end). Fixes etcd-io#7468
mitake
added a commit
to mitake/etcd
that referenced
this issue
Apr 4, 2017
This commit adds a new option --from-key to the command etcdctl role grant-permission. If the option is passed, an open ended permission will be granted to a role e.g. from start-key to any keys those are larger than start-key. Example: $ ETCDCTL_API=3 bin/etcdctl --user root:p role grant r1 readwrite a b $ ETCDCTL_API=3 bin/etcdctl --user root:p role grant --from-key r1 readwrite c $ ETCDCTL_API=3 bin/etcdctl --user root:p role get r1 Role r1 KV Read: [a, b) (prefix a) [c, <open ended> KV Write: [a, b) (prefix a) [c, <open ended> Note that a closed parenthesis doesn't follow the above <open ended> for indicating that the role has an open ended permission ("<open ended>" is a valid range end). Fixes etcd-io#7468
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current v3 auth code assumes that a role will cover a set of intervals [a, b). However, this is insufficient for including the entire key set since if
b
is fixed there is always ac
wherec > b
. The Range code handles this by treating [a, '\x0') as meaning all keys >= a; auth should probably do the same.The text was updated successfully, but these errors were encountered: