active-directory-b2c-dotnet-webapp-and-webapi icon indicating copy to clipboard operation
active-directory-b2c-dotnet-webapp-and-webapi copied to clipboard

Why we need `ReaderWriterLockSlim` in OpenIdConnectCachingSecurityTokenProvider?

Open LeTranAnhVu opened this issue 3 years ago • 1 comments

The class OpenIdConnectCachingSecurityTokenProvider uses read/write lock of ReaderWriterLockSlim before get issuer and keys. I am wondering, why we need to use lock here? and what happen if we don't?

LeTranAnhVu avatar Feb 25 '22 13:02 LeTranAnhVu

I've done a write-up of my findings about the locking behaviour that we're confident caused a deadlock-like situation for us under enough concurrent requests.

https://github.com/AzureAD/microsoft-identity-web/issues/3078.

mderriey avatar Oct 10 '24 11:10 mderriey