diff options
author | Michael Scherer <misc@mageia.org> | 2011-06-18 15:35:41 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-06-18 15:35:41 +0000 |
commit | cfbd3ed08a0d6b5c36828ee957312738d4f91c52 (patch) | |
tree | 31f803026d97f30d6303ac4eb5c46e5459c27069 /modules/mediawiki | |
parent | 69208ff1ebbd865cb7433808d8fe6d32c5a609ea (diff) | |
download | puppet-cfbd3ed08a0d6b5c36828ee957312738d4f91c52.tar puppet-cfbd3ed08a0d6b5c36828ee957312738d4f91c52.tar.gz puppet-cfbd3ed08a0d6b5c36828ee957312738d4f91c52.tar.bz2 puppet-cfbd3ed08a0d6b5c36828ee957312738d4f91c52.tar.xz puppet-cfbd3ed08a0d6b5c36828ee957312738d4f91c52.zip |
add support for ldap in the mediawiki config ( untested yet )
Diffstat (limited to 'modules/mediawiki')
-rw-r--r-- | modules/mediawiki/manifests/init.pp | 2 | ||||
-rw-r--r-- | modules/mediawiki/templates/LocalSettings.php | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/modules/mediawiki/manifests/init.pp b/modules/mediawiki/manifests/init.pp index db982326..0b091e6f 100644 --- a/modules/mediawiki/manifests/init.pp +++ b/modules/mediawiki/manifests/init.pp @@ -29,7 +29,6 @@ class mediawiki { } # TODO create the ldap user - $ldap_password = extlookup('mediawiki_ldap','x') # TODO write the web configuration apache::vhost_base { "wiki.$domain": @@ -84,6 +83,7 @@ class mediawiki { refreshonly => true, onlyif => "test -d $wiki_root/config", } + $ldap_password = extlookup('mediawiki_ldap','x') file { "$wiki_root/LocalSettings.php": ensure => present, diff --git a/modules/mediawiki/templates/LocalSettings.php b/modules/mediawiki/templates/LocalSettings.php index 3e0fe5d2..8a0a60e4 100644 --- a/modules/mediawiki/templates/LocalSettings.php +++ b/modules/mediawiki/templates/LocalSettings.php @@ -123,4 +123,27 @@ $wgDiff3 = "/usr/bin/diff3"; # sure that cached pages are cleared. $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); +require_once 'extensions/LdapAuthentication.php'; +$wgAuth = new LdapAuthenticationPlugin(); + +$wgLDAPDomainNames = array( 'ldap'); +#TODO make it workable with more than one server +$wgLDAPServerNames = array( 'ldap' => 'ldap.<%= domain %>' ); + +$wgLDAPSearchStrings = array( 'ldap' => 'uid'); + +$wgLDAPEncryptionType = array( 'ldap' => 'tls'); + +$wgLDAPBaseDNs = array( 'ldap' => 'ou=People,<%= dc_suffix %>'); + +$wgLDAPProxyAgent = array( 'ldap' => 'cn=mediawiki-alamut,ou=System Accounts,<%= dc_suffix %>'); + +$wgLDAPProxyAgentPassword = array( 'ldap' => '<%= ldap_password %>' ); + +$wgLDAPUseLDAPGroups = array( "ldap" => true ); +$wgLDAPGroupNameAttribute = array( "ldap" => "cn" ); + +$wgLDAPLowerCaseUsername = array( "ldap" => true ); + +$wgMinimalPasswordLength = 1; |