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

Monal causes excessive entries in audit log #240

Open
mwild1 opened this issue Nov 5, 2024 · 3 comments
Open

Monal causes excessive entries in audit log #240

mwild1 opened this issue Nov 5, 2024 · 3 comments

Comments

@mwild1
Copy link
Member

mwild1 commented Nov 5, 2024

Monal is relatively unique among clients in that it reconnects to the server extremely frequently (by design). This can cause an excessive number of entries in the server's audit log under normal usage. The performance of large audit logs should be improved when #196 becomes the default configuration. However it's also a good idea to avoid these excessive entries in the first place.

For example, it should be acceptable to skip recording entries successfully using FAST auth with a recognised client ID.

Edit: Apparently Monal does not implement FAST yet, so this can't be done securely.

@lissine0
Copy link

Note that Monal recommends setting a high smacks timeout (at least 24 hours)
https://github.com/monal-im/Monal/wiki/Considerations-for-XMPP-server-admins#session-timeout
This is needed to be able to receive push notifications from MUCs (you need to be joined to the room to receive push notifications, and a high smacks timeout allows that)

Depending on whether Snikket logs session resumptions in the audit log, a side benefit could be less (redundant) log entries.

@mwild1
Copy link
Member Author

mwild1 commented Jan 26, 2025

Thanks! I'm aware of this recommendation, but unfortunately the high smacks timeout has the potential to increase server resource usage and negatively affect other clients which do not act the way that Monal does. Applying it selectively may be a solution, but I'm not sure how easy that would be to implement.

@mwild1
Copy link
Member Author

mwild1 commented Jan 26, 2025

Oh, and an important thing to note is that authentication happens before a resumption, so this still wouldn't be a full solution unless we figured out a way to implement detection of that in mod_audit_auth. We can't just delay the audit log until XEP-0198 is enabled or resumed, because this would allow a (e.g. malicious) client which didn't implement XEP-0198 to avoid being recorded in the audit log.

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

No branches or pull requests

2 participants