Skip to content

Commit 47235a3

Browse files
authored
Merge pull request #55225 from sheriff-rh/OCPBUGS-908
OCPBUGS-908 updating custom seccomp profile procedures
2 parents ebd609d + 3fb1051 commit 47235a3

File tree

2 files changed

+45
-2
lines changed

2 files changed

+45
-2
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * security/seccomp-profiles.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="creating-custom-seccomp-profile_{context}"]
7+
= Creating seccomp profiles
8+
You can use the `MachineConfig` object to create profiles.
9+
10+
Seccomp can restrict system calls (syscalls) within a container, limiting the access of your application.
11+
12+
.Prerequisites
13+
14+
* You have cluster admin permissions.
15+
* You have created a custom security context constraints (SCC). For more information, see _Additional resources_.
16+
17+
.Procedure
18+
19+
* Create the `MachineConfig` object:
20+
+
21+
[source,yaml,subs="attributes+"]
22+
----
23+
apiVersion: machineconfiguration.openshift.io/v1
24+
kind: MachineConfig
25+
metadata:
26+
labels:
27+
machineconfiguration.openshift.io/role: worker
28+
name: custom-seccomp
29+
spec:
30+
config:
31+
ignition:
32+
version: 3.2.0
33+
storage:
34+
files:
35+
- contents:
36+
source: data:text/plain;charset=utf-8;base64,<hash>
37+
filesystem: root
38+
mode: 0644
39+
path: /var/lib/kubelet/seccomp/seccomp-nostat.json
40+
----

security/seccomp-profiles.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ include::_attributes/common-attributes.adoc[]
77
toc::[]
88

99
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.
10-
Secure computing mode, seccomp, is a Linux kernel feature that can be used to limit the process running in a container to only using a subset of the available system calls.
10+
Secure computing mode, seccomp, is a Linux kernel feature that can be used to limit the process running in a container to only using a subset of the available system calls.
1111

12-
The `restricted-v2` SCC applies to all newly created pods in {product-version}. The default seccomp profile `runtime/default` is applied to these pods.
12+
The `restricted-v2` SCC applies to all newly created pods in {product-version}. The default seccomp profile `runtime/default` is applied to these pods.
1313

1414
Seccomp profiles are stored as JSON files on the disk.
1515

@@ -24,6 +24,9 @@ include::modules/configuring-default-seccomp-profile.adoc[leveloffset=+1]
2424
== Configuring a custom seccomp profile
2525
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.
2626

27+
Seccomp security profiles list the system calls (syscalls) a process can make. Permissions are broader than SELinux, which restrict operations, such as `write`, system-wide.
28+
29+
include::modules/creating-custom-seccomp-profile.adoc[leveloffset=+2]
2730
include::modules/setting-custom-seccomp-profile.adoc[leveloffset=+2]
2831
include::modules/applying-custom-seccomp-profile.adoc[leveloffset=+2]
2932

0 commit comments

Comments
 (0)