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

Fix for federated user scope validation #2229

Closed
wants to merge 1 commit into from

Conversation

ThaminduR
Copy link
Contributor

Proposed changes in this pull request

$subject

@@ -111,7 +112,9 @@ private List<String> getRoleIdsAssociatedWithApp(String appId, String tenantDoma

try {
return OAuth2ServiceComponentHolder.getApplicationMgtService()
.getAssociatedRolesOfApplication(appId, tenantDomain).stream().map(RoleV2::getId)
.getAssociatedRolesOfApplication(appId,
PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain())
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need the tenant domain from the context when a tenant domain is given. Any difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given tenant domain is where the user resides in, in this case would be the organization. The role doesn't exist there.

@ThaminduR ThaminduR closed this Oct 28, 2023
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