Two Factor local login proposal

Remember to have an admin escape hatch to remove 2FA from the account, because you’re going to get people who didn’t set up enough backups. I suggest strong wording along the lines of “Please make extra sure this request is actually from the person who owns the account!”

You could even have an email notification “2FA Removal Requested” and mandatory time delay + cancel link, but that does feel like it might be overkill?

On a technical note, I think there’s value in having a single second_factor_data table containing all the methods registered to accounts, instead of spreading it out over multiple tables - that way, making the management UI for removing and auditing your 2FA methods only needs a single query.

user_id method created_at last_used data
208 totp 2018-01-10 … 2018-01-11 … 9bJGDVffCc6G58Epr1xJ
208 recovery 2018-01-10 … NULL JFMYBZCVZ8
208 recovery 2018-01-10 … NULL VJND3AECEH
208 recovery 2018-01-10 … NULL D4KL2WYZYL
208 recovery 2018-01-10 … NULL R6AYTHTIHO
208 u2f 2018-01-12 … 2018-01-12 … {“version”:“U2F-V2”,“keyHandle”:“d7AIn-S2cx7n2GgttorX_w”, “publicKey”:“MIIDnzCCAoegAwI…”}
136 webauthn-tpm 2018-01-07 … 2018-01-12 … {“publicKey”:“MIIDnzCCAoegAwI…”, …}
136 recovery 2018-01-07 … NULL VTXFPJJGWE

I had a little bit written about plugins adding extra methods, but there isn’t really anything mature other than U2F right now.

4 Likes