(ecs): (Fargate containers should be able to 'add' Linux kernel capability 'SYS_PTRACE')
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 71
Description
### Describe the feature
Fargate supports adding Linux kernel capability SYS_PTRACE, however CDK does not support this.
[add_capabilities(*cap)](https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_ecs/LinuxParameters.html#aws_cdk.aws_ecs.LinuxParameters.add_capabilities) only works with EC2 launch type.
### Use Case
Lacework sidecar container requires kernel capability to monitor app container's activities.
https://docs.lacework.com/onboarding/aws-ecs-fargate#run-application-as-non-root-and-agent-as-root
### Proposed Solution
Please add the ability to 'add' Linux kernel capability 'SYS_PTRACE'
### Other Information
https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_ecs/Capability.html#aws_cdk.aws_ecs.Capability
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.61.1 (build d319d9c)
### Environment details (OS name and version, etc.)
Fedora 37
Contributor guide
Research direction
Start with the ECS LinuxParameters.add_capabilities API and Capability documentation, then compare the Fargate and EC2 behavior described in the issue with the AWS ECS API reference. Done means a CDK user can request SYS_PTRACE for a Fargate task and the synthesized ECS definition accepts it without changing existing EC2 behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, linux, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100