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

Entra access token authentication policies such as BearerTokenAuthenticationPolicy should respect refresh_on information #22837

Open
christothes opened this issue May 3, 2024 · 4 comments
Assignees
Labels
Azure.Core Azure.Identity Blocked Client This issue points to a problem in the data-plane of the library.
Milestone

Comments

@christothes
Copy link
Member

Long lived credentials such as those received from managed identity authentication include additional metadata concerning when a token can/should be refreshed. Our authentication policies should take this information into account when refreshing access tokens.

This involves:

  • Modifying relevant authentication policies
  • Modifying the AccessToken type to include this optional information
  • Modifying Azure.Identity credential implementations to populate the refresh_on information in the AccessToken
@chlowell
Copy link
Contributor

chlowell commented May 3, 2024

@chlowell
Copy link
Contributor

chlowell commented May 3, 2024

🤔 on second thought I believe the only change we need from MSAL is to expose any refresh_in value provided by the STS. Everything else should be feasible in azidentity/azcore. And I can imagine a hacky way to get refresh_in without MSAL's help.

@chlowell chlowell removed the Blocked label May 3, 2024
@chlowell
Copy link
Contributor

chlowell commented May 8, 2024

On third thought, this is blocked because MSAL's token cache has a hardcoded expiration time preventing us from acquiring a new token when a cached one has at least 5 minutes left to expiry.

@chlowell chlowell removed the blocking-release Blocks release label May 17, 2024
@chlowell chlowell modified the milestones: 2024-06, Backlog May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Azure.Identity Blocked Client This issue points to a problem in the data-plane of the library.
Projects
Status: Blocked
Development

No branches or pull requests

4 participants