Check semicolon during the OIDC scope to permission conversion #36361
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.
Fixes #36313.
Supports #35931.
OIDC
scope
claim is automatically converted to one or moreStringPermission
s.Currently, if the scope is named
read:data
then the permission name will becomeread:data
, butStringPermission
which will be created from@PermissionAllowed("read:data")
will have its name set toread
, and its actions set todata
which makes the comparison produce a false result.This simple PR checks the semicolon during the OIDC scope to Permission conversion, if it is there, assumes that the first part is the name, the second part is the actions.
It does nothing for cases like
:a
orb:
as it is not a conversion's concern if such a value makes sense or what it may mean - it should never happen in any case