This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
If minimumExpiration is set to a really large number, DateTime(now) + minimumExpiration could overflow, resulting in the comparison within IsFresh() returning true when it should be false.
Except for azure-security-keyvault-secrets-unittest.KeyVaultChallengeBasedAuthenticationPolicy.MultipleTimes which needs to be updated to reflect the new expected cache invalidation behavior (fixed in https://github.com/Azure/azure-sdk-for-cpp/pull/6191)
https://github.com/Azure/azure-sdk-for-cpp/pull/6151 exposed an existing potential overflow issue in the Identity token cache logic.
If
minimumExpiration
is set to a really large number,DateTime(now) + minimumExpiration
could overflow, resulting in the comparison withinIsFresh()
returning true when it should be false.Fixes most of the failing KeyVault challenged based authentication policy tests:
Except for
azure-security-keyvault-secrets-unittest.KeyVaultChallengeBasedAuthenticationPolicy.MultipleTimes
which needs to be updated to reflect the new expected cache invalidation behavior (fixed in https://github.com/Azure/azure-sdk-for-cpp/pull/6191)FYI @RickWinter