-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
s3 remote: DVC asks MFA code for each file on push/pull #2791
Comments
Temporary workaround: https://discordapp.com/channels/485586884165107732/485596304961962003/644334026311598124 |
To get the above workaround working, I had to remove the |
Might be solved by caching the session #2473 (comment) , but need to confirm. |
Looked it up. This probably won't be solved by threadsafe caching Need to ask the user how MFA device is set. |
Another user is experiencing this same issue. https://discordapp.com/channels/485586884165107732/485596304961962003/656143281163599885 |
We could solve it the same way we do it with passphrase-s for ssh, by using |
From https://docs.aws.amazon.com/cli/latest/topic/config-vars.html
need to take a closer look. |
Might be related https://github.com/mixja/boto3-session-cache |
It feels to me that we are not caching some boto session properly, thus preventing it from caching an access token. |
@efiop your related lib says it is not needed anymore:
|
Hey, my organization recently switched to MFA style access control for our s3 buckets. While trying to run dvc push i get the prompt for MFA code 33 times and once I enter the code it another prompt is appended after the TQDM progress bar.
|
@drisspg Thanks for the suggestion! We've been migrating to fsspec this year and we've fully switched to https://github.com/dask/s3fs as a backend a few months back. @drisspg if you can, it would be great if you could confirm that this works for you now natively. 🙏 |
I am unable to get this to work. I set the env var: It prompts for my MFA code multiple times and says that it is not valid:
I get prompted multiple times to enter mfa code. When I use the source script the MFA code is working correctly so the mfa token shouldn't be wrong. |
@drisspg Thanks for trying it out! Reopening. Looks like we need to take a closer look. IIRC, currently you need to generate How do you normally use it with things like |
I have my credentials set in the ~/.aws/credentials file and use different profiles Is there further documentation somewhere about getting dvc to work with s3 and mfa I can try? |
@drisspg Not really, usually those are all the options you need to configure. We are not able to reproduce so far, looks like it might be something with your environment, not sure 🙁 Closing for now. Happy to take another look if you could produce a reproducible example. |
The setup described in the "Using temporary credentials with named profiles" section here should allow you to use profiles + MFA https://aws.amazon.com/premiumsupport/knowledge-center/authenticate-mfa-cli/ Essentially you need to use |
Context:
https://discordapp.com/channels/485586884165107732/485596304961962003/644313703038189568
Might be related:
boto/boto3#1179
The text was updated successfully, but these errors were encountered: