|
I've been experimenting with user-defined sandboxing using Bubblewrap process wrapper. I would like to try AppArmor, it seems better to use LSM as a proper solution designed for security instead of bending container mechanisms for security. Another reason is that with process wrappers it is possible to bypass the sandbox by mistake by executing without the wrapper. However, I found useful to be able to isolate apps by remapping paths (uses bind mounts). Is it possible to achive this with AppArmor? I see there are mount rules, but those seem to be only for allowing syscalls but they do not actually perform those syscalls. If not is it a good fit to have a wrapper script that would setup the mounts in combination with AppArmor? Or would there be completely different way how to achieve such isolation? |
Replies: 1 comment 3 replies
|
Apparmor is only allowing / denying things. Setting up a sandbox, putting a container image in this sandbox and pivoting the root to this image (like snap, flatpak or docker do) is out of the scope of apparmor. However, in coordination with these sandbox manager, you can use apparmor to ensure sandbox escape is not possible. It is especially useful when you need to give access to devices file (graphics, usb...) to the sandbox. |
Apparmor is only allowing / denying things.
Setting up a sandbox, putting a container image in this sandbox and pivoting the root to this image (like snap, flatpak or docker do) is out of the scope of apparmor. However, in coordination with these sandbox manager, you can use apparmor to ensure sandbox escape is not possible. It is especially useful when you need to give access to devices file (graphics, usb...) to the sandbox.