mozilla-services / syncserver

Run-Your-Own Firefox Sync Server
Mozilla Public License 2.0
1.87k stars 145 forks source link

How can I get the list of currently allowed users? #126

Open gaining opened 6 years ago

gaining commented 6 years ago

How can I see the list of users using the sync server while it is running? I noticed that few people per day are throwing dos and few other types of attacks at my server targeting the port that I'm forwarding related to the sync-server. Is there a way to monitor the security of the server and check its integrity?

rfk commented 6 years ago

There aren't really any APIs exposed directly for this purpose; you can connect to the db and query the users table but that will only tell you about which users have successfully connected at some point in the past, not about current user activity. Your best bet is likely to be monitoring your webserver access logs to look for e.g. requests to URLs with uids that you don't recognize.

gaining commented 6 years ago

Thanks for replying

Where is the database stored? I only have mariadb installed but show databases; doesn't return a database that matches it.

rfk commented 6 years ago

Did you configure a db explicitly in your syncserver.ini config file? If not, I believe it will default to creating an sqlite database in the file "syncserver.db" in your code checkout directory.