zero-ui icon indicating copy to clipboard operation
zero-ui copied to clipboard

feat: LDAP for User Authentication and Roles

Open drtech981 opened this issue 4 years ago • 5 comments

LDAP as an authentication backend / SAML would be great. Roles could be user (only view) , admin (add or delete networks they create) and su-admin (manage any network on the controller). Such features would be great for people who have more than one user per controller.

drtech981 avatar Dec 06 '21 16:12 drtech981

OAuth is a better integration, however implementing plain old LDAP is much easier than going the OAuth route (like what WordPress has - separate simple LDAP plugin + A separate OAuth plugin).

LDAP works better in a totally self hosted local environment.

drtech981 avatar Dec 08 '21 06:12 drtech981

Just piggy backing on this, is there now user management currently? I can't see anything outwardly.

codeghari avatar Mar 09 '22 01:03 codeghari

would be a little hack, but using #59 , you could limit the /api depending on the role to request methods. in detail, introduce multiple auth middlewares with different scopes for the api "traefik.http.routers.zt-noauth.rule=Host(`zt.example.com`) && PathPrefix(`/api/`)"

e.g.

  • role: admin, http request methods: GET, POST
  • role: moderator: http request methods: GET

for traefik, perhaps: https://doc.traefik.io/traefik/middlewares/http/headers/#cors-headers

this could also further be extended to certain network ids, e.g. api/network/CERTAIN_NETWORK_ID/member

another idea would be, limit the zero-ui to admins, and just create a simple static website which queries the network information - or @dec0dOS introduces a /static read-only route for this use case :)

maltegrosse avatar Apr 21 '22 06:04 maltegrosse

You can disable authentication and have zero-ui be protected by the reverse proxy which implements LDAP or OpenID or whatever.

9p4 avatar Jun 20 '22 07:06 9p4

Users are still required so that each can have their own set of networks, rules and capabilities.

drtech981 avatar Jun 20 '22 07:06 drtech981