Comments (9)
CC @jmprieur for this important bug
from microsoft-authentication-extensions-for-dotnet.
@bgavrilMS can we priortize for next release that will get along with MSAL.NET 4.23.0?
from microsoft-authentication-extensions-for-dotnet.
@yihezkel - is this a common scenario to have 150 threads do this work?
We've done some stress testing in the past and found that the current approach fails at around ~10-20 threads on Mac and Linux. We've tested Windows as well but haven't found an upper bound, although we may have not tested with 150 threads.
Petro had some thoughts on how to improve but I do not know if 150 threads can be achieved.
from microsoft-authentication-extensions-for-dotnet.
Quick note - this was discussed offline
from microsoft-authentication-extensions-for-dotnet.
@yihezkel : I was not part of the offline conversation. what was discussed/decided? is this still an issue?
from microsoft-authentication-extensions-for-dotnet.
This is still an issue, and we should fix it at some point by using read locks as well as write locks. I marked it as P2 because the use case is not common - around 150 threads running concurrently. But it is not extreme, since an SDK can be used for parallel calls.
from microsoft-authentication-extensions-for-dotnet.
This token caching library is meant to be used in public client scenarios, such as desktop clients, which should not exibit this level of concurrency. If you require this level of concurrency I suggest you experiment with using a different syncronization mechanism. When this library was designed, we chose to use file locks because they are ubiquitous and we have not found alternatives that would easily work across the 3 OSes. I do not think this requirements has changed.
from microsoft-authentication-extensions-for-dotnet.
I suggest this limitation/assumption be documented. For example, https://github.com/AzureAD/microsoft-authentication-extensions-for-dotnet/wiki/Cross-platform-Token-Cache only says that one of the goals is "Token cache storage can be accessed by multiple processes concurrently.", which is true but with a qualification.
from microsoft-authentication-extensions-for-dotnet.
We will not be fixing this as most public client use a single / a few thread to get tokens. Nobody else complained about this.
If Kusto has a complex scenario requiring many threads, I recommend you use MSAL's lower level cache extensibility to build your own cache, for example an in-memory cache that periodically saves data a file.
Or, if you have a solution for fixing the existing one, please contribute. This project is quite simple.
from microsoft-authentication-extensions-for-dotnet.
Related Issues (20)
- [Bug] Null Reference Exception Thrown in RegisterCache on Mac HOT 5
- CrossPlatLock does not work on UWP HOT 1
- Improved error message to steer users to .WithLinuxUnprotectedFile() or host workaround HOT 2
- How to prompt for account selection and then check the cache for a token instead of always requiring a password? HOT 4
- 1st party app using RPS HOT 2
- How to handle the locked default collection of Linux keyring when using msal storage? HOT 2
- LocalMachine-scoped cache serialization HOT 2
- Protect plaintext files with 600 permissions HOT 1
- "Operation is not supported on this platform." When trying to create cache in .NET MAUI in Mac Catalyst HOT 2
- Race condition in setting 600 permissions HOT 1
- Perf issue - Process.GetCurrentProcess() takes a long time
- Cannot build Xamarin.iOS App when Azure.Identity Nugets are installed. If I remove them then it builds and runs fine HOT 31
- When cache file directory does not exist, MsalCacheHelper crashes HOT 2
- Obsolete code in documentation HOT 1
- Non-async methods? HOT 1
- MsalCacheHelper.UserRootDirectory returns empty string when run in Azure function environment HOT 1
- Bug in CrossPlatLock? HOT 2
- Do I need to use this library? HOT 1
- On the encryption problem of AcquireTokenInteractive storage tokens HOT 4
- GitHub Releases Appear Outdated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft-authentication-extensions-for-dotnet.