Commit graph

23 commits

Author SHA1 Message Date
Timothy Andrew
dbedf3a61b Address review comments from @smcgivern.
1. Remove an unnecessary (since we're fetching all the records anyway)
   `pluck` while fetching U2F registration records.

2. Align "Your device was successfully set up!" section with the "U2F
   Devices" table below.
2016-08-18 22:12:02 +05:30
Timothy Andrew
16c44a5ddd Allow naming U2F devices.
1. Display a list of U2F devices on the `two_factor_auth` page.

2. Allow deleting individual U2F devices.

3. Allow setting a (optional) name for a device (during registration).
2016-08-18 22:12:02 +05:30
Timothy Andrew
4b33c4c6d1 Load Javascript U2F library selectively.
1. Only on supported Chrome versions

2. Mainly, this lets us simplify the javascript-based U2F check to
   `window.u2f`, where `window.u2f` can either be loaded from the GitLab
   server (for Chrome) or from the Firefox extension.

3. This is a better way to provide browser detection for U2F.
2016-07-14 08:19:09 +05:30
Timothy Andrew
128549f10b Implement U2F registration.
- Move the `TwoFactorAuthsController`'s `new` action to `show`, since
  the page is not used to create a single "two factor auth" anymore. We
  can have a single 2FA authenticator app, along with any number of U2F
  devices, in any combination, so the page will be accessed after the
  first "two factor auth" is created.
- Add the `u2f` javascript library, which provides an API to the
  browser's U2F implementation.
- Add tests for the JS components
2016-06-06 12:50:31 +05:30
Robert Speicher
b0ec9529e2 Don't show any "2FA required" message if it's not actually required
Prior, if the user had enabled and then disabled 2FA, they would be
shown a "You must enable Two-factor Authentication for your account."
message when going back to re-activate it, even if 2FA enforcement was
disabled.
2016-02-29 13:58:36 -05:00
Robert Speicher
fcab1345da Update wording for 2FA requirement notice 2016-01-23 17:56:18 -08:00
Gabriel Mazetto
1249289f89 Fixed codestyle and added 2FA documentation 2015-12-24 19:01:30 -02:00
Gabriel Mazetto
b61a5bc20c specs for forced two-factor authentication and grace period
simplified code and fixed stuffs
2015-12-24 19:01:30 -02:00
Gabriel Mazetto
31fb2b7702 Grace period support for TFA 2015-12-24 19:01:30 -02:00
Gabriel Mazetto
33964469b3 WIP require two factor authentication 2015-12-24 19:00:18 -02:00
Robert Speicher
259851c0d6 Bump devise-two-factor to 2.0.0
Addresses internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2605

See https://github.com/tinfoil/devise-two-factor/pull/43
2015-09-19 21:16:18 -04:00
Robert Speicher
22724418d3 Add User#disable_two_factor!
This method encapsulates all the logic for disabling 2FA on a specific
User model.
2015-07-10 16:18:30 -04:00
Robert Speicher
b6318297fc Use User#two_factor_enabled instead of otp_required_for_login 2015-06-19 15:14:37 -04:00
Robert Speicher
ad049a8e52 Prefix 2FA issuer with the GitLab host (e.g., 'dev.gitlab.org') 2015-06-16 13:08:29 -04:00
Robert Speicher
7b879bb8bd Bump secret key length to 32 2015-05-23 18:47:53 -04:00
Robert Speicher
e73ea12695 Add support for manually entering 2FA details 2015-05-23 15:04:40 -04:00
Robert Speicher
414ddc0021 Clear all 2FA-related fields when user disables the feature 2015-05-09 17:32:49 -04:00
Robert Speicher
6369d23d58 Fix nav and layout for TwoFactorAuthsController 2015-05-09 17:32:08 -04:00
Dmitriy Zaporozhets
8ae712ae28 Render 2fa recovery codes instead of downloading it 2015-05-09 17:31:39 -04:00
Dmitriy Zaporozhets
802fcd051f Add support for backup codes 2015-05-09 17:31:37 -04:00
Dmitriy Zaporozhets
50a2a229e7 Fix rubocop complain 2015-05-09 17:31:10 -04:00
Dmitriy Zaporozhets
cde474a49f Make 2 factor authentication work 2015-05-09 17:31:10 -04:00
Dmitriy Zaporozhets
ba7e2fd946 Create Two-factor authentication resource for user 2015-05-09 17:31:10 -04:00