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 KRA servlets to use @WebServlet (part 3) #4513

Merged
merged 10 commits into from
Jul 24, 2023
220 changes: 0 additions & 220 deletions base/kra/shared/webapps/kra/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,226 +3,6 @@

<display-name>Key Recovery Authority</display-name>

<servlet>
<servlet-name> kraheader </servlet-name>
<servlet-class> com.netscape.cms.servlet.base.KRAHeaderServlet </servlet-class>
<init-param><param-name> templatePath </param-name>
<param-value> /agent/header.template</param-value> </init-param>
<init-param><param-name> ID </param-name>
<param-value> kraheader </param-value> </init-param>
<init-param><param-name> GetClientCert </param-name>
<param-value> true </param-value> </init-param>
<init-param><param-name> AuthMgr </param-name>
<param-value> certUserDBAuthMgr </param-value> </init-param>
<init-param><param-name> template </param-name>
<param-value> /agent/header.template </param-value> </init-param>
</servlet>

<servlet>
<servlet-name> kraSrchRecoverKey </servlet-name>
<servlet-class> com.netscape.cms.servlet.base.KRASearchKeyForRecovery </servlet-class>
<init-param><param-name> GetClientCert </param-name>
<param-value> true </param-value> </init-param>
<init-param><param-name> htmlPath </param-name>
<param-value> /agent/kra/SrchRecoverKey.html </param-value> </init-param>
<init-param><param-name> authority </param-name>
<param-value> kra </param-value> </init-param>
<init-param><param-name> interface </param-name>
<param-value> agent </param-value> </init-param>
<init-param><param-name> templatePath </param-name>
<param-value> /agent/kra/srchKeyForRecovery.template</param-value> </init-param>
<init-param><param-name> ID </param-name>
<param-value> kraSrchRecoverKey </param-value> </init-param>
<init-param><param-name> unauthorizedTemplate </param-name>
<param-value> /agent/kra/GenUnauthorized.template </param-value> </init-param>
<init-param><param-name> AuthMgr </param-name>
<param-value> certUserDBAuthMgr </param-value> </init-param>
</servlet>

<servlet>
<servlet-name> kraSrchKey </servlet-name>
<servlet-class> com.netscape.cms.servlet.base.KRASearchKey </servlet-class>
<init-param><param-name> GetClientCert </param-name>
<param-value> true </param-value> </init-param>
<init-param><param-name> htmlPath </param-name>
<param-value> /agent/kra/SrchKey.html </param-value> </init-param>
<init-param><param-name> authority </param-name>
<param-value> kra </param-value> </init-param>
<init-param><param-name> interface </param-name>
<param-value> agent </param-value> </init-param>
<init-param><param-name> templatePath </param-name>
<param-value> /agent/kra/srchKey.template</param-value> </init-param>
<init-param><param-name> ID </param-name>
<param-value> kraSrchKey </param-value> </init-param>
<init-param><param-name> unauthorizedTemplate </param-name>
<param-value> /agent/kra/GenUnauthorized.template </param-value> </init-param>
<init-param><param-name> AuthMgr </param-name>
<param-value> certUserDBAuthMgr </param-value> </init-param>
</servlet>

<servlet>
<servlet-name> kraListRequests </servlet-name>
<servlet-class> com.netscape.cms.servlet.base.KRAListRequests </servlet-class>
<init-param><param-name> GetClientCert </param-name>
<param-value> true </param-value> </init-param>
<init-param><param-name> htmlPath </param-name>
<param-value> /agent/kra/ListRequests.html </param-value> </init-param>
<init-param><param-name> authority </param-name>
<param-value> kra </param-value> </init-param>
<init-param><param-name> interface </param-name>
<param-value> agent </param-value> </init-param>
<init-param><param-name> templatePath </param-name>
<param-value> /agent/kra/ListRequests.template</param-value> </init-param>
<init-param><param-name> ID </param-name>
<param-value> kraListRequests </param-value> </init-param>
<init-param><param-name> unauthorizedTemplate </param-name>
<param-value> /agent/kra/GenUnauthorized.template </param-value> </init-param>
<init-param><param-name> AuthMgr </param-name>
<param-value> certUserDBAuthMgr </param-value> </init-param>
</servlet>

<servlet>
<servlet-name> kraindex </servlet-name>
<servlet-class> com.netscape.cms.servlet.base.KRAIndexServlet </servlet-class>
<init-param><param-name> ID </param-name>
<param-value> kraindex </param-value> </init-param>
<init-param><param-name> template </param-name>
<param-value> index.template </param-value> </init-param>
<init-param><param-name> GetClientCert </param-name>
<param-value> true </param-value> </init-param>
<init-param><param-name> AuthMgr </param-name>
<param-value> certUserDBAuthMgr </param-value> </init-param>
</servlet>

<servlet>
<servlet-name> kraGrantRecovery </servlet-name>
<servlet-class> com.netscape.cms.servlet.base.KRAGrantRecovery </servlet-class>
<init-param><param-name> GetClientCert </param-name>
<param-value> true </param-value> </init-param>
<init-param><param-name> htmlPath </param-name>
<param-value> /agent/kra/GrantRecovery.html </param-value> </init-param>
<init-param><param-name> authority </param-name>
<param-value> kra </param-value> </init-param>
<init-param><param-name> interface </param-name>
<param-value> agent </param-value> </init-param>
<init-param><param-name> templatePath </param-name>
<param-value> /agent/kra/grantRecovery.template</param-value> </init-param>
<init-param><param-name> ID </param-name>
<param-value> kraGrantRecovery </param-value> </init-param>
<init-param><param-name> unauthorizedTemplate </param-name>
<param-value> /agent/kra/GenUnauthorized.template </param-value> </init-param>
<init-param><param-name> AuthMgr </param-name>
<param-value> certUserDBAuthMgr </param-value> </init-param>
</servlet>

<!--
<servlet>
<servlet-name> krajobsScheduler </servlet-name>
<servlet-class> com.netscape.cms.servlet.admin.KRAJobsAdminServlet </servlet-class>
<init-param><param-name> ID </param-name>
<param-value> krajobsScheduler </param-value> </init-param>
<init-param><param-name> AuthzMgr </param-name>
<param-value> BasicAclAuthz </param-value> </init-param>
</servlet>
-->

<servlet>
<servlet-name> kraGetCookie </servlet-name>
<servlet-class> com.netscape.cms.servlet.csadmin.KRAGetCookie </servlet-class>
<init-param><param-name> GetClientCert </param-name>
<param-value> false </param-value> </init-param>
<init-param><param-name> AuthzMgr </param-name>
<param-value> BasicAclAuthz </param-value> </init-param>
<init-param><param-name> authority </param-name>
<param-value> kra </param-value> </init-param>
<init-param><param-name> ID </param-name>
<param-value> kraGetCookie </param-value> </init-param>
<init-param><param-name> AuthMgr </param-name>
<param-value> passwdUserDBAuthMgr </param-value> </init-param>
<init-param><param-name> templatePath </param-name>
<param-value> /admin/kra/sendCookie.template </param-value> </init-param>
<init-param><param-name> errorTemplatePath </param-name>
<param-value> /admin/kra/securitydomainlogin.template </param-value> </init-param>
</servlet>

<servlet>
<servlet-name> kraTokenAuthenticate </servlet-name>
<servlet-class> com.netscape.cms.servlet.csadmin.KRATokenAuthenticate </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> kra </param-value> </init-param>
<init-param><param-name> ID </param-name>
<param-value> kraTokenAuthenticate </param-value> </init-param>
<init-param><param-name> interface </param-name>
<param-value> ee </param-value> </init-param>
</servlet>

<servlet>
<servlet-name> kraTokenAuthenticate-admin </servlet-name>
<servlet-class> com.netscape.cms.servlet.csadmin.KRATokenAuthenticateAdmin </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> kra </param-value> </init-param>
<init-param><param-name> ID </param-name>
<param-value> kraTokenAuthenticate </param-value> </init-param>
<init-param><param-name> interface </param-name>
<param-value> admin </param-value> </init-param>
</servlet>

<!--
<servlet-mapping>
<servlet-name> krajobsScheduler </servlet-name>
<url-pattern> /jobsScheduler </url-pattern>
</servlet-mapping>
-->

<servlet-mapping>
<servlet-name> kraheader </servlet-name>
<url-pattern> /agent/header </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name> kraSrchRecoverKey </servlet-name>
<url-pattern> /agent/kra/srchRecoverKey.html </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name> kraSrchKey </servlet-name>
<url-pattern> /agent/kra/srchKey.html </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name> kraListRequests </servlet-name>
<url-pattern> /agent/kra/listRequests.html </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name> kraindex </servlet-name>
<url-pattern> /index </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name> kraGrantRecovery </servlet-name>
<url-pattern> /agent/kra/grantRecovery.html </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name> kraGetCookie </servlet-name>
<url-pattern> /admin/kra/getCookie </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name> kraTokenAuthenticate </servlet-name>
<url-pattern> /ee/kra/tokenAuthenticate </url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name> kraTokenAuthenticate-admin </servlet-name>
<url-pattern> /admin/kra/tokenAuthenticate </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,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.admin;

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

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

@WebServlet(
name = "kraGrantRecovery",
urlPatterns = "/agent/kra/grantRecovery.html",
initParams = {
@WebInitParam(name="GetClientCert", value="true"),
@WebInitParam(name="htmlPath", value="/agent/kra/GrantRecovery.html"),
@WebInitParam(name="authority", value="kra"),
@WebInitParam(name="interface", value="agent"),
@WebInitParam(name="templatePath", value="/agent/kra/grantRecovery.template"),
@WebInitParam(name="ID", value="kraGrantRecovery"),
@WebInitParam(name="unauthorizedTemplate", value="/agent/kra/GenUnauthorized.template"),
@WebInitParam(name="AuthMgr", value="certUserDBAuthMgr")
}
)
public class KRAGrantRecovery extends DisplayHtmlServlet {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@
// All rights reserved.
// --- END COPYRIGHT BLOCK ---

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

@WebServlet(
name = "kraheader",
urlPatterns = "/agent/header",
initParams = {
@WebInitParam(name="templatePath", value="/agent/header.template"),
@WebInitParam(name="ID", value="kraheader"),
@WebInitParam(name="GetClientCert", value="true"),
@WebInitParam(name="AuthMgr", value="certUserDBAuthMgr"),
@WebInitParam(name="template", value="/agent/header.template")
}
)
public class KRAHeaderServlet extends IndexServlet {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
// All rights reserved.
// --- END COPYRIGHT BLOCK ---

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

@WebServlet(
name = "kraindex",
urlPatterns = "/index",
initParams = {
@WebInitParam(name="ID", value="kraindex"),
@WebInitParam(name="template", value="index.template"),
@WebInitParam(name="GetClientCert", value="true"),
@WebInitParam(name="AuthMgr", value="certUserDBAuthMgr")
}
)
public class KRAIndexServlet extends IndexServlet {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.base;

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

@WebServlet(
name = "kraListRequests",
urlPatterns = "/agent/kra/listRequests.html",
initParams = {
@WebInitParam(name="GetClientCert", value="true"),
@WebInitParam(name="htmlPath", value="/agent/kra/ListRequests.html"),
@WebInitParam(name="authority", value="kra"),
@WebInitParam(name="interface", value="agent"),
@WebInitParam(name="templatePath", value="/agent/kra/ListRequests.template"),
@WebInitParam(name="ID", value="kraListRequests"),
@WebInitParam(name="unauthorizedTemplate", value="/agent/kra/GenUnauthorized.template"),
@WebInitParam(name="AuthMgr", value="certUserDBAuthMgr")
}
)
public class KRAListRequests extends DisplayHtmlServlet {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.base;

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

@WebServlet(
name = "kraSrchKey",
urlPatterns = "/agent/kra/srchKey.html",
initParams = {
@WebInitParam(name="GetClientCert", value="true"),
@WebInitParam(name="htmlPath", value="/agent/kra/SrchKey.html"),
@WebInitParam(name="authority", value="kra"),
@WebInitParam(name="interface", value="agent"),
@WebInitParam(name="templatePath", value="/agent/kra/srchKey.template"),
@WebInitParam(name="ID", value="kraSrchKey"),
@WebInitParam(name="unauthorizedTemplate", value="/agent/kra/GenUnauthorized.template"),
@WebInitParam(name="AuthMgr", value="certUserDBAuthMgr")
}
)
public class KRASearchKey extends DisplayHtmlServlet {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cms.servlet.base;

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

@WebServlet(
name = "kraSrchRecoverKey",
urlPatterns = "/agent/kra/srchRecoverKey.html",
initParams = {
@WebInitParam(name="GetClientCert", value="true"),
@WebInitParam(name="htmlPath", value="/agent/kra/SrchRecoverKey.html"),
@WebInitParam(name="authority", value="kra"),
@WebInitParam(name="interface", value="agent"),
@WebInitParam(name="templatePath", value="/agent/kra/srchKeyForRecovery.template"),
@WebInitParam(name="ID", value="kraSrchRecoverKey"),
@WebInitParam(name="unauthorizedTemplate", value="/agent/kra/GenUnauthorized.template"),
@WebInitParam(name="AuthMgr", value="certUserDBAuthMgr")
}
)
public class KRASearchKeyForRecovery extends DisplayHtmlServlet {
private static final long serialVersionUID = 1L;
}
Loading
Loading