-
Notifications
You must be signed in to change notification settings - Fork 535
Description
After some recent chat on IRC with @pdurbin here and here, I am opening this issue quickly, as @pdurbin pointed out slide 32 by @djbrooke regarding future changes on the auth flow.
Motivation
We have had a discussion at FZJ about what auth methods we will allow and the result was that we will need to provide multiple options, including reusing the already existing accounts from AD. We are part of DFN AAI/eduGain, so there is a SAML IdP present, too.
While working on IQSS/dataverse-kubernetes, I tried to integrate the SAML IdP in gdcc/dataverse-kubernetes#14 using mod_auth_mellon instead of Shibboleth. Shibboleth as an SP IMHO is a nightmare. You can only use it with mod_shib, have to run it on the same host/container as Apache does and for usage with Dataverse, you are tied to using mod_ajp. As Dataverse is very tightly integrated with Shibboleth specials (reading sessions, etc), I had no luck with mod_auth_mellon... 😢
Proposal
All of this is not very container friendly, which is why I would like to propose integrating a "new" option: usage of an IDM/IAM.
Most existing solutions are capable of OAuth2 and/or OpenID Connect. At least OAuth2 support is already present in Dataverse.
Steps to be taken:
- Use current OAuth2 lib to read OpenID Connect data:
- Provide integration tests for Github, Google and ORCID to ensure nothing breaks (using stubs) See Providing testing for current OAuth2 implementations #5985
- Update to latest version (6.6.3) from v3.1.0 (See Upgrade ScribeJava to latest version #5991)
- Write new AuthenticationProvider for interaction with a custom endpoint (see Implement first (simple/PoC) version of a OIDC auth provider #6432)
- Receive and parse user data following Open ID connect standard (see Implement first (simple/PoC) version of a OIDC auth provider #6432)
- Provide documenation on usage and technical details (see Implement first (simple/PoC) version of a OIDC auth provider #6432)
- Stick with current "flow" based on first login page, etc for this first step.
- This might be referred to as "OpenID Connect Core".
- Create automated testing with Unity IDM provided by Helmholz Data Federation
- Make use of email adress verification status claim available from OIDC
- Make non-interactive signup via OA2/OIDC possible (OAuth2FirstLoginPage) w/ fallback when missing required
- Introduce OpenID Connect as an emerging standard (also supported by Google, ORCID, but not by GitHub yet). [1]
- Maybe more. Placeholder.
Benefits
- Open ID Connect support is also benefical without using an IDM, as it is the appropriate standard for authn via OAuth2.
- Using an IDM could be a solution to Permit multiple login options to the same Dataverse account #3487.
- Offloading the hard work for authentication with upstream IdPs and services to an IDM might be a solution for As a Dataverse Installation Administrator, I want to add an alternative OAuth provider as a plugin, so that I don't have to fork the core code #4383
- Many IDM solutions offer LDAP support as auth backend, so existing directories can be reused. No need to implement this in Dataverse.
- Integrations might benefit from an IDM, too. Instead of creating multiple service points for SAML, etc. they can use easier OAuth2 for integration with Dataverse.
- Most certainly even more.
Things for later optimization
- Refactor to remove some unused functions
- Refactor OAuth2 infrastructure to be named as "flow" or "token" or similar to be clearer
- Refactor AbstractOAuth2Authentication Provider into proper interfaced contracts for usage in the bean and reflect the clearer naming above
- Refactor ORCID provider, see Refactor ORCID OAuth2 and OAuth2TokenData #6329
- Refactor JSON files for providers: make factoryData proper JSON for ease of parsing, etc.
- Refactor OAuth2UserRecord creation to use factory/decorator pattern.
Costs
Minor(?) dev effort for Dataverse side, as lots of things are already present.
Examples
You might take a look at B2SHARE using B2ACCESS, also featuring X509 logins. This is based on Unity IDM, see here. Other, bigger examples for open source IDMs are Gluu and FreeIPA.
Footnotes
[1]: Current usage of ScribeJava should be replaced at least longterm, as it has no proper support for this.