Skip to content

Conversation

@wrodrig
Copy link
Contributor

@wrodrig wrodrig commented Dec 9, 2025

We need to update the code to reset the thread identity back to the server identity when EJBSecurityCollaboratorImpl.postInvoke() is called.

Currently, although we are correctly setting the syncToOSThreadToken in the EJBSecurityContext during preInvoke, this token is not being propagated to postInvoke because we are returning a SecurityCookieImpl object that does not contain the token field.

This fix adds the syncToOSThreadToken field to SecurityCookieImpl and ensures the token is properly transferred from the EJBSecurityContext to the cookie during preInvoke, allowing postInvoke to retrieve and use it to reset the thread identity.

Description:

We need to update the code to reset the thread identity back to the server identity when EJBSecurityCollaboratorImpl.postInvoke() is called.

Currently, although we are correctly setting the syncToOSThreadToken in the EJBSecurityContext during preInvoke, this token is not being propagated to postInvoke because we are returning a SecurityCookieImpl object that does not contain the token field.

This fix adds the syncToOSThreadToken field to SecurityCookieImpl and ensures the token is properly transferred from the EJBSecurityContext to the cookie during preInvoke, allowing postInvoke to retrieve and use it to reset the thread identity.
@wrodrig wrodrig requested a review from utle December 9, 2025 02:39
@wrodrig wrodrig self-assigned this Dec 9, 2025
@wrodrig wrodrig added the bug This bug is not present in a released version of Open Liberty label Dec 9, 2025
@wrodrig
Copy link
Contributor Author

wrodrig commented Dec 9, 2025

!build
(view Open Liberty Personal Build - ❌ completed with errors/failures.)
fat.buckets.to.run=all
fat.test.mode=full
spawn.zos=true

Note: Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link
Member

LibbyBot commented Dec 9, 2025

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 2 product code files were changed.
  • Please describe in a separate comment how you tested your changes.

@wrodrig wrodrig marked this pull request as draft December 9, 2025 03:07
@utle utle removed the bug This bug is not present in a released version of Open Liberty label Dec 9, 2025
@wrodrig wrodrig changed the title Reset SyncToOSThread in EJB After Each Invocation Reset ThreadIdentity for SyncToOSThread in EJB After Each Invocation Dec 9, 2025
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