Skip to content

OF-3059 Remove anonymous route #2766

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

Merged
merged 2 commits into from
Apr 18, 2025

Conversation

guusdk
Copy link
Member

@guusdk guusdk commented Apr 17, 2025

The commits in this PR remove:

  • the concept of having a route that is anonymous. Instead, a session can be anonymous
  • the clustered cache that stores anonymous sessions (apart from 'regular' session). Instead, all sessions are stored in one cache

Please refer to the individual commit messages for more details.

@guusdk guusdk requested review from dwd and Fishbowler April 17, 2025 14:49
@akrherz
Copy link
Member

akrherz commented Apr 17, 2025

I restarted the aioxmpp CI tests hoping the failure was transient, but it failed a second time

@guusdk
Copy link
Member Author

guusdk commented Apr 17, 2025

I did the same for the Smack test, that also consistently fails. There's a bug! There's a bug! Let's fire the author!

guusdk added 2 commits April 17, 2025 20:56
Openfire used the definition of an ‘anonymous route’ in various places (notably the routing table and session manager).

An anonymous route should be defined as “a route-able session of which the users has an anonymous authentication token.”

A ‘route’ is not inherently anonymous or non-anonymous, a session is.

Implementation that previously used the 'anonymous route' definition is interested only in the fact if the corresponding session is anonymous, not if the session is route-able.

In this commit, the implementations of methods named `isAnonymousRoute` are deprecated. Their implementation is replaced by checks that evaluate the authentication mechanism used in a session.
To maintain distinction between regular and anonymous ‘routes’, the RoutingTableImpl class used different caches for each. For every use case (other than determining if a ‘route is anonymous’),  both caches are operated on. This adds a lot of code complexity, and, as caches are operated on under cluster-wide lock, resource usage.

As the 'route is anonymous' concept has been replaced in the previous commit, the only reason to maintain two caches has been removed.

This commit removes the AnonymousUserCache completely. All data that was previously stored in either UserCache or AnonymousUserCache is now stored in UserCache.
@guusdk guusdk force-pushed the OF-3059_Remove-anonymous-route branch from 2bba0e5 to 0f8398c Compare April 17, 2025 18:56
@guusdk
Copy link
Member Author

guusdk commented Apr 17, 2025

I believe I've found and fixed the issue.

@guusdk guusdk merged commit 53dbbe4 into igniterealtime:main Apr 18, 2025
23 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
Development

Successfully merging this pull request may close these issues.

2 participants