Two-step verification in Plone 4 using login codes sent by SMS.
Two-step verification for Plone 4 with use login codes sent by SMS. This app allows users to enable the two-step verification for their Plone accounts. A mobile phone with ability to receive SMS messages is obviously required. Usage of two-step verification is optonal, unless site admins have forced it ( configurable in app control panel). Admins can white-list the IPs, for which the two-step verification would be skipped.
- Mobile phone which is able to receive SMS messages.
- Plone 4 (tested with Plone >= 4.3.1)
Case 1: Enabling the two-step verification
Pre-conditions: User is not logged into the Plone site, does not yet have two-step verification enabled and has a mobile phone.
From any page follow the “Enable two-step verification” link in the menu (next to “Log out”).
If you haven’t yet filled in your mobile phone number, you will be requested to do so. You will receive immeditely a SMS with confirmation code in.
When you’re done, you get to a page on which you will be requested to enter the code received by SMS.
Enter the secret code shown in the “Enter the verification code to activate two-step verification” field for confirmation and press the “Verify” button.
Upon successful confirmation (you should see a message stating that) the two-step verification is enabled for your account.
Case 2: Two-step verification
Pre-conditions: User is not logged in and has enabled the two-step verification.
When you log into the Plone site (just using username and password), you would see an extra screen on which you are asked to provide the login code, sent to your by SMS.
You should then check your phone for the new SMS message and type in the token shown into the “Enter code” field.
If token is valid, you would be logged in.
Case 3: Lost mobile phone or phone number
Pre-conditions: User is not logged in, has enabled the two-step verification.
There might be cases when you have lost your mobile phone (either really lost it or broken accident or somehow lost ownership of your former mobile number). For such cases, you can reset the phone number.
Log into the Plone site (just using username and password), for to see the extra screen on which you are asked to provide the login code, sent to your by SMS and follow the link (help text of the “Enter code” field). You would then land on the page where from you can request the bar code reset.
Enter your username and mobile number in the “Username” and “Mobile number” fields respectively, press the “Submit” button. Link for resetting your mobile number will appear in your mailbox shortly. Having clicked on the link to reset the mobile number, would bring your to a page where you can enter the verification code.
You will receive an SMS with verification code shortly. Enter the code in the “Enter the verification code to activate the two-step verification” field.
Upon successful confirmation (you should see a message stating that) your bar code is reset.
Case 4: Disabling the two-step verification
Pre-conditions: User is logged in and has enabled the two-step verification.
From any page follow the “Disable two-step verification” link in the menu (next to “Log out”).
After which you would get a message.
>>> [instance] >>> eggs += >>> collective.smsauthenticator
>>> zcml += >>> collective.smsauthenticator
ZMI -> portal_quickinstaller
Choose “SMS Authenticator Plone” and install it.
ZMI -> acl_users
Choose “sms_auth (SMS Authenticator plugin (collective.smsauthenticator))”.
Make sure the “Active plugins” section of “Authentication” has the following plugins in the given order (“sms_auth” should come as first - critical!):
App control panel can be accessed at http://your-plone-site.com/@@sms-authenticator-settings
If checked, two-step verification is globally force-enabled for all site users and they no longer have an option to disable it; this applies to all new users (just registered accounts) as well.
White-listed IP addresses
List of white-listed IP addresses - one at a line. If user comes from one of those, the two-step verification is skipped even if user has enabled it or two-step verification is globally enabled.
Additionals options of the control panel are:
- Enable two-step verification for all users.
- Disable two-step verification for all users.
Site secret key - can be any string. See it as some sort of a password.
Lifetime of the login- and the mobile number reset- codes. Defaults to 5 minutes (300 seconds).
It’s important that SMS Authenticator comes as first in the ZMI -> acl_users -> Authentication.
Tested in combination with the following products:
- The Products.LoginLockout. SMSAuthenticator comes as first, LoginLockout as second. All works fine.
See the documentation at:
For feature requests or bugs, open an issue. For questions, send us an email to firstname.lastname@example.org.
TODOs and Roadmap
See TODOS.rst file for the list of TODOs.
- Improved help texts.
- Adding admin helper views for viewing IPs that users have been using when logging in.
- Increasing number of chars in the SMS token from 6 to 8.
- Number of fixes and improvements.
- Fixes in translations.
- Fixed lost Plone info status message on mobile number (re)set.
- Better success message on mobile number (re)set.
- Taking out an extra step with logging in for the first time. Instead, logging it the user after the confirmation of the mobile.
- Having the username filled in setting up the mobile number for the first time, since at that point it’s already known.
- Initial release, with two-step verification, IP white-listing, configurable lifetime for the login codes, mobile number recover and app control panel.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|collective.smsauthenticator-0.2.6.tar.gz (42.1 kB) Copy SHA256 hash SHA256||Source||None||Jun 19, 2014|