Bugfix: do not load Session Id in a JWT session (#761, #964)#978
Draft
mmablom wants to merge 2 commits intojongpie:mainfrom
Draft
Bugfix: do not load Session Id in a JWT session (#761, #964)#978mmablom wants to merge 2 commits intojongpie:mainfrom
mmablom wants to merge 2 commits intojongpie:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
LoggerEngineDataCollectorand also return the fieldIsAssociatedWithJwtAccessToken. 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?