Skip to content

Conversation

Peter-Sh
Copy link
Contributor

@Peter-Sh Peter-Sh commented Mar 17, 2025

This kinda closes
#390
#401
#424
for Redis 8 CE.

Changes:

setpriv is used instead of gosu with the following flags:

  • Set reuid and regid to redis user and group
  • Clear all supplementary groups
  • Set bounding capabilities to an empty list
  • Enable no-new-privs bit

Other changes:

  • redis-sentinel is now also run with dropped privileges (previously, it wasn't)
  • Both redis-sentinel and redis-server will start with dropped privileges, regardless of how they were started (whether using absolute paths or just file names)

@Peter-Sh Peter-Sh force-pushed the RED-131427_setpriv_insteadof_gosu branch 3 times, most recently from f4f7bdf to 9d21650 Compare March 21, 2025 12:06
Changes:

setpriv is used instead of gosu with the following flags:

* Set reuid and regid to redis user and group
* Clear all supplementary groups
* Set bouding capabilities to an empty list
* Enable no-new-privs bit
* Set securebit to exclude regaining capabilities

redis-sentinel is now also run with dropped privileges (previously, it wasn't)

Both redis-sentinel and redis-server will start with dropped privileges, regardless of how they were started (whether using absolute paths or just file names)
redis-server may use sys_resource to increase open files limit if
maxclients option has been requested
@Peter-Sh Peter-Sh force-pushed the RED-131427_setpriv_insteadof_gosu branch from 9d21650 to f7606b5 Compare March 21, 2025 12:23
@adobrzhansky adobrzhansky merged commit 3b9471e into redis:release/8.0 Mar 21, 2025
16 checks passed
Peter-Sh added a commit to Peter-Sh/docker-library-redis that referenced this pull request May 23, 2025
…redis#435)

* Use setpriv instead of gosu to drop privileges

Changes:

setpriv is used instead of gosu with the following flags:

* Set reuid and regid to redis user and group
* Clear all supplementary groups
* Set bouding capabilities to an empty list
* Enable no-new-privs bit
* Set securebit to exclude regaining capabilities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants