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

Users shouldn't be able to invoke scripts requiring AZ CLI if they cannot auth against it #16

Closed
glennmusa opened this issue Feb 22, 2021 · 1 comment · Fixed by #63
Closed
Labels
bug Something isn't working

Comments

@glennmusa
Copy link
Contributor

What happens:

When invoking a Mission LZ script with a dependency on Azure CLI, I can do so from a terminal where my access has expired, but, Mission LZ scripts will continue to execute as if nothing is wrong and could put me into a weird state/confuse a user:

You'll notice mission LZ scripts continuing to try and execute Service Principal does not exist...creating despite not being able to get out and query that information to begin with.

Example:

> scripts/mlz_tf_setup.sh gmusadev eastus public
Verifying Service Principal is unique (sp-tf-mlz-gmusadev)
ERROR: AADSTS70043: The refresh token has expired or is invalid due to sign-in frequency checks by conditional access. The token was issued on 2021-02-17T15:42:34.0134674Z and the maximum allowed lifetime for this request is 43200.
Trace ID: [redacted]
Correlation ID: [redacted]
Timestamp: 2021-02-22 21:30:24Z
Service Principal does not exist...creating
ERROR: AADSTS70043: The refresh token has expired or is invalid due to sign-in frequency checks by conditional access. The token was issued on 2021-02-17T15:42:34.0134674Z and the maximum allowed lifetime for this request is 43200.
Trace ID: [redacted]
Correlation ID: [redacted]
Timestamp: 2021-02-22 21:30:25Z

What I expect to happen:
The script should fail gracefully and tell me to run az login

@glennmusa glennmusa added the bug Something isn't working label Feb 22, 2021
@brooke-hamilton
Copy link
Contributor

This is a general issue -- deployment scripts should stop as soon as an error is encountered instead of continuing. The same problem happens if a required environment variable is missing.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants