Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

handle azure-mgmt expired auth tokens by clearing the client cache and retrying #1099

Merged
5 commits merged into from
Jul 22, 2021

Conversation

bmc-msft
Copy link
Contributor

In order to reduce how frequently the IMS is hit from the service, the service caches the azure-mgmt clients between API calls. While the management APIs should have some amount of authentication expiration redundancy built in, not all of them do.

This is seen with ClientAuthenticationError, most often with the nested exception record of ExpiredAuthenticationToken.

This wraps all of the compute layer functionality with a wrapper that checks if there has been an exception, and retries the request.

@ghost
Copy link

ghost commented Jul 22, 2021

Hello @bmc-msft!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit ee3d087 into microsoft:main Jul 22, 2021
@bmc-msft bmc-msft deleted the handle-azure-mgmt-expired-auth-token branch July 22, 2021 18:01
@ghost ghost locked as resolved and limited conversation to collaborators Aug 22, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants