357 points · by captn3m0 · 8y ago · 127 comments
Right now I do something similar, but I have to keep a list of which accounts I need to add to key 2, and the key is offsite, so I have a several week period during which an account only has one key associated with it.
Maybe techie personal users have more than one, but I only carry one device (a yubikey) for work, someone at work can reset my MFA if I lose it.
I'd be surprised if "most" people have a backup device/codes.
It’s also helpful when you use a key that lives in a machine to not have to remove it. If you lose the machine, use another key to sign in and disavow the lost key.
If I have one key and someone takes it, I know it immediately.
If I have 2 keys and someone steals my spare, then I might not realize it for quite some time.
Really? I'd expect someone who's paying $50 for a yubikey to spend another $100 to have a backup key, a key for their laptop, and one for their desktop. Add another one for your keychain if you are using it on your phone (if your phone supports it).
It stores your secrets in plain text on the phone without any secure enclave. If your backup password is sniffed or there is a flaw in Authy or your mobile OS sandboxing fails you are toast.
With Yubico's authenticator, you store the secrets ontp your Yubikey. This means you can reset your phone and still be able to use the same TOTP shared secrets. Or if that matters, ask a friend to install the app and use your Yubikeys to get the TOTP.
You now have a backup login, it just has a different username too.
AWS EKS is a good example for anyone who has had a play already.
We eyed on switching from kops to EKS. But immediately stepped down after experiencing so many issues.
Why?!?! :(
LastPass for example
EDIT: "Fallback" is to have root account remove your IAM user 2FA. If root account 2FA is lost they have a few alternative verification options like email or phone call. [1]
1: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credenti...
AWS makes it super quick and easy to remove lost 2FA devices using the root account, so it doesn't really matter as much as losing your 2FA for a crypto exchange or whatever where it's going to take at least a week or two to reset. Just keep TOTP on the root account, since you shouldn't be logging into that on a regular basis anyway.
With TOTP, you could still use API keys to interact with the API. Is that also true of U2F?
https://github.com/coinbase/assume-role
edit: and apparently it doesn't work with this... :'(
- Requiring the attestation cert and not accepting a self-signed one—which U2F devices will magically not work? I don’t know, but apparently it’s strictly Yubikeys now.
- Still not convinced anyone seriously uses the console except for root accounts, where AWS forces you to.
- Only one U2F key? Bad. Only one U2F key and overall only one MFA method at all, disabling MFA where it matters most? Baffling.
- The legacy U2F API instead of just using WebAuthn already?
This is one of those things where I keep thinking I should just open source the SAML thing that safely gets an assertion to your CLI where you can assume-role with it, but who knows when AWS is going to decide to reimplement your project.
Atleast Krypton doesnt' work, neither do Titan keys it seems.
I would consider they did that on purpose in some kind of deal with yubico. But given the general level of 'buring-pile-of-failure' AWS manages to produce around the console, it is probably just that they didn't know
It makes no security sense to check attestation if your second factor is optional. How could a non-Yubico second factor make things worse compared to not using one? It couldn't. If you really, really care then store the attestations so that when fifty customers claim their U2F was broken into you can show that they all have Crap Co. FIDO tokens and point the finger at Crap Co. that's the absolute most that makes any sense with attestation.
Now, if second factor is _mandatory_ then it could make sense to decide OK, we trust Mattel, Apple and LexCorp but not HP, Tyrell Corp, or Weyland-Yutani. It's anticipated that banks (in fifty years when they hear about this new-fangled FIDO technology) would want that, giving customers their own tokens with their own attestation certs. But for an outfit like AWS this option makes no sense, so the correct design is to Never Ask, and if some higher-up insists on asking, just store the answer (including "No, fuck off") with the user's account and press on anyway.
For the access keys, you should look into things like aws-vault, which wrap the STS so that your shell is only ever handling temporary session-bound keys.
Thanks for the tip.
https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_us...
[1] https://blog.trezor.io/secure-two-factor-authentication-with... [2] https://trezor.io/passwords/
1: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credenti... ("You can enable one MFA device (of any kind) per root user or IAM user.")
I have a Yubikey for my LastPass. I lived with a single key for over a year. I finally got two more. I'm not sure why I made myself so nervous / stressed those 12+ months.
In my case all AWS accounts have a root user that has MFA enabled and that secret key is stored in a password vault. When a root user login is needed the key is plugged into an OTP application, tasks are performed and then the key is removed from the application.
I do however miss MFA when using the AWS CLI. A lot of my clients require MFA enabled when assuming a role in their account.
The link to "see information about supported configurations" is 404: https://docs.aws.amazon.com/iam/mfa-u2f-config
Hopefully this practice remains limited. I really don't want haul a bag of different security keys around with me to access all of my services.
What are the pros/cons?
Best practice for a user would be to use a good password manager (so you can use long, unique, secure passwords) and MFA. The second part of that is something that can actually be enforced within an organization.
As far as Yubikey vs software TOTP, etc, it's a bit theoretical. AFAIK, none of the auth apps have had compromises, but it's a lot easier to imagine someone out there figuring out a 0-day attack on a piece of software running on random Android and iOS devices than on hardware like a Yubikey. In theory, the way something like Yubikey works, the actual "secret" involved is stored on the device, and all the computation involving it happens on the device itself, carried out by hard-coded firmware.
As a user, I also really like that the Yubikey (higher end models at least) can store GPG keys and perform those operations securely. So I can set up GPG auth for SSH to servers, and sign my git commits using my Yubikey and know that my private key won't be exposed even if, eg, there's a trojan installed on my workstation. (obviously anything done while working on a trojaned machine is suspect, but the key itself never leaves the hardware, so they can't get that).
Not using a U2F key makes you susceptible to phishing attacks.
U2F credentials are tied to a particular domain, and so do not rely on the user making sure they are on the correct website. As such, they are not susceptible to typical credential phishing attacks.
It probably supports U2F, without all the privacy invasion of Google.