feat(auth): implement OIDC auth for frontend#7
feat(auth): implement OIDC auth for frontend#7jescalada wants to merge 17 commits intoG-Research:mainfrom
Conversation
| /** | ||
| * Generates a username from email address. | ||
| * This helps differentiate users within the specific OIDC provider. | ||
| * Note: This is incompatible with multiple providers. Ideally, users are identified by |
There was a problem hiding this comment.
Also if there is a local user with the same username
src/service/passport/oidc.js
Outdated
|
|
||
| passport.deserializeUser(async (id, cb) => { | ||
| try { | ||
| const user = (await db.findUserByOIDC(id)) || (await db.findUser(id)); |
There was a problem hiding this comment.
is this fallback to findUser necessary? If we are logging with OIDC shouldn't we only care about OIDC users?
|
It generally looks really good, and I think the OIDC strategy works well, I see problems with the local authentications, I couldn't manage to login with the admin profile, but I'm not sure if this is related to this pr. |
…t-proxy into oidc-implementation
I believe this is because in this PR, only one auth method can be active at a time. It's fixed in #24! |
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #7 +/- ##
=======================================
Coverage ? 61.06%
=======================================
Files ? 48
Lines ? 1767
Branches ? 0
=======================================
Hits ? 1079
Misses ? 688
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
chore: bump by patch to 1.8.1
|
Closing as upstream PR finos#936 got merged. |
This is a preliminary PR for #1. It adds the OIDC login button to the login page (
/login) and the internals for OIDC. Note that the MongoDB implementation is missing at the moment (since this will be refactored soon).In order to get this to work, you'll have to modify the
proxy.config.jsonin the project (assuming you're executing in dev). Look for theauthenticationentry, and fill it in with your own OIDC data. If you want to use my own config from below, let me know your email so I can register you in my Google client.Note: The new config will cause several unit tests to fail. To make those pass again, set the local authentication in the config to
"enabled": false. I'll patch this up when implementing the multiple auth strategy (#6) system.Changelog