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

fix(core): Add support for in-transit encryption (TLS) on Redis connections #7047

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/cli/src/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ export const schema = {
default: '',
env: 'QUEUE_BULL_REDIS_CLUSTER_NODES',
},
tls: {
format: 'Boolean',
default: false,
env: 'QUEUE_BULL_REDIS_TLS',
doc: 'Enable TLS on Redis connections. Default: false',
},
},
queueRecoveryInterval: {
doc: 'If > 0 enables an active polling to the queue that can recover for Redis crashes. Given in seconds; 0 is disabled. May increase Redis traffic significantly.',
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/services/redis/RedisServiceHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function getRedisStandardClient(
enableReadyCheck: false,
maxRetriesPerRequest: null,
};
if (config.getEnv('queue.bull.redis.tls')) sharedRedisOptions.tls = {};
LoggerProxy.debug(
`Initialising Redis client${redisType ? ` of type ${redisType}` : ''} connection with host: ${
host ?? 'localhost'
Expand Down Expand Up @@ -101,6 +102,7 @@ export function getRedisClusterClient(
enableReadyCheck: false,
maxRetriesPerRequest: null,
};
if (config.getEnv('queue.bull.redis.tls')) sharedRedisOptions.tls = {};
LoggerProxy.debug(
`Initialising Redis cluster${
redisType ? ` of type ${redisType}` : ''
Expand Down
Loading