DokuWiki mit Active Directory verbinden
Geschrieben von andy • Mittwoch, 18. Februar 2009 • Kategorie: combjuta![]()
Seit geraumer Zeit ist bei uns das freie Wikisystem DokuWiki im Einsatz.
Um die Ergonomie und Verwaltung zu erleichtern, haben wir das wiki an unser ActiveDirectory angebunden.
Die Authentifizierung aus verschiedenen Netzen macht modldap:
Apache Vhost config:
# LDAP Authentication & Authorization is final; do not check other databases
AuthzLDAPAuthoritative off
# Do basic password authentication in the clear
AuthType Basic
# The name of the protected area or "realm"
AuthName "Use AD Account for authentification"
AuthBasicProvider ldap
# Active Directory requires an authenticating DN to access records
# This is the DN used to bind to the directory service
# This is an Active Directory user account
AuthLDAPBindDN "CN=USERNAME,OU=P-R,OU=P,OU=Organization,DC=intranet,DC=dmz"
# This is the password for the AuthLDAPBindDN user in Active Directory
AuthLDAPBindPassword "PASSWORD"
# The LDAP query URL
# Format: scheme://host:port/basedn?attribute?scope?filter
# The URL below will search for all objects recursively below the basedn
# and validate against the sAMAccountName attribute
# AuthLDAPURL "ldap://DOMAINCONTROLLER IP/HOST:389 OU=Organization,DC=intranet,DC=dmz?sAMAccountName?sub?(objectClass=*)"
AuthLDAPURL "ldaps://DOMAINCONTROLLER IP/HOST:636/OU=Organization,DC=intranet,DC=dmz?sAMAccountName?sub?(objectClass=*)"
AuthUserFile /dev/null
# Require authentication for this Location
Require valid-user
ModLDAP gibt die Credentials dann an Dokuwiki weiter, welches uns über das Plugin Auth:AD authentifiziert:
local.php
// configure your Active Directory data here
$conf['auth']['ad']['accountsuffix'] = '@intranet.dmz';
$conf['auth']['ad']['basedn'] = 'DC=intranetDC=dmz';
$conf['auth']['ad']['domaincontrollers'] = 'DOMAINCONTROLLER IP/HOST'; //multiple can be given
$conf['auth']['ad']['sso'] = 1;
$conf['auth']['ad']['adusername'] = 'USERNAME';
$conf['auth']['ad']['adpassword'] = 'password';
$conf['auth']['ad']['realprimarygroup'] = 1;
$conf['auth']['ad']['usessl'] = 1;
$conf['auth']['ad']['debug'] = 0;
Die Superuser Gruppe enthält alle User, die im Wiki Admin Rechte bekommen sollen:
$conf['superuser'] = '@grlokwikiadmin';
Zugriffe kann man dann ganz normal über das ACL plugin verteilen und in der acl.auth.php von DokuWiki konfiguriert werden. Aufpassen muss man allerdings bei Benutzergruppen die Sonderzeichen enthalten:
acl.auth.php
@gr%5flok%5falle 8
Die Gruppe "grlokallle" enthält uneingeschränkten Zugriff auf alle Wiki Seiten. Das Sonderzeichen "" muss mit "%5f" escaped werden.
acl.auth.php
production: @ALL 0
production:* @gr%5flok%5fbetrieb 8
Der Namespace "production" darf von niemandem gelesen werden, die Gruppe "grlok_betrieb" hat uneingeschränkten Zugriff.
| Top Exits (329)







