2015-08-12 18:58:27 -05:00
|
|
|
Gogs LDAP Authentication Module
|
|
|
|
===============================
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 18:58:27 -05:00
|
|
|
## About
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 18:58:27 -05:00
|
|
|
This authentication module attempts to authorize and authenticate a user
|
|
|
|
against an LDAP server. Like most LDAP authentication systems, this module does
|
|
|
|
this in two steps. First, it queries the LDAP server using a Bind DN and
|
|
|
|
searches for the user that is attempting to sign in. If the user is found, the
|
|
|
|
module attempts to bind to the server using the user's supplied credentials. If
|
|
|
|
this succeeds, the user has been authenticated, and his account information is
|
|
|
|
retrieved and passed to the Gogs login infrastructure.
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 18:58:27 -05:00
|
|
|
## Usage
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 18:58:27 -05:00
|
|
|
To use this module, add an LDAP authentication source via the Authentications
|
|
|
|
section in the admin panel. The fields should be set as follows:
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* Authorization Name **(required)**
|
|
|
|
* A name to assign to the new method of authorization.
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* Host **(required)**
|
|
|
|
* The address where the LDAP server can be reached.
|
|
|
|
* Example: mydomain.com
|
2015-08-12 18:58:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* Port **(required)**
|
|
|
|
* The port to use when connecting to the server.
|
|
|
|
* Example: 636
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* Enable TLS Encryption (optional)
|
|
|
|
* Whether to use TLS when connecting to the LDAP server.
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* Bind DN (optional)
|
|
|
|
* The DN to bind to the LDAP server with when searching for the user.
|
2015-08-12 18:58:27 -05:00
|
|
|
This may be left blank to perform an anonymous search.
|
2015-08-12 19:08:16 -05:00
|
|
|
* Example: cn=Search,dc=mydomain,dc=com
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* Bind Password (optional)
|
|
|
|
* The password for the Bind DN specified above, if any.
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* User Search Base **(required)**
|
|
|
|
* The LDAP base at which user accounts will be searched for.
|
|
|
|
* Example: ou=Users,dc=mydomain,dc=com
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* User Filter **(required)**
|
|
|
|
* An LDAP filter declaring how to find the user record that is attempting
|
2015-08-12 18:58:27 -05:00
|
|
|
to authenticate. The '%s' matching parameter will be substituted with
|
|
|
|
the user's username.
|
2015-08-12 19:08:16 -05:00
|
|
|
* Example: (&(objectClass=posixAccount)(uid=%s))
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* First name attribute (optional)
|
|
|
|
* The attribute of the user's LDAP record containing the user's first
|
2015-08-12 18:58:27 -05:00
|
|
|
name. This will be used to populate their account information.
|
2015-08-12 19:08:16 -05:00
|
|
|
* Example: givenName
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* Surname name attribute (optional)
|
|
|
|
*The attribute of the user's LDAP record containing the user's surname
|
2015-08-12 18:58:27 -05:00
|
|
|
This will be used to populate their account information.
|
2015-08-12 19:08:16 -05:00
|
|
|
* Example: sn
|
2014-04-22 11:55:27 -05:00
|
|
|
|
2015-08-12 19:08:16 -05:00
|
|
|
* E-mail attribute (required)
|
2015-08-12 18:58:27 -05:00
|
|
|
The attribute of the user's LDAP record containing the user's email
|
|
|
|
address. This will be used to populate their account information.
|
2015-08-12 19:08:16 -05:00
|
|
|
* Example: mail
|