diff --git a/AUTHORS b/AUTHORS index 7252c1cb8a9e0c828d49c2415788dc50d480f19a..0850a48f9ced44a5a7b6b76344e41968c265f549 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,3 +5,4 @@ Alexandre Ferland (admiralobvious) Chris Seymour (iiSeymour) Timothy Allen (OptiverTimAll) +Jose Manuel (jm66) diff --git a/docs/index.rst b/docs/index.rst index 8e64674c0dd03f84ffd42de0d50c75ddaea1c03b..34064a9bfec3cc18b158510c163875e66a768aba 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -49,48 +49,54 @@ Configuration :class:`~flask_simpleldap.LDAP` understands the following configuration directives: -============================ =================================================== -``LDAP_HOST`` The host name or IP address of your LDAP server. - Default: 'localhost'. -``LDAP_PORT`` The port number of your LDAP server. Default: 389. -``LDAP_SCHEMA`` The LDAP schema to use between 'ldap' and 'ldaps'. - Default: 'ldap'. -``LDAP_USERNAME`` **Required**: The user name used to bind. -``LDAP_PASSWORD`` **Required**: The password used to bind. -``LDAP_TIMEOUT`` How long (seconds) a connection can take to be opened - before timing out. Default: 10. -``LDAP_USE_SSL`` Set to ``True`` if your server uses SSL. - Default: ``False``. -``LDAP_USE_TLS`` Set to ``True`` if your server uses TLS. - Default: ``False``. -``LDAP_REQUIRE_CERT`` Set to ``True`` if your server requires a certificate. - Default: ``False``. -``LDAP_CERT_PATH`` Path to the certificate if ``LDAP_REQUIRE_CERT`` is - ``True``. -``LDAP_BASE_DN`` **Required**: The distinguished name to use as the search base. -``LDAP_OBJECTS_DN`` The field to use as the objects' distinguished name. - Default: 'distinguishedName'. -``LDAP_USER_FIELDS`` ``list`` of fields to return when searching for a user's - object details. Default: ``list`` (all). -``LDAP_USER_OBJECT_FILTER`` The filter to use when searching for a user object. - Default: '(&(objectclass=Person)(userPrincipalName=%s))' -``LDAP_USER_GROUPS_FIELD`` The field to return when searching for a user's - groups. Default: 'memberOf'. -``LDAP_GROUP_FIELDS`` ``list`` of fields to return when searching for a group's - object details. Default: ``list`` (all). -``LDAP_GROUP_OBJECT_FILTER`` The filter to use when searching for a group object. - Default: '(&(objectclass=Group)(userPrincipalName=%s))' -``LDAP_GROUP_MEMBERS_FIELD`` The field to return when searching for a group's members. - Default: 'member' -``LDAP_LOGIN_VIEW`` Views decorated with :meth:`.login_required()` or - :meth:`.group_required()` will redirect - unauthenticated requests to this view. Default: - 'login'. -``LDAP_REALM_NAME`` Views decorated with - :meth:`.basic_auth_required()` will use this as - the "realm" part of HTTP Basic Authentication when - responding to unauthenticated requests. -============================ =================================================== +================================== =================================================== +``LDAP_HOST`` The host name or IP address of your LDAP server. + Default: 'localhost'. +``LDAP_PORT`` The port number of your LDAP server. Default: 389. +``LDAP_SCHEMA`` The LDAP schema to use between 'ldap' and 'ldaps'. + Default: 'ldap'. +``LDAP_USERNAME`` **Required**: The user name used to bind. +``LDAP_PASSWORD`` **Required**: The password used to bind. +``LDAP_TIMEOUT`` How long (seconds) a connection can take to be opened + before timing out. Default: 10. +``LDAP_USE_SSL`` Set to ``True`` if your server uses SSL. + Default: ``False``. +``LDAP_USE_TLS`` Set to ``True`` if your server uses TLS. + Default: ``False``. +``LDAP_REQUIRE_CERT`` Set to ``True`` if your server requires a certificate. + Default: ``False``. +``LDAP_CERT_PATH`` Path to the certificate if ``LDAP_REQUIRE_CERT`` is + ``True``. +``LDAP_BASE_DN`` **Required**: The distinguished name to use as the search base. +``LDAP_OBJECTS_DN`` The field to use as the objects' distinguished name. + Default: 'distinguishedName'. +``LDAP_USER_FIELDS`` ``list`` of fields to return when searching for a user's + object details. Default: ``list`` (all). +``LDAP_USER_OBJECT_FILTER`` The filter to use when searching for a user object. + Default: '(&(objectclass=Person)(userPrincipalName=%s))' +``LDAP_USER_GROUPS_FIELD`` The field to return when searching for a user's + groups. Default: 'memberOf'. +``LDAP_GROUP_FIELDS`` ``list`` of fields to return when searching for a group's + object details. Default: ``list`` (all). +``LDAP_GROUP_OBJECT_FILTER`` The filter to use when searching for a group object. + Default: '(&(objectclass=Group)(userPrincipalName=%s))' +``LDAP_GROUP_MEMBERS_FIELD`` The field to return when searching for a group's members. + Default: 'member' +``LDAP_LOGIN_VIEW`` Views decorated with :meth:`.login_required()` or + :meth:`.group_required()` will redirect + unauthenticated requests to this view. Default: + 'login'. +``LDAP_REALM_NAME`` Views decorated with + :meth:`.basic_auth_required()` will use this as + the "realm" part of HTTP Basic Authentication when + responding to unauthenticated requests. +``LDAP_OPENLDAP`` Set to ``True`` if your server is running OpenLDAP. + Default: ``False`` +``LDAP_GROUP_MEMBER_FILTER`` The group member filter to use when using OpenLDAP. + Default: '*' +``LDAP_GROUP_MEMBER_FILTER_FIELD`` The group member filter field to use when using OpenLDAP. + Default: '*' +================================== =================================================== API @@ -108,6 +114,10 @@ History Changes: +- 0.4.0: September 5, 2015 + + - Added support for OpenLDAP directories. Thanks to `@jm66 <https://github.com/jm66>`_ on GitHub. + - 0.3.0: January 21, 2015 - Fix Github issue `#10 <https://github.com/admiralobvious/flask-simpleldap/issues/10>`_, @@ -118,7 +128,7 @@ Changes: - 0.2.0: December 7, 2014 - - Added HTTP Basic Authentication. Thanks to OptiverTimAll on GitHub. + - Added HTTP Basic Authentication. Thanks to `@OptiverTimAll <https://github.com/optivertimall>`_ on GitHub. - Fix GitHub issue `#4 <https://github.com/admiralobvious/flask-simpleldap/issues/4>`_, User or group queries are vulnerable to LDAP injection. Make sure you update your filters to use '%s' instead of the old '{}'! diff --git a/setup.py b/setup.py index 90b2c4a28a89f93bd56458521f72be70ca1e3ddd..3f767179362a43237e18be4a6f3b1395f01dcdee 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ from setuptools import setup setup( name='Flask-SimpleLDAP', - version='0.3.0', + version='0.4.0', url='https://github.com/admiralobvious/flask-simpleldap', license='MIT', author='Alexandre Ferland',