Skip to content

Conversation

@vas3a
Copy link
Collaborator

@vas3a vas3a commented Oct 24, 2025

Update scopes check for m2m call - one scope match is enough.
Eg. I'm calling with a token that has onle update:billing-account, while the controller lists for scopes both update:billing-account and all:billing-account, the call was failing because I'm missing the "all" scope.

@vas3a vas3a requested review from jmgasper and kkartunov October 24, 2025 07:56
.filter(Boolean);

const ok = required.every((s) => scopes.includes(s));
const ok = required.some((s) => scopes.includes(s));

Choose a reason for hiding this comment

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

[⚠️ security]
The change from every to some is consistent with the pull request description, allowing for any one of the required scopes to be sufficient for authorization. Ensure that this change aligns with the intended security model, as it may allow access with fewer permissions than previously required.

@vas3a vas3a merged commit e880c4e into develop Oct 27, 2025
1 check passed
@vas3a vas3a deleted the fix-scopes-check branch October 27, 2025 07:30
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.

3 participants