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

Feature/issue1058 #1059

Merged
merged 20 commits into from
Feb 26, 2025
Merged

Feature/issue1058 #1059

merged 20 commits into from
Feb 26, 2025

Conversation

chrisala
Copy link
Collaborator

Please don't merge this one yet @temi - needs a bit of testing before being committed to the next release

@chrisala chrisala requested a review from temi January 28, 2025 04:57
return null
}

if (request.isUserInRole(scope)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

does isUserInRole check scope attribute or just role attribute?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, for M2M tokens it applies the role check to the scopes rather than the user profile roles. The alternatives I could find to identify M2M was to check the principal (which is set to the clientId) or a check of the profile class (which introduces a dependency on the plugin implementation).
I thought since we otherwise were using the scopes it made sense to go with that approach?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(The disadvantage of checking the client id is we need to manage a list of authorized clients)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, looks good to me. I was just checking.

@chrisala chrisala merged commit 0e37da0 into dev Feb 26, 2025
1 check passed
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