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

Support wildcard scopes in M2M auth #320

Merged
merged 2 commits into from
Jun 11, 2024
Merged

Support wildcard scopes in M2M auth #320

merged 2 commits into from
Jun 11, 2024

Conversation

logan-stytch
Copy link
Contributor

@logan-stytch logan-stytch commented Jun 3, 2024

This PR adds support for wildcard scopes in M2M auth.
This means that an M2M client can have a scope like read:* and if given a required scope of read:foo, authentication will be allowed.

This does not affect "simple" scopes like read or read_users -- only scopes with a separating : are supported.

Furthermore, the assumption is that the scopes will be given as action:resource, though it is technically possible to assign in a different way like users:read, though in that case, a scope of users:* would not match a required scope of read:users. But as long as an application is consistent, this would be allowed.

Furthermore, a scope of just * does not get interpreted as an "omniscient" client -- instead, this is seen as the literal character * and gets matched similarly to read_users as mentioned above.

@logan-stytch logan-stytch merged commit 09c32b6 into main Jun 11, 2024
9 checks passed
@logan-stytch logan-stytch deleted the logan/m2m-scopes branch June 11, 2024 01:50
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