-
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
etcdctl role grant-permission --from-key '' is not effect #8494
Labels
Comments
Reproduced on master: #!/bin/bash
export ETCDCTL_API=3
bin/etcdctl put abc def
bin/etcdctl role add view
bin/etcdctl user add root:root
bin/etcdctl user add view:view
bin/etcdctl role grant-permission --from-key view read ''
bin/etcdctl role get view
bin/etcdctl user grant-role view view
bin/etcdctl user get --detail view
bin/etcdctl auth enable
bin/etcdctl --user=root:root get --from-key ''
bin/etcdctl --user=view:view get --from-key '' |
@zyf0330 thanks for reporting, I'll work on it. |
mitake
added a commit
to mitake/etcd
that referenced
this issue
Sep 7, 2017
Current `etcdctl role grant-permission` doesn't handle an empty key ("") correctly. Because the range permissions are treated as BytesAffineInterval internally, just specifying the empty key as a beginning of range introduces an invalid permission which doesn't work and betray users' intuition. This commit fix the way of handling empty key as a prefix or from key in permission granting. Fix etcd-io#8494
mitake
added a commit
to mitake/etcd
that referenced
this issue
Sep 11, 2017
Current `etcdctl role grant-permission` doesn't handle an empty key ("") correctly. Because the range permissions are treated as BytesAffineInterval internally, just specifying the empty key as a beginning of range introduces an invalid permission which doesn't work and betray users' intuition. This commit fix the way of handling empty key as a prefix or from key in permission granting. Fix etcd-io#8494
mitake
added a commit
to mitake/etcd
that referenced
this issue
Sep 13, 2017
Current `etcdctl role grant-permission` doesn't handle an empty key ("") correctly. Because the range permissions are treated as BytesAffineInterval internally, just specifying the empty key as a beginning of range introduces an invalid permission which doesn't work and betray users' intuition. This commit fix the way of handling empty key as a prefix or from key in permission granting. Fix etcd-io#8494
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
etcdctl role grant-permission view --from-key read ''
causeetcdctl role get view
showsBut then I use
etcdctl --user view get '' --from-key
it alertsError: etcdserver: permission denied
So is it a bug, or I do something wrong for granting permission to read all keys?
The text was updated successfully, but these errors were encountered: