Skip to content

feat: [OCISRE-1629] harden nats, NATS always calls UserJWT first - #793

Merged
mklos-kw merged 1 commit into
stable-8.0from
fix/ossre-1629-natsauth-2
Nov 4, 2026
Merged

mklos-kw merged 1 commit into
stable-8.0from
fix/ossre-1629-natsauth-2

Conversation

@mklos-kw

@mklos-kw mklos-kw commented Nov 4, 2026

Copy link
Copy Markdown
Member

No description provided.

@kw-security

kw-security commented Nov 4, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mklos-kw
mklos-kw marked this pull request as ready for review November 4, 2026 08:56
@mklos-kw
mklos-kw merged commit 724a15a into stable-8.0 Nov 4, 2026
@mklos-kw
mklos-kw deleted the fix/ossre-1629-natsauth-2 branch November 4, 2026 10:51
2403905 added a commit that referenced this pull request Nov 20, 2026
…connection attempt (#829)

NATS always calls UserJWT before SignatureCB for one connection attempt.
Before, both callbacks read the .creds file on their own. A rotated file
could change between the two reads. The JWT and the signature then came
from different files.

UserJWT now reads the file and keeps the content. SignatureCB uses this
content and wipes it after the signature. If NATS calls SignatureCB first,
it reads the file as before.

Backport of #793 from stable-8.0.

Signed-off-by: Roman Perekhod <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
2403905 added a commit that referenced this pull request Nov 20, 2026
…ttempt (#828)

NATS always calls UserJWT before SignatureCB for one connection attempt.
Before, both callbacks read the .creds file on their own. A rotated file
could change between the two reads. The JWT and the signature then came
from different files.

UserJWT now reads the file and keeps the content. SignatureCB uses this
content and wipes it after the signature. If NATS calls SignatureCB first,
it reads the file as before.

Backport of #793 from stable-8.0.

Signed-off-by: Roman Perekhod <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.

4 participants