$wgLDAPPasswordHash = array('labs' => 'clear');
// 'invaliddomain' is set to true so that mail password options
// will be available on user creation and password mailing
$wgLDAPMailPassword = array('labs' => true, 'invaliddomain' => true);
$wgLDAPPreferences = array('labs' => array("email" => "mail"));
$wgLDAPUseFetchedUsername = array('labs' => true);
$wgLDAPLowerCaseUsernameScheme = array('labs' => false, 'invaliddomain' => false);
$wgLDAPLowerCaseUsername = array('labs' => false, 'invaliddomain' => false);
// Only enable UseLocal if you need to promote an LDAP user
#$wgLDAPUseLocal = true;
$wgLDAPDebug = 5;
// Maximally verbose logs for Andrew Bogott, 8-Dec-2015
// Local debug logging for troubleshooting LDAP issues
if (false) {
    $wgLDAPDebug = 5;
    $monolog = \Mediawiki\Logger\LoggerFactory::getProvider();
    $monolog->mergeConfig(array('loggers' => array('ldap' => array('handlers' => array('wikitech-ldap'), 'processors' => array_keys($wmgMonologProcessors))), 'handlers' => array('wikitech-ldap' => array('class' => '\\Monolog\\Handler\\StreamHandler', 'args' => array('/tmp/ldap-s-1-debug.log'), 'formatter' => 'line'))));
}
require_once "{$IP}/extensions/OpenStackManager/OpenStackManager.php";
$wgOpenStackManagerNovaKeypairStorage = 'ldap';
$wgOpenStackManagerNovaIdentityURI = 'http://labcontrol1001.wikimedia.org:35357/v2.0';
$wgOpenStackManagerLDAPDomain = 'labs';
$wgOpenStackManagerLDAPProjectBaseDN = 'ou=projects,dc=wikimedia,dc=org';
$wgOpenStackManagerLDAPProjectGroupBaseDN = "ou=groups,dc=wikimedia,dc=org";
$wgOpenStackManagerLDAPInstanceBaseDN = 'ou=hosts,dc=wikimedia,dc=org';
$wgOpenStackManagerLDAPServiceGroupBaseDN = 'ou=servicegroups,dc=wikimedia,dc=org';
$wgOpenStackManagerLDAPDefaultGid = '500';
$wgOpenStackManagerLDAPDefaultShell = '/bin/bash';
$wgOpenStackManagerLDAPUseUidAsNamingAttribute = true;
$wgOpenStackManagerDNSOptions = array('enabled' => true, 'servers' => array('primary' => 'labcontrol1001.wikimedia.org'), 'soa' => array('hostmaster' => 'hostmaster.wikimedia.org', 'refresh' => '1800', 'retry' => '3600', 'expiry' => '86400', 'minimum' => '7200'));
$wgOpenStackManagerPuppetOptions = array('enabled' => true, 'defaultclasses' => array(), 'defaultvariables' => array());
Beispiel #2
0
 /**
  * Restores loggers replaced by setLogger().
  * @since 1.27
  */
 private function restoreLoggers()
 {
     $provider = LoggerFactory::getProvider();
     $wrappedProvider = TestingAccessWrapper::newFromObject($provider);
     $singletons = $wrappedProvider->singletons;
     foreach ($this->loggers as $channel => $logger) {
         if ($provider instanceof MonologSpi) {
             if ($logger === null) {
                 unset($singletons['loggers'][$channel]);
             } else {
                 $singletons['loggers'][$channel] = $logger;
             }
         } elseif ($provider instanceof LegacySpi) {
             if ($logger === null) {
                 unset($singletons[$channel]);
             } else {
                 $singletons[$channel] = $logger;
             }
         }
     }
     $wrappedProvider->singletons = $singletons;
     $this->loggers = array();
 }
                // Register a handler that will buffer the event stream and
                // pass events to the nested handler after closing the request
                $wmgMonologConfig['handlers'][$bufferedHandler] = array('class' => '\\MediaWiki\\Logger\\Monolog\\BufferHandler', 'args' => array(function () use($handlerName) {
                    return LoggerFactory::getProvider()->getHandler($handlerName);
                }));
            }
            $handlers[$idx] = $bufferedHandler;
        }
    }
    if ($handlers) {
        // T118057: wrap the collection of handlers in a WhatFailureGroupHandler
        // to swallow any exceptions that might leak out otherwise
        $failureGroupHandler = 'failuregroup|' . implode('|', $handlers);
        if (!isset($wmgMonologConfig['handlers'][$failureGroupHandler])) {
            $wmgMonologConfig['handlers'][$failureGroupHandler] = array('class' => '\\Monolog\\Handler\\WhatFailureGroupHandler', 'args' => array(function () use($handlers) {
                $provider = LoggerFactory::getProvider();
                return array_map(array($provider, 'getHandler'), $handlers);
            }));
        }
        $wmgMonologConfig['loggers'][$channel] = array('handlers' => array($failureGroupHandler), 'processors' => array_keys($wmgMonologProcessors), 'calls' => $wmgMonologLoggerCalls);
    } else {
        // No handlers configured, so use the blackhole route
        $wmgMonologConfig['loggers'][$channel] = array('handlers' => array('blackhole'), 'calls' => $wmgMonologLoggerCalls);
    }
}
$wgMWLoggerDefaultSpi = array('class' => '\\MediaWiki\\Logger\\MonologSpi', 'args' => array($wmgMonologConfig));
// Bug: T99581 - force logger timezone to UTC
// Guard condition needed for Jenkins; class from mediawiki/vendor
if (method_exists('\\Monolog\\Logger', 'setTimezone')) {
    \Monolog\Logger::setTimezone(new DateTimeZone('UTC'));
}