Patch #1237

Add support for one time passwords or two-factor authentication

Added by Sam McCoy over 9 years ago. Updated 11 days ago.

Status:Needs feedbackStart date:2008-05-14
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Accounts / authentication
Target version:4.1.0

Description

Please add support for a one time password service, such as Yubikey, and add the ability to authenticate against a two-factor authentication system (as in RSA SecurID).

0002-2-factor-authentication-disabled-enabled-required.patch Magnifier (13.8 KB) Felix Schäfer, 2018-01-02 18:42

0001-2-factor-authentication-using-TOTP.patch Magnifier (30 KB) Felix Schäfer, 2018-01-02 18:42

0003-Backup-codes-for-2-factor-authentication.patch Magnifier (18.8 KB) Felix Schäfer, 2018-01-02 18:42

2fa-setting@2x.png (55.4 KB) Go MAEDA, 2018-01-04 07:30

2fa-my-account@2x.png (45.5 KB) Go MAEDA, 2018-01-04 07:34

2fa-enabling@2x.png (26.1 KB) Go MAEDA, 2018-01-04 07:35

2fa-enter-auth-code@2x.png (15.4 KB) Go MAEDA, 2018-01-04 07:39


Related issues

Related to Redmine - Feature #699: OpenID login Closed 2008-02-20

History

#1 Updated by Thomas Lecavelier over 9 years ago

Good idea. Since OpenID (#699) should be implemented too, it could be an idea to build a plugin system for authentication, to help introduction of a new authentification systems.

#2 Updated by Etienne Massip over 6 years ago

  • Category set to Accounts / authentication

#3 Updated by Nathanael Hansen over 3 years ago

+1 for dual-factor authentication support

Thanks!

#4 Updated by Blagoy Chepelov almost 3 years ago

+1 for two factory auth, YubiKey for instance it is open source and well documented

#5 Updated by Ouss Orange over 2 years ago

+1 for Two Factory Authentication support

#6 Updated by eric c about 2 years ago

+1 for Two Factory Authentication, maybe using the one-time-password with the Google Authenticator App

#7 Updated by Stephen Yeargin over 1 year ago

This page (http://developers-club.com/posts/168063/) describes a potential method of using a low-level service to achieve this. It looks fairly complicated to set up, but it may help somebody. Would love to hear if it works.

#8 Updated by Fabián Rodríguez 12 months ago

There is a plugin for 2FA including support for SMS, Telegram and authenticator apps:
http://www.redmine.org/plugins/redmine_2fa

#9 Updated by Felix Schäfer 16 days ago

Please find attached a proposed 2-factor authentication implementation for Redmine. The core logic for the TOTP scheme is implemented using the rotp gem.

The first of the 3 attached patches is an extendable implementation of 2-factor authentication including a default TOTP scheme. The second patch adds an option to require, optionally enable or disable 2-factor authentication for all users. The third patch adds support for creating and using backup codes.

The feature is implemented so that new 2-factor authentication schemes other than TOTP can easily be added, for example in a plugin. All scheme-specific localisation strings have a __#{scheme}__ identifier, generally this is easier to do with namespaces, i.e. twofa.#{scheme}.some_string instead of twofa__#{scheme}__some_string, but the current Redmine tooling only supports top-level localisation keys.

Please furthermore note that the base 2-factor authentication is structured so that it can accommodate computed second factors (TOTP, HOTP, Keyfobs, …) or sent second factors (sending the code via SMS, telegram, …). Those sent second factors can contain a link with the code as query parameter so that the user can click on the link instead of copying the code into the text field in Redmine, which is why all actions that accept a 2-factor authentication code are also available via the GET verb.

We have rolled out this feature to Planio a few weeks ago, the customers that use this feature have been happy with it so far.

Last but not least, we have created a plugin implementing a 2-factor email scheme to demonstrate how additional schemes can be implemented, and how a scheme sending the one-time-password instead of using a generated one can work with the patches proposed above. Please note that this plugin is only for demonstration purposes and should probably not be used in production, refer to the "Security considerations" section of the README for more details.

#10 Updated by Jan from Planio www.plan.io 16 days ago

  • Target version set to Candidate for next major release

#11 Updated by Jan from Planio www.plan.io 16 days ago

  • Tracker changed from Feature to Patch
  • Status changed from New to Needs feedback

#12 Updated by Go MAEDA 14 days ago

Thank Felix and Planio for sharing the patch. I think this is an outstanding enhancement because 2FA is helpful to keep accounts secure and it is a must-have feature for modern cloud-based applications. Many users should welcome this feature.

I tried out the patch. It works very fine.

2FA is optional by default. Users can choose whether to use 2FA or not:

Users can enable 2FA on "My account" page:

Enabling 2FA:

One time password is required as well as login id and password when you sign in:

#13 Updated by Go MAEDA 11 days ago

  • Target version changed from Candidate for next major release to 4.1.0

Setting target version to 4.1.0.

Also available in: Atom PDF