Skip to content

feat(Mastercontainer): drop all capabilities and only add back required ones - #9071

Draft
szaimen wants to merge 1 commit into
mainfrom
enh/cap-drop-all
Draft

szaimen wants to merge 1 commit into
mainfrom
enh/cap-drop-all

Conversation

@szaimen

@szaimen szaimen commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

cap_drop in containers.json was never read; DockerActionManager always sent CapDrop: [NET_RAW]. It is now passed to Docker, and all default containers use cap_drop: [ALL] with only the capabilities they need in cap_add. Containers without cap_drop (e.g. community containers) keep dropping NET_RAW.

Capabilities added back, each verified by removing it individually:

  • apache: NET_BIND_SERVICE (needed under Podman for low APACHE_PORT)
  • nextcloud: CHOWN, DAC_OVERRIDE, FOWNER, KILL, SETGID, SETUID
  • collabora: SYS_ADMIN, SYS_CHROOT, FOWNER, CHOWN (unchanged)
  • borgbackup: SYS_ADMIN, CHOWN, DAC_OVERRIDE, FOWNER, FSETID
  • imaginary: SYS_NICE (unchanged)
  • eurooffice: CHOWN, DAC_OVERRIDE, FOWNER, KILL, NET_BIND_SERVICE, SETGID, SETUID
  • onlyoffice: unchanged defaults minus NET_RAW (deprecated, not re-evaluated)

The json validator workflow now fails if a container in php/containers.json does not set cap_drop to [ALL]. update-helm.sh keeps its own capability handling, so only collabora's cap_add is passed to kompose and the generated chart stays unchanged.

Summary

  • The PR was tested and verified that it works locally
  • And will be tested after merge on a dedicated test instance (available for maintainers)
  • Sign-off message is added to all commits
  • Tests (playwright if possible) are included
  • Screenshots before/after for front-end changes
  • Documentation has been updated or is not required
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
  • Milestone next added

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…ed ones

cap_drop in containers.json was never read; DockerActionManager always sent
CapDrop: [NET_RAW]. It is now passed to Docker, and all default containers
use cap_drop: [ALL] with only the capabilities they need in cap_add.
Containers without cap_drop (e.g. community containers) keep dropping NET_RAW.

Capabilities added back, each verified by removing it individually:
- apache: NET_BIND_SERVICE (needed under Podman for low APACHE_PORT)
- nextcloud: CHOWN, DAC_OVERRIDE, FOWNER, KILL, SETGID, SETUID
- collabora: SYS_ADMIN, SYS_CHROOT, FOWNER, CHOWN (unchanged)
- borgbackup: SYS_ADMIN, CHOWN, DAC_OVERRIDE, FOWNER, FSETID
- imaginary: SYS_NICE (unchanged)
- eurooffice: CHOWN, DAC_OVERRIDE, FOWNER, KILL, NET_BIND_SERVICE, SETGID, SETUID
- onlyoffice: unchanged defaults minus NET_RAW (deprecated, not re-evaluated)

The json validator workflow now fails if a container in php/containers.json
does not set cap_drop to [ALL]. update-helm.sh keeps its own capability
handling, so only collabora's cap_add is passed to kompose and the
generated chart stays unchanged.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Simon L. <szaimen@e.mail.de>
@szaimen szaimen added this to the next milestone Nov 18, 2026
@szaimen
szaimen requested a review from pabzm November 18, 2026 13:26
@szaimen szaimen added 3. to review Waiting for reviews enhancement New feature or request labels Nov 18, 2026
@szaimen szaimen removed this from the next milestone Nov 18, 2026
@szaimen
szaimen marked this pull request as draft November 18, 2026 13:28
@szaimen

szaimen commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator Author

TODO: should be merged with the next major release to improve testing coverage and time

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant