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

What characters should I use or not use in usernames on etcd? #11785

Closed
hehechen opened this issue Apr 14, 2020 · 10 comments
Closed

What characters should I use or not use in usernames on etcd? #11785

hehechen opened this issue Apr 14, 2020 · 10 comments
Labels

Comments

@hehechen
Copy link

etcdctl --endpoints=https://localhost:2389 --ca-file=cn0/cacert.crt --cert-file=tem.crt --key-file=tem.pem -u root user add "A:B"
I want to add user with username "A:B", But actually etcd add username "A", it showes
User A created
What characters should I use or not use in usernames on etcd?
ETCD version: 3.3.13

@tangcong
Copy link
Contributor

A is username,B is password,character : is special

@hehechen
Copy link
Author

A is username,B is password,character : is special

Is there any other way to add a user name with character : ?

@tangcong
Copy link
Contributor

etcdctl can not add a user name with character ; , you can try to add special user name by clientv3. example.

@tangcong
Copy link
Contributor

etcdctl user add hello:123 --no-password
etcdctl user passwd hello:123

it also works.

@tangcong
Copy link
Contributor

it is better if username supports special characters :, can we add a password flag to optimize this issue? how do you think so? @mitake

@hehechen
Copy link
Author

etcdctl user add hello:123 --no-password
etcdctl user passwd hello:123

it also works.

It doesn't work in etcd 3.3.13, showes flag provided but not defined: -no-password
what etcd version support --no-password ?

@tangcong
Copy link
Contributor

etcdctl user add hello:123 --no-password
etcdctl user passwd hello:123

it also works.

It doesn't work in etcd 3.3.13, showes flag provided but not defined: -no-password
what etcd version support --no-password ?
3.4+

@tangcong
Copy link
Contributor

it is better if username supports special characters :, can we add a password flag to optimize this issue? how do you think so? @mitake

this pr solved this issue. etcd version 3.4+.

@mitake
Copy link
Contributor

mitake commented Apr 15, 2020

@hehechen yeah the problem comes from the old flag (it comes from v2)like etcdctl user add <username:password>. A:B will be interpreted as user A whose password is B. As @tangcong shared --password flag can avoid this problem. I feel the behavior is confusing so I personally want to remove <username:password> notation...

@stale
Copy link

stale bot commented Jul 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants