Add short lived memory cache for DefaultAzureCredential#15053
Merged
pavel-purma merged 4 commits intomainfrom Sep 24, 2024
Merged
Add short lived memory cache for DefaultAzureCredential#15053pavel-purma merged 4 commits intomainfrom
pavel-purma merged 4 commits intomainfrom
Conversation
81b5671 to
5a73b20
Compare
src/Microsoft.DotNet.Build.Tasks.Feed/src/common/TokenCredentialShortCache.cs
Outdated
Show resolved
Hide resolved
premun
reviewed
Sep 6, 2024
src/Microsoft.DotNet.Build.Tasks.Feed/src/common/TokenCredentialShortCache.cs
Outdated
Show resolved
Hide resolved
premun
reviewed
Sep 9, 2024
src/Microsoft.DotNet.Build.Tasks.Feed/src/common/TokenCredentialShortCache.cs
Outdated
Show resolved
Hide resolved
1c31f5e to
5132de4
Compare
6be8ede to
6488109
Compare
6488109 to
b555cd9
Compare
…ntial Remove from cache flow fix Exclude TokenCredentialShortCache file from source build
3c1a934 to
014bf31
Compare
014bf31 to
91f80a2
Compare
dkurepa
reviewed
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/AzureCliCredentialWithAzNoUpdateWrapper.cs
Show resolved
Hide resolved
oleksandr-didyk
previously approved these changes
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
Outdated
Show resolved
Hide resolved
dkurepa
reviewed
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/AzureCliCredentialWithAzNoUpdateWrapper.cs
Outdated
Show resolved
Hide resolved
dkurepa
reviewed
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
Outdated
Show resolved
Hide resolved
dkurepa
reviewed
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
Outdated
Show resolved
Hide resolved
dkurepa
reviewed
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/DefaultIdentityTokenCredential.cs
Outdated
Show resolved
Hide resolved
dkurepa
reviewed
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/TokenCredentialShortCache.cs
Show resolved
Hide resolved
dkurepa
reviewed
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/TokenCredentialShortCache.cs
Outdated
Show resolved
Hide resolved
dkurepa
reviewed
Sep 24, 2024
src/Microsoft.DotNet.ArcadeAzureIntegration/TokenCredentialShortCache.cs
Outdated
Show resolved
Hide resolved
dkurepa
previously approved these changes
Sep 24, 2024
oleksandr-didyk
previously approved these changes
Sep 24, 2024
cfb2c41
dkurepa
approved these changes
Sep 24, 2024
pavel-purma
added a commit
that referenced
this pull request
Sep 24, 2024
Co-authored-by: Pavel Purma <pavelpurma@microsoft.com>
This was referenced Sep 24, 2024
pavel-purma
added a commit
that referenced
this pull request
Sep 25, 2024
Co-authored-by: Pavel Purma <pavelpurma@microsoft.com>
pavel-purma
added a commit
that referenced
this pull request
Sep 25, 2024
Co-authored-by: Pavel Purma <pavelpurma@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements complex handling for Azure identity Token credentials by creating new pre-configured ChainedTokenCredential which know about common AzDO Task called AzureCLI@2
There are few cases how you can preconfigure this and provide identity to the DefaultIdentityTokenCredential class.
In Feed publishing task where this authentication is used all of these are wrapped to in-memory short lived cache of tokens.
You can see that one in TokenCredentialShortCache class. It works again as wrapper of TokenCredential and caches only for really small amount of time not to affect timeouts defined by specific implementations.