HTTPS support for secondary storage? #894
Replies: 6 comments 10 replies
-
I mostly implemented HTTPS support because it could be used to protect the secrets in a HTTP Basic Authentication scenario. There might be industries which mandate encryption and authentication for storing build results. We might be able to reduce the roundtrips needed for a handshake with TLS Session Resumption reducing ccache startup time would involve dynamic loading of either OpenSSL or a hypothetical ccache HTTPS plugin. Maybe we could disable OpenSSL / HTTPS support by default and add a big warning sign above the CMake option to convince distributions to not enable it for the standard packages? |
Beta Was this translation helpful? Give feedback.
-
Depending on the outcome of the discussion (about HTTPS), one can use hiredis_ssl to add a similar option for Redis. The trade-offs are quite the same, and TLS support is quite new (it requires Redis 6): https://redis.io/topics/encryption NOTE: requires hiredis version 1.0.0 (with ENABLE_SSL=ON, not the default OFF) int redisInitiateSSLWithContext(redisContext *c, redisSSLContext *redis_ssl_ctx); Some reports talk about a 36% performance drop (adding TLS), the single-threaded model makes it extra visible., There is also an increased CPU load on the server, normally it is very light (just sending from memory to network) |
Beta Was this translation helpful? Give feedback.
-
Added a Redis SSL ( Adding a test case requires "redis-server" and "libhiredis-dev" newer than what is available in Ubuntu... |
Beta Was this translation helpful? Give feedback.
-
Maybe this feature (SSL) can be added in 4.5 instead ? |
Beta Was this translation helpful? Give feedback.
-
There are some suggestions to add new cloud storage backends: The SDKs that they use are quite big, so probably OFF by default ? |
Beta Was this translation helpful? Give feedback.
-
Here is an example of a project using plugins: https://github.com/VgTajdd/plugin_manager Some could be compiled in, some loaded ? It would still need RPC, when actually used... |
Beta Was this translation helpful? Give feedback.
-
I kind of hoped not to have to start a discussion about HTTPS at this time by saying "Not in scope: HTTPS" in #858, but now when PR #890 already exists I guess I have to anyway. 🙂 The thing is that I'm not yet sure whether we actually should support HTTPS at all, so I would like to discuss our options first.
I have two concerns with adding support like in #890, i.e. just linking with OpenSSL and letting each ccache invocation start a new HTTPS connection:
ccache -V
goes from ≈1.5 ms to ≈2.9 ms with Add secondary HTTPS storage #890 (dynamic linking). With static linking of OpenSSL it goes down to ≈2.6 ms, which surprised me since I expected most of the slowdown to go away. That seems to be because libssl/libcrypto perform some initialization steps before main is reached. A couple of ms slower is probably acceptable for many people, but many small slowdowns can turn into a larger slowdown, so we have to compare this with the value the feature adds.Also: is HTTPS storage a valid use case? Do we know of anybody who wants to use HTTPS for ccache, especially in this one-connection-per-invocation way?
Beta Was this translation helpful? Give feedback.
All reactions