azure-sdk-for-go icon indicating copy to clipboard operation
azure-sdk-for-go copied to clipboard

azcontainerregistry: delegate token caching

Open stevekuznetsov opened this issue 1 year ago • 6 comments

azcontainerregistry: decouple token exchange from request specifics

I would like to propose a generally-useful token cache in a future commit. Managing the refresh tokens and exchanging them for access tokens does not need to rely specifically on the authentication policy or the specific client request being made, so this commit decouples the two concerns, thereby enabling the future refactor to be simpler.

Signed-off-by: Steve Kuznetsov [email protected]


azcontainerregistry: delegate token caching

Mechanically refactor token caching, retrieval and exchange behavior from the authentication policy into a dedicated object, allowing us to separate token management concerns from Azure client policy concerns.

Signed-off-by: Steve Kuznetsov [email protected]


azcontainerregistry: move code

This commit simply moves code from one location to another, broken out from other commits for ease of review.

Signed-off-by: Steve Kuznetsov [email protected]


Builds on top of #23270

Proving out a separation of concerns that could solve https://github.com/Azure/azure-sdk-for-go/issues/20571

stevekuznetsov avatar Aug 02 '24 20:08 stevekuznetsov

Thank you for your contribution @stevekuznetsov! We will review the pull request and get back to you soon.

github-actions[bot] avatar Aug 02 '24 20:08 github-actions[bot]

I don't see anything wrong with this, however I also don't see a reason to make these changes, because they don't affect client behavior or the module's public API. Can you please describe the scenario motivating this? I take it you want to replace the ACR token cache of a BlobClient or Client instance with a custom implementation. Why is the current internal caching function not sufficient?

chlowell avatar Aug 02 '24 21:08 chlowell

@chlowell were you aware of the conversation happening on https://github.com/Azure/azure-sdk-for-go/issues/20571? Sorry if I was not clear - I 100% agree with you that the changes here as they are will not be user-visible, but their value comes from the context of that issue, specifically what I laid out in this comment.

stevekuznetsov avatar Aug 05 '24 12:08 stevekuznetsov

Rebased after pre-requisite PR merged.

stevekuznetsov avatar Aug 06 '24 13:08 stevekuznetsov

Hi @stevekuznetsov. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

github-actions[bot] avatar Oct 11 '24 05:10 github-actions[bot]

Would be great to do it but not sure if maintainers want this feature.

stevekuznetsov avatar Oct 12 '24 01:10 stevekuznetsov

Hi @stevekuznetsov. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

github-actions[bot] avatar Dec 13 '24 05:12 github-actions[bot]

Hi @stevekuznetsov. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

github-actions[bot] avatar Dec 20 '24 08:12 github-actions[bot]