Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TPS servlets to use @WebServlet #4565

Merged
merged 6 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 0 additions & 111 deletions base/tps/shared/webapps/tps/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,117 +7,6 @@

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

<servlet>
<servlet-name>tpsug</servlet-name>
<servlet-class>com.netscape.cms.servlet.admin.TPSUsrGrpAdminServlet</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.TPSLogAdminServlet</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.TPSGetStatus</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>tpsGetConfigEntries</servlet-name>
<servlet-class>com.netscape.cms.servlet.csadmin.TPSGetConfigEntries</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>tpsGetConfigEntries</param-value>
</init-param>
<init-param>
<param-name>AuthzMgr</param-name>
<param-value>BasicAclAuthz</param-value>
</init-param>
<init-param>
<param-name>AuthMgr</param-name>
<param-value>TokenAuth</param-value>
</init-param>
<init-param>
<param-name>resourceID</param-name>
<param-value>certServer.clone.configuration.GetConfigEntries</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>

<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>tpsGetConfigEntries</servlet-name>
<url-pattern>/admin/tps/getConfigEntries</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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.admin;

import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;

@WebServlet(
name = "tpslog",
urlPatterns = "/log",
initParams = {
@WebInitParam(name="ID", value="tpslog"),
@WebInitParam(name="AuthzMgr", value="BasicAclAuthz")
}
)
public class TPSLogAdminServlet extends LogAdminServlet {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.admin;

import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;

@WebServlet(
name = "tpsug",
urlPatterns = "/ug",
initParams = {
@WebInitParam(name="ID", value="tpsug"),
@WebInitParam(name="AuthzMgr", value="BasicAclAuthz")
}
)
public class TPSUsrGrpAdminServlet extends UsrGrpAdminServlet {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.csadmin;

import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;

@WebServlet(
name = "tpsGetConfigEntries",
urlPatterns = "/admin/tps/getConfigEntries",
initParams = {
@WebInitParam(name="GetClientCert", value="false"),
@WebInitParam(name="authority", value="tps"),
@WebInitParam(name="ID", value="tpsGetConfigEntries"),
@WebInitParam(name="AuthzMgr", value="BasicAclAuthz"),
@WebInitParam(name="AuthMgr", value="TokenAuth"),
@WebInitParam(name="resourceID", value="certServer.clone.configuration.GetConfigEntries")
}
)
public class TPSGetConfigEntries extends GetConfigEntries {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.csadmin;

import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;

@WebServlet(
name = "tpsGetStatus",
urlPatterns = "/admin/tps/getStatus",
initParams = {
@WebInitParam(name="GetClientCert", value="false"),
@WebInitParam(name="authority", value="tps"),
@WebInitParam(name="ID", value="tpsGetStatus")
}
)
public class TPSGetStatus extends GetStatus {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
Expand All @@ -15,6 +16,10 @@

import com.netscape.cmscore.apps.CMS;

@WebServlet(
name = "phoneHome",
urlPatterns = "/phoneHome"
)
public class TPSPhoneHome extends HttpServlet {

public static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TPSPhoneHome.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.io.IOException;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
Expand All @@ -28,6 +29,10 @@
/**
* @author Endi S. Dewata <edewata@redhat.com>
*/
@WebServlet(
name = "tps",
urlPatterns = "/tps"
)
public class TPSServlet extends HttpServlet {

public static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TPSServlet.class);
Expand Down
Loading