Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-4420 user auth leaks into non-Artemis servlets #4897

Merged
merged 1 commit into from
May 22, 2024

Conversation

jbertram
Copy link
Contributor

No description provided.

@jbertram
Copy link
Contributor Author

@clebertsuconic, let's get this into 2.34.0. Can you review and merge? Thanks!

Copy link
Contributor

@gtully gtully left a comment

Choose a reason for hiding this comment

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

my understanding is the problem is with the filters setting thread locals and not clearing them, so even if the filters are only on specific contexts, the threads won't respect that, and the data will leak.

@gtully
Copy link
Contributor

gtully commented May 9, 2024

Using a thread local to propagate the session subject is fine, but it needs to be scoped to the user of that thread for the request, and cleared on response. so set every time.

@jbertram
Copy link
Contributor Author

@gtully, point taken. I've updated the PR with what I believe will address the ThreadLocal issue. I wasn't able to come up with a way to test it automatically, but manual tests (e.g. the use-case outlined in the Jira) is working fine now.

Copy link
Contributor

@gtully gtully left a comment

Choose a reason for hiding this comment

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

that looks good to me.

@jbertram jbertram merged commit e13d65b into apache:main May 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants