Ldap
Konfigurace LDAP¶
Systém DHIS2 umí pro ověřování uživatelů používat server LDAP. Pro ověřování LDAP je nutné mít v databázi DHIS2 odpovídajícího uživatele pro každou položku LDAP. Uživatel DHIS2 bude použit pro zastupování autorit / uživatelských rolí.
To set up LDAP authentication you need to configure the LDAP server URL, a manager user and an LDAP search base and search filter. This configuration should be done in the DHIS 2 configuration file dhis.conf. LDAP users, or entries, are identified by distinguished names (DN from now on). An example configuration looks like this:
# LDAP server URL
ldap.url = ldaps://domain.org:636
# LDAP manager entry distinguished name
ldap.manager.dn = cn=johndoe,dc=domain,dc=org
# LDAP manager entry password
ldap.manager.password = xxxx
# LDAP base search
ldap.search.base = dc=domain,dc=org
# LDAP search filter
ldap.search.filter = (cn={0})
Vlastnosti konfigurace LDAP jsou vysvětleny níže:
- ldap.url: Adresa URL serveru LDAP, pro který se má ověřovat naproti. Důrazně doporučujeme používat SSL / šifrování make authentication secure. As example URL is ldaps://domain.org:636, kde ldaps odkazuje na protokol, domain.org odkazuje na název domény nebo IP adresu a 636 odkazuje na port (636 je výchozí pro LDAPS).
- ldap.manager.dn: Pro připojení je vyžadován uživatel správce LDAP server LDAP pro proces ověřování uživatele. Tato vlastnost odkazuje na DN tohoto záznamu. Tj. toto není uživatel, který to udělá be authenticated when logging into DHIS2, rather the user which binds to the LDAP server in order to do the authentication.
- ldap.manager.password: Heslo pro uživatele správce LDAP.
- ldap.search.base: Základ hledání nebo rozlišující název the search base object, which defines the location in the directory from which the LDAP search begins.
- ldap.search.filter: Filtr pro odpovídající DN záznamů v LDAP directory. The {0} variable will be substituted by the DHIS2 username, or alternatively, the LDAP identifier defined for the user with the supplied username.
DHIS2 will use the supplied username / password and try to authenticate against an LDAP server entry, then look up user roles / authorities from a corresponding DHIS2 user. This implies that a user must have a matching entry in the LDAP directory as well as a DHIS2 user in order to log in.
During authentication, DHIS2 will try to bind to the LDAP server using the configured LDAP server URL and the manager DN and password. Once the binding is done, it will search for an entry in the directory using the configured LDAP search base and search filter.
The {0} variable in the configured filter will be substituted before applying the filter. By default, it will be substituted by the supplied username. You can also set a custom LDAP identifier on the relevant DHIS2 user account. This can be done through the DHIS2 user module user interface in the add or edit screen by setting the "LDAP identifier" property. When set, the LDAP identifier will be substituted for the {0} variable in the filter. This feature is useful when the LDAP common name is not suitable or cannot for some reason be used as a DHIS2 username.