<div dir="ltr"><div>Hey Guys,<br></div>We are kicking off the effort for 2-factor auth for firefox accounts. Please do check out the Mana Page for the same.<br><br><a href="https://mana.mozilla.org/wiki/display/Identity/Two+Factor+Auth+for+FxA#">https://mana.mozilla.org/wiki/display/Identity/Two+Factor+Auth+for+FxA#</a><br><p><strong>Problem statement:</strong></p><p>Implement 2 Factor
Authentication for Firefox Accounts, provide user a way to turn the 2FA
on/off. Provide set of options for the user to choose the method of 2FA
he/she prefers.</p><p><strong>Who & Schedule</strong></p><ul><li>Dev: Sai</li><li>Dev Mgr: Ryan K</li><li>Product Manager: Bill M</li><li>UX: Ryan Feeley</li><li>Tech. Program Manager: Edwin W</li><li>QA: ?</li><li>Sec Review: ?</li><li>Release end of Q3?</li></ul><p><strong>Goals:</strong></p><ol><li>Lay out the infrastructure for implementing and extending 2FA. (Requirement - Must have)</li><li>Implement Google Authenticator based 2FA. (Requirement - Must have)</li><li>Implement App-specific passwords as a fallback for older devices. (Requirement - Must have)</li><li>Implement SMS as a backup option. (Nice to have)</li><li>Implement E-Mail as a backup option. (Nice to have)</li><li>Implement WhatsAuth as a backup option. (Nice to have)</li></ol><p><strong>User Requirements</strong></p><ul><li>installation of Google Authenticator - <a href="https://en.wikipedia.org/wiki/Google_Authenticator" rel="nofollow">https://en.wikipedia.org/wiki/Google_Authenticator</a><ul><li>install includes QR code reader</li><li>Authenticator generats a one time password (OTP) which is entered into web form.</li></ul></li></ul><p><strong>Non Goals:</strong></p><ol><li>Firefox OS support</li><li>Older versions of FF on Android</li></ol><p class="">Android:<br>TBD - need to provide back end support schedule and find out timing.</p><p class="">Old Fennecs may not have screens and need message to upgrade.</p><p class=""><strong>Mocks</strong></p><ul><li class="">rfeeley WIP</li></ul><p><strong>Useful Links:</strong></p><ol><li><a href="http://garbagecollected.org/2014/09/14/how-google-authenticator-works/">http://garbagecollected.org/2014/09/14/how-google-authenticator-works/</a> --> Very good intro article on Google Auth</li><li><a href="https://www.twilio.com/blog/2013/04/add-two-factor-authentication-to-your-website-with-google-authenticator-and-twilio-sms.html">https://www.twilio.com/blog/2013/04/add-two-factor-authentication-to-your-website-with-google-authenticator-and-twilio-sms.html</a> –> Detailed article about implementing the GA and sms based 2FA.</li><li><a href="http://twilio-tfa.herokuapp.com/">http://twilio-tfa.herokuapp.com/</a> --> Demo link from the above article</li><li><a href="https://www.npmjs.com/package/otp-key">https://www.npmjs.com/package/otp-key</a> - Node based otp-key generator. This is a pseudo random key generator, and works pretty well.</li><li><a href="https://www.npmjs.com/package/otp">https://www.npmjs.com/package/otp</a> - Node based OTP generator library, and implements RFC 6238 pretty accurately.</li><li><a href="http://tools.ietf.org/html/rfc6238">http://tools.ietf.org/html/rfc6238</a> - The actual RFC - very straighforward and well documented.</li></ol><p><br></p><p><img class="" style="background-image: url("/wiki/plugins/servlet/confluence/placeholder/macro-heading?definition=e2dsaWZmeTpuYW1lPTJmYV9nYTJ9&locale=en_GB&version=2"); background-repeat: no-repeat;" src="https://mana.mozilla.org/wiki/download/attachments/48598601/2fa_ga2.png?version=1&modificationDate=1435610832777&api=v2" height="0" width="1213"></p><p><br></p><p>Requirements for implementing Google Auth:</p><ol><li>The secret key is a 32 byte sequence that we need to generate for each user who signs up for 2FA.</li><li>The
generated secret key can either be manually entered or scanned from a
QR on the client side. –> Us generating a QR code is easier for the
user and/or provide an option to copy the text(secret-key)</li><li>We need to generate a QR containing the "secret-key" along with the <a href="mailto:username@domain.com">username@domain.com</a> (unique?)</li><li>Use TOTP to generate 6 digit key – very straightforward to implement.</li><li>Scan this with Google Auth --> If user was able to do this, sign them up for 2FA with Google auth, store the secret.</li><li>Verify
and sign in every time the user signs in, the OTP can be generated on
the fly and stays active for 30 seconds on GA, so we can use the same
time interval on our app as well</li></ol><p>Content Server requirements:</p><ul><li>Form: sign in form to include google authenticator 6 char OTP field</li><li>Settings: ability to toggle 2fa on/off</li></ul><p>Auth Server requirements:</p><ul><li>need a new column in db to store 2fa secret key</li><li>auth server needs API to accept 2fa OTP value</li></ul><p><br></p><p><strong>Testing</strong></p><p><br></p><ul><li>Who?</li></ul><p><strong>Security Review</strong></p><ul><li>Who?</li></ul><p><strong>Metrics</strong></p><p>bmaggs to identify KPI</p><ul><li>Product Usage and success/failure rates<ul><li>Counts of users in the funnel</li><li>Frequency of entering OTP</li><li>Frequency of gAuthenticator, App pw, SMS, email</li><li>entry points</li></ul></li><li>Counts of encountering error/success states: 4xx, 5xx</li><li>Counts of slow queries/slow performance</li></ul><p><br></p><hr><p>Breakdown of tasks: (provisional)</p><ul><li>Update schema for DB</li><li>Set up the signup page and settings page to include the 2FA option</li><li>Set up the sign in page to validate password and the 2nd factor</li><li>Add support for recognizing "trusted devices" (like remembering them so we don't ask for the pin every time. Is this required?)</li><li>Set up the controller for generating the Secret Key</li><li>Set up the controller for generating OTP using the secret key</li><li>Set up error pages, success page for 2FA.</li></ul><br clear="all"><div><div><div><div><div class="gmail_signature"><div dir="ltr"><div>Thanking You,<br></div>Sai Pc.<br></div></div></div>
</div></div></div></div>