Skip to content

Commit 957ef39

Browse files
committed
OCPBUGS-13768: Updated SPO profilerecording procedures
1 parent afbd6ba commit 957ef39

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

modules/spo-container-profile-instances.adoc

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ ifeval::["{context}" == "spo-seccomp"]
77
:seccomp:
88
:type: seccomp
99
:kind: SeccompProfile
10+
:object: seccompprofiles
1011
endif::[]
1112
ifeval::["{context}" == "spo-selinux"]
1213
:selinux:
1314
:type: SELinux
1415
:kind: SelinuxProfile
16+
:object: selinuxprofiles
1517
endif::[]
1618

1719
:_content-type: PROCEDURE
@@ -83,32 +85,34 @@ $ oc delete profilerecording test-recording
8385

8486
. To start the merge operation and generate the results profile, run the following command:
8587
+
86-
[source,terminal]
88+
[source,terminal,subs="attributes+"]
8789
----
88-
$ oc get sp -lspo.x-k8s.io/recording-id=test-recording
90+
$ oc get {object} -lspo.x-k8s.io/recording-id=test-recording
8991
----
9092
+
9193
.Example output
9294
[source,terminal]
9395
----
94-
NAME STATUS AGE
95-
test-recording-nginx-record Installed 17m
96+
NAME USAGE STATE
97+
test-recording-nginx-record test-recording-nginx-record_mytest1.process Installed
9698
----
9799

98-
. To view the syscalls used by any of the containers, run the following command:
100+
. To view the permissions used by any of the containers, run the following command:
99101
+
100-
[source,terminal]
102+
[source,terminal,subs="attributes+"]
101103
----
102-
$ oc get sp test-recording-nginx-record -o yaml
104+
$ oc get {object} test-recording-nginx-record -o yaml
103105
----
104106

105107
ifeval::["{context}" == "spo-seccomp"]
106108
:!seccomp:
107109
:!type:
108110
:!kind:
111+
:!object:
109112
endif::[]
110113
ifeval::["{context}" == "spo-selinux"]
111114
:!selinux:
112115
:!type:
113116
:!kind:
117+
:!object:
114118
endif::[]

modules/spo-recording-profiles.adoc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ ifeval::["{context}" == "spo-seccomp"]
77
:seccomp:
88
:type: seccomp
99
:kind: SeccompProfile
10+
:object: seccompprofiles
1011
endif::[]
1112
ifeval::["{context}" == "spo-selinux"]
1213
:selinux:
1314
:type: SELinux
1415
:kind: SelinuxProfile
16+
:object: selinuxprofiles
1517
endif::[]
1618

19+
1720
:_content-type: PROCEDURE
1821
[id="spo-recording-profiles_{context}"]
1922
= Recording profiles from workloads
@@ -94,10 +97,9 @@ $ oc -n openshift-security-profiles logs --since=1m --selector name=spod -c log-
9497
----
9598
+
9699
.Example output
97-
[source,terminal]
100+
[source,terminal,subs="attributes+"]
98101
----
99-
100-
I0705 12:08:18.729660 1843190 enricher.go:136] log-enricher "msg"="audit" "container"="redis" "executable"="/usr/local/bin/redis-server" "namespace"="default" "node"="127.0.0.1" "pid"=1847839 "pod"="my-pod" "syscallID"=232 "syscallName"="epoll_wait" "timestamp"="1625486870.273:187492" "type"="{type}"
102+
I0517 13:55:36.383187 348295 enricher.go:376] log-enricher "msg"="audit" "container"="redis" "namespace"="my-namespace" "node"="ip-10-0-189-53.us-east-2.compute.internal" "perm"="name_bind" "pod"="my-pod" "profile"="test-recording_redis_6kmrb_1684331729" "scontext"="system_u:system_r:selinuxrecording.process:s0:c4,c27" "tclass"="tcp_socket" "tcontext"="system_u:object_r:redis_port_t:s0" "timestamp"="1684331735.105:273965" "type"="{type}"
101103
----
102104

103105
.Verification
@@ -111,26 +113,28 @@ $ oc -n openshift-security-profiles delete pod my-pod
111113

112114
. Confirm the Security Profiles Operator reconciles the two {type} profiles:
113115
+
114-
[source,terminal]
116+
[source,terminal,subs="attributes+"]
115117
----
116-
$ oc -n openshift-security-profiles get sp
118+
$ oc get {object} -n my-namespace
117119
----
118120
+
119121
.Example output
120122
[source,terminal]
121123
----
122-
NAME STATUS AGE
123-
test-recording-nginx Installed 15s
124-
test-recording-redis Installed 15s
124+
NAME USAGE STATE
125+
test-recording-nginx test-recording-nginx_my-namespace.process Installed
126+
test-recording-redis test-recording-redis_my-namespace.process Installed
125127
----
126128

127129
ifeval::["{context}" == "spo-seccomp"]
128130
:!seccomp:
129131
:!type:
130132
:!kind:
133+
:!object:
131134
endif::[]
132135
ifeval::["{context}" == "spo-selinux"]
133136
:!selinux:
134137
:!type:
135138
:!kind:
139+
:!object:
136140
endif::[]

0 commit comments

Comments
 (0)