immudb-py icon indicating copy to clipboard operation
immudb-py copied to clipboard

Add SSL credentials support for secure gRPC channels

Open AlphaKhaw opened this issue 9 months ago • 0 comments
trafficstars

Description

This PR adds native support for secure gRPC channels in the ImmuDB Python client by introducing an optional ssl_credentials parameter to the ImmudbClient constructor.

Changes

  • Added ssl_credentials parameter to ImmudbClient.__init__
  • Modified channel creation logic to support both secure and insecure channels
  • Updated documentation to reflect new parameter
  • Maintained backward compatibility with existing implementations

Example Usage

Create secure channel

credentials = grpc.ssl_channel_credentials()
client = ImmudbClient(immudUrl="host:port", ssl_credentials=credentials)

Existing usage remains unchanged

client = ImmudbClient(immudUrl="host:port") # Creates insecure channel

Related Issue

Closes #79

Testing

  • Tested with both secure and insecure connections
  • Verified backward compatibility
  • Tested with production ALB setup

Documentation

Updated docstring in ImmudbClient.__init__ to document the new parameter.

AlphaKhaw avatar Feb 04 '25 08:02 AlphaKhaw