EaR: Avoid appending `tls` to the URL (#9734)
Description Patch proposes two changes: 1. Avoid appending tls as part of URI for secure connections 2. RefreshEKs recurring task can be skipped if there are no keys to be refreshed Testing EncryptionOps.toml EncryptKeyProxyTest.toml devRunCorrectness devRunCorrectnessFiltered 'Encrypt*'
This commit is contained in:
parent
0f5e75b34b
commit
c492f83bf4
|
@ -143,8 +143,7 @@ ACTOR Future<RESTConnectionPool::ReusableConnection> connect_impl(Reference<REST
|
|||
ASSERT(poolItr == connectionPool->connectionPoolMap.end() || poolItr->second.empty());
|
||||
|
||||
// No valid connection exists, create a new one
|
||||
state Reference<IConnection> conn =
|
||||
wait(INetworkConnections::net()->connect(connectKey.first, connectKey.second, isSecure));
|
||||
state Reference<IConnection> conn = wait(INetworkConnections::net()->connect(connectKey.first, connectKey.second));
|
||||
wait(conn->connectHandshake());
|
||||
|
||||
TraceEvent("RESTTUilCreateNewConn")
|
||||
|
|
|
@ -639,7 +639,7 @@ ACTOR Future<Void> refreshEncryptionKeysImpl(Reference<EncryptKeyProxyData> ekpP
|
|||
itr != ekpProxyData->baseCipherDomainIdCache.end();) {
|
||||
if (isCipherKeyEligibleForRefresh(itr->second, currTS)) {
|
||||
TraceEvent("RefreshEKs").detail("Id", itr->first);
|
||||
req.encryptDomainIds.emplace_back(itr->first);
|
||||
req.encryptDomainIds.push_back(itr->first);
|
||||
}
|
||||
|
||||
// Garbage collect expired cached CipherKeys
|
||||
|
@ -650,6 +650,12 @@ ACTOR Future<Void> refreshEncryptionKeysImpl(Reference<EncryptKeyProxyData> ekpP
|
|||
}
|
||||
}
|
||||
|
||||
if (req.encryptDomainIds.empty()) {
|
||||
// Nothing to refresh
|
||||
TraceEvent(SevDebug, "RefreshEKsEmptyRefresh");
|
||||
return Void();
|
||||
}
|
||||
|
||||
state double startTime = now();
|
||||
std::function<Future<KmsConnLookupEKsByDomainIdsRep>()> repF = [&]() {
|
||||
return kmsConnectorInf.ekLookupByDomainIds.getReply(req);
|
||||
|
|
Loading…
Reference in New Issue