Home - AzureAD/microsoft-authentication-extensions-for-java GitHub Wiki
Welcome to the microsoft-authentication-extensions-for-java wiki!
- MSAL extension library is implementation of ITokenCacheAccessAspect from https://github.com/AzureAD/microsoft-authentication-library-for-java, which provides token cache persistence in secure permanent memory.
Token Cache Aspect implementation
-
To synchronize access to persisted cache cross-process lock is used, it is based on OS level file locks. File locks are not 100% reliable load on Unix based OS – Mac + Linux.
-
Taking to account that file lock based cross-process locks are already used in prod by .NET extension lib on Mac – changing file lock implementation is problematic.
-
Race conditions (as result of unreliable nature of file locks on mac + Linux) are observed only under stress testing, not under normal load. Stress testing data shows that percentage of lost updates is under % 2 on Mac.
-
It was decided to keep using file lock based cross platform lock + make sure that MSAL + MSAL extension SDK is resilient to possible race conditions. Race conditions effects + mitigation approaches