Comments (4)
Hi @brphelps,
MSAL does not store un-encrypted data on disk, ever.
On UWP, we store the data encrypted with DPAPI https://docs.microsoft.com/en-us/dotnet/standard/security/how-to-use-data-protection.
On .NET Fwk, .NET Core, .NET 5, we don't store the token cache at all, because storing it in a file is not appropriate for web site scenarios. Users need to provide their own token cache storage implementation. For PublicCLientApps (e.g. desktop), we suggest you use this cross-plat cache persistence strategy: https://github.com/AzureAD/microsoft-authentication-extensions-for-dotnet, which stores the data as follows:
- Windows - DPAPI
- Mac - KeyChain
- Linux - KeyRing
Note that we used to store tokens in WinCredManager, however this has a bunch of limitations, especially when it comes to size of keys etc. Tokens are not passwords, they are fairly long (2-3k chars) and would break WinCredsManager.
AFAIK (and MSALs are reviewed by security folk periodically), there is no security difference between DPAPI and WinCredsManager .
from microsoft-authentication-extensions-for-dotnet.
ACK on wincredmanager.
I think there's a pretty big exception to what you're saying above -- Headless linux (arguably more widely used than headed linux) seems to still fallback to a plaintext password in that cred manager. Is there a way we can disable that behavior or cause it to throw instead of just warn?
Thanks!
from microsoft-authentication-extensions-for-dotnet.
@bgavrilMS : isn't this more a question for the extension library?
from microsoft-authentication-extensions-for-dotnet.
@brphelps - MSAL on its own will not store tokens anywhere for .NET Fx and .NET Core runtimes. You have to customize storage. We offer a solution for this here: https://github.com/AzureAD/microsoft-authentication-extensions-for-dotnet/ which seems to satisfy your needs, including Linux fallback.
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.