Add encrypted caching support for PoP token flow#676
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #676 +/- ##
===========================================
- Coverage 63.43% 52.26% -11.18%
===========================================
Files 37 47 +10
Lines 2210 2960 +750
===========================================
+ Hits 1402 1547 +145
- Misses 733 1270 +537
- Partials 75 143 +68 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@weinong Can you please review this? |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 30 out of 38 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
pkg/internal/pop/msal_confidential.go:63
- Unsafe type assertion without checking if Transport is actually an *http.Client. This could panic if Transport is a different type that implements http.RoundTripper.
confOptions = append(confOptions,
confidential.WithHTTPClient(msalOptions.Options.Transport.(*http.Client)),
)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 30 out of 38 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 32 out of 41 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Add
pkg/internal/pop/cachepackage which provides unified interface for PoP token caching for all OSAdd support for PoP token caching using official MSAL cache implementation (for windows, mac) which supports encryption
https://github.com/AzureAD/microsoft-authentication-extensions-for-go/tree/main/cache
For linux, to avoid dependency on libsecret, ported the cache implementation from
azidentityhttps://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/cache/linux.go
Leveraging the secure storage implementation for caching both the pop tokens & pop key
Support PoP Token in ROPC convert-kubeconfig command
Relevant WI - https://msazure.visualstudio.com/AzureArcPlatform/_workitems/edit/35025798