Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OIDC authentication to AtoM #1741

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Add OIDC authentication to AtoM #1741

merged 1 commit into from
Feb 7, 2024

Conversation

sbreker
Copy link
Member

@sbreker sbreker commented Jan 26, 2024

This commit adds support for OIDC (OpenID Connect) user authentication in AtoM, implemented in a new arOidcPlugin.

The plugin also provides an optional mechanism for dynamically setting AclUserGroup membership on each login, based on the presence or absence of expected values in tokens returned from the OIDC endpoint during authentication.

Configuration of the plugin is handled manually by editing configuration files rather than through the AtoM user interface to avoid a "chicken-egg" problem of needing to log into AtoM as an administrator in order to set up the authentication mechanism. The steps required to enable the plugin are as follows, with all paths relative to the AtoM root directory:

  • Activate the plugin by adding it to the $plugins array in config/ProjectConfiguration.class.php
  • Configure the OIDC settings in plugins/arOidcPlugin/config/app.yml
  • Change the default login module from user to OIDC in apps/qubit/config/settings.yml
  • Change the user class to oidcUser in apps/qubit/config/factories.yml

Tasks such as DIP upload will use authenticateWithBasicAuth method in AtoM's base myUser user class to allow Archivematica to authenticate for DIP Upload using basic auth even when a single sign-on method such as OIDC is enabled in AtoM.

@anvit anvit requested a review from a team February 6, 2024 17:34
Copy link
Contributor

@melaniekung melaniekung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job, steve! minor typo and question, but otherwise looks good to me!

plugins/arOidcPlugin/lib/oidcUser.class.php Outdated Show resolved Hide resolved
plugins/arOidcPlugin/config/app.yml Outdated Show resolved Hide resolved
@sbreker sbreker requested review from anvit and melaniekung February 6, 2024 22:24
Copy link
Contributor

@anvit anvit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few files that use elseif instead of else if that's probably causing the tests to fail, but other than that this looks good to me!

@sbreker
Copy link
Member Author

sbreker commented Feb 7, 2024

There are a few files that use elseif instead of else if that's probably causing the tests to fail, but other than that this looks good to me!

Thanks @anvit and @melaniekung! I have made the last change to satisfy PHP_cs_fixer. I will rebase, squash and merge.

This commit adds support for OIDC (OpenID Connect) user authentication
in AtoM, implemented in a new arOidcPlugin.

The plugin also provides an optional mechanism for dynamically setting
AclUserGroup membership on each login, based on the presence or absence
of expected values in tokens returned from the OIDC endpoint during
authentication.

Configuration of the plugin is handled manually by editing configuration
files rather than through the AtoM user interface to avoid a
"chicken-egg" problem of needing to log into AtoM as an administrator
in order to set up the authentication mechanism. The steps required to
enable the plugin are as follows, with all paths relative to the AtoM
root directory:

- Activate the plugin by adding it to the $plugins array in
config/ProjectConfiguration.class.php
- Configure the OIDC settings in plugins/arOidcPlugin/config/app.yml
- Change the default login module from user to OIDC in
apps/qubit/config/settings.yml
- Change the user class to oidcUser in apps/qubit/config/factories.yml

Tasks such as DIP upload will use authenticateWithBasicAuth method in
AtoM's base myUser user class to allow Archivematica to authenticate for
DIP Upload using basic auth even when a single sign-on method such as
OIDC is enabled in AtoM.
@sbreker sbreker merged commit fecda72 into qa/2.x Feb 7, 2024
6 checks passed
@anvit anvit deleted the dev/auth-plugin branch February 7, 2024 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants