matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.12k forks source link

Keep track of `user_ips` and `monthly_active_users` when delegating auth #16672

Closed DMRobertson closed 12 months ago

DMRobertson commented 12 months ago

This was present in Synapse's "internal" auth, but was not available when delegating auth to an OIDC provider until now.

I haven't tested this end-to-end. But there isn't any variation in the way we write to the DB. So I'm fairly confident this should work. (Unless I'm missing something @sandhose?)

DMRobertson commented 12 months ago

As a side-effect, this should reinstate MAU limiting in Synapse. Endpoints like /login and /register that are handled by the auth service won't be limited though.

DMRobertson commented 12 months ago

I although noticed that the special __oidc_admin virtual user gets tracked, which shouldn't be the case.

Good spot, thank you. 45ffd5f should fix.