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

Will there be an option for 2FA #43

Open
nickkostov opened this issue Dec 4, 2022 · 3 comments
Open

Will there be an option for 2FA #43

nickkostov opened this issue Dec 4, 2022 · 3 comments

Comments

@nickkostov
Copy link

Error: {"detail":"Require secondary authentication on MFA enabled account","login_2fa_token":

It terms of security it would be very nice to have this feature available bypassed with API token.

@meysam81
Copy link

Any movement on this one @BarnabyShearer?

@ghost
Copy link

ghost commented Oct 31, 2023

I am also interested in access using personal access tokens.

@dannysauer
Copy link

dannysauer commented Aug 9, 2024

Based on https://docs.docker.com/docker-hub/api/latest/#tag/authentication/operation/PostUsers2FALogin, you need to provide that second factor token in a second round of authentication. That part isn't the end of the world, but the problem is that you'll need to find a way to get a TOTP value into Terraform as part of the provider. That probably means specifying it as an input variable, since you can't use a data source value inside the provider definition.

Using the standard TOTP skew, there's about a 30 second window, worst case (retrieved at the end of the normal 30 second cycle), where an "expired" token will still be valid. I'm not particularly confident that a large terraform policy set will necessarily get around to initializing the provider in that window after fetching the value in an external program right before kicking off terraform plan/apply. :(

This seems to my understanding more like a Dockerhub terrible API problem than something easily fixed in a Terraform provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants