The existing async client (StorageAsync::Client) is very simple now. It got too complex due to all scenarios it must support, so I extracted most of its logic to the new class AsyncRedis::Client.
AsyncRedis::Client is a wrapper for the two Redis clients we use in async mode: one for single instances and one for sentinels. This implements support for all possible scenarios.
AsyncRedis::EndpointHelpers is a utility module which contains some logic that is used from several places.
Our custom protocol AsyncRedis::Protocol::ExtendedRESP2 now accepts ACL credentials.
We also use our own client for Sentinels: AsyncRedis::SentinelsClientACLTLS which extends the upstream client Async::Redis::SentinelsClient to add it ACL and TLS support.
It installs fakefs. This is used to dynamically generate RSA, DSA and EC keys to be tested from StorageAsyncTest. In async mode we only support these 3 algorithms for TLS but I think that's enough for most of cases and we can add new algorithms in the future if some client requires it.
TestHelpers::Certificates contains the logic to generate keys and certificates for tests.
Added TLS and ACL tests in StorageAsyncTest and StorageSyncTest.
This supersedes https://github.com/3scale/apisonator/pull/350. That PR is too messy and contains a lot of wrong or outdated info.
Jira Issue:
THREESCALE-8404
Summary of changes:
StorageAsync::Client
) is very simple now. It got too complex due to all scenarios it must support, so I extracted most of its logic to the new classAsyncRedis::Client
.AsyncRedis::Client
is a wrapper for the two Redis clients we use in async mode: one for single instances and one for sentinels. This implements support for all possible scenarios.AsyncRedis::EndpointHelpers
is a utility module which contains some logic that is used from several places.AsyncRedis::Protocol::ExtendedRESP2
now accepts ACL credentials.AsyncRedis::SentinelsClientACLTLS
which extends the upstream clientAsync::Redis::SentinelsClient
to add it ACL and TLS support.fakefs
. This is used to dynamically generate RSA, DSA and EC keys to be tested fromStorageAsyncTest
. In async mode we only support these 3 algorithms for TLS but I think that's enough for most of cases and we can add new algorithms in the future if some client requires it.TestHelpers::Certificates
contains the logic to generate keys and certificates for tests.StorageAsyncTest
andStorageSyncTest
.