Skip to content

Pulsar containers should not run as the root user #8751

Closed

Description

@michaeljmarshall

Is your enhancement request related to a problem? Please describe.
The image produced by pulsar unnecessarily runs as the root user. My company requires applications to run with the least privilege necessary, and the current pulsar docker images do not comply with that policy.

Describe the solution you'd like
Given that pulsar only needs privileges to read/write from/to certain directories, the Dockerfile should add a user with the appropriate level of permission, chown the appropriate directories, and then run as that user.

Describe alternatives you've considered
I don't see an alternative--Pulsar does not need root privileges.

Additional context
Note that I want to deploy pulsar on a kubernetes cluster that has a pod security policy that prevents applications from running as root. Given that it is a good security principal to give applications the least permission possible, I see this enhancement as a way to make pulsar more secure and more easy to adopt for other organizations.

Activity

  1. added
    type/enhancement
    on Nov 30, 2020
  2. hpvd commented on Nov 30, 2020

    @hpvd

    related to
    unable to run on rootless kubernetess #7210

  3. added a commit that references this issue on Feb 16, 2021
    4264a67
  4. added 3 commits that reference this issue on May 14, 2021
    376867a
    3b0f7d7
    bf00805
  5. added 2 commits that reference this issue on Jun 9, 2021
    60c8285
    1b44c32
  6. frankjkelly commented on Jul 8, 2021

    @frankjkelly
    Contributor

    @sijie Although originally closed due to this PR #8796 however this PR appears to have reverted it #10861 - should the issue be reopened or is there an equivalent issue that covers this request?

  7. michaeljmarshall commented on Jul 8, 2021

    @michaeljmarshall
    MemberAuthor

    @frankjkelly - I don't know of any equivalent issue. I will open a new issue today with details for what needs to happen in order to get this feature added. Based on a recent pulsar community meeting, there is a desire for more integration testing before merging this change. I plan to help contribute this feature, but I don't expect to be able to work on it for a couple of weeks.

  8. frankjkelly commented on Jul 8, 2021

    @frankjkelly
    Contributor

    @michaeljmarshall thanks - that sounds good

  9. michaeljmarshall commented on Jul 8, 2021

    @michaeljmarshall
    MemberAuthor

    @frankjkelly - here is the new issue: #11269.

  10. added a commit that references this issue on Feb 28, 2022
    e4e26a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildtype/enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions