Zum Inhalt springen

Mediawiki absichern: Unterschied zwischen den Versionen

Aus LHlab Wiki
KKeine Bearbeitungszusammenfassung
K Textersetzung - „</source>“ durch „</syntaxhighlight>“
Zeile 44: Zeile 44:
         'Security1' => 'Security Group'
         'Security1' => 'Security Group'
         );
         );
</source>
</syntaxhighlight>


[[Kategorie:MediaWiki]]
[[Kategorie:MediaWiki]]
[[Kategorie:Security]]
[[Kategorie:Security]]

Version vom 1. Januar 2021, 21:19 Uhr

Hier eine kleine Anleitung wie man den Anonymous Benutzern, also den nicht eingeloggten Mediawiki Benutzern so gut es geht die Rechte im Wiki entzieht. Sie sollen wenn möglich nur Artikel Lesen dürfen. Requirements:

/etc/mediawiki/LocalSettings.conf <source lang=php>

  1. E-Mail adress valididation

$wgEmailConfirmToEdit = true;

  1. Prevent new user registrations except by sysops

$wgWhitelistAccount = array ( "user" => 0, "sysop" => 1, "developer" => 1 ); $wgGroupPermissions['*']['createaccount'] = false;

  1. Disable anonymous editing and talk

$wgGroupPermissions['*']['edit'] = false; $wgDisableAnonTalk = true;

  1. Anonymous users can't create pages

$wgGroupPermissions['*']['createpage'] = false; $wgShowIPinHeader = false;

  1. Enable Lockdown Extension

require_once( "$IP/extensions/Lockdown/Lockdown.php" );

  1. Use Lockdown to lock Sites and Functions

$wgSpecialPageLockdown['Version'] = array('user', 'bureaucrat', 'sysop'); $wgSpecialPageLockdown['Export'] = array('user', 'bureaucrat', 'sysop'); $wgSpecialPageLockdown['Listfiles'] = array('user', 'bureaucrat', 'sysop'); $wgSpecialPageLockdown['Listusers'] = array('user', 'bureaucrat', 'sysop'); $wgSpecialPageLockdown['Statistics'] = array('user', 'bureaucrat', 'sysop'); $wgSpecialPageLockdown['Protectedpages'] = array('user', 'bureaucrat', 'sysop'); $wgSpecialPageLockdown['Version'] = array('sysop'); $wgSpecialPageLockdown['Booksources'] = array('user', 'bureaucrat', 'sysop'); $wgActionLockdown['history'] = array('user', 'bureaucrat', 'sysop'); $wgActionLockdown['edit'] = array('user', 'bureaucrat', 'sysop')

  1. Enable SimpleSecurity

$wgSecurityUseDBHook = true; include_once("$IP/extensions/SimpleSecurity/SimpleSecurity.php"); $wgSecurityRenderInfo = true; $wgSecurityAllowUnreadableLinks = false;

  1. Add new Security Group

$wgSecurityExtraGroups = array(

       'Security1' => 'Security Group'
       );

</syntaxhighlight>