wiki:Software/Productionalisation/RaptorWebUsers
Last modified 8 years ago Last modified on 06/02/11 17:43:14

Users and Roles

RaptorWeb currently makes limited use of users and roles. Users are needed to login to the web interface, and each user can store their own reports. Beyond that, there is no assignment of functions to roles, and every user will see and interact with the same statistics on the attached MUA. That said, future releases of Raptor will take more consideration of user rights, and therefore we recommend configuring your user set now.

Adding a User

RaptorWeb comes preconfigured with one admin user:

  • User: admin
  • Password: raptor

To add more users, edit the web/conf/users.xml file and add users to the authentication-manager e.g. add new users to:

<s:authentication-manager>
        <s:authentication-provider>
            <s:password-encoder hash="md5" />
            <s:user-service>
                <s:user name="admin" password="20076547310803443eb482ec21bc3c3a"
                    authorities="ROLE_ADMIN" />
            </s:user-service>
        </s:authentication-provider>
    </s:authentication-manager>

Passwords are stored as MD5 hashes. Hence, to add a new users you must first compute the MD5 hash of your chosen password. For example, if you wanted to add the user 'bob' with the password 'raptor' you first generate the MD5 hash of the password 'raptor' then add that user to the XML configuration, e.g.

  1. Computing the MD5 hash
    • On Mac OS X
      • You can use the md5 command e.g.
        # md5 -s raptor
        
    • On linux
      • You can use the md5sum command, e.g.
        # echo -n 'raptor' | md5sum -
        
    • Or you can try one of the websites e.g. http://md5-hash-online.waraxe.us/
    • Which gives the result 20076547310803443eb482ec21bc3c3a.
  2. Adding a user
    • Then add the user 'bob' to the XML configuration in web/conf/users.xml:
      <s:authentication-manager>
              <s:authentication-provider>
                  <s:password-encoder hash="md5" />
                  <s:user-service>
                      <s:user name="admin" password="20076547310803443eb482ec21bc3c3a"
                          authorities="ROLE_ADMIN" />
                     <s:user name="bob" password="20076547310803443eb482ec21bc3c3a"
                          authorities="ROLE_ADMIN" />
                  </s:user-service>
              </s:authentication-provider>
          </s:authentication-manager>
      

We recommend at present to use the ROLE_ADMIN role for all users. As described above, RaptorWeb does not utilise roles for the time being. Where future releases will decide which roles can access what functions.