Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker-mux] limit privileged flag for mux container #16562

Merged
merged 3 commits into from
Oct 3, 2023

Conversation

maipbui
Copy link
Contributor

@maipbui maipbui commented Sep 14, 2023

Why I did it

HLD implementation: Container Hardening (sonic-net/SONiC#1364)

Work item tracking
  • Microsoft ADO (number only): 14807420

How I did it

Reduce linux capabilities in privileged flag

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@@ -30,7 +30,7 @@ SONIC_INSTALL_DOCKER_DBG_IMAGES += $(DOCKER_MUX_DBG)
endif

$(DOCKER_MUX)_CONTAINER_NAME = mux
$(DOCKER_MUX)_RUN_OPT += --privileged -t
$(DOCKER_MUX)_RUN_OPT += --cap-add=NET_ADMIN -t
Copy link
Collaborator

@qiluo-msft qiluo-msft Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NET_ADMIN

If you remove this cap, what will happen? #Closed

@maipbui maipbui marked this pull request as ready for review September 28, 2023 15:47
@qiluo-msft qiluo-msft requested a review from zjswhhh September 29, 2023 21:27
Copy link
Contributor

@zjswhhh zjswhhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@qiluo-msft qiluo-msft merged commit ada2d88 into sonic-net:master Oct 3, 2023
16 checks passed
@maipbui maipbui deleted the mux_priv branch October 3, 2023 23:36
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.

3 participants