Skip to content

PKI REST Configuration

Endi S. Dewata edited this page Jan 25, 2021 · 1 revision

PKI REST Configuration

REST services configuration is stored in the web.xml:

<web-app>

    <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.ca.rest.CAApplication</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>RESTEasy</servlet-name>
        <url-pattern>/rest/*</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>

</web-app>
Clone this wiki locally