Skip to content

Conversation

@jac
Copy link
Member

@jac jac commented Jul 21, 2025

SAMS Service Access Tokens function similarly to M2M tokens. Both use the same introspectToken call to SAMS. For SATs the response includes the user the token is scoped to.

In the case where a SAT and M2M token both have the same scopes we need to prevent privilege escalation where a SAT could be supplied to a M2M RPC which would not be expected to properly enforce the user scoping.

This PR updates the client credentials middleware to fail the request if an introspected token as a non-empty user field.

Closes CORE-1126

Test plan

CI

@jac jac requested a review from unknwon July 21, 2025 10:23
@jac jac requested a review from a team as a code owner July 21, 2025 10:23
Copy link
Contributor

@unknwon unknwon left a comment

Choose a reason for hiding this comment

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

Thank you!

jac and others added 2 commits July 21, 2025 15:04
@jac jac requested a review from unknwon July 21, 2025 14:58
@jac jac merged commit 98b0060 into main Jul 21, 2025
2 checks passed
@jac jac deleted the jac/core-1126 branch July 21, 2025 17:39
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