tvl-depot/web/panettone
Vincent Ambo c1bddf191f feat(web/panettone): Implement OAuth2-based authentication
Instead of directly connecting to LDAP and attempting to bind
usernames/password, authenticate users through an OAuth2 flow to
Keycloak.

This has the advantage of reusing the same SSO we already have for
Gerrit, Buildkite, ...

However, much of panettone's functionality makes assumptions about
LDAP being used. As a result there are some warts introduced by
this (for now):

* Since LDAP DNs are used as primary keys for users, we have to
  construct fake DNs based on LDAP usernames

  It might be sensible to migrate this to the UUIDs used by Keycloak
  eventually.

* LDAP is part of the serving path for issues (for fetching user
  information), however panettone no longer has a way to fetch
  arbitrary user information unless it is persisted in its database.

  To work around this, we construct a "fake" user based only on its
  DN (i.e. only the username is going to be "correct") and use that to
  serve issues.

* Email notifications no longer work (panettone can not access email
  addresses)

Some of these need to be worked around by persisting some of that
information in the panettone database instead, as we don't want to
give the service the ability to access arbitrary user information
anymore.

We can probably do this with the user settings feature that already
exists and populate it on launch, but as of this commit email and
displayName functionality is simply broken.

Change-Id: Id32bf5e09d67f0f1e883024c6e013eb342f03b05
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5772
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
2022-05-28 18:00:02 +00:00
..
src feat(web/panettone): Implement OAuth2-based authentication 2022-05-28 18:00:02 +00:00
test fix(web/panettone): make (who:html-mode) stick 2022-01-13 23:19:31 +00:00
.envrc feat(web/panettone): Add dev helpers for postgres db 2020-07-26 21:55:41 +00:00
.gitignore chore(web/panettone): ignore .fasl files 2020-07-26 20:12:37 +00:00
default.nix feat(web/panettone): Implement OAuth2-based authentication 2022-05-28 18:00:02 +00:00
docker-compose.yml feat(web/panettone): Add dev helpers for postgres db 2020-07-26 21:55:41 +00:00
OWNERS refactor(users/glittershark): Rename to grfn 2021-04-12 14:45:51 +00:00
panettone.asd feat(web/panettone): Add initial styles 2020-07-23 22:20:00 +00:00
shell.nix fix(web/panettone): Fix shell.nix for new third_party format 2022-04-14 14:26:50 +00:00