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

[Identity] MSI doesn't work with Function Apps, expires on date format is incorrect. #4965

Closed
bterlson opened this issue Sep 3, 2019 · 4 comments · Fixed by #5144
Closed
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. Managed Identity

Comments

@bterlson
Copy link
Member

bterlson commented Sep 3, 2019

  • Package Name: @azure/identity
  • Package Version: 1.0.0-preview.2

Describe the bug
DefaultAzureCredential and ManagedIdentityCredential do not handle the expires on date format provided by MSI on Azure Function Apps (and possibly Azure App Service as well). It sends a date format like MM/DD/YYYY H:MM:SS AM/PM +MM:SS but expects a date format matching the regexp /(\d\d)\/(\d\d)\/(\d\d\d\d) (\d\d):(\d\d):(\d\d) (\+|-)(\d\d):(\d\d)/

Two possible fixes:

  • Generalize the regexp matching.
  • Just pass the date through to Date.parse which handles many date formats. Care would have to be taken to ensure Date.parse interprets these dates appropriately, but from what I can tell it's a pure superset of the current semantics.
@bterlson bterlson added Azure.Identity Client This issue points to a problem in the data-plane of the library. Managed Identity labels Sep 3, 2019
@bterlson bterlson added the triage label Sep 3, 2019
@loarabia loarabia removed the triage label Sep 4, 2019
@sophiajt
Copy link
Contributor

sophiajt commented Sep 5, 2019

#2 seems like the better path, though I think we would want to apply it and then watch for any possible side effects of the increase in lenience. Perhaps we could slate this for the preview 4 release?

@bterlson
Copy link
Member Author

bterlson commented Sep 5, 2019

I feel like sooner is better, considering this is a core scenario for DefaultAzureCredential...

@schaabs do you have any thoughts on the excess leniency of Date.parse? Do we need a regexp?

@sophiajt
Copy link
Contributor

Is #4631 also related to this issue?

@schaabs
Copy link
Member

schaabs commented Sep 16, 2019

@jonathandturner, I believe the two issues are the same.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. Managed Identity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants