actix / actix-extras

A collection of additional crates supporting the actix and actix-web frameworks.
https://actix.rs
Apache License 2.0
787 stars 206 forks source link

Session: Add option for redis/tokio-rustls-comp #342

Closed ryanseipp closed 5 months ago

ryanseipp commented 1 year ago

Expected Behavior

actix-session should provide an option to use rustls to handle TLS as an alternative to OpenSSL, to reduce surface area and allow the end user to standardize on a single TLS implementation vs. having potentially two.

Current Behavior

actix-session only exposes redis/tokio-native-tls-comp feature flag when the redis-rs-tls-session feature is enabled. As I utilize rustls for sqlx, actix-web and anything else needing a TLS secured connection, I now have two implementations of TLS in my compiled executable, and OpenSSL is dynamically linked.

Possible Solution

Expose a "redis-rs-rustls-session" feature flag to enable "redis/tokio-rustls-comp".

Steps to Reproduce

cargo new ssl && cd ssl
cargo add actix-web -F rustls-0_21
cargo add actix-session -F redis-rs-tls-session
cat Cargo.lock | grep -E '"rustls"|"openssl"'
# if actix-session used in bin, observe libssl.so.3 dynamically linked via
ldd target/debug/ssl