From: lpsolit%gmail.com <> Date: Tue, 18 Aug 2009 11:05:24 +0000 (+0000) Subject: Bug 510496: Recommend the admin to run mysql_secure_installation rather than playing... X-Git-Tag: bugzilla-3.2.5~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=534f9baa4d1708cd9856b70fa33fdedbd644081e;p=thirdparty%2Fbugzilla.git Bug 510496: Recommend the admin to run mysql_secure_installation rather than playing with command lines - Patch by Frédéric Buclin r=dkl --- diff --git a/docs/en/xml/glossary.xml b/docs/en/xml/glossary.xml index 5b6d1a6e7d..127b94038c 100644 --- a/docs/en/xml/glossary.xml +++ b/docs/en/xml/glossary.xml @@ -306,8 +306,7 @@ Privilege System - Much more detailed information about the suggestions in - . + Information about how to protect your MySQL server. diff --git a/docs/en/xml/installation.xml b/docs/en/xml/installation.xml index 5ac68aac53..ebca08ba8e 100644 --- a/docs/en/xml/installation.xml +++ b/docs/en/xml/installation.xml @@ -1,5 +1,5 @@ - + Installing Bugzilla @@ -747,9 +747,23 @@ - MySQL's default configuration is very insecure. - has some good information for - improving your installation's security. + MySQL's default configuration is insecure. + We highly recommend to run mysql_secure_installation + on Linux or the MySQL installer on Windows, and follow the instructions. + Important points to note are: + + + Be sure that the root account has a secure password set. + + + Do not create an anonymous account, and if it exists, say "yes" + to remove it. + + + If your web server and MySQL server are on the same machine, + you should disable the network access. + + @@ -757,11 +771,11 @@ Allow large attachments and many comments By default, MySQL will only allow you to insert things - into the database that are smaller than 64KB. Attachments + into the database that are smaller than 1MB. Attachments may be larger than this. Also, Bugzilla combines all comments on a single bug into one field for full-text searching, and the - combination of all comments on a single bug are very likely to - be larger than 64KB. + combination of all comments on a single bug could in some cases + be larger than 1MB. To change MySQL's default, you need to edit your MySQL configuration file, which is usually /etc/my.cnf diff --git a/docs/en/xml/security.xml b/docs/en/xml/security.xml index b6bd0bcc82..0462ba2da9 100644 --- a/docs/en/xml/security.xml +++ b/docs/en/xml/security.xml @@ -1,5 +1,5 @@ - + Bugzilla Security @@ -57,7 +57,7 @@ You will need to set the option - in localconfig to the group your webserver runs + in localconfig to the group your web server runs as. This will allow ./checksetup.pl to set file permissions on Unix systems so that nothing is world-writable. @@ -80,111 +80,21 @@ - - - -
- MySQL - -
- The MySQL System Account - - As mentioned in , the MySQL - daemon should run as a non-privileged, unique user. Be sure to consult - the MySQL documentation or the documentation that came with your system - for instructions. - -
- -
- The MySQL <quote>root</quote> and <quote>anonymous</quote> Users - - By default, MySQL comes with a root user with a - blank password and an anonymous user, also with a blank - password. In order to protect your data, the root user - should be given a password and the anonymous user should be disabled. - - - - Assigning the MySQL <quote>root</quote> User a Password - - -bash$ mysql mysql -mysql> UPDATE user SET password = password('new_password') WHERE user = 'root'; -mysql> FLUSH PRIVILEGES; - - - - - Disabling the MySQL <quote>anonymous</quote> User - -bash$ mysql -u root -p mysql -Enter Password: new_password -mysql> DELETE FROM user WHERE user = ''; -mysql> FLUSH PRIVILEGES; - - - - This command assumes that you have already completed - . - - - - - -
- -
- Network Access - - If MySQL and your webserver both run on the same machine and you - have no other reason to access MySQL remotely, then you should disable - the network access. This, along with the suggestion in - , will help protect your system from - any remote vulnerabilities in MySQL. - - - - Disabling Networking in MySQL - - Simply enter the following in /etc/my.cnf: - -[mysqld] -# Prevent network access to MySQL. -skip-networking - - - - -
- - - -
- - -
- Webserver + Web server
Disabling Remote Access to Bugzilla Configuration Files - There are many files that are placed in the Bugzilla directory - area that should not be accessable from the web. Because of the way - Bugzilla is currently layed out, the list of what should and should not - be accessible is rather complicated. A new installation method is - currently in the works which should solve this by allowing files that - shouldn't be accessible from the web to be placed in a directory outside - the webroot. See - bug 44659 - for more information. + + There are many files that are placed in the Bugzilla directory + area that should not be accessible from the web server. Because of the way + Bugzilla is currently layed out, the list of what should and should not + be accessible is rather complicated. A quick way is to run + testserver.pl to check if your web server serves + Bugzilla files as expected. If not, you may want to follow the few + steps below. @@ -296,52 +206,21 @@ skip-networking properly blocked. Of particular interest is the localconfig file which contains your database password. Also, be aware that many editors create temporary and backup files in the working directory and that - those should also not be accessable. For more information, see + those should also not be accessible. For more information, see bug 186383 or Bugtraq ID 6501. - To test, simply point your web browser at the file; for example, to - test mozilla.org's installation, we'd try to access - . You should get - a 403 Forbidden - error. + To test, simply run testserver.pl, as said above. Be sure to check for instructions - specific to the webserver you use. + specific to the web server you use.
- -
- Using <filename>mod_throttle</filename> to Prevent a DOS - - - This section only applies to people who have chosen the Apache - webserver. It may be possible to do similar things with other - webservers. Consult the documentation that came with your webserver - to find out. - - - - It is possible for a user, by mistake or on purpose, to access - the database many times in a row which can result in very slow access - speeds for other users (effectively, a - DOS attack). If your - Bugzilla installation is experiencing this problem, you may install - the Apache module mod_throttle which can limit - connections by IP address. You may download this module at - . - Follow the instructions to install into your Apache install. - The command you need is - ThrottleClientIP. See the - documentation - for more information. -
-