Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One way of defining users and roles is shown in the following Apache Tomcat example. This is not is not a viable solution but rather a simple example in order to illustrate the concept. In the example, an XML definition file is used to declare users and their roles in the backend container. Combining the XperienCentral roles with the wmadmin role the wmadmin role is a trick to make this work with the default web.xml delivered with XperienCentral. The following file named tomcat-users.xml defines the users:

...

 

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
  <role rolename="wmadmin"/>
  <role rolename="xc_administrator"/>
  <role rolename="xc_editor"/>
  <role rolename="xc_casual_editor"/>
  <role rolename="xc_custom_permissions"/>
 
  <user username="JohnS" password="w3e4r5t" roles="xc_administrator,wmadmin"/>
  <user username="MaryP" password="1b2w3q7n5t" roles="xc_editor,xc_custom_permissions,wmadmin"/>
  <user username="JanW" password="m9w1q0n5l" roles="xc_casual_editor,wmadmin"/>
</tomcat-users>

 

 

 

 

You can use any Administrative page (for example /web/admin/status) to make the browser ask for credentials so that you can log in to the container.

 

Container-based

...

Authentication in Tomcat using a Valve

The easiest way to enable container-based authentication in Tomcat for test purposes is by adding this valve:

...