Skip to content

Existing OAuth users API OIDC Authentication#11671

Merged
ofahimIQSS merged 16 commits intodevelopfrom
11645-old-oidc-users-api-auth
Aug 25, 2025
Merged

Existing OAuth users API OIDC Authentication#11671
ofahimIQSS merged 16 commits intodevelopfrom
11645-old-oidc-users-api-auth

Conversation

@GPortas
Copy link
Copy Markdown
Contributor

@GPortas GPortas commented Jul 23, 2025

What this PR does / why we need it:

Introduces a mechanism that allows linking incoming bearer tokens with the following existing OAuth accounts: Google, ORCID, and GitHub.

This mechanism is enabled through the new api-bearer-auth-use-oauth-user-on-id-match feature flag.

The behavior of api-bearer-auth-use-shib-user-on-id-match has also been modified, now expecting the Shibboleth IdP provider id comes from the claim named idp instead of Shib-Identity-Provider, since the idp claim is common to both Shibboleth and OIDC IdPs within the scope of CILogon.

Which issue(s) this PR closes:

Special notes for your reviewer:

This branch is including the changes from #11622.

Suggestions on how to test this:

  1. Open the QA server Single Page Application (SPA) at: https://qa.dataverse.org/spa

  2. On CILogon, Log in using one of the supported OAuth providers: Google, ORCID, or GitHub.

  3. To test the behavior for an existing account, ensure that the Google, ORCID, or GitHub account you use was already registered in Harvard Dataverse.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No

Is there a release notes update needed for this change?:

Yes, attached.

Additional documentation:

None

@GPortas GPortas changed the base branch from develop to 11605-existing-external-users-api-auth July 23, 2025 16:21
@GPortas GPortas force-pushed the 11645-old-oidc-users-api-auth branch from d6b36ef to 4697002 Compare July 23, 2025 16:23
@github-actions

This comment has been minimized.

3 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 23, 2025

Coverage Status

coverage: 23.257% (+2.5%) from 20.726%
when pulling 5cca889 on 11645-old-oidc-users-api-auth
into 20aaf5a on develop.

@GPortas GPortas changed the base branch from 11605-existing-external-users-api-auth to develop July 24, 2025 12:47
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@GPortas GPortas added Size: 10 A percentage of a sprint. 7 hours. Original size: 10 SPA.Q3.2025.9 Deploy External User Auth to the Harvard Dataverse SPA GREI Re-arch Issues related to the GREI Dataverse rearchitecture SPA These changes are required for the Dataverse SPA labels Jul 26, 2025
@GPortas GPortas moved this to Ready for Review ⏩ in IQSS Dataverse Project Jul 26, 2025
@GPortas GPortas marked this pull request as ready for review July 26, 2025 04:49
@GPortas
Copy link
Copy Markdown
Contributor Author

GPortas commented Jul 26, 2025

Waiting for #11622 to be merged

@GPortas GPortas added the Status: Waiting for Related Issues/PRs This issue depends upon the completion of one or more issues/PRs label Jul 26, 2025
@github-actions

This comment has been minimized.

@GPortas GPortas requested a review from qqmyers July 28, 2025 16:47
@GPortas GPortas removed the Status: Waiting for Related Issues/PRs This issue depends upon the completion of one or more issues/PRs label Jul 28, 2025
@github-actions

This comment has been minimized.

@cmbz cmbz added the FY26 Sprint 3 (2025-07-30 - 2025-08-13) label Jul 31, 2025
@cmbz cmbz added the FY26 Sprint 4 FY26 Sprint 4 (2025-08-13 - 2025-08-27) label Aug 14, 2025
@pdurbin pdurbin self-assigned this Aug 20, 2025
@pdurbin pdurbin moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Aug 20, 2025
Copy link
Copy Markdown
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Tests are passing but I didn't do any testing myself (we definitely need it).

@GPortas I'm approving this but I'm leaving a couple small comments in this review.

Comment thread doc/release-notes/11645-existing-oauth-external-users-api-auth.md
- Allows the use of a Shibboleth user account when an identity match is found during API bearer authentication. This feature enables automatic association of an incoming IdP identity with an existing Shibboleth user account, bypassing the need for additional user registration steps. This feature only works when the feature flag ``api-bearer-auth`` is also enabled. **Caution: Enabling this flag could result in impersonation risks if (and only if) used with a misconfigured IdP.**
- ``Off``
* - api-bearer-auth-use-oauth-user-on-id-match
- Allows the use of an OAuth user account (GitHub, Google, or ORCID) when an identity match is found during API bearer authentication. This feature enables automatic association of an incoming IdP identity with an existing OAuth user account, bypassing the need for additional user registration steps. This feature only works when the feature flag ``api-bearer-auth`` is also enabled. **Caution: Enabling this flag could result in impersonation risks if (and only if) used with a misconfigured IdP.**
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm confused. What is the impersonation risk? 🤔

Copy link
Copy Markdown
Contributor Author

@GPortas GPortas Aug 22, 2025

Choose a reason for hiding this comment

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

If the OIDC claims include an identity provider ID and a user ID that match an authenticated user in Dataverse, but the provider that issued the claims is not actually the one that originally created that user, this would represent an impersonation issue. However, as mentioned in the docs, this scenario can only occur if the IdP is misconfigured.

Comment thread src/main/java/edu/harvard/iq/dataverse/settings/FeatureFlags.java Outdated
@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Aug 21, 2025
@pdurbin pdurbin removed their assignment Aug 21, 2025
GPortas and others added 2 commits August 22, 2025 10:24
Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>
Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>
@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Copy Markdown

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11645-old-oidc-users-api-auth
ghcr.io/gdcc/configbaker:11645-old-oidc-users-api-auth

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Aug 25, 2025
@ofahimIQSS ofahimIQSS self-assigned this Aug 25, 2025
@ofahimIQSS
Copy link
Copy Markdown
Contributor

tested using github account - looks good to me. Merging.
image

@ofahimIQSS ofahimIQSS merged commit ab2c661 into develop Aug 25, 2025
23 checks passed
@github-project-automation github-project-automation Bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Aug 25, 2025
@ofahimIQSS ofahimIQSS deleted the 11645-old-oidc-users-api-auth branch August 25, 2025 19:38
@ofahimIQSS ofahimIQSS removed their assignment Aug 25, 2025
@pdurbin pdurbin added this to the 6.8 milestone Aug 26, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 3 (2025-07-30 - 2025-08-13) FY26 Sprint 4 FY26 Sprint 4 (2025-08-13 - 2025-08-27) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 10 Size: 10 A percentage of a sprint. 7 hours. SPA.Q3.2025.9 Deploy External User Auth to the Harvard Dataverse SPA SPA These changes are required for the Dataverse SPA

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Support old OIDC users with the new OIDC API authentication

6 participants