-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
tokens invalid when az and terraform run on different timezones #1706
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.
hey @cruwe
Thanks for this PR - I've left a couple of minor edits inline but this otherwise LGTM 👍
Thanks!
@@ -15,6 +15,12 @@ We recommend [using a Service Principal when running in a shared environment](au | |||
|
|||
~> **NOTE:** Authenticating via the Azure CLI is only supported when using a User Account. If you're using a Service Principal (e.g. via `az login --service-principal`) you should instead [authenticate via the Service Principal directly](authenticating_via_service_principal.html). | |||
|
|||
~> **NOTE:** Take note that when `az login` fetches access_tokens, these are interpreted (and stored) according to the timezone settings the azure-cli runs in. | |||
|
|||
When the timezones `az` and `terraform` run in differ (because `az` is run inside docker, which defaults to UTC, and `terraform` on some host, not UTC), `terraform` interprets the token differently from what `az` intended and may incorrectly determines the token to be stale and invalid. |
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.
"because
az" -> "for example when
az`
"and terraform
on some host, not UTC" -> "the system timezone where Terraform runs isn't UTC"
@@ -15,6 +15,12 @@ We recommend [using a Service Principal when running in a shared environment](au | |||
|
|||
~> **NOTE:** Authenticating via the Azure CLI is only supported when using a User Account. If you're using a Service Principal (e.g. via `az login --service-principal`) you should instead [authenticate via the Service Principal directly](authenticating_via_service_principal.html). | |||
|
|||
~> **NOTE:** Take note that when `az login` fetches access_tokens, these are interpreted (and stored) according to the timezone settings the azure-cli runs in. |
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.
access_tokens
-> the access tokens
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.
More specifically, - adapt @tombuildsstuff's (thanks, that's better) stylistic requests.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
No description provided.