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

Change DBConnector to connect redis with unix socket. #21345

Merged
merged 8 commits into from
Jan 10, 2025

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Jan 7, 2025

Change DBConnector to connect redis with unix socket.

Why I did it

Improve SONiC Redis security by switch to unix socket connection.

Work item tracking
  • Microsoft ADO: 30329015

How I did it

Change DBConnector parameter to connect redis with unix socket:
DBConnector(const std::string &dbName, unsigned int timeout_ms, bool isTcpConn = false);

How to verify it

Pass all UT.

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

Change DBConnector to connect redis with unix socket.

Link to config_db schema for YANG module changes

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

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80 liuh-80 marked this pull request as ready for review January 8, 2025 02:07
@liuh-80 liuh-80 requested a review from qiluo-msft January 8, 2025 02:07
@@ -212,7 +212,7 @@ def get_transceiver_change_event(self, timeout=0):
from swsscommon import swsscommon
self.state_db = swsscommon.DBConnector("STATE_DB",
REDIS_TIMEOUT_USECS,
True)
Copy link
Collaborator

@qiluo-msft qiluo-msft Jan 10, 2025

Choose a reason for hiding this comment

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

True

since this file is vendor owned. please have a smaller PR and ask vendor to review. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft qiluo-msft merged commit 25b0732 into sonic-net:master Jan 10, 2025
20 checks passed
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