-
Notifications
You must be signed in to change notification settings - Fork 4
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
DT-659: Use ECM instead of Shibboleth for eRA Commons Authentication #2664
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
cb1d752
feat: ECM POC
rushtong 34b622d
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong fd9c2ce
feat: docs and diagram
rushtong bffcd1d
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong 3b67f6c
feat: doc updates
rushtong a8948f9
feat: new post oauthcode method
rushtong 623c3c1
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong 59640c9
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong 9a411b1
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong fd74078
feat: use the post api to get nih auth url
rushtong 66737a6
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong d119982
feat: add stub for ecm call
rushtong f28b5aa
feat: prefer axios over fetch
rushtong beb9569
feat: use new redirect
rushtong 489cf7a
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong 00bc4e5
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong b61ec5a
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong 4c5f49c
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong e1d32b1
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong 88e5bc9
fix: RAS changes
rushtong 86af3d7
fix: carry through method name refactor
rushtong ad98af8
doc: minor doc updates
rushtong cc02601
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong 6851c1f
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong ad53e19
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong 446bd87
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong e3983bb
feat: clean up; add enabled; merge fixes
rushtong c714fa9
feat: handle redirect response from ECM
rushtong 5ffd45e
npm lint
rushtong dacacb3
fix: add stub to render test
rushtong 97b67bf
Merge branch 'refs/heads/develop' into gr-DCJ-659-ecm-for-era-commons
rushtong a9653ce
feat: complete auth/redirect process
rushtong 027539a
feat: docs, cleanup
rushtong fd29864
feat: replace eRA Commons with RAS
rushtong bf92725
lint
rushtong 61289d3
feat: use RAS link
rushtong 6af938f
revert quote reformat
rushtong 8150455
revert quote reformat
rushtong ae862b1
docs
rushtong df55cc2
formatting
rushtong ed135a0
revert quote formatting
rushtong f8919f8
feat: prevent double run
rushtong a8c5e33
feat: clean up todo
rushtong 7322061
feat: rm unused
rushtong 5a53665
lint
rushtong 33265e8
feat: use nih logo for RAS
rushtong 5f47b5c
feat: article change
rushtong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# RAS/eRA Commons Integration | ||
|
||
DUOS uses ECM as an intermediary to allow users to authenticate | ||
with NIH. ECM provides a redirect url that we point the user to. | ||
Once authenticated, the user is redirected back to ECM which saves | ||
the authentication information and then redirects the user back to | ||
the originating URL. DUOS, historically, also saved this information | ||
locally in Consent. This allows Data Access Committees the ability to | ||
see if a researcher is an NIH user. | ||
|
||
```mermaid | ||
%%{init: { 'theme': 'forest' } }%% | ||
sequenceDiagram | ||
User ->> DUOS: clicks the eRA Commons button | ||
DUOS ->> ECM: Get authorization url | ||
Note over DUOS, ECM: POST /api/oauth/v1/{provider}/authorization-url | ||
Note over DUOS, ECM: include a redirectUri query parameter | ||
Note over DUOS, ECM: include a { "redirectTo": "url" } request body | ||
ECM ->> DUOS: return auth url | ||
DUOS ->> User: send user new url to follow | ||
User ->> NIH: User is forwarded to NIH | ||
NIH ->> NIH: User Auths | ||
NIH ->> DUOS: Return with user state | ||
Note over DUOS, NIH: Gets the oauth code from NIH | ||
DUOS ->> ECM: Post oauthcode to ECM | ||
Note over DUOS, ECM: POST /api/oauth/v1/{provider}/oauthcode | ||
Note over DUOS, ECM: include state, oauthcode | ||
ECM ->> DUOS: return LinkInfo | ||
Note over ECM, DUOS: response includes externalUserId redirectTo | ||
DUOS ->> DUOS: Decode/validate ECM response | ||
DUOS ->> Consent: Save eRA Commons state to Consent for local purposes | ||
DUOS ->> User: Redirect user to original redirectTo | ||
User ->> DUOS: Original page is refreshed | ||
DUOS ->> User: Updates user display | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have some basic tests for ECM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏽 Yes, we have a test that works with eRA Commons, but not with ECM.