-
Notifications
You must be signed in to change notification settings - Fork 687
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
Add staging-with-rebase-focal to CI and fix testinfra tests #5638
Changes from 5 commits
39832f7
e97a811
5401f18
645e85a
ff3fcd9
41ec2db
5ff15ac
a2aa941
9e8ab2d
1f3239f
90946e8
35ab7a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=OSSEC service | ||
|
||
[Service] | ||
Type=forking | ||
ExecStart=/var/ossec/bin/ossec-control start | ||
ExecStop=/var/ossec/bin/ossec-control stop | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
# Single handler to operate on *both* OSSEC hosts, server & client. | ||
- name: restart ossec | ||
service: | ||
systemd: | ||
name: ossec | ||
state: restarted |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,3 +113,20 @@ | |
creates: /var/ossec/etc/sslmanager.cert | ||
tags: | ||
- ossec_auth | ||
|
||
- name: Copy the systemd service file | ||
copy: | ||
src: ossec.service | ||
dest: "/etc/systemd/system/ossec.service" | ||
|
||
- name: Remove the old style /etc/init.d/ossec file | ||
file: | ||
path: "/etc/init.d/ossec" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These files are provided by ossec-{agent,server} packages:
This means that on subsequent ossec package upgrades, this init file will be re-added, unless we do specific tasks at build-time to remove it. If these steps are strictly required for functioning, we should address this in the build logic as to not provide the init.d file in focal (instead of doing it in ansible) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think we should remove it from the server package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely agree, let's remove the Ansible task and clean up that file at the packaging level. Be mindful of side-effects for Xenial. |
||
state: absent | ||
|
||
- name: Enable the OSSEC service | ||
systemd: | ||
name: ossec | ||
daemon_reload: yes | ||
enabled: yes | ||
masked: no |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,11 +45,7 @@ def test_fpf_apt_repo_fingerprint(host): | |
|
||
c = host.run('apt-key finger') | ||
|
||
fpf_gpg_pub_key_info = """/etc/apt/trusted.gpg.d/securedrop-keyring.gpg | ||
--------------------------------------------- | ||
pub 4096R/00F4AD77 2016-10-20 [expires: 2021-06-30] | ||
Key fingerprint = 2224 5C81 E3BA EB41 38B3 6061 310F 5612 00F4 AD77 | ||
uid SecureDrop Release Signing Key""" | ||
fpf_gpg_pub_key_info = "2224 5C81 E3BA EB41 38B3 6061 310F 5612 00F4 AD77" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having the full output seems more secure, especially if the testinfra tests are being used to verify a prod system. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The output is different in both |
||
|
||
assert c.rc == 0 | ||
assert fpf_gpg_pub_key_info in c.stdout | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections to disabling
systemd-resolved
, sticking with resolvconf which we've been using for a while will be fairly straightforward. Since we just copied the samedns_base
source a few lines above, let's use that task to write the file. Sounds like on Xenial we want the /etc/resolvconf/resolve.conf.d/ path, whereas on Focal we should write it directly to/etc/resolv.conf
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a commit to consolidate the logic here a bit: under Focal, the old
/etc/resolvconf/resolve.conf.d/
path is no longer written to, and the tests now inspect the correct file based on distro.