Skip to content

Lower the priviliges of worker_wrapper Docker Container #1619

@t-book

Description

@t-book

What is the enhancement proposal? What problem are you trying to solve?

Description

Use Cases

  • Organizations requiring BSI compliance

Technical Implementation

From what I see worker_wrapper must access the Docker daemon to spawn QGIS containers for job processing. This cannot be done without root or major architectural redesign. But BSI SYS.1.6.A17 allows exceptions for operational necessity if privileges are minimized which would be met with a minimal change in docker-compose.yml:

worker_wrapper:
  user: root
  cap_drop:
    - ALL     # Remove all Linux capabilities
  security_opt:
    - no-new-privileges:true  # Prevent privilege escalation attacks
  read_only: true             # Read-only root filesystem
  tmpfs:
    - /run:rw,noexec,nosuid,size=512m  # Temporary files (can't execute binaries)
  volumes:
    # ... existing mounts for /tmp, /app, etc.

All tests pass in my fork. But of course this needs to be tested carefully before used in production.
Find a nice overview regarding docker privilige settings here.

Agreements

  • I commit to keeping my branch up to date with the latest master branch until my pull request is merged.
  • I commit to writing tests for my enhancement proposal, if applicable.
  • I am aware that my enhancement proposal and related pull request may not be accepted.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions