Security Profile for Docker Container and Kubernetes Pod
-
Use Case of Security Profile
-
What is Seccomp
-
How to Use SecComp
-
Default Behavior of Seccomp
-
Demo With SecComp
-
Tips for Securing Docker Container
Agenda
-
Restrict your application’s access
-
Restrict Any Command in Docker Container
-
Restrict system calls inside docker container
-
Reduce the attack surface of containers.
Use Cases
Seccomp
- Secure computing mode (seccomp) is a Linux kernel feature. You can use it to restrict the actions available within the container.
- Seccomp is a sandboxing facility in the Linux kernel that acts like a firewall for system calls (syscalls).
How to use Seccomp?
Pass a profile for a container:
They're defined in a JSON file that is applied when a container starts
Demo
Default:
44 system calls are blocked by default for all Docker containers
6 tips for securing your Docker containers
- Choose third-party containers carefully
- Only Use Images from Trusted Sources
- Set resource limits for your containers
- Limit Direct Access to Kubernetes Nodes/Pod/Container
- Use Docker Bench for Security
- Seccomp
Seccomp
By Sagar Mal Shankhala
Seccomp
- 321