Skip to content

[IMPROVED] Enhance JWT validation for scoped users#7217

Merged
neilalexander merged 1 commit intomainfrom
relax-sentinel-token-verification
Aug 27, 2025
Merged

[IMPROVED] Enhance JWT validation for scoped users#7217
neilalexander merged 1 commit intomainfrom
relax-sentinel-token-verification

Conversation

@aricart
Copy link
Copy Markdown
Member

@aricart aricart commented Aug 26, 2025

Updated logic to allow scoped users with IssuerAccount and empty permissions to bypass immediate validation, with runtime rejection if invalid.

Fix #7137

Signed-off-by: Your Name alberto@synadia.io

@aricart aricart requested a review from a team as a code owner August 26, 2025 20:49
@aricart aricart requested review from MauriceVanVeen and removed request for a team August 26, 2025 20:49
@aricart
Copy link
Copy Markdown
Member Author

aricart commented Aug 26, 2025

@MauriceVanVeen I couldn't finds a way of loading the preload to check that the account indeed had a scoped signing key. However the hint is that if the permissions are empty, and it is a signing key the permissions will come from the account when presented to the server.

Signed-off-by: Alberto Ricart <alberto@synadia.com>
@aricart aricart force-pushed the relax-sentinel-token-verification branch from bd21975 to 894112f Compare August 26, 2025 20:55
Copy link
Copy Markdown
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

@MauriceVanVeen
Copy link
Copy Markdown
Member

This approach sounds good. I think we can't guarantee the preload contains the account for the default_sentinel anyhow, it could be it needs to be fetched. But that would depend on the setup.

Copy link
Copy Markdown
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

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

LGTM

@neilalexander neilalexander merged commit aaca6c7 into main Aug 27, 2025
69 of 70 checks passed
@neilalexander neilalexander deleted the relax-sentinel-token-verification branch August 27, 2025 10:55
MauriceVanVeen pushed a commit that referenced this pull request Sep 3, 2025
Updated logic to allow scoped users with `IssuerAccount` and empty
permissions to bypass immediate validation, with runtime rejection if
invalid.

Fix #7137

Signed-off-by: Your Name alberto@synadia.io
@wallyqs wallyqs changed the title Enhance JWT validation for scoped users [IMPROVED] Enhance JWT validation for scoped users Sep 3, 2025
neilalexander added a commit that referenced this pull request Sep 8, 2025
Includes the following:
- #7200
- #7201
- #7202
- #7209
- #7210
- #7211
- #7213
- #7212
- #7216
- #7217
- #7230
- #7239
- #7246
- #7248
-
8241a15,
specifically delayed errors that are not JS API errors
- #7158 (not containing
2.12-specific changes)
- #7233
- #7255
- #7249
- #7259
- #7265
- #7273 (not including Go
1.25.x)
- #7258
- #7222

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
Signed-off-by: Neil Twigg <neil@nats.io>
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.

User token from a scoped issuer can't be used as default_sentinel value

3 participants