-
Notifications
You must be signed in to change notification settings - Fork 618
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
ECS AppArmor Support (aka Ubuntu 22 support) #3941
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SreeeS
force-pushed
the
app-armor-test
branch
19 times, most recently
from
October 2, 2023 16:20
94c7ec7
to
75aa213
Compare
SreeeS
changed the title
[WIP donot review]App armor support
[WIP donot review]Apparmor support
Oct 2, 2023
SreeeS
changed the title
[WIP donot review]Apparmor support
[WIP donot review]Add apparmor support
Oct 2, 2023
SreeeS
changed the title
Add apparmor support
ECS AppArmor Support (aka Ubuntu 22 support)
Oct 2, 2023
danehlim
reviewed
Oct 3, 2023
SreeeS
force-pushed
the
app-armor-test
branch
3 times, most recently
from
October 5, 2023 00:01
b54cd4e
to
9a8fc26
Compare
danehlim
reviewed
Oct 10, 2023
danehlim
approved these changes
Oct 10, 2023
mythri-garaga
approved these changes
Oct 10, 2023
This was referenced Dec 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This change will introduce
ecs-default
apparmor profile which adds support for ubuntu22 platforms as with Ubuntu 22, Ubuntu defaults both to docker 20.10.x+ and CgroupsV2. Creating ECS’s cgroups require extra DBUSpermissions in CgroupsV2. Thisecs-default
apparmor profile will provide the required permissions.Implementation details
The changs are in ecs-init:
PreStartAppArmor
which checks if the host is apparmor supported andloadDefaultProfile
if supportedecs-default
profile:apparmor_parser
.hostConfig.SecurityOpt
if the host is apparmor supportedecs-init/config/development.go
as it is no longer used by our team, it is interfering with our ecs-int development process for debugging and running ecs-init.Testing
bot/test
- tests run as part of git hub PR workflowNew tests cover the changes: yes
Description for the changelog
Add apparmor support
Does this PR include breaking model changes? If so, Have you added transformation functions?
This PR is intended to support apparmor supported hosts. This PR can potentially break customers using a custom profile and the ecs-default profile permissions are insufficient (has been tested for availability risk). Given that currently we are not supporting apparmor, this change should not break existing customer.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.