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

ID-1330 Orchestration can PUT eRA Commons accounts #209

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

tlangs
Copy link
Contributor

@tlangs tlangs commented Jul 25, 2024

Jira: https://broadworkbench.atlassian.net/browse/ID-1330

Since RAS is on the slow-end of getting us the correct redirects for OAuth login with eRA Commons credentials, we should just have ECM store the result of the SAML handshake. This PR lets Orch PUT a linked account for eRA Commons. It also makes getting a token from a linked eRA Account throw an UnsupportedOperationException, since we don't have a real refresh token to get an access token with.

@tlangs tlangs requested a review from a team as a code owner July 25, 2024 17:26
$ref: '#/components/responses/PermissionDenied'
'500':
$ref: '#/components/responses/ServerError'
/api/admin/v1/{provider}/userForExternalId/{externalId}:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved the api version to the correct place.

.isAuthenticated(true)
.provider(provider)
.userId(adminLinkInfo.getUserId())
.refreshToken("fake-refresh-token")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made it so that trying to get an access token from an eRA Commons account fails with a helpful message instead of some esoteric permissions error.

@@ -66,9 +111,9 @@ void testGetLinkedAccountForExternalIdNonAdmin() throws Exception {
var inputLinkedAccount = TestUtils.createRandomLinkedAccount(Provider.ERA_COMMONS);

mvc.perform(
get("/api/admin/"
get("/api/admin/v1/"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Result of putting the API Version in the right place.

Copy link

@tlangs tlangs merged commit 6db0f0f into dev Jul 25, 2024
18 checks passed
@tlangs tlangs deleted the tl_ID-1330_orch_puts_era_linked_account branch July 25, 2024 18:22
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.

2 participants