Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[uAMQP] Smarter refresh token window #20573

Closed
yunhaoling opened this issue Sep 7, 2021 · 0 comments
Closed

[uAMQP] Smarter refresh token window #20573

yunhaoling opened this issue Sep 7, 2021 · 0 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs Messaging Messaging crew MQ This issue is part of a "milestone of quality" initiative. Service Bus uAMQP

Comments

@yunhaoling
Copy link
Contributor

yunhaoling commented Sep 7, 2021

This is spawned from the issue: #20086

  • The token returned by the AAD service maybe a cached one.
  • The service would refresh the token on their side within their refresh window.
  • uAMQP would refresh the token on its own refresh window.
  • So if there's gap between the uAMQP refresh window (e.g. 6mins) and the service refresh window (e.g. 5 mins), then during the gap (e.g. 1min), uAMQP would keep trying to refresh the token blocking sending/receiving flow.

We should improve the behavior to have a smarter version of token refreshing strategy.

azure-core ref: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py#L71


  • allow setting refresh window
  • do not put token onto the link if the new token is equal to the old one
  • introduce backoff if the new token is equal to the old one
    • no throttling service
    • however, the current auth state set is a problem
      • currently it is refresh_required -> auth_in_progress
      • we need a kinda new status: refresh_required + can_work, which indicates token refresh is required but we should still keep working
@yunhaoling yunhaoling added Service Bus Event Hubs Client This issue points to a problem in the data-plane of the library. uAMQP labels Sep 7, 2021
@yunhaoling yunhaoling added this to the [2021] October milestone Sep 7, 2021
@yunhaoling yunhaoling self-assigned this Sep 7, 2021
@yunhaoling yunhaoling added the Messaging Messaging crew label Sep 7, 2021
@yunhaoling yunhaoling changed the title [uAMQP] Smart refresh token window [uAMQP] Smarter refresh token window Sep 7, 2021
@yunhaoling yunhaoling added the MQ This issue is part of a "milestone of quality" initiative. label Nov 16, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs Messaging Messaging crew MQ This issue is part of a "milestone of quality" initiative. Service Bus uAMQP
Projects
None yet
Development

No branches or pull requests

1 participant