[BUG] Helm chart and image not compatible with OpenShift restricted SCC (non-root UID, no capabilities, port above 1024)
Problem
Helm install on OpenShift 4.22 under the default restricted-v2 SCC: pod runs as an arbitrary non-root UID with GID 0, all capabilities dropped, no privilege escalation, ports below 1024 blocked. Chart default container.port: 80 + AP_PORT=80 fails: listen EACCES: permission denied :::80. Follow-up to activepieces/activepieces#15739 / PR 15774, which was tested on kind only. OpenShift never tested on our side. No OpenShift or non-root guidance in docs/install/options/helm.mdx or deploy/activepieces-helm.
Ref: Pylon 6080
Root cause
Dockerfilehas noUSER; image assumes root.values.yamlcontainer.port: 80;docker-entrypoint.shdefaultsAP_PORTto 80. Privileged port under a non-root UID with noNET_BIND_SERVICE.securityContext/podSecurityContextinvalues.yamlare empty passthroughs; nothing sets a non-root-safe default.- StatefulSet path hardcodes
storageClassName: local-path(deployment.yaml). - Bundled subcharts (
postgresql.enabled/redis.enabled): pinnedpostgresql11.7.2 andredis17.4.2 (both late 2022) hardcoderunAsUser: 1001/fsGroup: 1001inprimary,readReplicas,master,replicapod and container securityContexts, whichrestricted-v2rejects. Neither version hasglobal.compatibility.openshift.adaptSecurityContext. Confirmed on a real OpenShift 4.22 cluster by the reporter; workaround was<component>.podSecurityContext.enabled=false+<component>.containerSecurityContext.enabled=falseon every component. Last chart versions before the Bitnami image freeze (2025-08-28) that carry the switch (autoby default) and whose images still exist underbitnamilegacy/*:postgresql16.7.27 (image17.6.0-debian-12-r4) andredis22.0.7 (image8.2.1-debian-12-r0). Newer charts pintag: latestonly. See activepieces/activepieces#10795.
Docker emulation of the SCC on image 0.91.1 (--user 1000680000:0 --cap-drop ALL --security-opt no-new-privileges, cache volume group-0 writable, AP_EDITION=ee, AP_EXECUTION_MODE=SANDBOX_CODE_ONLY):
AP_PORT=80: exit 1,listen EACCES.AP_PORT=8080: boots, sign-up, worker connects. Plain code step and text-helper piece step (bundle download +bun install) SUCCEEDED. No EACCES / EPERM.- Code step with an npm dependency fails identically as root (SANDBOX_CODE_ONLY has no npm). Not a UID issue.
- mittwald secret-generator image runs as UID 65532.
Not verified: real OpenShift cluster, Route vs Ingress, readOnlyRootFilesystem, Helm lookup under OpenShift RBAC.
Fix
- Verify on a real OpenShift cluster (OpenShift Local / CRC) under
restricted-v2; record every rejection. - Chart:
container.port/AP_PORTabove 1024 working out of the box (new default, or a documented override if changing the default is breaking). - Docs: OpenShift / non-root section: port override,
persistence.storageClassName,SANDBOX_CODE_ONLYas the no-capabilities mode, npm-in-code-steps limit. - Optional:
USERin the Dockerfile with group-0-writable app dirs, so non-root needs no SCC exception anywhere. - Bump the Bitnami subcharts to
postgresql16.7.27 andredis22.0.7 (last pre-freeze versions withadaptSecurityContext: auto), keepimage.repository: bitnamilegacy/*, re-runhelm dependency build. Existing installs: PostgreSQL 14 -> 17 is a major upgrade of the bundled DB, needs a migration note.
Out of scope: SANDBOX_PROCESS / SANDBOX_CODE_AND_PROCESS, need CAP_SYS_ADMIN, cannot run under a restricted SCC.
Hi @majewskibartosz, thanks for the detailed repro. There's one more piece: the chart never passes container.port to the app. AP_PORT stays at 80, so changing container.port alone moves the probes to a port nothing listens on.
I have a chart-only fix ready:
container.port defaults to 8080 and is wired to AP_PORT. The Service stays on 80. securityContext stays empty by default, so SANDBOX_PROCESS users don't break. The values file and a new docs section give the restricted/OpenShift recipe instead. CI checks for the port wiring.
I'll open the PR shortly. The Dockerfile USER change can be a follow-up.
I opened #15802 for this, but it was auto-closed by the pause on external PRs, so I'm leaving the fix here for whoever picks this up. The branch is https://github.com/gypsy5oul/activepieces/tree/fix/helm-nonroot-port-15780 (6 files, CLA signed, merges cleanly into main).
What it does:
container.port defaults to 8080 and is passed to the app as AP_PORT. The Service stays on port 80. The test pod gets a restricted securityContext. Adds docs for OpenShift and the restricted Pod Security Standard, plus CI assertions.
Tested on RKE2 in a namespace enforcing restricted, as UID 1000680000 with GID 0 and no capabilities, with ip_unprivileged_port_start=1024 to match CRI-O/OpenShift:
Port 8080 runs and helm test passes. Port 80 fails with listen EACCES :::80.
One detail: containerd 2.x and Docker set that sysctl to 0, so this only shows up on CRI-O clusters like OpenShift.
@majewskibartosz, if you want to try it on your cluster before a fix lands: helm install ... -f from that branch, or just set container.port: 8080 and activepiecesConfig.AP_PORT: "8080" on the current chart.
Small update to the branch since my last comment (31578805a3). #15802 is closed, so it doesn't show this commit.
- The test pod now uses the chart's own
securityContextandpodSecurityContextinstead of a fixedrunAsUser: 65534. It's admitted wherever the app pod is, including under an OpenShift SCC that assigns the UID itself. - CI now also checks that
AP_PORTset through anactivepiecesEnvVariablessecret list renders once, so the chart doesn't add a duplicate entry.
I re-tested on the same RKE2 setup (restricted PSA, UID 1000680000, GID 0, all capabilities dropped, ip_unprivileged_port_start=1024). The app listens on 8080, and helm test passes with the test pod running as the same UID as the app.
The branch still merges cleanly into main.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If this issue is continuing with the latest stable version of Activepieces, please open a new issue that references this one.