Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
c5b14fe
tests: Modify the example pod if running on OCP
jhrozek Jun 30, 2022
d8b73f4
tests: Add the recording RBAC roles and SA dynamically, re-add on eve…
jhrozek Jun 30, 2022
0ffd218
Run metrics e2e tests in single-node environments only
JAORMX Jul 28, 2022
e0b2827
tc_log_enricher: Only run metrics check in a single-node environment
jhrozek Aug 2, 2022
317be32
WIP: Move setting the namespace earlier
jhrozek Aug 2, 2022
ae9f6cb
tests: Clean up selinuxprofiles when tests end, too
jhrozek Aug 2, 2022
3786a4c
e2e: Add a breakpoint func
jhrozek Aug 3, 2022
7e44229
tests: Wait for profile name to be reconciled before creating pod
jhrozek Aug 3, 2022
27da8ae
Merge branch 'main' into openshift-main
jhrozek Sep 12, 2022
14dc293
Merge pull request #3 from jhrozek/openshift-main
openshift-merge-robot Sep 13, 2022
ae9dffa
Allow the access() syscall from the operator seccomp profile
jhrozek Sep 27, 2022
4780bdd
Merge pull request #4 from jhrozek/ocp_fork_seccomp
openshift-merge-robot Sep 28, 2022
032f3eb
Merge pull request #5 from Vincent056/main
openshift-merge-robot Oct 11, 2022
bbaf8c6
Merge pull request #7 from jhrozek/ocp_sync_0.5.0
openshift-merge-robot Oct 19, 2022
d13acc2
Upgrade golang.org/x/text to get around CVE warnings
jhrozek Oct 21, 2022
3bbab1a
recordingmerger: Fix producing union of SELinux permissions
jhrozek Oct 24, 2022
9d2ff2e
handle node deletion
Vincent056 Oct 24, 2022
90e2697
Merge pull request #8 from jhrozek/ocp_dep_upgrade
openshift-merge-robot Nov 3, 2022
7e6c2a3
OWNERS: Downstream only: Add QE,PX and docs to OWNERS to allow them t…
jhrozek Nov 3, 2022
7434c16
Merge pull request #11 from jhrozek/ocp_owners
openshift-merge-robot Nov 4, 2022
9716f58
Merge pull request #10 from jhrozek/ocp_node_deletion
openshift-merge-robot Nov 5, 2022
7b6494c
enricher: Parse SELinux AVC lines that contain multiple permissions
jhrozek Oct 30, 2022
a75a53b
selinux: Add a permissive boolean
jhrozek Nov 6, 2022
84d42ad
make: Add an option to produce a dynamic build
jhrozek Nov 14, 2022
a38ca19
Dockerfile.ubi: Use ubi8/go-toolset and enable dynamic build
jhrozek Nov 16, 2022
53fe148
OLM: Add an OpenShift-specific annotation
jhrozek Nov 16, 2022
02567be
Merge pull request #16 from jhrozek/ocp-csv-annotation
openshift-merge-robot Nov 17, 2022
e2a8a8e
Merge pull request #15 from jhrozek/ocp-fips-fix
openshift-merge-robot Nov 18, 2022
e1848a5
Merge pull request #9 from jhrozek/ocp_selinux_merge
openshift-merge-robot Nov 18, 2022
20be18e
Merge pull request #13 from jhrozek/ocp_selinux_permissive
openshift-merge-robot Nov 21, 2022
425eb47
workloadannotator: Prevent crash with non-operator seccomp profiles s…
jhrozek Nov 21, 2022
9cf85b5
operator: Fall back to WATCH_NAMESPACE if RESTRICT_TO_NAMESPACE is no…
jhrozek Nov 23, 2022
7a66105
bundle: Support SingleNamespace and AllNamespaces install methods
jhrozek Nov 22, 2022
2886cb1
bundle: Let OLM manage Service Accounts
jhrozek Nov 24, 2022
c336334
examples: Make AllNamespaces the default installation method
jhrozek Nov 24, 2022
99d244c
e2e: Improve OLM tests to include installation methods
jhrozek Nov 24, 2022
0ad16dd
make: Use matching OPM version with operator-sdk version
jhrozek Oct 22, 2022
a53c3f3
Merge pull request #18 from jhrozek/ocp_olm_install_modes
openshift-merge-robot Nov 30, 2022
2148723
Merge pull request #17 from jhrozek/ocpbugs_2914_crash_seccomp_annota…
openshift-merge-robot Dec 1, 2022
639f8aa
metrics: Use the operator namespace name in metrics service
jhrozek Dec 7, 2022
fdcac4d
metrics: OCP specific CA config to avoid extra config steps
jhrozek Dec 7, 2022
74d024a
deploy: Add OCP-specific kustomize manifesst
jhrozek Dec 7, 2022
6676ae1
deploy: Add OCP-specific downstream deployment
jhrozek Dec 7, 2022
6ac2baf
doc: Amend documentation to clarify that no action is needed to enabl…
jhrozek Dec 8, 2022
cb300f2
Merge pull request #19 from jhrozek/ocp-metrics
openshift-merge-robot Dec 11, 2022
dee4f23
merging: Fix the mergeStrategy=containers option
jhrozek Dec 13, 2022
6a648dd
profilerecorder: gracefully skip containers that did not record anything
jhrozek Dec 13, 2022
4adf95a
e2e: Wait for profile that is supposed to be used
jhrozek Dec 15, 2022
042bb06
Merge pull request #20 from jhrozek/ocp-record_empty
openshift-merge-robot Dec 15, 2022
2a82ee8
Merge pull request #21 from jhrozek/ocp-merge_containers
openshift-merge-robot Dec 16, 2022
ca90f17
bundle: Add OCP-specific cluster monitoring annotation
jhrozek Dec 16, 2022
f775fa6
Merge pull request #12 from jhrozek/ocp_selinux_multi_perm
openshift-merge-robot Dec 16, 2022
f99d79f
Merge pull request #22 from jhrozek/ocp-csv_cluster_monitoring
openshift-merge-robot Dec 16, 2022
6d77fcc
Add component to OWNERS file
rhmdnd Jan 24, 2023
2f4b94c
Merge pull request #23 from rhmdnd/add-component
openshift-merge-robot Jan 26, 2023
abfaded
doc: Restricted PSS/restricted SCC allows the use of custom seccomp p…
jhrozek Nov 21, 2022
3a8971b
Merge pull request #24 from jhrozek/ocp-bump-commit
openshift-merge-robot Feb 28, 2023
1059a86
Update bundle CSV to match 0.5.2 tag
rhmdnd Feb 28, 2023
6c6cadf
Merge pull request #25 from rhmdnd/update-version-to-match-tag
openshift-merge-robot Feb 28, 2023
47a0bf2
Merge remote-tracking branch 'origin/main' into import_upstream_into_ocp
jhrozek Mar 20, 2023
dda728d
OWNERS: Trim upstream contributors to make downstream checks happy
jhrozek Mar 20, 2023
5df1ded
Merge remote-tracking branch 'origin/main' into import_upstream_into_ocp
jhrozek Mar 20, 2023
db04735
Merge pull request #26 from jhrozek/import_upstream_into_ocp
jhrozek Mar 27, 2023
ce33c1e
Merge remote-tracking branch 'origin/main' into ocp-main
jhrozek Mar 27, 2023
0062317
Merge pull request #27 from jhrozek/ocp-main
openshift-merge-robot Mar 28, 2023
23dddab
Auto-select selinuxd image based on nodeInfo.OSImage
jhrozek Apr 1, 2023
3a3d1a6
Merge pull request #28 from jhrozek/ocp-selinuxd-select
jhrozek Apr 11, 2023
4094def
Make the selinuxd auto-selection logic use environment variables
jhrozek Apr 21, 2023
7e594c7
Merge pull request #29 from jhrozek/ocp-main
openshift-ci[bot] Apr 24, 2023
b1eec2e
Make the selinuxd auto-selection logic use environment variables
jhrozek Apr 21, 2023
31379e1
Bump to v0.8.0
Vincent056 Jul 13, 2023
446e7c5
Merge pull request #30 from Vincent056/0.8.0
openshift-ci[bot] Jul 17, 2023
a520c13
Releasing v0.8.1
Vincent056 Oct 12, 2023
cc65bbf
Merge pull request #31 from Vincent056/release_v0.8.1
Vincent056 Oct 16, 2023
dd9e0d0
update x/net to 0.17.0
rhmdnd Oct 17, 2023
9dd625d
Merge pull request #32 from rhmdnd/update-x-net
Vincent056 Oct 17, 2023
92cea38
amend release v0.8.1
Vincent056 Oct 18, 2023
6bdf13d
Bump up grpc dependency
Vincent056 Oct 17, 2023
ea59306
Merge pull request #34 from Vincent056/append_v0.8.1
Vincent056 Oct 20, 2023
680fa59
Merge pull request #33 from Vincent056/update_grpc
Vincent056 Oct 20, 2023
cf234d8
Amend release v0.8.1
Vincent056 Oct 20, 2023
7708c76
Merge pull request #35 from Vincent056/amend_v0.8.1
Vincent056 Oct 20, 2023
2e7a5ea
OWNERS: Downstream only: Add QE,PX and docs to OWNERS to allow them t…
jhrozek Nov 3, 2022
afe4369
OWNERS: Trim upstream contributors to make downstream checks happy
jhrozek Mar 20, 2023
936ffa0
OWNERS: Update OpenShift-specific owners
rhmdnd Nov 30, 2023
923f4c3
Merge pull request #41 from rhmdnd/ocp
rhmdnd Dec 1, 2023
263182b
OWNERS: Downstream only: Add QE,PX and docs to OWNERS to allow them t…
jhrozek Nov 3, 2022
aa7590d
OWNERS: Trim upstream contributors to make downstream checks happy
jhrozek Mar 20, 2023
7c983ac
OWNERS: Update OpenShift-specific owners
rhmdnd Nov 30, 2023
085d8f8
Add an option to specific what selinuxd image to use during e2e test
Vincent056 Dec 5, 2023
452ac68
Merge pull request #43 from Vincent056/fix_e2e
Vincent056 Dec 5, 2023
7aeb368
Fix e2e tc_log_enricher_test
Vincent056 Dec 5, 2023
b1fa144
Merge pull request #44 from Vincent056/fix_e2e
Vincent056 Dec 5, 2023
c66c792
Merge pull request #42 from rhmdnd/ocp
Vincent056 Dec 6, 2023
13362e0
Revert "Back to dev"
yuumasato Dec 12, 2023
0e542bc
Merge pull request #45 from yuumasato/revert_bump_back_to_dev
rhmdnd Dec 12, 2023
97f1b61
Merge remote-tracking branch 'openshift/ocp' into update-v0.8.2
rhmdnd Jan 11, 2024
270a667
OWNERS: Downstream only: Add QE,PX and docs to OWNERS to allow them t…
jhrozek Nov 3, 2022
03a6423
OWNERS: Trim upstream contributors to make downstream checks happy
jhrozek Mar 20, 2023
1325079
OWNERS: Update OpenShift-specific owners
rhmdnd Nov 30, 2023
47bca89
Make booleans related to disable profile optional
yuumasato Dec 19, 2023
a5aec29
Add an option to specific what selinuxd image to use during e2e test
Vincent056 Dec 5, 2023
408cee4
Fix e2e tc_log_enricher_test
Vincent056 Dec 5, 2023
a26fb6c
Merge pull request #46 from rhmdnd/update-v0.8.2
rhmdnd Jan 16, 2024
1536395
Merge tag 'v0.8.4' into ocp-v0.8.4
Vincent056 Jul 2, 2024
c79ce50
Clean up go dependency after merge v0.8.4
Vincent056 Jul 2, 2024
465949a
Merge branch 'ocp' into ocp-v0.8.4
Vincent056 Jul 2, 2024
7fafb3b
Update OWNERS
Vincent056 Jul 5, 2024
e124aed
Fix e2e errors
Vincent056 Jul 9, 2024
f57b444
We should handle case for * image differntlty, as we are applying pro…
Vincent056 Jul 9, 2024
9a63105
Merge pull request #48 from openshift/Vincent056-patch-1
Vincent056 Jul 9, 2024
014b084
Merge pull request #47 from openshift/ocp-v0.8.4
openshift-merge-bot[bot] Jul 9, 2024
a69bd08
Amend v0.8.4
Vincent056 Jul 11, 2024
04f0291
Merge pull request #49 from openshift/amend
Vincent056 Jul 11, 2024
5d53070
Add SPO operator dockerfile for Konflux
Vincent056 Oct 11, 2024
d0d946c
Red Hat Konflux update security-profiles-operator
Oct 11, 2024
4cc2dff
Merge pull request #5 from Vincent056/appstudio-security-profiles-ope…
Vincent056 Oct 11, 2024
6f67f5f
Red Hat Konflux purge security-profiles-operator
Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.21 as builder

RUN export SMDEV_CONTAINER_OFF=1 && \
subscription-manager register --org $(cat "/activation-key/org") --activationkey $(cat "/activation-key/activationkey") && \
# use --allowerasing to avoid conflicts with the base image for mingw packages
# Problem 1: cannot install both mingw-binutils-generic-2.41-3.el9.x86_64 and mingw-binutils-generic-2.39-2.el9.x86_64
# Problem 2: package mingw64-filesystem-139-1.el9.noarch requires mingw-filesystem-base = 139-1.el9, but none of the providers can be installed
yum -y update --allowerasing && \
yum -y install git libseccomp-devel && yum clean all && \
yum -y clean all && rm -rf /var/cache/yum && \
subscription-manager unregister

WORKDIR /go/src/github.com/openshift/security-profiles-operator

ENV GOFLAGS="-mod=vendor" BUILD_FLAGS="-tags strictfipsruntime"

COPY . .

RUN mkdir -p build

ARG APPARMOR_ENABLED=0
ARG BPF_ENABLED=0
# OCP in FIPS mode doesn't like statically linked SPO
ARG STATIC_LINK=no

RUN make

FROM registry.redhat.io/ubi9/ubi-minimal:latest

RUN INSTALL_PKGS="tar libseccomp" && \
if [ ! -e /usr/bin/dnf ]; then ln -s /usr/bin/microdnf /usr/bin/dnf; fi && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
dnf clean all && rm -rf /var/cache/*
LABEL \
io.k8s.display-name="Security Profiles Operator" \
io.k8s.description="The Security Profiles Operator makes it easier for cluster admins to manage their seccomp, or SELinux profiles and apply them to Kubernetes' workloads." \
io.openshift.tags="security,seccomp,selinux" \
com.redhat.delivery.appregistry="false" \
maintainer="Red Hat ISC <isc-team@redhat.com>" \
License="APL 2.0" \
name="openshift-security-profiles-operator" \
com.redhat.component="openshift-security-profiles-operator-container" \
io.openshift.maintainer.product="OpenShift Container Platform" \
io.openshift.maintainer.component="Security Profiles Operator" \
version=0.8.4
# io.openshift.build.commit.id=98271bc2812881010146f47e4587dcd449b846bd \
# io.openshift.build.source-location=https://github.com/openshift/file-integrity-operator.git \
# io.openshift.build.commit.url=https://github.com/openshift/file-integrity-operator.git/commit/98271bc2812881010146f47e4587dcd449b846bd \

ENV OPERATOR=/usr/local/bin/security-profiles-operator \
USER_UID=65534 \
USER_NAME=security-profiles-operator

COPY --from=builder /go/src/github.com/openshift/security-profiles-operator/build/security-profiles-operator ${OPERATOR}
# This is required for the bundle build.
COPY --from=builder /go/src/github.com/openshift/security-profiles-operator/bundle /bundle

ENTRYPOINT ["/usr/local/bin/security-profiles-operator"]

USER ${USER_UID}:${USER_UID}
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ OLM_EXAMPLES := \

BUNDLE_SA_OPTS ?= --extra-service-accounts security-profiles-operator,spod,spo-webhook

BUNDLE_SA_OPTS ?= --extra-service-accounts security-profiles-operator,spod,spo-webhook

.PHONY: bundle
bundle: operator-sdk deployments ## Generate bundle manifests and metadata, then validate generated files.
$(SED) "s/\(olm.skipRange: '>=.*\)<.*'/\1<$(VERSION)'/" deploy/base/clusterserviceversion.yaml
Expand Down
9 changes: 7 additions & 2 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# See the OWNERS docs at https://go.k8s.io/owners
# See the OWNERS docs at https://go.k8s.io/owners for details

reviewers:
- Vincent056
approvers:
- ccojocar
- pjbgf
- saschagrunert
- JAORMX
- jhrozek
- sheriff-rh
- Vincent056
- xiaojiey
- BhargaviGudi
emeritus_approvers:
- cmurphy
- hasheddan

component: "Security Profiles Operator"
Original file line number Diff line number Diff line change
Expand Up @@ -985,5 +985,5 @@ spec:
name: selinuxd-el8
- image: quay.io/security-profiles-operator/selinuxd-el9:latest
name: selinuxd-el9
replaces: security-profiles-operator.v0.8.3
replaces: security-profiles-operator.v0.8.1
version: 0.8.4
12 changes: 12 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ dependencies:
- path: Dockerfile.build-image
match: tag

- name: ubi9-minimal
version: sha256:ef6fb6b3b38ef6c85daebeabebc7ff3151b9dd1500056e6abc9c3295e4b78a51
refPaths:
- path: Dockerfile.ubi
match: registry.access.redhat.com/ubi9/ubi-minimal

- name: ubi9-go-toolset
version: sha256:d1911ff6e8b3d17175dafe00aa466e83c3ceec45903b01a7cc18e9e417781263
refPaths:
- path: Dockerfile.ubi
match: registry.access.redhat.com/ubi9/go-toolset

- name: nix
version: 2.18.1
refPaths:
Expand Down
2 changes: 1 addition & 1 deletion test/e2e_flaky_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (e *e2e) TestSecurityProfilesOperator_Flaky() {
// fix the issue with the certs.
e.Run("cluster-wide: Seccomp: Verify profile binding", func() {
e.testCaseSeccompProfileBinding(nodes, "quay.io/security-profiles-operator/test-hello-world:latest")
e.testCaseSeccompProfileBinding(nodes, "*")
e.testCaseSeccompProfileBinding(nodes, "'*'")
})

e.Run("cluster-wide: Seccomp: Verify profile recording logs", func() {
Expand Down
21 changes: 15 additions & 6 deletions test/tc_seccomp_profilebindings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,21 @@ spec:

namespace := e.getCurrentContextNamespace(defaultNamespace)

e.logf("Testing that pod has securityContext")
output = e.kubectl(
"get", "pod", "hello",
"--output", "jsonpath={.spec.containers[0].securityContext.seccompProfile.localhostProfile}",
)
e.Equal(fmt.Sprintf("operator/%s/profile-allow-unsafe.json", namespace), output)
if image == "*" || image == "'*'" {
e.logf("Profile Binding has * image, Testing that pod has securityContext")
output = e.kubectl(
"get", "pod", "hello",
"--output", "jsonpath={.spec.securityContext.seccompProfile.localhostProfile}",
)
e.Equal(fmt.Sprintf("operator/%s/profile-allow-unsafe.json", namespace), output)
} else {
e.logf("Testing that pod container has securityContext for specific image")
output = e.kubectl(
"get", "pod", "hello",
"--output", "jsonpath={.spec.containers[0].securityContext.seccompProfile.localhostProfile}",
)
e.Equal(fmt.Sprintf("operator/%s/profile-allow-unsafe.json", namespace), output)
}

e.logf("Testing that profile binding has pod reference")
output = e.kubectl("get", "profilebinding", "hello-binding", "--output", "jsonpath={.status.activeWorkloads[0]}")
Expand Down