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

Add useEntryProcessor flag into HazelcastIndexedSessionRepository to avoid using remote user code deployment #2463

Closed
shustinho opened this issue Oct 5, 2023 · 3 comments
Assignees
Labels
in: hazelcast status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@shustinho
Copy link

shustinho commented Oct 5, 2023

Expected Behavior

We should have a choise for session replication in HZ whether we want to execute code on client side or on cluster member. Add useEntryProcessor flag into HazelcastIndexedSessionRepository and do non atomic map.get(), map.put() in case of useEntryProcessor is false. Change should be made here HazelcastIndexedSessionRepository#save

Current Behavior

Right now client should provide classes to HZ member for remote execution. But simple http session replication is litghweight operation that can be executed on client side. Remote code deployment lead to a lot of restrictions and should be made by a valuable reason.

Context
So client couple with HZ instance and require the same JDK version as a minimum. I am not sure about difference spring versions.

@shustinho shustinho added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Oct 5, 2023
@marcusdacoregio marcusdacoregio self-assigned this Oct 9, 2023
@marcusdacoregio marcusdacoregio added in: hazelcast and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 9, 2023
@marcusdacoregio
Copy link
Contributor

marcusdacoregio commented Oct 9, 2023

Hi, @shustinho. Thanks for the suggestion.

Do you mean that if the flag is false we should do something like:

this.sessions.set(session.getId(), session.getDelegate(), session.getMaxInactiveInterval().getSeconds(),
					TimeUnit.SECONDS);

instead of using the EntryProcessor do apply the update?

@shustinho
Copy link
Author

Yes, @marcusdacoregio

@marcusdacoregio
Copy link
Contributor

I think this is a duplicate of #1131. If we improve the serialization mechanism by using Portable, for example, we wouldn't need to add a flag to control the strategy used for session updates. Maybe we can add such an implementation in #1174 and port it to the servlet version.

That said, I will close this as a duplicate of #1131.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: hazelcast status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants