Describe the bug
The Redis WithDbGate() extension configures DbGate with a manually constructed Redis URL but does not configure DbGate to trust Aspire’s development certificate.
Aspire Redis enables TLS by default. DbGate therefore cannot establish the configured Redis connection because its Node.js runtime does not trust the Aspire-generated certificate.
The manually constructed URL also duplicates logic already provided by RedisResource.UriExpression. That expression correctly handles credentials, deferred endpoint resolution, and the redis:// versus rediss:// scheme.
Regression
Unknown. I have not confirmed a previous Aspire Community Toolkit version where the Redis DbGate integration worked with Aspire’s default TLS configuration.
Steps to reproduce
1. Create an Aspire AppHost with Redis and DbGate:
var builder = DistributedApplication.CreateBuilder(args);
builder.AddRedis("redis1")
.WithDbGate();
builder.Build().Run();
2. Start the AppHost.
3. Open DbGate from the Aspire dashboard.
4. Select the redis1 connection in the DbGate UI.
5. Attempt to connect to Redis.
6. Observe that DbGate cannot establish the connection.
Expected behavior
Opening the redis1 connection in the DbGate UI should connect successfully and allow the user to browse and manage the Redis instance.
Screenshots
No response
IDE and version
Rider
IDE version
2026.2
Nuget packages
CommunityToolkit.Aspire.Hosting.Redis.Extensions
Additional context
The proposed fix is to use Aspire’s existing deferred Redis URI expression:
context.EnvironmentVariables[$"URL_{connectionId}"] =
redisResource.UriExpression;
DbGate should also receive Aspire’s certificate bundle:
dbGateBuilder.WithCertificateTrustConfiguration(context =>
{
context.EnvironmentVariables["NODE_EXTRA_CA_CERTS"] =
context.CertificateBundlePath;
return Task.CompletedTask;
});
A Docker-backed AppHost test can verify the complete behavior by authenticating with DbGate, refreshing the Redis connection, invoking Redis PING, and asserting that the response is PONG.
See https://github.com/0mar-rivero/Aspire/tree/fix/redis-dbgate-tls for a working fix. If that looks good I can open a PR.
Help us help you
Yes, I'd like to be assigned to work on this item
Describe the bug
The Redis
WithDbGate()extension configures DbGate with a manually constructed Redis URL but does not configure DbGate to trust Aspire’s development certificate.Aspire Redis enables TLS by default. DbGate therefore cannot establish the configured Redis connection because its Node.js runtime does not trust the Aspire-generated certificate.
The manually constructed URL also duplicates logic already provided by
RedisResource.UriExpression. That expression correctly handles credentials, deferred endpoint resolution, and the redis:// versus rediss:// scheme.Regression
Unknown. I have not confirmed a previous Aspire Community Toolkit version where the Redis DbGate integration worked with Aspire’s default TLS configuration.
Steps to reproduce
Expected behavior
Opening the redis1 connection in the DbGate UI should connect successfully and allow the user to browse and manage the Redis instance.
Screenshots
No response
IDE and version
Rider
IDE version
2026.2
Nuget packages
Additional context
The proposed fix is to use Aspire’s existing deferred Redis URI expression:
DbGate should also receive Aspire’s certificate bundle:
A Docker-backed AppHost test can verify the complete behavior by authenticating with DbGate, refreshing the Redis connection, invoking Redis PING, and asserting that the response is PONG.
See https://github.com/0mar-rivero/Aspire/tree/fix/redis-dbgate-tls for a working fix. If that looks good I can open a PR.
Help us help you
Yes, I'd like to be assigned to work on this item