-
Notifications
You must be signed in to change notification settings - Fork 198
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
Update federated auth to allow token re-fetch #1963
Update federated auth to allow token re-fetch #1963
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - raised an issue around if we want to support the raw --federated-token at all, since the more I think about it, the more like a footgun it feels like it is going to be, since I expect that these tokens will be short lived?
The fact that we support it is likely an artifact of how the change I did evolved. I had started with just --federated-credential
and at the time the pipeline would call the GH CLI to get the token, and then call azd login
with it. After feedback with the team, we decided to move to the model where azd
would call gh
for you to fetch the token, and since the code was already written, I just built on top of the existing structure. I should have taken a moment to think about the fact that these tokens are likely short lived and that persisting one long term (instead of the information we need to mint one when we need it) was going to lead to issues, but I didn't have the insight at that time.
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference (preview)
|
Fix implementation of GitHub federated auth token provider to allow for fetching of tokens when tokens expire.
Validated the failing behavior before this change, and success behavior after this change, using a GitHub action that slept for 15 minutes, calling
azd auth token
in-between, and runs fullazd provision
andazd deploy
after 15 minutes.Fixes #1901