Skip to content

Hardening Redis db connectivity - #7

Merged
dawid-nowak merged 5 commits into
mainfrom
user/dawid.nowak/hardening_redis_db_connectivity
May 12, 2026
Merged

Hardening Redis db connectivity#7
dawid-nowak merged 5 commits into
mainfrom
user/dawid.nowak/hardening_redis_db_connectivity

Conversation

@dawid-nowak

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Dawid Nowak <nowakd@gmail.com>
@dawid-nowak
dawid-nowak force-pushed the user/dawid.nowak/hardening_redis_db_connectivity branch from 9fc2b9c to 26d151c Compare May 11, 2026 08:59
…vity

 Conflicts:
	Cargo.lock
	Cargo.toml

Signed-off-by: Dawid Nowak <nowakd@gmail.com>
@dawid-nowak
dawid-nowak force-pushed the user/dawid.nowak/hardening_redis_db_connectivity branch from add9975 to e3c982e Compare May 11, 2026 09:04

@lucarlig lucarlig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing README and compose startup paths only pass Redis host/port. Add --redis-mode or CONTEXTFORGE_GATEWAY_RS_REDIS_CONNECTION_MODE there so documented launches still work.

If Redis TLS is intended, compose must use the TLS port and pass the trust bundle path. Otherwise the gateway fails config validation before connecting.

validate_certs() accepts empty files because it only checks parse errors. Ensure at least one certificate is parsed before returning Ok.

Signed-off-by: Dawid Nowak <nowakd@gmail.com>
@dawid-nowak
dawid-nowak requested a review from lucarlig May 11, 2026 16:55

@lucarlig lucarlig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not directly in the PR diff, so I would not block this PR on it. But the PR’s new TLS default makes the existing per-operation Redis connection creation more expensive, especially on cache misses/writes. Worth opening a follow-up issue to consider reuse or pool Redis connections in RedisUserConfigStore.

Signed-off-by: Dawid Nowak <nowakd@gmail.com>
@dawid-nowak
dawid-nowak merged commit faacc81 into main May 12, 2026
5 checks passed
@dawid-nowak
dawid-nowak deleted the user/dawid.nowak/hardening_redis_db_connectivity branch May 12, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants