2. User authentication Previous topic Parent topic Child topic Next topic

XMLmind XSL Server has primarily been designed to be used by Web clients and by other server-side applications as a programmable XML conversion service. As such, by default, user authentication is turned off. The following procedure explains how to turn user authentication on.

Procedure

  1. Stop the Servlet Container.
  2. Edit xslsrv/WEB-INF/web.xml using a text editor and remove the line starting with "<!--AUTH" and also the line ending with "AUTH-->".
    <!--AUTH
    <security-constraint>
      <web-resource-collection>
        <web-resource-name>ConvertServlet</web-resource-name>
        <url-pattern>/exec/*</url-pattern>
      </web-resource-collection>
    
      <auth-constraint>
        <role-name>user</role-name>
      </auth-constraint>
    </security-constraint>
    
    <login-config>
      <auth-method>DIGEST</auth-method>
      <realm-name>XSL Server</realm-name>
    </login-config>
    
    <security-role>
      <role-name>user</role-name>
    </security-role>
    AUTH-->
  3. Specify the authentication scheme and specify how to perform the user authentication.
    • If you have deployed XMLmind XSL Server using controlapp.
      Simply start controlapp and reconfigure the server by clicking the Configure button. The configuration wizard will guide you on what to do.
    • If you have deployed the XMLmind XSL Server WebApp on your own existing Servlet Container.
      1. You may want to change the authentication scheme from DIGEST (default value; recommended for production use) to BASIC (simpler to configure).
        <login-config>
          <auth-method>BASIC</auth-method>
          <realm-name>XSL Server</realm-name>
        </login-config>
      2. Specify to the Servlet Container how the user authentication is to be performed.
        tomcat.png Simplest Tomcat example, assuming a BASIC authentication scheme:
        1. Copy install_dir/doc/manual/tomcat6/META-INF/ to /opt/tomcat/webapps/xslsrv/.
        2. Copy install_dir/doc/manual/tomcat6/tomcat-users.xml to /opt/tomcat/conf/.
        3. Edit the contents of /opt/tomcat/conf/tomcat-users.xml using a text editor to declare some users:
          <tomcat-users>
            <role rolename="user"/>
            <user username="john" password="secret" roles="user"/>
            ...
        jetty.png Simplest Jetty example, assuming a BASIC authentication scheme:
        1. Copy install_dir/doc/manual/jetty7/WEB-INF/jetty-web.xml to /opt/jetty/webapps/xslsrv/WEB-INF/.
        2. Copy install_dir/doc/manual/jetty7/xslsrv-users.properties to /opt/jetty/etc/.
        3. Edit the contents of /opt/jetty/etc/xslsrv-users.properties using a text editor to declare some users (the format of a line is: username : password , user):
          john:secret,user
          ...
        resin.png Simplest Resin example, assuming a BASIC authentication scheme:
        1. Copy install_dir/doc/manual/resin4/resin-web.xml to /opt/resin/webapps/xslsrv/WEB-INF/.
        2. Edit the contents of /opt/resin/webapps/xslsrv/WEB-INF/resin-web.xml using a text editor to declare some users:
            <resin:XmlAuthenticator password-digest="none">
              <resin:user name="john" password="secret" roles="user"/>
              ...
  4. Restart the Server Container.