Conversation
Enable the AppArmor modules in the kernel, load it by default and allow configuring the AppArmor profile that should be applied for each container individually. linuxkitgh-108 Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
|
I had some trouble updating the arm64 and riscv configs but I would expect the changes to be the same. When I updated them with |
|
Let's get this to move forward. I have some suggestions and (more) questions. First, I am strongly in favour of this, as long as it is optional. We don't want apparmor to be enabled by surprise. From what I understood from what you wrote in the linked issue, it is compiled into the kernel but not enabled unless you add the onboot container or some other method, is that correct? So this becomes an option? That would make it good. We definitely need the changes in riscv64 and arm64 as well. There is a process for updating the kernel, documented in kernels.md. There are updated versions of kernels regularly, so it likely is easiest to take the most recent version of 6.6.x and update to it while adding these changes. It all is documented there, including how to update dependencies in the repo. I know you cannot push out the changes, but I can take care of that when the rest is done. Of course, if you want to cut a new series, I won't complain. 😁 Next, can you explain what the changes to |
|
Last, are you on docker slack? Do you mind pinging me there? Thanks! |
|
No, I'm not in the Docker Slack (or Slack in general), but that could be changed :) So with the current changes the AppArmor module would be enabled automatically but it won't do anything until some policies are loaded from user space. It can also be fully optional (i.e. the module isn't loaded at all) if we don't set the I'll try updating the So the change in You would then put |
Definitely join up. Or any of the other slacks (I am on Docker community, CNCF community, Kubernetes community, lfedge community, I can keep going; not to mention databack for the open source database backup software I manage). Pick one if you are up for it and ping me? |
Actually, I think the first option you described - and what you did here - is best. Make it available, but not enabled until policies are loaded - makes sense. I would say stick with what you did.
Thanks that sounds solid.
Which I want to hear more about (among other things to discuss via DM in Slack).
I wouldn't go backwards for this. Leave the old ones around, don't bother building again for them. Maybe 6.6 would stay around. I guess that is deprecation?
Got it. That makes sense, so go for it.
Where is "in there"? This sounds like it is the kind of thing you would want either on the If so, then I don't think you need a change to the init container, which just starts up containerd (services) and runc (onboot/onshutdown). It is at build time ( Either way, I still think one step at a time:
|
- What I did
Enabled AppArmor in the kernel, load it by default and allow the AppArmor profile to be configured per container.
- How I did it
Update the kernel config for 6.6.x (x86) and the LinuxKit YAML schema.
- How to verify it
Start a container with a
/sys:/sysmount and theapparmor-toolsinstalled and runaa-statusshould show AppArmor is loaded/active.- Description for the changelog
Enable the AppArmor modules in the kernel, load it by default and allow configuring the AppArmor profile that should be applied for each container individually.
gh-108