Skip to content
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

aws-ecs-1: enable SELinux capability #1009

Merged
merged 2 commits into from
Aug 6, 2020

Conversation

samuelkarp
Copy link
Contributor

Issue number:
#815

Description of changes:
Configure the ECS agent to register the SELinux capability so SELinux options can be set in the task definition:

"dockerSecurityOptions": [
    "label:type:super_t"
]

Testing done:

  • Ran a task through ECS with a restricted host path (/etc) mounted and no explicit SELinux options. Observed that the container received the default container_t label and that it cannot write to the /etc bind-mount.
  • Ran a task through ECS with a restricted host path (/etc) mounted and the super_t label assigned in the task definition. Observed that the container received the super_t label and that it can write to the /etc bind-mount.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Copy link
Member

@jahkeup jahkeup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🔐 🐳

sources/api/ecs-settings-applier/src/ecs.rs Show resolved Hide resolved
@samuelkarp samuelkarp merged commit c8adf5a into bottlerocket-os:develop Aug 6, 2020
@samuelkarp samuelkarp deleted the ecs-selinux branch August 6, 2020 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants