-
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
Can't use users with colon in names #9691
Comments
Hi @cristifalcas would you mind posting full logs showing this failure, please? Also can you note what version of etcd you are using? |
I can give the logs from openshift after enabling authentication in etcd:
And I have no way to add this user. I will try to redo the client certs used by the kube apiserver |
@cristifalcas I didn't test etcdctl but I had no issues adding a user with colons using gRPC gateway. So this is not a limitation of etcd. I will look into etcdctl further but it feel likes an escaping issue. have you tried "foo\:bar" ? .. oops, I didn't realize you basically did that with your test above.
|
I see so the |
Perhaps we could add a /cc @mitake how do you feel? Post Note: if it can be done with gRPC gateway it should probably be supported by etcdctl or disabled entirly. |
Can you help me with a grpc gateway example? How to add the user? And I need it to work with tls certs. |
This is what I'm trying:
The same certificates work with etcdctl client And the cert:
|
Strange. I managed to create the user from inside a container with version 3.0.17:
|
@cristifalcas sure here is a bash example of auth and useradd using gRPC gateway. https://github.com/coreos/etcd/blob/master/contrib/recipes/grpc_gateway/user_add.sh usage : $ user_add.sh system:master |
Thank you |
Just note for 3.0 you will need to use /v3alpha as with your above example. But you probably notice that by now :) |
@cristifalcas is this solution going to work for you or do you want to explore further? |
It seems it worked, at least on 3.0.17. For me it will be better to do it with any version of etcdctl. But I'm ok with the grpc solution also. |
Sorry for my late reply. Probably adding a new flag |
This commit adds two flags to etcdctl: 1. `--password` flag to etcdctl as a global option. It can be used for specifying password for authentication required for the command execution. 2. `--new-user-password` flag to `etcdctl user add`. It can be used for specifying password of newly created user by the command. The main motivation of the flags is allowing user to have : in its name. Fix etcd-io#9691
We can't enable authentication in etcd with kubernetes/openshift because the CN in the certs they use to connect to etcd contais a colon: "system:master".
Is there any way to bypass this and create users with colon in name?
And it seems we can have users with strange names:
The text was updated successfully, but these errors were encountered: