Skip to content

Conversation

@VeryEarly
Copy link
Collaborator

@VeryEarly VeryEarly commented Jul 22, 2020

Description

#11925
#6585

Added delegate function to RenewingTokenCredential when management client was instantiated.

This function will authenticate token (refresh if expired) each time ProcessHttpRequestAsync was called.

ProcessHttpRequestAsync will be executed before management client tries to send request (include polling for long running operation)
https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/mgmtcommon/ClientRuntime.Azure/ClientRuntime.Azure/LRO/LROPollState.cs#L182

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

@isra-fel
Copy link
Member

isra-fel commented Jul 22, 2020

Thinking about the different login scenarios: interactive, service principal, managed service identity, they use different mechanism to refresh token. We need test them all.
Forget it. This issue is all about access token scenario.

@VeryEarly VeryEarly marked this pull request as draft July 22, 2020 09:48
Copy link
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment. Also, what validation are we planning to do here?

@VeryEarly VeryEarly requested a review from markcowl July 24, 2020 07:14
@VeryEarly
Copy link
Collaborator Author

One minor comment. Also, what validation are we planning to do here?

  1. I'll debug a long running operation see whether it was a new token (from context.account.accesstoken)

  2. provide engineering build to partner (who reported this issue), ask them to help verify (meanwhile I'll try to reproduce more than one hour long running operations in my local)

@isra-fel isra-fel marked this pull request as ready for review July 31, 2020 06:23
@isra-fel isra-fel marked this pull request as draft July 31, 2020 06:24
@VeryEarly VeryEarly marked this pull request as ready for review August 11, 2020 07:42
@isra-fel
Copy link
Member

/azp run azure-powershell - powershell-core

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants