Programvareverkstedet / Drift

Ticketing repo for drift
4 stars 1 forks source link

Create new authentication/authorization system #67

Open h7x4 opened 1 year ago

h7x4 commented 1 year ago

Currently Balduzius serves as KDC master (Swedish kerberos lmao, not the MIT one, ITK has good docs). In addition, Spikkjeposche runs SimpleSAML for auth services for web.

We have not touched these systems in a long while, and with moving the servers and most services rather using either LDAP or OIDC for auth these days, we really need a need setup.

Mandatory features

Nice to have features

felixalbrigtsen commented 1 year ago

We have a few options for this one;

Keep our existing setup

This is the "simplest", but is quite problematic as we need OAuth2 and LDAP to integrate with new web services and allow user login on NixOS. This makes it not viable in the long run.

Keep using kerberos, add keycloak and LDAP

The biggest disadvantage of this system is that it can be quite a lot of work to configure and maintain all these different services, separating and combining them in the right way. OpenLDAP and Keycloak are both in nixpkgs, so running them should be very possible. The end result will expose both LDAP and Oauth2, but with many moving parts that depend on each other. Key words: Old, stable, clunky, predictable

Use Kanidm

This is a young project still in beta, but most of the core features seem to be stable. This will probably be the simplest system to manage, as a single program will manage all our authentication and authorization.

It will however not be as "standard" as the above solution. Local auth with PAM will require a custom module made by Kanidm, and not all LDAP features are supported.

My suggested plan:

When these things are confirmed working, we can start migrating users and designing how we organize groups, ids and similar.

felixalbrigtsen commented 1 year ago

There are also many alternatives to OpenLDAP, and some who combine LDAP and kerberos into single services.

These larger/combined services include

and other smaller LDAP servers like

I don't think any of these will be better suited to our needs than the original suggestions above, but they are worth mentioning/researching.

dali99 commented 1 year ago

I support trying kanidm to see what the workflow would look like