Moin Moin Wiki Active Directory Integration

I was trying to setup AD integration for our moinmoin wiki . Unfortunately I couldnt see that much straightforward documentation on this. Here I am sharing my settings which worked pretty well.

I have created a user wiki.admin in the AD and used that to query the Active directory .

=======================================

# Active Directory authentication  starts here
from MoinMoin.auth.ldap_login import LDAPAuth
ldap_authenticator1 = LDAPAuth (
server_uri=’ldap://adminlogs.info’,
bind_dn = ‘[email protected]’,
bind_pw = ‘password’,
base_dn = ‘DC=adminlogs,DC=info’,
scope=2,
referrals=0,
# LDAP REFERRALS (0 needed for AD)
search_filter = ‘(sAMAccountName=%(username)s)’,
givenname_attribute=’givenName’,
# often ‘givenName’ – ldap attribute we get the first name from
surname_attribute=’sn’,
# often ‘sn’ – ldap attribute we get the family name from
aliasname_attribute=None,
# often ‘displayName’ – ldap attribute we get the aliasname from
email_attribute=’mail’,
email_callback=None,
coding = ‘utf-8’,
timeout = 10,
autocreate=True,
# set to True to automatically create/update user profiles
report_invalid_credentials=True,
# whether to emit “invalid username or password” msg at login time or not
)
auth = [ldap_authenticator1, ]
# this is a list, you may have multiple ldap authenticator as well as other authenticators
cookie_lifetime = (1, 1)
# no anon user sessions, 1h session lifetime for logged-in users
# Active Directory authentication  ends here

=======================================

Add the above in your wikiconfigy.py file and restart apache ..Thats its !!  You will be able to authenticate using Active directory credentials 🙂