Linux capabilities
Separate pieces of root power, such as binding low ports or changing file owners, that can be granted or removed one by one.
In more detail
Docker gives containers a reduced default set. Hardened services drop every capability and add back only what they need, for example CAP_NET_BIND_SERVICE to listen on port 80. Adding CAP_SYS_ADMIN is close to giving full root.
Example
docker run --cap-drop ALL --cap-add NET_BIND_SERVICE taskapi:0.1Related terms
- root user — The all-powerful administrator account on Linux, with user ID 0, which can read or change anything.
- least privilege — Giving every program and person only the access they need, and nothing more.
- privileged container — A container started with --privileged, which removes almost all isolation and gives it the powers of root on the host.
- seccomp — A Linux kernel feature that blocks a process from making system calls it has no need for.
- privileged port — A network port numbered below 1024, which on Linux normally only root, or a process with a special capability, may listen on.
- read-only root filesystem — Running a container so that nothing in its root filesystem can be changed, with writable space only where you add it.
Taught in
- SecurityContexts And Capabilities — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Configuration And Security: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Mock Exam: Sixteen Tasks Against The Clock — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Seccomp: Which Syscalls A Container May Make — Certified Kubernetes Security Specialist (CKS) Exam Prep
- AppArmor: The Guard Docker Desktop Does Not Have — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Pod Security Admission: Created, Never Started — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Static Analysis: kubesec And KubeLinter — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Mock Exam: Seventeen Security Tasks Against The Clock — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Container Hardening: Distroless & Rootless — Cloud Security & DevSecOps Engineering
- Kubernetes Pod Security Standards: Baseline & Restricted — Cloud Security & DevSecOps Engineering
- Security Frameworks: NIST CSF 2.0, ISO 27001 & CIS — Cybersecurity Fundamentals, GRC & Cryptography
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Bind Mounts, Permissions And Backups — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Harden And Deliver The Complete Service Stack — Docker Architecture & Production Containers
- From Local Containers To Kubernetes — Docker Architecture & Production Containers
- Ninety Minutes, Six Domains: Where The Marks Are — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- A Pod That Mounts The Node: Runtime, Pods And Storage — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Created, But Never Running: Pod Security Admission — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Draw The Boundaries: Trust And Data Flow — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- One Pod Away: Network Attackers And Sensitive Data — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Audit Day: Final Review — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Node Affinity, Pod Affinity And Topology Spread — Kubernetes: Production-Grade Container Orchestration
- securityContext: Nonroot, Capabilities And Seccomp — Kubernetes: Production-Grade Container Orchestration
- Container Security: Minimal Bases And Non Root — Application Security & Threat Modeling for Engineers
- Root, But Not That Root: Default Engine Security And Image Scanning — Docker Certified Associate (DCA) Exam Prep
- Who Let Femi In? UCP Roles, Grants, LDAP And Client Bundles — Docker Certified Associate (DCA) Exam Prep
- Security Sprint: Eight Questions On Defaults, Trust And Access — Docker Certified Associate (DCA) Exam Prep