Skip to content

Add support for secure gRPC channels in ImmudbClient #79

Open
@AlphaKhaw

Description

@AlphaKhaw

Current Behavior

The current implementation of ImmudbClient only supports insecure gRPC channels (grpc.insecure_channel). This makes it challenging to use ImmuDB in production environments where TLS/SSL is required, such as when connecting through an Application Load Balancer (ALB) or when security policies mandate encrypted connections.

Proposed Solution

Add support for secure gRPC channels by:

  1. Adding an optional ssl_credentials parameter to ImmudbClient.__init__
  2. Creating a secure channel when credentials are provided
  3. Maintaining backward compatibility by defaulting to insecure channel

Current Workaround

Users currently need to manually override the channel after client creation:

credentials = grpc.ssl_channel_credentials()
channel = grpc.secure_channel(target=f"{host}:{port}", credentials=credentials)
client = ImmudbClient(...)
client.channel.close() # Close existing insecure channel
client.channel = channel
client.resetStub()

This workaround is functional but not ideal for production use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions