microsoft / Azure-DCAP-Client

Interfaces between SGX SDKs and the Azure Attestation SGX Certification Cache.
MIT License
60 stars 45 forks source link

Skip primary fetch if it failed recently #191

Closed FranciscoJavierOrtegaPalacios closed 1 year ago

FranciscoJavierOrtegaPalacios commented 1 year ago

The issue DCAP takes too long to respond in certain situations where the primary fetch is unavailable

What was done DCAP now registers in memory the time of the last failure when fetching from primary and checks it before fetching from primary. If it happened too recently, it skips the fetch.

Testing Tested manually that it skips primary after a recent failure and that it returns to fetching from primary after the time threshold for the failure has been crossed. E2E and unit tests pass