|
| 1 | +[id="seccomp-profiles"] |
| 2 | += Configuring seccomp profiles |
| 3 | +include::modules/common-attributes.adoc[] |
| 4 | +:context: configuring-seccomp-profiles |
| 5 | + |
| 6 | +toc::[] |
| 7 | + |
| 8 | +An {product-title} container or a pod runs a single application that performs one or more well-defined tasks. The application usually requires only a small subset of the underlying operating system kernel APIs. |
| 9 | +Seccomp, secure computing mode, is a Linux kernel feature that can be used to limit the process running in a container to only call a subset of the available system calls. These system calls can be configured by creating a profile that is applied to a container or pod. |
| 10 | +Seccomp profiles are stored as JSON files on the disk. |
| 11 | + |
| 12 | +[IMPORTANT] |
| 13 | +==== |
| 14 | +OpenShift workloads run unconfined by default, without any seccomp profile applied. |
| 15 | +==== |
| 16 | + |
| 17 | +[IMPORTANT] |
| 18 | +==== |
| 19 | +Seccomp profiles cannot be applied to privileged containers. |
| 20 | +==== |
| 21 | + |
| 22 | +include::modules/configuring-default-seccomp-profile.adoc[leveloffset=+1] |
| 23 | + |
| 24 | +[id="custom-seccomp-profile"] |
| 25 | +== Configuring a custom seccomp profile |
| 26 | +You can configure a custom seccomp profile, which allows you to update the filters based on the application requirements. This allows cluster administrators to have greater control over the security of workloads running in OpenShift Container Platform. |
| 27 | + |
| 28 | +include::modules/setting-custom-seccomp-profile.adoc[leveloffset=+2] |
| 29 | +include::modules/applying-custom-seccomp-profile.adoc[leveloffset=+2] |
| 30 | + |
| 31 | +During deployment, the admission controller validates the following: |
| 32 | + |
| 33 | +* The annotations against the current SCCs allowed by the user role. |
| 34 | +* The SCC, which includes the seccomp profile, is allowed for the pod. |
| 35 | + |
| 36 | +If the SCC is allowed for the pod, the kubelet runs the pod with the specified seccomp profile. |
| 37 | + |
| 38 | +[IMPORTANT] |
| 39 | +==== |
| 40 | +Ensure that the seccomp profile is deployed to all worker nodes. |
| 41 | +==== |
| 42 | + |
| 43 | +[NOTE] |
| 44 | +==== |
| 45 | +The custom SCC must have the appropriate priority to be automatically assigned to the pod or meet other conditions required by the pod, such as allowing CAP_NET_ADMIN. |
| 46 | +==== |
| 47 | + |
| 48 | + |
| 49 | +[id="additional-resources_configuring-seccomp-profiles"] |
| 50 | +== Additional resources |
| 51 | +* xref:../authentication/managing-security-context-constraints.adoc[Managing security context constraints] |
| 52 | +* xref:../post_installation_configuration/machine-configuration-tasks.adoc[Post-installation machine configuration tasks] |
0 commit comments