-
Notifications
You must be signed in to change notification settings - Fork 696
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
Regression: OSSEC sending daily login reports, even if a user hasn't logged in #6982
Comments
Logs from my QA instance
#6780 got rid of securedrop/securedrop/debian/ossec-agent/var/ossec/etc/ossec.conf Lines 129 to 139 in d431061
I was initially puzzled by the chronology between #6704 and #6780, but I see now that the latter didn't contain an explicit test case for #6748. Now that these |
...unless we mask only those alerts for exactly these |
We could have those scripts run as systemd timers on the app server and do the same head/grep thing that submissions_today.txt does? Or flag on some line they print? |
If I have time this afternoon, I'll throw in a |
I don't think OSSEC is up to this, because it would require correlating (in the following example) line 1 with each of lines 2 and 3, rather than processing each individually: Oct 8 04:00:36 app sudo: root : TTY=unknown ; PWD=/ ; USER=www-data ; COMMAND=/opt/venvs/securedrop-app-code/bin/python3 /var/www/securedrop/manage.py check-disconnected-fs-submissions
Oct 8 04:00:36 app sudo: pam_unix(sudo:session): session opened for user www-data by (uid=0)
Oct 8 04:00:37 app sudo: pam_unix(sudo:session): session closed for user www-data We don't even have an ID to In theory we could do something clever with PAM to suppress lines (2) and (3) altogether. But I can't justify such a low-level intervention for such a high-level (anti-)observability wish. So, reluctantly, I think you may be right to suggest adding a level of indirection to these script invocations so that OSSEC never |
As of 8d648fc I have new systemd units in place: root@app:/lib/systemd/system# systemctl start securedrop-check-disconnected-db-submissions.service
root@app:/lib/systemd/system# systemctl start securedrop-check-disconnected-fs-submissions.service
root@app:/lib/systemd/system# ls -al /var/lib/securedrop/*.txt
-rw-r--r-- 1 www-data www-data 60 Oct 13 01:23 /var/lib/securedrop/disconnected_db_submissions.txt
-rw-r--r-- 1 www-data www-data 148 Oct 13 01:24 /var/lib/securedrop/disconnected_fs_submissions.txt
-rw-r--r-- 1 www-data www-data 1 Oct 12 03:01 /var/lib/securedrop/submissions_today.txt
root@app:/lib/systemd/system# cat /var/lib/securedrop/*.txt
No problems were found. All submissions' files are present.
There are files in the submission area with no corresponding records in the database. Run "manage.py list-disconnected-fs-submissions" for details. The OSSEC changes are there, too, but I've missed today's "Daily Reports" timer on this instance, so I won't be able to see what it looks like until tomorrow's. I can pick this back up on Monday, or tomorrow someone can test directly in staging. |
This appears to work as expected on my long-running QA instance with disconnected submissions. Before installing a package with this change
After installing a package with this change
Pull request forthcoming. |
Description
I'm unsure if the underlying cause is the same as with issue #6748, but there appears to be a regression that has been in place since the release of SecureDrop 2.6.0.
It appears that OSSEC is sending a daily login report, even in instances when a user hasn't directly logged in. As a result, these alerts are not as effective as a monitoring tool.
Expected Behavior
A daily login report is only sent if someone logs into a SecureDrop server.
Actual Behavior
A daily login report is sent every day, even if a human has not logged into a SecureDrop server.
The text was updated successfully, but these errors were encountered: