-
Notifications
You must be signed in to change notification settings - Fork 725
Add AppArmor confinement for Qemu, Qemu-img and DNSMasq #995
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
Conversation
- ProcessFactory will return AppArmor-wrapped Processes if using qemu backend. - On creation these Processes install the AppArmor profile defined in the ProcessSpec, and executes the binary within this confinement. On Process deletion, the AppArmor profile is uninstalled. - Add AppArmor profiles for Qemu, Qemu-img and DNSMasq
Available in the |
Codecov Report
@@ Coverage Diff @@
## master #995 +/- ##
==========================================
+ Coverage 69.43% 69.58% +0.14%
==========================================
Files 191 193 +2
Lines 6992 7114 +122
==========================================
+ Hits 4855 4950 +95
- Misses 2137 2164 +27
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #995 +/- ##
=========================================
+ Coverage 69.43% 69.64% +0.2%
=========================================
Files 191 193 +2
Lines 6992 7116 +124
=========================================
+ Hits 4855 4956 +101
- Misses 2137 2160 +23
Continue to review full report at Codecov.
|
702f202
to
f2d30ee
Compare
CI unhappy I believe due to #995 |
Good to review, only Mac failing in CI due to conflict |
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.
Looks really good. Just a few minor inline comments and/or questions.
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.
Ok, I'm good with this. I would like another set of eyes on this since it's a large-ish change.
@ricab, do you have any spare cycles to review? If not, then we'll just merge it as-is.
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.
Now that I think about it, I had one question below pertaining to the libvirt backend.
@townsend2010 I'd have to allocate a whole chunk of time to parse this, so I'd leave this one up to you if that is ok... |
@ricab, ack, will just approve then. |
Let's do it! bors r+ |
995: Add AppArmor confinement for Qemu, Qemu-img and DNSMasq r=townsend2010 a=gerboland - ProcessFactory will return AppArmor-wrapped Processes if using qemu backend or DISABLE_APPARMOR env var set. - On creation these Processes install the AppArmor profile defined in the ProcessSpec, and executes the binary within this confinement. On Process deletion, the AppArmor profile is uninstalled. - Add AppArmor profiles for Qemu, Qemu-img and DNSMasq For testing, I needed to add mpt::ResetProcessFactory to ensure the ProcessFactory is reset before & after the test suite runs. Co-authored-by: Gerry Boland <[email protected]>
Build failed |
For testing, I needed to add mpt::ResetProcessFactory to ensure the ProcessFactory is reset before & after the test suite runs.
Tip for reviewing:
sudo aa-status
to check the list of AppArmor profiles loaded. The multipass profiles will be in enforce mode (except multipassd, as it's classicly confined still). PIDs being confined are listed after the profile name.