Skip to content

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

Merged
qiluo-msft merged 3 commits intosonic-net:masterfrom
maipbui:mux_priv
Oct 3, 2023
Merged

[docker-mux] limit privileged flag for mux container#16562
qiluo-msft merged 3 commits intosonic-net:masterfrom
maipbui:mux_priv

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)


$(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
@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