Skip to content

Bugfix: do not load Session Id in a JWT session (#761, #964)#978

Draft
mmablom wants to merge 2 commits intojongpie:mainfrom
mmablom:bugfix/jwt-session-id
Draft

Bugfix: do not load Session Id in a JWT session (#761, #964)#978
mmablom wants to merge 2 commits intojongpie:mainfrom
mmablom:bugfix/jwt-session-id

Conversation

@mmablom
Copy link
Copy Markdown

@mmablom mmablom commented Apr 22, 2026

Following my comment in #761 I tried some options.

The naive approach of querying the AuthSession directly seems contradictory to the optimizations done with the LoggerEngineDataSelector.

Following that I added the filtering to the AuthSession query in LoggerEngineDataCollector and also return the field IsAssociatedWithJwtAccessToken. When loading the Session Id we can check if the AuthSession is for JWT based on the cached proxy.

One drawback is that this check does not work if 'QueryAuthSessionData' is set to false. For now I've landed on only skipping the Session Id load if we're definitely in a JWT session. I've also expiremented with always querying the AuthSession, but that would run counter to the intention of the parameter.

Another drawback is that this will invalidate the 'QueryAuthSessionDataSynchronously' parameter, since this will always query the AuthSession through the chain LOGGING_CONTEXT > transactionQuiddity > SESSION_ID.

For now I'll keep this a draft PR with the solution I landed on before working on test. @jongpie what do you think of this approach and/or do you see any other options to handle this issue?

@mmablom mmablom changed the title Bugfix: do not load Session Id in a JWT session (#761 Bugfix: do not load Session Id in a JWT session (#761, #964) Apr 22, 2026
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.

1 participant