stackstorm-k8s
stackstorm-k8s copied to clipboard
Run Containers as Non-Root, and without Privilege Escalation by default.
In attempt to harden the security of running StackStorm within k8s, this PR makes it such that by default all containers run as a non-root user, generally 1000:1000 (the stanley user) - or for st2web it runs as 100:100 (which is the nginx user).
It also disables the ability of the container to escalate privileges.
Generally in my testing, this all "just" works - Aside from requiring a change to the st2web container to allow nginx to run as the nginx user. (Changes to support that are here https://github.com/StackStorm/st2-dockerfiles/pull/66).
NOTE: This PR depends on https://github.com/StackStorm/st2-dockerfiles/pull/66 to work.