<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- BEGIN COPYRIGHT BLOCK
     Copyright (C) 2006 Red Hat, Inc.
     All rights reserved.
     END COPYRIGHT BLOCK -->
<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "file:///usr/share/pki/setup/web-app_2_3.dtd">
<web-app>

    <display-name>Token Processing Service</display-name>

    <servlet>
        <servlet-name>tpsstart</servlet-name>
        <servlet-class>com.netscape.cms.servlet.base.CMSStartServlet</servlet-class>
        <init-param>
            <param-name>AuthzMgr</param-name>
            <param-value>BasicAclAuthz</param-value>
        </init-param>
        <init-param>
            <param-name>ID</param-name>
            <param-value>tpsstart</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet>
        <servlet-name>tpsug</servlet-name>
        <servlet-class>com.netscape.cms.servlet.admin.UsrGrpAdminServlet</servlet-class>
        <init-param>
            <param-name>ID</param-name>
            <param-value>tpsug</param-value>
        </init-param>
        <init-param>
            <param-name>AuthzMgr</param-name>
            <param-value>BasicAclAuthz</param-value>
        </init-param>
    </servlet>

    <servlet>
        <servlet-name>tpslog</servlet-name>
        <servlet-class>com.netscape.cms.servlet.admin.LogAdminServlet</servlet-class>
        <init-param>
            <param-name>ID</param-name>
            <param-value>tpslog</param-value> </init-param>
        <init-param>
            <param-name>AuthzMgr</param-name>
            <param-value>BasicAclAuthz</param-value>
        </init-param>
    </servlet>

    <servlet>
        <servlet-name>tpsGetStatus </servlet-name>
        <servlet-class> com.netscape.cms.servlet.csadmin.GetStatus</servlet-class>
        <init-param>
            <param-name>GetClientCert</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>authority</param-name>
            <param-value>tps</param-value>
        </init-param>
        <init-param>
            <param-name>ID</param-name>
            <param-value>tpsGetStatus</param-value>
        </init-param>
    </servlet>

    <servlet>
     <servlet-name>phoneHome</servlet-name>
     <servlet-class>org.dogtagpki.server.tps.TPSPhoneHome</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>tps</servlet-name>
        <servlet-class>org.dogtagpki.server.tps.TPSServlet</servlet-class>
    </servlet>

    <listener>
        <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
    </listener>

    <context-param>
        <param-name>resteasy.servlet.mapping.prefix</param-name>
        <param-value>/rest</param-value>
    </context-param>

    <context-param>
        <param-name>resteasy.resource.method-interceptors</param-name>
        <param-value>org.jboss.resteasy.core.ResourceMethodSecurityInterceptor</param-value>
    </context-param>

    <servlet>
        <servlet-name>Resteasy</servlet-name>
        <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
        <init-param>
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>org.dogtagpki.server.tps.rest.TPSApplication</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>Resteasy</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>tpsstart</servlet-name>
        <url-pattern>/start</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>tpsug</servlet-name>
        <url-pattern>/ug</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>tpslog</servlet-name>
        <url-pattern>/log</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>tpsGetStatus</servlet-name>
        <url-pattern>/admin/tps/getStatus</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>phoneHome</servlet-name>
        <url-pattern>/phoneHome</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>tps</servlet-name>
        <url-pattern>/tps</url-pattern>
    </servlet-mapping>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Account Services</web-resource-name>
            <url-pattern>/rest/account/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Admin Services</web-resource-name>
            <url-pattern>/rest/admin/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Audit</web-resource-name>
            <url-pattern>/rest/audit/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Authenticators</web-resource-name>
            <url-pattern>/rest/authenticators/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Configuration</web-resource-name>
            <url-pattern>/rest/config/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Connectors</web-resource-name>
            <url-pattern>/rest/connectors/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Profiles</web-resource-name>
            <url-pattern>/rest/profiles/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Profile Mappings</web-resource-name>
            <url-pattern>/rest/profile-mappings/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Self Tests</web-resource-name>
            <url-pattern>/rest/selftests/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Token Services</web-resource-name>
            <url-pattern>/rest/tokens/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>UI</web-resource-name>
            <url-pattern>/ui/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>*</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <login-config>
        <realm-name>Token Processing Service</realm-name>
    </login-config>

    <security-role>
        <role-name>*</role-name>
    </security-role>

</web-app>
