soyking / e3w

etcd v3 Web UI
MIT License
589 stars 111 forks source link

Issue with auth enabled #11

Closed adalga closed 6 years ago

adalga commented 6 years ago

Hi, When I enabled auth on etcd and run e3w with auth:true I have an issue like

When I try to add delete edit user or role in Auth section there is an error like etcdclient: no available endpoints. I can put and get key values I also can see members status however, I couldn't do anything on auth . Can you check this issue ?

soyking commented 6 years ago

I'll try it later.

There are some hints, and maybe you could try them.

adalga commented 6 years ago

Yes I have done all of these.

soyking commented 6 years ago

The situation is:

It is weird, and I guess there are some bugs in etcd/clientv3. So I upgraded the etcd client version to v3.2.10 and it works. You could try it in master.

adalga commented 6 years ago

Hi, Thanks for effort. I tested and it looks fine.I can add role/user set role to user change password delete user etc. There is a little problem though. I can't delete roles it gives error like "etcdserver: user name not found".

soyking commented 6 years ago

Sorry, there is a bug in frontend. I just fixed it in this commit. You could rebuild static/ and try again.

adalga commented 6 years ago

Thanks now it looks perfect.

adalga commented 6 years ago

Hi, it is me again :) My naming convention for username and role names is same for project structure which contains "/". E.g. "a/b". When I try to do something with user or role with has / character there is a bug. I think I know the reason. You don't encode the username or rolename therefore it results in request like localhost:8080/role/a/b/permission?prefix and returns 404 not found. Can you fix this?

soyking commented 6 years ago

I just fix it in commit. Please try it again.

adalga commented 6 years ago

Thanks again. It looks it is fixed.