Wiki source code of Security

Version 2.1 by Vincent Massol on 2008/07/24

Show last authors
1 1 Security
2
3 It's important you spend some time understanding the different settings you can modify to protected your wiki.
4
5 1.1. Admin password
6
7 Make sure you either change its password or remove that user.
8
9 1.1 Superadmin account
10
11 XWiki provides a superadmin account. It is special, because:
12 * It is not stored in the database
13 * It cannot be modified in any way
14 * It always has full access, regardless of the rights settings
15
16 #warning("Because it is so powerful, it is not safe to leave it enabled for a long time.")
17
18 By default, this account is disabled. To enable it, you have to edit <tt>&lt;xwiki-dir&gt;/WEB-INF/xwiki.cfg</tt>, uncomment the <tt>xwiki.superadminpassword=system</tt> line and set a proper password. To disable it, just comment this line. Remember to restart the servlet container after changing <tt>xwiki.cfg</tt>.
19
20 #info("Using this superadmin account is useful when you cannot log in anymore, for example when you forgot your admin user password, if you messed up some rights or if you have deleted your admin user by mistake.")
21
22 1.1 Cookie Encryption Keys
23
24 When a user chooses to be remembered when he logs in, a cookie is saved on his machine. The cookie is encrypted so that nobody having access to it can see the username/password. This encryption is done using 2 configuration parameters located in the ~~xwiki.cfg~~ configuration file. This file is located in ~~WEB-INF/~~ in the XWiki WAR (see the [Installation>AdminGuide.Installation] for where it's installed).
25
26 It's important you edit the ~~xwiki.cfg~~ file to modify the cookie authentication and encryption keys as they use default values when you install XWiki and these predefined values could be used by an attacker to decode the username/password. To prevent this change the following 2 configuration parameters:
27
28 * ~~xwiki.authentication.validationKey~~
29 * ~~xwiki.authentication.encryptionKey~~
30
31 In future versions we'd like to generate random and host-dependent key pairs at installation time (see the following [issue>http://jira.xwiki.org/jira/browse/XWIKI-542] for details).

Get Connected