Skip to content

Security hardening of image #263

@janhoy

Description

@janhoy

We already run Cantaloupe as non-root user, but it has become more common for K8S environements to also require a more tight securityContext such as this one:

          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            capabilities:
              drop:
                - ALL

The runAsNonRoot setting requires a numeric USER directive, i.e. USER 101.

The readOnlyRootFilesystem is a bit hard to fix in a downstream Dockerfile today as the docker-entrypoint.sh script writes to several locations, re-packages logback.xml into war file etc. Some rewrite of entrypoint script and perhaps loading logback config from a different location than inside war is needed here. Also documenting what image paths needs writing to so users can mount up volmes for those (ideally only one?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions