Default security context settings for SpiceDB Operator #237
Labels
area/security
Affects security
area/tooling
Affects the dev or user toolchain
priority/3 low
This would be nice to have
Summary
Add security hardening for SpiceDB Operator deployment. Similar to #236, but for the operator instead of the deployments that the operator creates.
Background
The operator itself does not have any securityContext settings:
spicedb-operator/config/operator.yaml
Lines 31 to 63 in 715aed2
And it's running as root for some reason: https://explore.ggcr.dev/?blob=ghcr.io/authzed/spicedb-operator@sha256:48525acebb788bf6bdb4b64a8719185555210e8fc7904366ae7a281765c9ad7b&mt=application%2Fvnd.docker.container.image.v1%2Bjson&size=2519&manifest=ghcr.io/authzed/spicedb-operator@sha256:4e58cdf61d343a3ace7d0f5f94f1e97e858e6b6c7a02afcd58a6f0e8ce6e682f
I think building from
distroless/base:nonroot
should resolve this issue:spicedb-operator/Dockerfile.release
Line 2 in 715aed2
For the operator, I've applied the following patches via the Kustomization:
The resulting deployment looks like it runs okay:
The text was updated successfully, but these errors were encountered: