Skip to content
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

Grant-permissions with wildcards in V3 #5896

Closed
sergeyfd opened this issue Jul 7, 2016 · 10 comments
Closed

Grant-permissions with wildcards in V3 #5896

sergeyfd opened this issue Jul 7, 2016 · 10 comments

Comments

@sergeyfd
Copy link

sergeyfd commented Jul 7, 2016

Hello,

How can I grant permissions to all keys, or to keys wit a certain prefix, in V3 etcd to some role? I created a role with the following permissions:

Role etcd
KV Read:
    *
    [*, *)
    .*
    /*
    etcd
    etcd*
KV Write:
    *
    [*, *)
    .*
    /*
    etcd
    etcd*

But so far this role is only able to get/put etcd key and nothing else.

@xiang90
Copy link
Contributor

xiang90 commented Jul 7, 2016

we do not support widecard for auth right now. only explicit range is supported

@sergeyfd
Copy link
Author

sergeyfd commented Jul 7, 2016

What is a range in this context?

@xiang90
Copy link
Contributor

xiang90 commented Jul 7, 2016

@sergeyfd Permission on a range of keys like from foo to foo10.

@sergeyfd
Copy link
Author

sergeyfd commented Jul 7, 2016

But:

get etcd
Role etcd
KV Read:
    *
    [*, *)
    .*
    /*
    etcd
    etcd*
    [etcd0, etcd100)
KV Write:
    *
    [*, *)
    .*
    /*
    etcd
    etcd*
    [etcd0, etcd100)
-bash-4.2$ etcdctl --user etcd:etcd get etcd20
Error:  etcdserver: permission denied

@xiang90
Copy link
Contributor

xiang90 commented Jul 7, 2016

etcd20 is not in any range I think. etcd20 > etcd100.

@sergeyfd
Copy link
Author

sergeyfd commented Jul 7, 2016

Kind of weird but Ok. get on etcd020 works. Thanks for the explanation.

@xiang90
Copy link
Contributor

xiang90 commented Jul 7, 2016

@sergeyfd Shall we close this issue? Or you still want the wide card support?

@sergeyfd
Copy link
Author

sergeyfd commented Jul 7, 2016

Will you add it if I keep it open? :-)

If you have no plans for adding such support, then yes, it's Ok to close it.

@xiang90
Copy link
Contributor

xiang90 commented Jul 7, 2016

@sergeyfd We do not have plan. But if there is a strong use case, we might consider. If you think range can achieve what you want for now, we shall close it. Based on your reply, seems that range is good enough for you.

@sergeyfd
Copy link
Author

sergeyfd commented Jul 7, 2016

I should be Ok for now. But I bet you that eventually you'll have to add that support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants