The external authentication module makes it possible to authenticate against authentication sources outside of SilverStripe. This might be a LDAP server, a mailserver etc. The main purpose of the module is to allow for single source authentication.
The module is designed in such a way that it should easily be expandable with new authentication sources. At the moment LDAP, IMAP, POP3, FTP, HTTP and SilverStripe are supported, in encrypted and non encrypted variants. If the LDAP schema is set up for POSIX type authentication, account expiry is supported.
For sources that do not support locking of accounts after a login has failed too many times, the module can also use SilverStripes built-in account locking mechanism, which locks an account for 20 minutes after a set number of failures.
It is possible to define multiple authentication backends. A user can then choose his source, or, if the user logs on with his e-mail address, the source is selected automatically.
SilverStripe keeps its own user database. By default, if a username does not exists within SilverStripe, access to the CMS is denied, even if the user authenticated successfully against the external source. However, by changing a setting users could be automatically added to the SilverStripe user database if they successfully authenticate.
WARNING You should use this functionality only if you have the external authentication source under your control.
Users that are automatically added are member of a preset group which you must create and configure yourself. The name of this group is also configurable. When using the LDAP driver, you can define a mapping of LDAP groups onto Silverstripe groups. Group memberships are dynamic and checked on each login. (currently SVN version only)
If you use LDAP for authentication, you can set it up to automatically determine the users name and e-mail address. The module can handle the event of a changed mail address (but only if another unique property is defined for the source in question).
The configuration of an authentication source can be troublesome, especially if you are using an LDAP directory. The module provides a debug log mechanism to help you troubleshoot problems. There are also 2 possibilities for audit logging, to file or use Silverstripe's internal mechanism (database table)
If you have an external website, but you want to prevent exposing your authentication source to the Internet (what you are doing if you expose http://yoursite/admin to the Internet), the module also allows you to define which networks are valid for your authentication source (IPv4 and SVN version only)
Requirements
Installation of the module is real easy
You should now have an “External Account” tab on the admin page.
Log in as the administrative user (using the normal e-mail/password authentication) and add the external source and account names to their SilverStripe accounts. From that moment on, users will be able to logon to SilverStripe, with their external authentication source accountname and password.
You might want to set the SilverStripe password of the user to an empty string. This prevents the user from logging on without using the External Authentication source.
If you do not use other authentication sources you can disable them.
Disabling OpenID: Open auth_openid/_config.php and comment out
Authenticator::register_authenticator('OpenIDAuthenticator');
Disabling SilverStripes built-in mechanism: auth_external/_config.php and add
Authenticator::unregister('MemberAuthenticator');
to the top.
If you only want to set External Authentication as the default you can add ”
Authenticator::set_default_authenticator('ExternalAuthenticator');
in this modules _config.php (after the “Authenticator::register” line)
How to:
This module can be extended by adding new drivers. Some generic drivers are already included with the module. If users create their own, more specific, drivers they can be published on this wiki page.
Each driver archive consists of a php file which goes in the code/drivers directory and a configuration template named _config.[driver name]. This file can be used in the module root (renamed as _config.php). Instructions may vary on a driver by driver basis. See documentation in the driver archive.
Drop me an e-mail (address in the module README) if you want your driver reviewed or want to keep informed on any changes in the module that have an impact on the driver code.
Simple Machines Forum driver by Matt Hardwick
Please use comments for notes, tips and corrections about the described
functionality.
Use the Silverstripe Forum to
ask questions.