-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Feature Request: Support for Pre-configured Redis Connections in Data Store
Problem
The current Redis data store implementation only supports password-based authentication, creating a limitation for enterprise environments requiring Azure Active Directory (AAD) authentication or centralized connection management.
Current limitations:
Uri()
method only supports password authentication- No support for externally managed connections
- Cannot use
ConfigureForAzureWithTokenCredentialAsync()
for AAD authentication
Enterprise impact:
Many organizations require AAD authentication for Azure services and prohibit storing passwords in configuration, forcing them to use less secure authentication or avoid persistent data stores entirely.
Proposed Solution
Add a Connection(IConnectionMultiplexer connection)
method to RedisStoreBuilder<T>
:
public RedisStoreBuilder<T> Connection(IConnectionMultiplexer connection)
Usage example:
// Azure AAD authentication
var credential = new DefaultAzureCredential();
var redisConfig = new ConfigurationOptions();
redisConfig.EndPoints.Add(redisHostName, redisPort);
await redisConfig.ConfigureForAzureWithTokenCredentialAsync(credential);
var connection = await ConnectionMultiplexer.ConnectAsync(redisConfig);
// LaunchDarkly configuration
var config = Configuration.Builder(sdkKey)
.DataStore(Components.PersistentDataStore(
Redis.DataStore().Connection(connection)
))
.Build();
Benefits
- Enables Azure AAD authentication for enterprise security compliance
- Supports dependency injection and centralized connection management
- Maintains full backward compatibility
- Follows existing builder pattern conventions
Implementation Notes
- No breaking changes to existing API
- Builder handles connection logic, keeping constructors simple
- Comprehensive test coverage will be included
Metadata
Metadata
Assignees
Labels
No labels