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

--skip-version-check option doesn't work with azcopy login #2299

Closed
atakadams opened this issue Jul 14, 2023 · 2 comments · Fixed by #2301
Closed

--skip-version-check option doesn't work with azcopy login #2299

atakadams opened this issue Jul 14, 2023 · 2 comments · Fixed by #2301
Assignees
Labels
bug login Bugs related a login command

Comments

@atakadams
Copy link

Which version of the AzCopy was used?

Note: The version is visible when running AzCopy without any argument

10.19.0

Which platform are you using? (ex: Windows, Mac, Linux)

Linux

What command did you run?

Note: Please remove the SAS to avoid exposing your credentials. If you cannot remember the exact command, please retrieve it from the beginning of the log file.

azcopy login --skip-version-check --service-principal --application-id --tenant-id

What problem was encountered?

Version check (access to azcopyvnextrelease.blob.core.windows.net) observed during successful azcopy-login execution, while the option "--skip-version-check" is expected to suppress the version check.

How can we reproduce the problem in the simplest way?

  1. Create service principal and keep your appId, password and tenant in the result.
    az ad sp create-for-rbac -n

  2. store the password into AZCOPY_SPA_CLIENT_SECRET

  3. Try azcopy login while running packet capture or any other methods to monitor network connections.
    azcopy login --skip-version-check --service-principal --application-id --tenant-id

Have you found a mitigation/solution?

The PR #1950 introduced "--skip-version-check" option, which sets azcopySkipVersionCheck to skip beginDetectNewVersion() in rootCmd().

if !azcopySkipVersionCheck {

However, there are another calls to beginDetectNewVersion() in Execute(), which is said to be effective in login/logout/help cases.

case <-beginDetectNewVersion():

I believe we also need to check azcopySkipVersionCheck flag in Execute() and skip beginDetectNewVersion() if the flag is set.

@siminsavani-msft
Copy link
Member

Hi @atakadams ! I was able to repro this issue. We will work on getting a fix out for this soon. Thank you!

@gapra-msft
Copy link
Member

This should be fixed in 10.20.0. Thanks for your patience while we got the release out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug login Bugs related a login command
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants