summaryrefslogtreecommitdiffstats
path: root/base/tps/apache/docroot/tokendb
diff options
context:
space:
mode:
Diffstat (limited to 'base/tps/apache/docroot/tokendb')
-rw-r--r--base/tps/apache/docroot/tokendb/addConfig.template164
-rw-r--r--base/tps/apache/docroot/tokendb/addResults.template74
-rw-r--r--base/tps/apache/docroot/tokendb/agentSelectConfig.template123
-rw-r--r--base/tps/apache/docroot/tokendb/agentViewConfig.template187
-rw-r--r--base/tps/apache/docroot/tokendb/auditAdmin.template213
-rw-r--r--base/tps/apache/docroot/tokendb/confirmConfigChanges.template234
-rw-r--r--base/tps/apache/docroot/tokendb/confirmDeleteConfig.template173
-rw-r--r--base/tps/apache/docroot/tokendb/delete.template294
-rw-r--r--base/tps/apache/docroot/tokendb/deleteResults.template74
-rw-r--r--base/tps/apache/docroot/tokendb/doToken.template360
-rw-r--r--base/tps/apache/docroot/tokendb/doTokenConfirm.template344
-rw-r--r--base/tps/apache/docroot/tokendb/edit.template199
-rw-r--r--base/tps/apache/docroot/tokendb/editConfig.template237
-rw-r--r--base/tps/apache/docroot/tokendb/editResults.template75
-rw-r--r--base/tps/apache/docroot/tokendb/editUser.template313
-rw-r--r--base/tps/apache/docroot/tokendb/error.template73
-rw-r--r--base/tps/apache/docroot/tokendb/index.template151
-rw-r--r--base/tps/apache/docroot/tokendb/indexAdmin.template176
-rw-r--r--base/tps/apache/docroot/tokendb/indexOperator.template129
-rw-r--r--base/tps/apache/docroot/tokendb/new.template93
-rw-r--r--base/tps/apache/docroot/tokendb/newUser.template179
-rw-r--r--base/tps/apache/docroot/tokendb/revoke.template317
-rw-r--r--base/tps/apache/docroot/tokendb/search.template118
-rw-r--r--base/tps/apache/docroot/tokendb/searchActivity.template123
-rw-r--r--base/tps/apache/docroot/tokendb/searchActivityAdmin.template119
-rw-r--r--base/tps/apache/docroot/tokendb/searchActivityAdminResults.template234
-rw-r--r--base/tps/apache/docroot/tokendb/searchActivityResults.template239
-rw-r--r--base/tps/apache/docroot/tokendb/searchAdmin.template115
-rw-r--r--base/tps/apache/docroot/tokendb/searchAdminResults.template222
-rw-r--r--base/tps/apache/docroot/tokendb/searchCertificate.template118
-rw-r--r--base/tps/apache/docroot/tokendb/searchCertificateResults.template226
-rw-r--r--base/tps/apache/docroot/tokendb/searchResults.template227
-rw-r--r--base/tps/apache/docroot/tokendb/searchUser.template126
-rw-r--r--base/tps/apache/docroot/tokendb/searchUserResults.template190
-rw-r--r--base/tps/apache/docroot/tokendb/selectConfig.template137
-rw-r--r--base/tps/apache/docroot/tokendb/selfTest.template129
-rw-r--r--base/tps/apache/docroot/tokendb/selfTestResults.template113
-rw-r--r--base/tps/apache/docroot/tokendb/show.template379
-rw-r--r--base/tps/apache/docroot/tokendb/showAdmin.template302
-rw-r--r--base/tps/apache/docroot/tokendb/showCert.template355
-rwxr-xr-xbase/tps/apache/docroot/tokendb/userDelete.template174
41 files changed, 7828 insertions, 0 deletions
diff --git a/base/tps/apache/docroot/tokendb/addConfig.template b/base/tps/apache/docroot/tokendb/addConfig.template
new file mode 100644
index 000000000..ce0177c1a
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/addConfig.template
@@ -0,0 +1,164 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2010 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">Red Hat<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Add " + disp_conf_type + " Configuration </font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+// validate according to the pattern
+function validate_form(s) {
+ var s_array = s.split("\n");
+ var reg = new RegExp(conf_pattern.replace(/\$name/g, conf_name));
+
+ for (var i=0; i< s_array.length ; i++) {
+ var key_value = s_array[i].split("=");
+ if (! reg.test(key_value[0])) {
+ alert(key_value[0] + " is not a valid parameter.\nValid parameters have the format " + conf_pattern.replace(/\$name/g, conf_name));
+ return false;
+ }
+ }
+ return true;
+}
+
+function doUpdateConfig(form) {
+ var uri = "";
+ var s = document.addConfigForm.added_params.value;
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+
+ if (validate_form(s)) {
+ document.addConfigForm.added_params.value = s.replace(/\n/g, "&&");
+ this.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5>" + disp_conf_type + ": </td>\n");
+ document.write("<td align=left >" + conf_name + "</td></tr>");
+
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5> Status: </td>\n");
+ document.write("<td align=left width=20% > New </td></tr>");
+
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5> Contents: </td>\n");
+ document.write("<form NAME =\"addConfigForm\" METHOD=POST onSubmit=\"return doUpdateConfig(this);\">\n");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=save_config_changes\">");
+ document.write("<input TYPE=hidden NAME=ptype VALUE=\"" + conf_type + "\">");
+ document.write("<input TYPE=hidden NAME=pname VALUE=\"" + conf_name + "\">");
+ document.write("<input TYPE=hidden NAME=new_config VALUE=true>");
+
+ document.write("<td>\n");
+ document.write("<textarea name=added_params cols=100 rows=40>\n");
+ document.write("</textarea>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+ document.write("<HR NOSHADE SIZE=1>");
+ document.write("<DIV ALIGN=RIGHT>");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=4>\n");
+ document.write("<tr>\n");
+ document.write("<td align=left>\n");
+ document.write("<input TYPE=submit VALUE=Save>");
+ document.write("</td>\n");
+ document.write("<td align=left>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</form>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/addResults.template b/base/tps/apache/docroot/tokendb/addResults.template
new file mode 100644
index 000000000..eca814f8b
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/addResults.template
@@ -0,0 +1,74 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a></font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+if (typeof(tid) == "undefined") {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ document.write("Missing "+addType+" ID</font>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ document.write("New "+addType+" record "+tid+" has been added.</font>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+}
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/agentSelectConfig.template b/base/tps/apache/docroot/tokendb/agentSelectConfig.template
new file mode 100644
index 000000000..af782c190
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/agentSelectConfig.template
@@ -0,0 +1,123 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">Red Hat<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : " + disp_conf_type + " Review and Approval </font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doViewConfig(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ this.action = uri;
+ return true;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr colspan=3> <p> Use this form to select " + conf_type.replace(/_/g, " ").toLowerCase() + " for review. <br>" +
+ "Select an item in the drop-down menu below and click \"Review\". </p></tr>");
+
+ document.write("<form NAME =\"selectViewConfigForm\" METHOD=POST onSubmit=\"return doViewConfig(this);\">");
+
+ document.write("<tr>");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=agent_view_config\">");
+ document.write("<input TYPE=HIDDEN NAME=ptype VALUE=\"" + conf_type + "\">");
+ var pset_list = conf_list.split(",");
+ document.write("<td ALIGN=LEFT width=20% >" + disp_conf_type + ": </td>");
+ document.write("<td ALIGN=LEFT><select name=\"pname\" >");
+ for (var i=0; i < pset_list.length; i++) {
+ document.write("<option value=\""+ pset_list[i] + "\">" + pset_list[i] + "</option>\n");
+ }
+ document.write("</select></td></tr>");
+ document.write("</table>");
+
+ document.write("<HR NOSHADE SIZE=1>");
+ document.write("<DIV ALIGN=RIGHT>");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=4>\n");
+ document.write("<tr><td><input TYPE=submit VALUE=Review> </td>");
+ document.write("<td><input TYPE=button VALUE=Cancel onClick=\"doCancel();\"></td>");
+ document.write("</tr>");
+ document.write("</table>");
+ document.write("</form>\n");
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/agentViewConfig.template b/base/tps/apache/docroot/tokendb/agentViewConfig.template
new file mode 100644
index 000000000..9abce847a
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/agentViewConfig.template
@@ -0,0 +1,187 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2010 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">Red Hat<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : " + disp_conf_type + " Review </font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+function validate_form(thisform) {
+ with (thisform) {
+ }
+ return true;
+}
+
+function doViewConfig(form) {
+ var uri = "";
+ var s = document.editConfigForm.pvalues.value;
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ if (validate_form(this)) {
+ this.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+function doDelete() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5>" + disp_conf_type + ": </td>\n");
+ document.write("<td align=left width=20% colspan=4>" + conf_name + "</td></tr>");
+
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5> Status: </td>\n");
+ document.write("<td align=left width=20% colspan=4>" + conf_state.replace(/_/g, " ") + "</td></tr>");
+
+ document.write("<form NAME =\"viewConfigForm\" METHOD=POST onSubmit=\"return doViewConfig(this);\">\n");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=agent_change_config_state\">");
+ document.write("<input TYPE=hidden NAME=ptype VALUE=\"" + conf_type + "\">");
+ document.write("<input TYPE=hidden NAME=pname VALUE=\"" + conf_name + "\">");
+ document.write("<input TYPE=hidden NAME=ptimestamp VALUE=\"" + conf_tstamp + "\">");
+
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5> Contents: </td>\n");
+ document.write("<td colspan=4>\n");
+ if ((typeof(conf_values) == "undefined") || (conf_values.length == 0) ) {
+ document.write("<textarea name=pvalues cols=100 rows=40 style=\"color:#000000\" disabled=disabled >\n");
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=pvalues cols=100 rows=40 style=\"color:#000000\" disabled=disabled >\n");
+ document.write(conf_values.replace(/&&/g, "\r\n"));
+ document.write("</textarea>\n");
+ }
+ document.write("</td></tr>\n");
+ document.write("</table>\n");
+
+ document.write("<HR NOSHADE SIZE=1>");
+ document.write("<DIV ALIGN=RIGHT>");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=4>\n");
+ document.write("<tr>\n");
+ document.write("<td align=left>\n");
+ if (conf_state == "Enabled") {
+ document.write("<input TYPE=submit name=choice VALUE=Disable>");
+ } else {
+ document.write("<input TYPE=submit name=choice VALUE=Disable disabled=disabled>");
+ }
+ document.write("</td>\n");
+ document.write("<td align=left>\n");
+ if (conf_state == "Pending_Approval") {
+ document.write("<input TYPE=submit name=choice VALUE=Reject >");
+ } else {
+ document.write("<input TYPE=submit name=choice VALUE=Reject disabled=disabled>");
+ }
+ document.write("</td>\n");
+ document.write("<td align=left>\n");
+ if ((conf_state == "Disabled") || (conf_state == "Pending_Approval")) {
+ document.write("<input TYPE=submit name=choice VALUE=\"Approve and Enable\">");
+ } else {
+ document.write("<input TYPE=submit name=choice VALUE=\"Approve and Enable\" disabled=disabled>");
+ }
+ document.write("</td>\n");
+ document.write("<td align=left>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</form>\n");
+ document.write("</table>\n");
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/auditAdmin.template b/base/tps/apache/docroot/tokendb/auditAdmin.template
new file mode 100644
index 000000000..ff299530c
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/auditAdmin.template
@@ -0,0 +1,213 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Configure Audit Logging</font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doUpdateAudit(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ this.action = uri;
+ return true;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+ document.write("<BR>");
+ document.write("<form NAME =\"editAuditForm\" METHOD=POST onSubmit=\"return doUpdateAudit(this);\">");
+ document.write("<input TYPE=HIDDEN NAME=query VALUE=\"op=update_audit_admin\">");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Enable Audit Logging:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ if (signedAuditEnable == "true") {
+ document.write("<input TYPE=RADIO NAME=auditEnable VALUE=\"true\" checked> Enable &nbsp;&nbsp;&nbsp;");
+ document.write("<input TYPE=RADIO NAME=auditEnable VALUE=\"false\"> Disable");
+ } else {
+ document.write("<input TYPE=RADIO NAME=auditEnable VALUE=\"true\" > Enable &nbsp;&nbsp;&nbsp;");
+ document.write("<input TYPE=RADIO NAME=auditEnable VALUE=\"false\" checked> Disable");
+ }
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Enable Audit Log Signing:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ if (logSigningEnable == "true") {
+ document.write("<input TYPE=RADIO NAME=logSigningEnable VALUE=\"true\" checked> Enable &nbsp;&nbsp;&nbsp;");
+ document.write("<input TYPE=RADIO NAME=logSigningEnable VALUE=\"false\"> Disable");
+ } else {
+ document.write("<input TYPE=RADIO NAME=logSigningEnable VALUE=\"true\" > Enable &nbsp;&nbsp;&nbsp;");
+ document.write("<input TYPE=RADIO NAME=logSigningEnable VALUE=\"false\" checked> Disable");
+ }
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Audit Log Signing Interval (seconds):&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=TEXT NAME=logSigningInterval VALUE=\"" + signedAuditLogInterval + "\" />");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Audit Log Signing Buffer Size (bytes, minimum 512):&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=TEXT NAME=logSigningBufferSize VALUE=\"" + signedAuditLogBufferSize + "\" />");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ var nonselectable_array = signedAuditNonSelectableEvents.split(",");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Events Always Logged:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<textarea name=nonselect cols=40 rows=10 >\n");
+ for (var i=0; i< nonselectable_array.length; i++) {
+ document.write(nonselectable_array[i] + "\n");
+ }
+ document.write("</textarea>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<p> Selected Optional Events to be logged: </p>");
+ var selectable_array = signedAuditSelectableEvents.split(",");
+ var signedAuditSelectedEvents_tmp = "," + signedAuditSelectedEvents + ",";
+
+
+ if ((typeof(selectable_array) != "undefined") && (selectable_array.length > 0)) {
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ for (var i=0; i < selectable_array.length; i++) {
+ if (i % 3 == 0) {
+ document.write("<tr bgcolor=#e5e5e5>\n");
+ }
+ document.write("<td>" + selectable_array[i] + "</td>");
+ if (signedAuditSelectedEvents_tmp.search("," + selectable_array[i] + ",") != -1) {
+ document.write("<td><input type=checkbox name=\"event_" + i + "\" value=\"" + selectable_array[i] + "\" checked></td>");
+ } else {
+ document.write("<td><input type=checkbox name=\"event_" + i + "\" value=\"" + selectable_array[i] + "\"></td>");
+ }
+
+ if ((i % 3 == 2) || (i == (selectable_array.length - 1))) {
+ document.write("</tr>");
+ }
+ }
+ document.write("</table>");
+ } else {
+ document.write("<p>There are no optional events to select.</p>");
+ }
+
+ document.write("<input type=hidden name=\"nEvents\" value=" + selectable_array.length + ">");
+
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=submit VALUE=Update>");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</form>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/confirmConfigChanges.template b/base/tps/apache/docroot/tokendb/confirmConfigChanges.template
new file mode 100644
index 000000000..ef541d732
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/confirmConfigChanges.template
@@ -0,0 +1,234 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2010 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">Red Hat<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+String.prototype.htmlEntities = function () {
+ return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+};
+
+
+String.prototype.unescapeEntry = function () {
+ return this.replace(/&dbquote/g,'\"').replace(/&singlequote/g,'\'').replace(/&lessthan/g,'<').replace(/&greaterthan/g, '>');
+};
+
+String.prototype.escapeEntry = function () {
+ return this.replace(/\"/g,'&dbquote').replace(/\'/g,'&singlequote').replace(/</g,'&lessthan').replace(/>/g, '&greaterthan');
+};
+
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : " + disp_conf_type + " Configuration </font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+function validate_form(thisform) {
+ with (thisform) {
+ }
+ return true;
+}
+
+function doConfirmConfig(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+
+ if (validate_form(this)) {
+ this.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doBack(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+
+ if (validate_form(this)) {
+ this.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+ document.write("<p> Please confirm changes to the " + disp_conf_type + ": " + conf_name + "</p>");
+ document.write("<BR/>");
+
+ document.write("<form NAME =\"confirmConfigForm\" METHOD=POST onSubmit=\"return doConfirmConfig(this);\">\n");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=save_config_changes\">");
+ document.write("<input TYPE=hidden NAME=ptype VALUE=\"" + conf_type + "\">");
+ document.write("<input TYPE=hidden NAME=pname VALUE=\"" + conf_name + "\">");
+ document.write("<input TYPE=hidden NAME=added_params VALUE='" + added_str + "'>");
+ document.write("<input TYPE=hidden NAME=deleted_params VALUE='" + deleted_str + "'>");
+ document.write("<input TYPE=hidden NAME=changed_params VALUE='" + changed_str + "'>");
+ document.write("<input TYPE=hidden NAME=new_config VALUE=false>");
+ document.write("<input TYPE=hidden NAME=ptimestamp VALUE=\"" + conf_tstamp + "\">");
+ document.write("<input TYPE=hidden NAME=approval_requested VALUE=\"" + conf_approval_requested + "\">");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5> <font size=-1 face=\"PrimaSans BT, Verdana, sans-serif\"> Parameters added: </font></td>");
+ document.write("<td>");
+ if ((typeof(added_str) == "undefined") || (added_str.length == 0) ) {
+ document.write("<textarea name=disp_added_params cols=100 rows=10 style=\"color:#000000\" disabled=disabled>\n");
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=disp_added_params cols=100 rows=10 style=\"color:#000000\" disabled=disabled>\n");
+ document.write(added_str.unescapeEntry().replace(/&&/g, "\r\n"));
+ document.write("</textarea>\n");
+ }
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5> <font size=-1 face=\"PrimaSans BT, Verdana, sans-serif\"> Parameters deleted: </font></td>");
+ document.write("<td>");
+ if ((typeof(deleted_str) == "undefined") || (deleted_str.length == 0) ) {
+ document.write("<textarea name=disp_deleted_params cols=100 rows=10 style=\"color:#000000\" disabled=disabled>\n");
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=disp_deleted_params cols=100 rows=10 style=\"color:#000000\" disabled=disabled>\n");
+ document.write(deleted_str.unescapeEntry().replace(/&&/g, "\r\n"));
+ document.write("</textarea>\n");
+ }
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5> <font size=-1 face=\"PrimaSans BT, Verdana, sans-serif\"> Parameters changed: </font></td>");
+ document.write("<td>");
+ if ((typeof(changed_str) == "undefined") || (changed_str.length == 0) ) {
+ document.write("<textarea name=disp_changed_params cols=100 rows=10 style=\"color:#000000\" disabled=disabled>\n");
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=disp_changed_params cols=100 rows=10 style=\"color:#000000\" disabled=disabled>\n");
+ document.write(changed_str.unescapeEntry().replace(/&&/g, "\r\n"));
+ document.write("</textarea>\n");
+ }
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+ document.write("<HR NOSHADE SIZE=1>");
+ document.write("<DIV ALIGN=RIGHT>");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=4>\n");
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=submit VALUE=\"Confirm Changes\">");
+ document.write("</td>\n");
+ document.write("</form>\n");
+
+ document.write("<td>\n");
+ document.write("<form NAME =\"backForm\" METHOD=POST onSubmit=\"return doBack(this);\">\n");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=return_to_edit_config_parameter\">");
+ document.write("<input TYPE=hidden NAME=ptype VALUE=\"" + conf_type + "\">");
+ document.write("<input TYPE=hidden NAME=pname VALUE=\"" + conf_name + "\">");
+ document.write("<input TYPE=hidden NAME=pvalues VALUE=\"" + conf_values.escapeEntry() + "\">");
+ document.write("<input TYPE=hidden NAME=ptimestamp VALUE=\"" + conf_tstamp + "\">");
+ document.write("<input TYPE=hidden NAME=pstate VALUE=\"" + conf_state + "\">");
+ document.write("<input TYPE=submit VALUE=\"Back\">");
+ document.write("</form>\n");
+ document.write("</td>\n");
+
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/confirmDeleteConfig.template b/base/tps/apache/docroot/tokendb/confirmDeleteConfig.template
new file mode 100644
index 000000000..3b1ab8b47
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/confirmDeleteConfig.template
@@ -0,0 +1,173 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2010 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">Red Hat<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Delete " + disp_conf_type + " Confirmation </font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+function validate_form(thisform) {
+ with (thisform) {
+ }
+ return true;
+}
+
+function doUpdateConfig(form) {
+ var uri = "";
+ var s = document.editConfigForm.pvalues.value;
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ document.editConfigForm.pvalues.value = s.replace(/\n/g, "&&");
+ if (validate_form(this)) {
+ this.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+function doDelete() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5>" + disp_conf_type + ": </td>\n");
+ document.write("<td align=left width=20% colspan=4>" + conf_name + "</td></tr>");
+
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5> Status: </td>\n");
+ document.write("<td align=left width=20% colspan=4>" + conf_state.replace(/_/g, " ") + "</td></tr>");
+
+ document.write("<form NAME =\"editConfigForm\" METHOD=POST onSubmit=\"return doUpdateConfig(this);\">\n");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=delete_config_parameter\">");
+ document.write("<input TYPE=hidden NAME=ptype VALUE=\"" + conf_type + "\">");
+ document.write("<input TYPE=hidden NAME=pname VALUE=\"" + conf_name + "\">");
+ document.write("<input TYPE=hidden NAME=ptimestamp VALUE=\"" + conf_tstamp + "\">");
+
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5> Contents: </td>\n");
+ document.write("<td align=left colspan=4>\n");
+ if ((typeof(conf_values) == "undefined") || (conf_values.length == 0) ) {
+ document.write("<textarea name=pvalues style=\"color:#000000\" cols=100 rows=40 disabled=disabled>\n");
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=pvalues cols=100 style=\"color:#000000\" rows=40 disabled=disabled>\n");
+ document.write(conf_values.replace(/&&/g, "\r\n"));
+ document.write("</textarea>\n");
+ }
+ document.write("</td></tr>\n");
+ document.write("</table>\n");
+
+ document.write("<HR NOSHADE SIZE=1>");
+ document.write("<DIV ALIGN=RIGHT>");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=4>\n");
+ document.write("<tr valign=top>\n");
+ document.write("<td>\n");
+ document.write("Are you sure?");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=submit VALUE=\"Delete\">");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</form>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/delete.template b/base/tps/apache/docroot/tokendb/delete.template
new file mode 100644
index 000000000..4d3243db1
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/delete.template
@@ -0,0 +1,294 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Token Details</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function trim(str) {
+ var i, k, newString;
+
+ for (i = 0; i < str.length; i++) {
+ if (str.charAt(i) != ' ' )
+ break;
+ }
+ for (k = str.length - 1; k >= i; k--) {
+ if (str.charAt(k) != ' ' ) {
+ k++;
+ break;
+ }
+ }
+
+ if (k > i)
+ newString = str.substring(i, k);
+ else
+ newString = null;
+
+ return newString;
+}
+
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+function doSave(form) {
+ if (form.uid.value.length > 0) {
+ var trimmedList = "";
+ var uids = form.uid.value.split(',');
+
+ for (var i=0; i < uids.length; i++) {
+ if (i > 0) trimmedList += ",";
+ trimmedList += trim(uids[i]);
+ }
+ form.uid.value = trimmedList;
+ }
+ if (form.status.value.length > 0) {
+ form.status.value = trim(form.status.value);
+ }
+
+ if (form.status.value == "") {
+ alert("Enter token status");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=save&tid="+results[0].cn;
+
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+ if (results[0].tokenStatus != form.status.value) {
+ uri += "&s=" + form.status.value;
+ }
+ uri += "&m=" + results[0].modified;
+ location.href = uri;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many tokens to edit</font>\n");
+} else {
+ document.write("<BR>");
+
+ document.write("<p>\n");
+ document.write("<b>Token Information:</b>");
+ document.write("<p>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Policy:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenPolicy+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<p>\n");
+ document.write("<b>System Information:</b>");
+ document.write("<p>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Info:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].keyInfo+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Applet ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenAppletID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Creation Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modification Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr valign=top>\n");
+ document.write("<td>\n");
+ document.write("Are you sure?");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=delete><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=Delete></form>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/deleteResults.template b/base/tps/apache/docroot/tokendb/deleteResults.template
new file mode 100644
index 000000000..606e11bb0
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/deleteResults.template
@@ -0,0 +1,74 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a></font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+if (typeof(tid) == "undefined") {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ document.write("Missing " + deleteType + " ID</font>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ document.write(deleteType + " record "+tid+" has been deleted.</font>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+}
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/doToken.template b/base/tps/apache/docroot/tokendb/doToken.template
new file mode 100644
index 000000000..419a9a240
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/doToken.template
@@ -0,0 +1,360 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Token Details</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function breakLines(str) {
+ str = str.replace('#', '<br>');
+ return str;
+}
+
+function trim(str) {
+ var i, k, newString;
+
+ for (i = 0; i < str.length; i++) {
+ if (str.charAt(i) != ' ' )
+ break;
+ }
+ for (k = str.length - 1; k >= i; k--) {
+ if (str.charAt(k) != ' ' ) {
+ k++;
+ break;
+ }
+ }
+
+ if (k > i)
+ newString = str.substring(i, k);
+ else
+ newString = null;
+
+ return newString;
+}
+
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+function doSave(form) {
+ if (form.uid.value.length > 0) {
+ var trimmedList = "";
+ var uids = form.uid.value.split(',');
+
+ for (var i=0; i < uids.length; i++) {
+ if (i > 0) trimmedList += ",";
+ trimmedList += trim(uids[i]);
+ }
+ form.uid.value = trimmedList;
+ }
+ if (form.status.value.length > 0) {
+ form.status.value = trim(form.status.value);
+ }
+
+ if (form.status.value == "") {
+ alert("Enter token status");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=save&tid="+results[0].cn;
+
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+ if (results[0].tokenStatus != form.status.value) {
+ uri += "&s=" + form.status.value;
+ }
+ uri += "&m=" + results[0].modified;
+ location.href = uri;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+function check_transition(state, tlist) {
+ for (var i=0; i < tlist.length; i++) {
+ if (state == tlist[i]) {
+ return true;
+ }
+ }
+ return false;
+}
+
+if (rc == "0") {
+ document.write("<b>The operation has been successful.</b>");
+ document.write("<p>\n");
+} else if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many tokens to edit</font>\n");
+} else {
+ document.write("<BR>");
+
+ document.write("<p>\n");
+ document.write("<b>Token Information:</b>");
+ document.write("<p>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Reason:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenReason+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Policy:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenPolicy+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<p>\n");
+ document.write("<b>System Information:</b>");
+ document.write("<p>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Info:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].keyInfo+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Applet ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenAppletID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Creation Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modification Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td width=60%>\n");
+ var transitions = allowed_transitions.split(",");
+ if (allowed_transitions != "") {
+ document.write("<form method='get' action='tus'><select name=\"question\">");
+
+ if (check_transition(1, transitions)) {
+ document.write("<option value=\"1\" >This token has been physically damaged.</option>");
+ } else {
+ document.write("<option value=\"1\" disabled=true >This token has been physically damaged.</option>");
+ }
+ if (check_transition(2, transitions)) {
+ document.write("<option value=\"2\">This token has been permanently lost.</option>");
+ } else {
+ document.write("<option value=\"2\" disabled=true >This token has been permanently lost.</option>");
+ }
+ if (check_transition(3, transitions)) {
+ document.write("<option value=\"3\" >This token has been temporarily lost.</option>");
+ } else {
+ document.write("<option value=\"3\" disabled=true >This token has been temporarily lost.</option>");
+ }
+ if (check_transition(4, transitions)) {
+ document.write("<option value=\"4\" >This temporarily lost token has been found.</option>");
+ } else {
+ document.write("<option value=\"4\" disabled=true >This temporarily lost token has been found.</option>");
+ }
+ if (check_transition(5, transitions)) {
+ document.write("<option value=\"5\" >This temporarily lost token cannot be found (becomes permanently lost).</option>");
+ } else {
+ document.write("<option value=\"5\" disabled=true >This temporarily lost token cannot be found (becomes permanently lost).</option>");
+ }
+ if (check_transition(6, transitions)) {
+ document.write("<option value=\"6\" >This token has been terminated.</option>");
+ } else {
+ document.write("<option value=\"6\" disabled=true >This token has been terminated.</option>");
+ }
+ document.write("</select><input type=hidden name=op value=do_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>");
+  }
+ document.write("</td>\n");
+ document.write("<td width=10%>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_certificate_all><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Certificates\"></form>");
+ document.write("</td>\n");
+ document.write("<td width=10%>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity_all><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
+ document.write("</td>\n");
+ document.write("<td width=10%>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=edit><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Edit\"></form>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/doTokenConfirm.template b/base/tps/apache/docroot/tokendb/doTokenConfirm.template
new file mode 100644
index 000000000..16bd2a191
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/doTokenConfirm.template
@@ -0,0 +1,344 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Token Details</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function breakLines(str) {
+ str = str.replace('#', '<br>');
+ return str;
+}
+
+function trim(str) {
+ var i, k, newString;
+
+ for (i = 0; i < str.length; i++) {
+ if (str.charAt(i) != ' ' )
+ break;
+ }
+ for (k = str.length - 1; k >= i; k--) {
+ if (str.charAt(k) != ' ' ) {
+ k++;
+ break;
+ }
+ }
+
+ if (k > i)
+ newString = str.substring(i, k);
+ else
+ newString = null;
+
+ return newString;
+}
+
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+function doSave(form) {
+ if (form.uid.value.length > 0) {
+ var trimmedList = "";
+ var uids = form.uid.value.split(',');
+
+ for (var i=0; i < uids.length; i++) {
+ if (i > 0) trimmedList += ",";
+ trimmedList += trim(uids[i]);
+ }
+ form.uid.value = trimmedList;
+ }
+ if (form.status.value.length > 0) {
+ form.status.value = trim(form.status.value);
+ }
+
+ if (form.status.value == "") {
+ alert("Enter token status");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=save&tid="+results[0].cn;
+
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+ if (results[0].tokenStatus != form.status.value) {
+ uri += "&s=" + form.status.value;
+ }
+ uri += "&m=" + results[0].modified;
+ location.href = uri;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many tokens to edit</font>\n");
+} else {
+ document.write("<BR>");
+
+ document.write("<p>\n");
+ document.write("<b>Token Information:</b>");
+ document.write("<p>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Reason:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenReason+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Policy:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenPolicy+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<p>\n");
+ document.write("<b>System Information:</b>");
+ document.write("<p>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Info:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].keyInfo+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Applet ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenAppletID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Creation Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modification Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<td width=80%>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">");
+ document.write("Are you sure?");
+ document.write("</font>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td width=80%>\n");
+ document.write("<form method='get' action='tus'><select name=\"question\">");
+ if (question == '1') {
+ document.write("<option selected value=\"1\">This token has been physically damaged.</option>");
+ } else {
+ document.write("<option value=\"1\" disabled>This token has been physically damaged.</option>");
+ }
+ if (question == '2') {
+ document.write("<option selected value=\"2\">This token has been permanently lost.</option>");
+ } else {
+ document.write("<option value=\"2\" disabled>This token has been permanently lost.</option>");
+ }
+ if (question == '3') {
+ document.write("<option selected value=\"3\">This token has been temporarily lost.</option>");
+ } else {
+ document.write("<option value=\"3\" disabled>This token has been temporarily lost.</option>");
+ }
+ if (question == '4') {
+ document.write("<option selected value=\"4\">This temporarily lost token has been found.</option>");
+ } else {
+ document.write("<option value=\"4\" disabled>This temporarily lost token has been found.</option>");
+ }
+ if (question == '5') {
+ document.write("<option selected value=\"5\">This temporarily lost token cannot be found (becomes permanently lost).</option>");
+ } else {
+ document.write("<option value=\"5\" disabled>This temporarily lost token cannot be found (becomes permanently lost).</option>");
+ }
+ if (question == '6') {
+ document.write("<option selected value=\"6\">This token has been terminated.</option>");
+ } else {
+ document.write("<option value=\"6\" disabled>This token has been terminated.</option>");
+ }
+ document.write("</select><input type=hidden name=op value=do_token>");
+ document.write("<input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/edit.template b/base/tps/apache/docroot/tokendb/edit.template
new file mode 100644
index 000000000..163ae3bd1
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/edit.template
@@ -0,0 +1,199 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Edit Token</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function trim(str) {
+ var i, k, newString;
+
+ for (i = 0; i < str.length; i++) {
+ if (str.charAt(i) != ' ' )
+ break;
+ }
+ for (k = str.length - 1; k >= i; k--) {
+ if (str.charAt(k) != ' ' ) {
+ k++;
+ break;
+ }
+ }
+
+ if (k > i)
+ newString = str.substring(i, k);
+ else
+ newString = null;
+
+ return newString;
+}
+
+function doSave(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=save&tid="+results[0].cn;
+
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+
+ if (results[0].tokenPolicy != form.tokenPolicy.value) {
+ uri += "&tokenPolicy=" + form.tokenPolicy.value;
+ }
+ uri += "&m=" + results[0].modified;
+ location.href = uri;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many tokens to edit</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<FORM NAME =\"editForm\" ACTION=\"\" METHOD=GET>");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=TEXT NAME=uid SIZE=20 VALUE="+results[0].tokenUserID+">\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write(results[0].tokenStatus+"\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Policy:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=TEXT NAME=tokenPolicy SIZE=20 VALUE="+results[0].tokenPolicy+">\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write(results[0].tokenType+"\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Save onClick=\"doSave(editForm);\">");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+ document.write("</form>\n");
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/editConfig.template b/base/tps/apache/docroot/tokendb/editConfig.template
new file mode 100644
index 000000000..a4091870a
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/editConfig.template
@@ -0,0 +1,237 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2010 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">Red Hat<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+String.prototype.htmlEntities = function () {
+ return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+};
+
+String.prototype.unescapeEntry = function () {
+ return this.replace(/&dbquote/g,'\"').replace(/&singlequote/g,'\'').replace(/&lessthan/g,'<').replace(/&greaterthan/g, '>');
+};
+
+String.prototype.escapeEntry = function () {
+ return this.replace(/\"/g,'&dbquote').replace(/\'/g,'&singlequote').replace(/</g,'&lessthan').replace(/>/g, '&greaterthan');
+};
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : " + disp_conf_type + " Configuration </font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+// validate according to the pattern
+function validate_form(s) {
+ var s_array = s.split("\n");
+ var reg = new RegExp(conf_pattern.replace(/\$name/g, conf_name));
+
+ for (var i=0; i< s_array.length ; i++) {
+ var key_value = s_array[i].split("=");
+ if (! reg.test(key_value[0])) {
+ alert(key_value[0] + " is not a valid parameter.\nValid parameters have the format " + conf_pattern.replace(/\$name/g, conf_name));
+ return false;
+ }
+ }
+ return true;
+}
+
+function doUpdateConfig(form) {
+ var uri = "";
+ var s = document.editConfigForm.pvalues.value;
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ if (validate_form(s)) {
+ document.editConfigForm.pvalues.value = s.escapeEntry().replace(/\n/g, "&&");
+ this.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+function doDelete() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5>" + disp_conf_type + ": </td>\n");
+ document.write("<td align=left width=20% colspan=4>" + conf_name + "</td></tr>");
+
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5> Status: </td>\n");
+ document.write("<td align=left width=20% colspan=4>" + conf_state.replace(/_/g, " ") + "</td></tr>");
+
+ document.write("<form NAME =\"editConfigForm\" METHOD=POST onSubmit=\"return doUpdateConfig(this);\">\n");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=confirm_config_changes\">");
+ document.write("<input TYPE=hidden NAME=ptype VALUE=\"" + conf_type + "\">");
+ document.write("<input TYPE=hidden NAME=pname VALUE=\"" + conf_name + "\">");
+ document.write("<input TYPE=hidden NAME=ptimestamp VALUE=\"" + conf_tstamp + "\">");
+
+ document.write("<tr><td align=left width=20% bgcolor=#e5e5e5> Contents: </td>\n");
+ document.write("<td align=left colspan=4>\n");
+ if ((typeof(conf_values) == "undefined") || (conf_values.length == 0) ) {
+ if ((conf_state == "Disabled") || (agent_must_approve != "true")) {
+ document.write("<textarea name=pvalues cols=100 rows=40>\n");
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=pvalues style=\"color:#000000\" cols=100 rows=40 disabled=disabled>\n");
+ document.write("</textarea>\n");
+ }
+ } else {
+ if ((conf_state == "Disabled") || (agent_must_approve != "true")) {
+ document.write("<textarea name=pvalues cols=100 rows=40>\n");
+ document.write(conf_values.unescapeEntry().replace(/&&/g, "\r\n"));
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=pvalues cols=100 style=\"color:#000000\" rows=40 disabled=disabled>\n");
+ document.write(conf_values.unescapeEntry().replace(/&&/g, "\r\n"));
+ document.write("</textarea>\n");
+ }
+ }
+ document.write("</td></tr>\n");
+ document.write("</table>\n");
+
+ document.write("<HR NOSHADE SIZE=1>");
+ document.write("<DIV ALIGN=RIGHT>");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=4>\n");
+
+ document.write("<tr>\n");
+ document.write("<td align=left>\n");
+ if ((conf_state == "Disabled") || (agent_must_approve != "true")) {
+ document.write("<input name=choice TYPE=submit VALUE=Save>");
+ } else {
+ document.write("<input name=choice TYPE=submit VALUE=Save disabled=disabled>");
+ }
+ document.write("</td>\n");
+
+ document.write("<td align=left>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+
+ if (agent_must_approve == "true") {
+ document.write("<td align=left>\n");
+ if (conf_state == "Disabled") {
+ document.write("<input name=choice TYPE=submit VALUE=\"Submit For Approval\">");
+ } else {
+ document.write("<input name=choice TYPE=submit VALUE=\"Submit For Approval\" disabled=disabled>");
+ }
+ document.write("</td>\n");
+ }
+
+ document.write("</form>\n");
+
+ if (conf_type != "Generals") {
+ document.write("<td align=left>\n");
+ document.write("<form name=deleteConfig method=POST onSubmit=\"return doDelete(this);\">\n");
+ document.write("<input type=hidden name=query value=\"op=confirm_delete_config\">");
+ document.write("<input type=hidden name=pname value=\"" + conf_name + "\">");
+ document.write("<input type=hidden name=ptype value=\"" + conf_type + "\">");
+ document.write("<input type=hidden name=pvalues value=\"" + conf_values.escapeEntry() + "\">");
+ document.write("<input type=hidden name=pstate value=\"" + conf_state + "\">");
+ document.write("<input TYPE=hidden NAME=ptimestamp VALUE=\"" + conf_tstamp + "\">");
+ if ((conf_state == "Disabled")|| (agent_must_approve != "true")) {
+ document.write("<input TYPE=submit VALUE=\"Delete\">");
+ } else {
+ document.write("<input TYPE=submit VALUE=\"Delete\" disabled=disabled>");
+ }
+ document.write("</form>");
+ document.write("</td>\n");
+ }
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/editResults.template b/base/tps/apache/docroot/tokendb/editResults.template
new file mode 100644
index 000000000..783b065c3
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/editResults.template
@@ -0,0 +1,75 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a></font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+if (typeof(tid) == "undefined") {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ document.write("Missing token ID</font>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ document.write("Token record <a href=\"tus?op=show&tid=" + tid + "\">"+tid+"</a> has been updated.</font>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/editUser.template b/base/tps/apache/docroot/tokendb/editUser.template
new file mode 100644
index 000000000..55b587cbe
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/editUser.template
@@ -0,0 +1,313 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Edit User</font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+function validate_form(thisform) {
+ with (thisform) {
+ if (validate_required(firstName,"First Name is required")==false) {
+ firstName.focus();
+ return false;
+ }
+ if (validate_required(lastName,"Last Name is required")==false) {
+ lastName.focus();
+ return false;
+ }
+ if (validate_required(userCert,"User Certificate is required")==false) {
+ userCert.focus();
+ return false;
+ }
+
+ }
+}
+
+function doUpdateUser(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ if (validate_form(this)) {
+ this.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function doUpdateUserProfile(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ this.action = uri;
+ return true;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+function doCheckBox(val) {
+ document.addUserProfileForm.other_profile.disabled = false;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many users to edit</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<form NAME =\"editUserForm\" METHOD=POST onSubmit=\"return doUpdateUser(this);\">");
+ document.write("<input TYPE=HIDDEN NAME=query VALUE=\"op=save_user\">");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "UserID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].uid+"</font>\n");
+ document.write("<input TYPE=HIDDEN NAME=uid VALUE=\"" + results[0].uid + "\">");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "First Name:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=TEXT NAME=firstName SIZE=20 VALUE=\""+
+ ((typeof(results[0].givenName) == 'undefined')?'':results[0].givenName)+"\">\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Last Name:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=TEXT NAME=lastName SIZE=20 VALUE=\""+results[0].sn+"\">\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Role:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td ><input type=checkbox name=opOperator value=Operators " + operator + ">Operator</td>\n");
+ document.write("<td ><input type=checkbox name=opAgent value=Agents " + agent + ">Agent</td>\n");
+ document.write("<td ><input type=checkbox name=opAdmin value=Administrators " + admin + ">Administrator</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Certificate:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ if ((typeof(results[0].userCertificate) == "undefined") || (results[0].userCertificate.length == 0) ) {
+ document.write("<textarea name=userCert cols=40 rows=10>\n");
+ document.write("Paste the base 64 user certificate here (without the header and footer)");
+ document.write("</textarea>\n");
+ } else {
+ document.write("<textarea name=userCert cols=40 rows=10>\n");
+ document.write(results[0].userCertificate.replace(/\.\./g, "\r\n"));
+ document.write("</textarea>\n");
+ }
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ if ((typeof(results[0].profileID) != "undefined") && (results[0].profileID.length != 0)) {
+
+ var profile_array = results[0].profileID.split("#");
+ document.write("<input TYPE=HIDDEN NAME=nProfiles VALUE=\"" + profile_array.length + "\">");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Profile ID</font>\n");
+ document.write("</td>\n");
+
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Remove Profile Access</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i=0; i < profile_array.length; i++) {
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write(profile_array[i]);
+ document.write("<input type=hidden name=\"profile_" + i + "\" value=\""+ profile_array[i] + "\">");
+ document.write("</td>\n");
+ document.write("<td><input type=checkbox name=\"delete_" + i + "\" value=\"delete\"></td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+ } else {
+ document.write("<p>Profile Memberships</p>");
+ }
+
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=submit VALUE=Update>");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("</form>\n");
+ document.write("<td>\n");
+ document.write("<form name=deleteUser method=GET action='tus'>\n");
+ document.write("<input type=hidden name=op value=user_delete_confirm>");
+ document.write("<input type=hidden name=uid value=" + results[0].uid + ">");
+ document.write("<input TYPE=submit VALUE=\"Delete User\">");
+ document.write("</form>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+ document.write("<DIV ALIGN=LEFT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+
+ if ((typeof(start_val) != "undefined") && (start_val > 0) && (typeof(num_profiles_to_display) != "undefined")) {
+ var new_start = start_val - num_profiles_to_display;
+ if (new_start < 0) new_start =0;
+ document.write("<td> <form name=prev_edit method=get action=\"doCancel()\">");
+ document.write("<input TYPE=hidden name=op VALUE=edit_user>");
+ document.write("<input TYPE=hidden name=uid VALUE=" + results[0].uid + ">");
+ document.write("<input TYPE=hidden name=start_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
+ }
+
+ if ((typeof(has_more_profile_vals) != "undefined") && (has_more_profile_vals == "true")) {
+ var new_start = end_val;
+ document.write("<td> <form method=get name=prev_edit action=\"doCancel()\">");
+ document.write("<input TYPE=hidden name=op VALUE=edit_user>");
+ document.write("<input TYPE=hidden name=uid VALUE=" + results[0].uid + ">");
+ document.write("<input TYPE=hidden name=start_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
+ }
+ document.write("</tr>");
+
+ document.write("<form NAME =\"addUserProfileForm\" METHOD=POST onSubmit=\"return doUpdateUserProfile(this);\">");
+ document.write("<tr>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 >\n");
+ document.write("<input TYPE=HIDDEN NAME=query VALUE=\"op=add_profile_user\">");
+ document.write("<input TYPE=HIDDEN NAME=uid VALUE=\"" + results[0].uid + "\">");
+ document.write("<td>Add new profile: <select name=\"profile_0\" onChange=\"doCheckbox(this.options[selectedIndex].value)\">");
+ for (var i=0; i < profile_list.length; i++) {
+ document.write("<option value=\""+ profile_list[i] + "\">" + profile_list[i] + "</option>\n");
+ }
+ document.write("</select></td>");
+ document.write("<td><input type=text name=other_profile></td>");
+ document.write("<td><input TYPE=submit VALUE=\"Add Profile\"></td></tr>");
+ document.write("</table>");
+ document.write("</form>\n");
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/error.template b/base/tps/apache/docroot/tokendb/error.template
new file mode 100644
index 000000000..8f629ff72
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/error.template
@@ -0,0 +1,73 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS Error!</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a></font>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+document.write("<font size=-1 face=\"PrimaSans BT, Verdana, sans-serif\">\n");
+
+if (typeof(error) == "undefined") {
+ document.write("TUS encountered undefined error.");
+} else {
+ document.write(""+error);
+}
+
+document.write("</font>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/index.template b/base/tps/apache/docroot/tokendb/index.template
new file mode 100644
index 000000000..4aa9f0cdd
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/index.template
@@ -0,0 +1,151 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS Agent</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a></font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\"><b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ if (form.uid.value == "" && form.tid.value == "") {
+ alert("Enter token or user ID");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view";
+ if (form.tid.value.length > 0) uri += "&tid=" + form.tid.value;
+ if (form.uid.value.length > 0) uri += "&uid=" + form.uid.value;
+ location.href = uri;
+ }
+}
+
+var lastCol = 100;
+document.write("<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%><tr>");
+if ((typeof(operatorAuth) != "undefined") && (operatorAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus?op=index_operator\">Operator Operations</td>");
+ lastCol -= 20;
+}
+if ((typeof(agentAuth) != "undefined") && (agentAuth == "true")) {
+ document.write("<td bgcolor=\"#e5e5e5\" width=\"20%\"><a href=\"/tus\">Agent Operations</td>");
+ lastCol -= 20;
+}
+if ((typeof(adminAuth) != "undefined") && (adminAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus?op=index_admin\">Administrator Operations</td>");
+ lastCol -= 20;
+}
+document.write("<td width=\"" + lastCol + "%\"></td>");
+document.write("</tr></table>");
+
+//-->
+</SCRIPT>
+
+<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%>
+<tr>
+ <td bgcolor=#e5e5e5>&nbsp;</td>
+</tr>
+</table>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td><i>Tokens</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search">List/Search Tokens</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Certificates</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search_certificate">List/Search Certificates</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Activities</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search_activity">List/Search Activities</a></td>
+ </tr>
+ <tr>
+ <td></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Advanced Configuration</i></td>
+ </tr>
+ <SCRIPT type="text/JavaScript">
+ <!--
+ var target_array = agent_target_list.split(",");
+ for (var i=0; i< target_array.length ; i++) {
+ document.write("<tr><td>&bull;&nbsp;<a href=\"tus?op=agent_select_config&type=" + target_array[i] + "\">" +
+ target_array[i].replace(/_/g, " ") + "</a></td> </tr>");
+ }
+ //-->
+ </SCRIPT>
+
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/indexAdmin.template b/base/tps/apache/docroot/tokendb/indexAdmin.template
new file mode 100644
index 000000000..97086257b
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/indexAdmin.template
@@ -0,0 +1,176 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS Admin</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a></font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\"><b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function submitEditForm(form) {
+ document.editForm.submit();
+}
+
+function doFind(form) {
+ if (form.uid.value == "" && form.tid.value == "") {
+ alert("Enter token or user ID");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view";
+ if (form.tid.value.length > 0) uri += "&tid=" + form.tid.value;
+ if (form.uid.value.length > 0) uri += "&uid=" + form.uid.value;
+ location.href = uri;
+ }
+}
+var lastCol = 100;
+document.write("<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%><tr>");
+if ((typeof(operatorAuth) != "undefined") && (operatorAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus?op=index_operator\">Operator Operations</td>");
+ lastCol -= 20;
+}
+if ((typeof(agentAuth) != "undefined") && (agentAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus\">Agent Operations</td>");
+ lastCol -=20;
+}
+if ((typeof(adminAuth) != "undefined") && (adminAuth == "true")) {
+ document.write("<td bgcolor=\"#e5e5e5\" width=\"20%\"><a href=\"/tus?op=index_admin\">Administrator Operations</td>");
+ lastCol -=20;
+}
+document.write("<td width=\"" + lastCol + "%\"></td>");
+document.write("</tr></table>");
+//-->
+</SCRIPT>
+
+<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%>
+<tr>
+ <td bgcolor=#e5e5e5>&nbsp;</td>
+</tr>
+</table>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td></td>
+ </tr>
+ <tr>
+ <td><i>Tokens</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search_admin">List/Search Tokens</a></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=new">Add New Token</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Users</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=add_user?tid=&uid=">Add User</a></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=view_users">List Users</a></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search_users">Search Users</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Activities</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search_activity_admin">List/Search Activities</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Self Tests</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=self_test">Run Self Tests</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Auditing</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=audit_admin">Configure Signed Audit</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Advanced Configuration</i></td>
+ </tr>
+ <SCRIPT type="text/JavaScript">
+ <!--
+ var target_array = target_list.split(",");
+ for (var i=0; i< target_array.length ; i++) {
+ document.write("<tr><td>&bull;&nbsp;<a href=\"tus?op=select_config_parameter&type=" + target_array[i] + "\">" +
+ target_array[i].replace(/_/g, " ") + "</a></td> </tr>");
+ }
+ //-->
+ </SCRIPT>
+ <tr>
+ <form name="editForm" method=POST action="tus" >
+ <input TYPE=hidden NAME=query VALUE="op=edit_config_parameter">
+ <input TYPE=HIDDEN NAME=ptype VALUE="Generals">
+ <input TYPE=HIDDEN NAME=pname VALUE="General">
+ <td>&bull;&nbsp;<a href="javascript:submitEditForm(this)">General</a></td>
+ </form>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/indexOperator.template b/base/tps/apache/docroot/tokendb/indexOperator.template
new file mode 100644
index 000000000..1b1902843
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/indexOperator.template
@@ -0,0 +1,129 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS Operator</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a></font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\"><b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ if (form.uid.value == "" && form.tid.value == "") {
+ alert("Enter token or user ID");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view";
+ if (form.tid.value.length > 0) uri += "&tid=" + form.tid.value;
+ if (form.uid.value.length > 0) uri += "&uid=" + form.uid.value;
+ location.href = uri;
+ }
+}
+
+var lastCol = 100;
+document.write("<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%><tr>");
+if ((typeof(operatorAuth) != "undefined") && (operatorAuth == "true")) {
+ document.write("<td bgcolor=\"#e5e5e5\" width=\"20%\"><a href=\"/tus?op=index_operator\">Operator Operations</td>");
+ lastCol -= 20;
+}
+if ((typeof(agentAuth) != "undefined") && (agentAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus\">Agent Operations</td>");
+ lastCol -=20;
+}
+if ((typeof(adminAuth) != "undefined") && (adminAuth == "true")) {
+ document.write("<td width=\"20%\"><a href=\"/tus?op=index_admin\">Administrator Operations</td>");
+ lastCol -=20;
+}
+document.write("<td width=\"" + lastCol + "%\"></td>");
+document.write("</tr></table>");
+//-->
+</SCRIPT>
+
+<table BORDER=0 CELLSPACING=0 CELLPADDING=0 width=100%>
+<tr>
+ <td bgcolor=#e5e5e5>&nbsp;</td>
+</tr>
+</table>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td><i>Tokens</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search&top=operator">List/Search Tokens</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Certificates</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search_certificate&top=operator">List/Search Certificates</a></td>
+ </tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr>
+ <td><i>Activities</i></td>
+ </tr>
+ <tr>
+ <td>&bull;&nbsp;<a href="tus?op=search_activity&top=operator">List/Search Activities</a></td>
+ </tr>
+ <tr>
+ <td></td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/new.template b/base/tps/apache/docroot/tokendb/new.template
new file mode 100644
index 000000000..f4bf1475d
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/new.template
@@ -0,0 +1,93 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Add New Token</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doAdd(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=add";
+ uri += "&tid=" + form.tid.value;
+ location.href = uri;
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="addForm" ACTION="" METHOD=GET>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Token ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=tid SIZE=20>
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=button VALUE=Add onClick="doAdd(addForm);">
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/newUser.template b/base/tps/apache/docroot/tokendb/newUser.template
new file mode 100644
index 000000000..f1e7e6e35
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/newUser.template
@@ -0,0 +1,179 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Admin Operations : Add New User</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function validate_required(field,alerttxt) {
+ with (field) {
+ if (value==null||value=="") {
+ alert(alerttxt);
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+}
+
+function validate_form(thisform) {
+ with (thisform) {
+ if (validate_required(userid,"Userid is required")==false) {
+ userid.focus();
+ return false;
+ }
+ if (validate_required(firstName,"First Name is required")==false) {
+ firstName.focus();
+ return false;
+ }
+ if (validate_required(lastName,"Last Name is required")==false) {
+ lastName.focus();
+ return false;
+ }
+ if (validate_required(groupid,"Group ID is required")==false) {
+ groupid.focus();
+ return false;
+ }
+
+ }
+}
+
+function doAdd(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ if (validate_form(this)) {
+ document.addUserForm.action = uri;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+
+//-->
+</SCRIPT>
+
+<FORM NAME ="addUserForm" METHOD="POST" onSubmit="return doAdd(this)" >
+<input TYPE="hidden" NAME="query" VALUE="op=addUser">
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=userid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User First Name:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=firstName SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User Last Name:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=lastName SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Role:
+ </font>
+ </td>
+ <td> Operator
+ <input TYPE=CHECKBOX NAME=opOperator value="Operators" CHECKED>
+ &nbsp;&nbsp;&nbsp;&nbsp;Agent
+ <input TYPE=CHECKBOX NAME=opAgent value="Agents" >
+ &nbsp;&nbsp;&nbsp;&nbsp;Admin
+ <input TYPE=CHECKBOX NAME=opAdmin value="Administrators" >
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Certificate:
+ </font>
+ </td>
+ <td>
+ <textarea name="cert" cols="40" rows="10" >
+Paste the base 64 user certificate here (without the header and footer)
+ </textarea>
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=submit VALUE="Add User" >
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/revoke.template b/base/tps/apache/docroot/tokendb/revoke.template
new file mode 100644
index 000000000..6a62ea116
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/revoke.template
@@ -0,0 +1,317 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Token Details</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function breakLines(str) {
+ str = str.replace('#', '<br>');
+ return str;
+}
+
+function trim(str) {
+ var i, k, newString;
+
+ for (i = 0; i < str.length; i++) {
+ if (str.charAt(i) != ' ' )
+ break;
+ }
+ for (k = str.length - 1; k >= i; k--) {
+ if (str.charAt(k) != ' ' ) {
+ k++;
+ break;
+ }
+ }
+
+ if (k > i)
+ newString = str.substring(i, k);
+ else
+ newString = null;
+
+ return newString;
+}
+
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+function doSave(form) {
+ if (form.uid.value.length > 0) {
+ var trimmedList = "";
+ var uids = form.uid.value.split(',');
+
+ for (var i=0; i < uids.length; i++) {
+ if (i > 0) trimmedList += ",";
+ trimmedList += trim(uids[i]);
+ }
+ form.uid.value = trimmedList;
+ }
+ if (form.status.value.length > 0) {
+ form.status.value = trim(form.status.value);
+ }
+
+ if (form.status.value == "") {
+ alert("Enter token status");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=save&tid="+results[0].cn;
+
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+ if (results[0].tokenStatus != form.status.value) {
+ uri += "&s=" + form.status.value;
+ }
+ uri += "&m=" + results[0].modified;
+ location.href = uri;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many tokens to edit</font>\n");
+} else {
+ document.write("<BR>");
+
+ document.write("<p>\n");
+ document.write("<b>Token Information:</b>");
+ document.write("<p>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Reason:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenReason+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Policy:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenPolicy+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<p>\n");
+ document.write("<b>System Information:</b>");
+ document.write("<p>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Info:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].keyInfo+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Applet ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenAppletID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Creation Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modification Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td width=60%>\n");
+ document.write("<form method='get' action='tus'><select name=\"question\"><option value=\"1\">Is this token physically damaged?</option><option value=\"2\">Is this token permanently lost?</option><option value=\"3\">Is this token temporarily lost?</option><option value=\"4\">Is this temporarily lost token found?</option><option value=\"5\">Does this temporarily lost token become permanently lost?</option></select><input type=hidden name=op value=do_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>");
+ document.write("</td>\n");
+ document.write("<td width=10%>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=revoke><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Revoke\"></form>");
+ document.write("</td>\n");
+ document.write("<td width=10%>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_certificate_all><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Certificates\"></form>");
+ document.write("</td>\n");
+ document.write("<td width=10%>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity_all><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
+ document.write("</td>\n");
+ document.write("<td width=10%>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=edit><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Edit\"></form>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/search.template b/base/tps/apache/docroot/tokendb/search.template
new file mode 100644
index 000000000..305c9cd74
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/search.template
@@ -0,0 +1,118 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Search Tokens</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view";
+ uri += "&tid=" + form.tid.value;
+ uri += "&uid=" + form.uid.value;
+ uri += "&maxCount=" + form.maxCount.value;
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ uri += "top=operator";
+ }
+ location.href = uri;
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="findForm" ACTION="" METHOD=GET>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Token ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=tid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=uid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Max Count:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT SIZE=4 NAME=maxCount value="20">
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=button VALUE=Find onClick="doFind(findForm);">
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchActivity.template b/base/tps/apache/docroot/tokendb/searchActivity.template
new file mode 100644
index 000000000..e831a2872
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchActivity.template
@@ -0,0 +1,123 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Operator Operations : Search Activity</font>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Search Activity</font>\n");
+}
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view_activity";
+ uri += "&tid=" + form.tid.value;
+ uri += "&uid=" + form.uid.value;
+ uri += "&maxCount=" + form.maxCount.value;
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ uri += "top=operator";
+ }
+ location.href = uri;
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="findForm" ACTION="" METHOD=GET>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Token ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=tid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=uid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Max Count:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=maxCount SIZE=4 value="20">
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=button VALUE=Find onClick="doFind(findForm);">
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchActivityAdmin.template b/base/tps/apache/docroot/tokendb/searchActivityAdmin.template
new file mode 100644
index 000000000..da201d97f
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchActivityAdmin.template
@@ -0,0 +1,119 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Search Activity</font>\n");
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view_activity_admin";
+ uri += "&tid=" + form.tid.value;
+ uri += "&uid=" + form.uid.value;
+ uri += "&maxCount=" + form.maxCount.value;
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ uri += "top=operator";
+ }
+ location.href = uri;
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="findForm" ACTION="" METHOD=GET>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Token ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=tid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=uid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Max Count:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=maxCount SIZE=4 value="20">
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=button VALUE=Find onClick="doFind(findForm);">
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchActivityAdminResults.template b/base/tps/apache/docroot/tokendb/searchActivityAdminResults.template
new file mode 100644
index 000000000..d8f6587aa
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchActivityAdminResults.template
@@ -0,0 +1,234 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Administrator Operations : Search Activity Results</font>\n");
+uri += "?op=show_admin&tid=";
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#cccccc>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Activity ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "IP</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Operation</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Result</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Created</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("<tr bgcolor=#cccccc>\n");
+ document.write("<td colspan=7>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">");
+ document.write("Details");
+ document.write("</font>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i = 0; i < results.length; i++) {
+ if (i % 2 == 0) {
+ document.write("<tr bgcolor='#eeeeee'>\n");
+ } else {
+ document.write("<tr >\n");
+ }
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+
+ results[i].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"" + uri +
+ results[i].tokenID+"\">" + results[i].tokenID + "</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenIP+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenOp+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenResult+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ if (i % 2 == 0) {
+ document.write("<tr bgcolor='#eeeeee'>\n");
+ } else {
+ document.write("<tr >\n");
+ }
+ document.write("<td colspan=7>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+ results[i].tokenMsg+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+
+ document.write("<DIV ALIGN=LEFT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ if ((typeof(start_entry_val) != "undefined") && (start_entry_val > 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val - num_entries_per_page;
+ if (new_start < 0) new_start = 0;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form name=prev_entries method=get >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
+ }
+
+ if ((typeof(has_more_entries) != "undefined") && (has_more_entries == 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val + num_entries_per_page;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form method=get name=next_entries >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
+ }
+ document.write("</tr>\n");
+ document.write("</table>\n");
+ document.write("</div>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+ if (typeof(results) != "undefined" && results.length > 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-2\">");
+ if (typeof(results) != "undefined" || results.length == 0) {
+ if (typeof(limited) != "undefined" && typeof(total) != "undefined") {
+ document.write("<br>" + limited + " of " + total + " Search Results Returned\n");
+ } else if (typeof(total) != "undefined") {
+ document.write("<br>Total Search Results Returned: " + total + "\n");
+ }
+ }
+ document.write("</font>");
+ }
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchActivityResults.template b/base/tps/apache/docroot/tokendb/searchActivityResults.template
new file mode 100644
index 000000000..1f97860a0
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchActivityResults.template
@@ -0,0 +1,239 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Operator Operations : Search Activity Results</font>\n");
+ uri += "?op=show&top=operator&tid=";
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Agent Operations : Search Activity Results</font>\n");
+ uri += "?op=show&tid=";
+}
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#cccccc>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Activity ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "IP</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Operation</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Result</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Created</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("<tr bgcolor=#cccccc>\n");
+ document.write("<td colspan=7>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">");
+ document.write("Details");
+ document.write("</font>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i = 0; i < results.length; i++) {
+ if (i % 2 == 0) {
+ document.write("<tr bgcolor='#eeeeee'>\n");
+ } else {
+ document.write("<tr >\n");
+ }
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+
+ results[i].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"" + uri +
+ results[i].tokenID+"\">" + results[i].tokenID + "</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenIP+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenOp+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenResult+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ if (i % 2 == 0) {
+ document.write("<tr bgcolor='#eeeeee'>\n");
+ } else {
+ document.write("<tr >\n");
+ }
+ document.write("<td colspan=7>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+ results[i].tokenMsg+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+
+ document.write("<DIV ALIGN=LEFT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ if ((typeof(start_entry_val) != "undefined") && (start_entry_val > 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val - num_entries_per_page;
+ if (new_start < 0) new_start = 0;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form name=prev_entries method=get >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
+ }
+
+ if ((typeof(has_more_entries) != "undefined") && (has_more_entries == 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val + num_entries_per_page;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form method=get name=next_entries >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
+ }
+ document.write("</tr>\n");
+ document.write("</table>\n");
+ document.write("</div>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+ if (typeof(results) != "undefined" && results.length > 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-2\">");
+ if (typeof(results) != "undefined" || results.length == 0) {
+ if (typeof(limited) != "undefined" && typeof(total) != "undefined") {
+ document.write("<br>" + limited + " of " + total + " Search Results Returned\n");
+ } else if (typeof(total) != "undefined") {
+ document.write("<br>Total Search Results Returned: " + total + "\n");
+ }
+ }
+ document.write("</font>");
+ }
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchAdmin.template b/base/tps/apache/docroot/tokendb/searchAdmin.template
new file mode 100644
index 000000000..b0960f571
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchAdmin.template
@@ -0,0 +1,115 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Search Tokens</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view_admin";
+ uri += "&tid=" + form.tid.value;
+ uri += "&uid=" + form.uid.value;
+ uri += "&maxCount=" + form.maxCount.value;
+ location.href = uri;
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="findForm" ACTION="" METHOD=GET>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Token ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=tid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=uid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Max Count:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=maxCount SIZE=4 value="20">
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=button VALUE=Find onClick="doFind(findForm);">
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchAdminResults.template b/base/tps/apache/docroot/tokendb/searchAdminResults.template
new file mode 100644
index 000000000..ab0a471c2
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchAdminResults.template
@@ -0,0 +1,222 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Administrator Operations : Search Results</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+uri += "?op=show_admin&tid=";
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Applet</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Info</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Policy</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Created</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modified</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i = 0; i < results.length; i++) {
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "<a href=\""+uri+results[i].cn+"\">"+
+ results[i].cn+"</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenAppletID+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].keyInfo+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenPolicy+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+
+ document.write("<DIV ALIGN=LEFT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ if ((typeof(start_entry_val) != "undefined") && (start_entry_val > 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val - num_entries_per_page;
+ if (new_start < 0) new_start = 0;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form name=prev_entries method=get >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
+ }
+
+ if ((typeof(has_more_entries) != "undefined") && (has_more_entries == 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val + num_entries_per_page;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form method=get name=next_entries >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
+ }
+ document.write("</tr>\n");
+ document.write("</table>\n");
+ document.write("</div>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+ if (typeof(results) != "undefined" && results.length > 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-2\">");
+ if (typeof(results) != "undefined" || results.length == 0) {
+ if (typeof(limited) != "undefined" && typeof(total) != "undefined") {
+ document.write("<br>" + limited + " of " + total + " Search Results Returned\n");
+ } else if (typeof(total) != "undefined") {
+ document.write("<br>Total Search Results Returned: " + total + "\n");
+ }
+ }
+ document.write("</font>");
+ }
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchCertificate.template b/base/tps/apache/docroot/tokendb/searchCertificate.template
new file mode 100644
index 000000000..788491fbf
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchCertificate.template
@@ -0,0 +1,118 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Search Certificates</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view_certificate";
+ uri += "&tid=" + form.tid.value;
+ uri += "&uid=" + form.uid.value;
+ uri += "&maxCount=" + form.maxCount.value;
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ uri += "&top=operator";
+ }
+ location.href = uri;
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="findForm" ACTION="" METHOD=GET>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Token ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=tid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=uid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Max Count:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT SIZE=4 NAME=maxCount value="20">
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=button VALUE=Find onClick="doFind(findForm);">
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchCertificateResults.template b/base/tps/apache/docroot/tokendb/searchCertificateResults.template
new file mode 100644
index 000000000..bb6dcabf3
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchCertificateResults.template
@@ -0,0 +1,226 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Operator Operations : Search Certificate Results</font>\n");
+ cert_uri = uri + "?op=show_certificate&top=operator&cn=";
+ uri += "?op=show&top=operator&tid=";
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Agent Operations : Search Certificate Results</font>\n");
+ cert_uri = uri + "?op=show_certificate&cn=";
+ uri += "?op=show&tid=";
+}
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Serial Number</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Subject</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Type</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Last Status</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Last Modified At</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i = 0; i < results.length; i++) {
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\""+ cert_uri +
+ results[i].cn+"\">" + results[i].cn + "</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "0x" + results[i].tokenSerial+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenSubject+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"" + uri +
+ results[i].tokenID+"\">" + results[i].tokenID + "</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenKeyType+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+ document.write("<DIV ALIGN=LEFT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ if ((typeof(start_entry_val) != "undefined") && (start_entry_val > 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val - num_entries_per_page;
+ if (new_start < 0) new_start = 0;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form name=prev_entries method=get >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
+ }
+
+ if ((typeof(has_more_entries) != "undefined") && (has_more_entries == 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val + num_entries_per_page;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form method=get name=next_entries >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
+ }
+ document.write("</tr>\n");
+ document.write("</table>\n");
+ document.write("</div>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+ if (typeof(results) != "undefined" && results.length > 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-2\">");
+ if (typeof(results) != "undefined" || results.length == 0) {
+ if (typeof(limited) != "undefined" && typeof(total) != "undefined") {
+ document.write("<br>" + limited + " of " + total + " Search Results Returned\n");
+ } else if (typeof(total) != "undefined") {
+ document.write("<br>Total Search Results Returned: " + total + "\n");
+ }
+ }
+ document.write("</font>");
+ }
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchResults.template b/base/tps/apache/docroot/tokendb/searchResults.template
new file mode 100644
index 000000000..f4644b355
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchResults.template
@@ -0,0 +1,227 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Operator Operations : Search Results</font>\n");
+ uri += "?op=show&top=operator&tid=";
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Agent Operations : Search Results</font>\n");
+ uri += "?op=show&tid=";
+}
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Reason</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Applet</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Info</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Created</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modified</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i = 0; i < results.length; i++) {
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "<a href=\""+uri+results[i].cn+"\">"+
+ results[i].cn+"</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenReason+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].tokenAppletID+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].keyInfo+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+
+ document.write("<DIV ALIGN=LEFT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ if ((typeof(start_entry_val) != "undefined") && (start_entry_val > 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val - num_entries_per_page;
+ if (new_start < 0) new_start = 0;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form name=prev_entries method=get >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
+ }
+
+ if ((typeof(has_more_entries) != "undefined") && (has_more_entries == 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val + num_entries_per_page;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form method=get name=next_entries >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
+ }
+ document.write("</tr>\n");
+ document.write("</table>\n");
+ document.write("</div>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+ if (typeof(results) != "undefined" && results.length > 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-2\">");
+ if (typeof(results) != "undefined" || results.length == 0) {
+ if (typeof(limited) != "undefined" && typeof(total) != "undefined") {
+ document.write("<br>" + limited + " of " + total + " Search Results Returned\n");
+ } else if (typeof(total) != "undefined") {
+ document.write("<br>Total Search Results Returned: " + total + "\n");
+ }
+ }
+ document.write("</font>");
+ }
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchUser.template b/base/tps/apache/docroot/tokendb/searchUser.template
new file mode 100644
index 000000000..57e3a5507
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchUser.template
@@ -0,0 +1,126 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Search Users</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doFind(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=view_users";
+ uri += "&uid=" + form.uid.value;
+ uri += "&firstName=" + form.firstName.value;
+ uri += "&lastName=" + form.lastName.value;
+ uri += "&maxCount=" + form.maxCount.value;
+ location.href = uri;
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="findForm" ACTION="" METHOD=GET>
+<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ User ID:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=uid SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ First Name:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=firstName SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Last Name:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=lastName SIZE=20>
+ </td>
+ </tr>
+ <tr>
+ <td ALIGN=LEFT width=30%>
+ <font size=-1 face="PrimaSans BT, Verdana, sans-serif">
+ Max Count:
+ </font>
+ </td>
+ <td>
+ <input TYPE=TEXT NAME=maxCount SIZE=4 value="20">
+ </td>
+ </tr>
+</table>
+<HR NOSHADE SIZE=1>
+<DIV ALIGN=RIGHT>
+<input TYPE=button VALUE=Find onClick="doFind(findForm);">
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/searchUserResults.template b/base/tps/apache/docroot/tokendb/searchUserResults.template
new file mode 100644
index 000000000..bbb885f31
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/searchUserResults.template
@@ -0,0 +1,190 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a> : Administrator Operations : Search Results</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+uri += "?op=edit_user&uid=";
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Not Found</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Name</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Date Created</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Date Modified</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ for (var i = 0; i < results.length; i++) {
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "<a href=\""+uri+results[i].uid+"\">"+
+ results[i].uid+"</a></font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[i].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].createTimeStamp)+"</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[i].modifyTimeStamp)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ }
+ document.write("</table>\n");
+
+ document.write("<DIV ALIGN=LEFT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ if ((typeof(start_entry_val) != "undefined") && (start_entry_val > 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val - num_entries_per_page;
+ if (new_start < 0) new_start = 0;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form name=prev_entries method=get >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\<\"></form><td>\n");
+ }
+
+ if ((typeof(has_more_entries) != "undefined") && (has_more_entries == 1) &&
+ (typeof(num_entries_per_page) != "undefined") &&
+ (typeof(my_query) != "undefined")) {
+
+ var new_start = start_entry_val + num_entries_per_page;
+ var query = my_query.replace(/&*start_entry_val=\d*/,"");
+ var query_array = query.split("&");
+ document.write("<td> <form method=get name=next_entries >");
+ for (var i=0; i< query_array.length ; i++) {
+ var a = query_array[i].split("=");
+ document.write("<input TYPE=hidden name=" + a[0] + " VALUE=" + a[1] + ">");
+ }
+ document.write("<input TYPE=hidden name=start_entry_val VALUE=" + new_start + ">");
+ document.write("<input TYPE=submit VALUE=\"\>\"></form><td>\n");
+ }
+ document.write("</tr>\n");
+ document.write("</table>\n");
+ document.write("</div>\n");
+
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+ if (typeof(results) != "undefined" && results.length > 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-2\">");
+ if (typeof(results) != "undefined" || results.length == 0) {
+ if (typeof(limited) != "undefined" && typeof(total) != "undefined") {
+ document.write("<br>" + limited + " of " + total + " Search Results Returned\n");
+ } else if (typeof(total) != "undefined") {
+ document.write("<br>Total Search Results Returned: " + total + "\n");
+ }
+ }
+ document.write("</font>");
+ }
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/selectConfig.template b/base/tps/apache/docroot/tokendb/selectConfig.template
new file mode 100644
index 000000000..33f560461
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/selectConfig.template
@@ -0,0 +1,137 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301 USA
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000000">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white">Red Hat<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : " + disp_conf_type + " Configuration </font>\n");
+
+if ((typeof(flash) != "undefined") && (flash != "")) {
+ document.write("<table width=\"100%\"><tr><td align=\"left\">" +
+ "<font color=\"#ff0000\"><b>" + flash.replace(/\+/g, " ") + "</b><font>" +
+ "</td></tr></table>\n");
+}
+
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" + userid
+ + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doAddConfig(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ // need to validate that pname is not empty
+ this.action = uri;
+ return true;
+}
+
+function doEditConfig(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ this.action = uri;
+ return true;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr bgcolor=#e5e5e5> <p> Use this form to add or modify " + conf_type.replace(/_/g, " ").toLowerCase() + ". <br> Either select an item " +
+ " to edit in the drop-down box below and click \"Edit\", <br> or fill in the name of a new " + disp_conf_type.toLowerCase() +
+ " and click the \"Add\" button.</p></tr>");
+
+ document.write("<form NAME =\"selectEditConfigForm\" METHOD=POST onSubmit=\"return doEditConfig(this);\">");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=edit_config_parameter\">");
+ document.write("<input TYPE=HIDDEN NAME=ptype VALUE=\"" + conf_type + "\">");
+
+ var pset_list = conf_list.split(",");
+ document.write("<tr>");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5> Edit an existing " + disp_conf_type + ": </td>");
+ document.write("<td ALIGN=LEFT width=30%><select name=\"pname\">");
+ for (var i=0; i < pset_list.length; i++) {
+ document.write("<option value=\""+ pset_list[i] + "\">" + pset_list[i] + "</option>\n");
+ }
+ document.write("</select></td>");
+ document.write("<td ALIGN=LEFT width=30%><input TYPE=submit VALUE=Edit></td></tr>");
+ document.write("</form>\n");
+
+ document.write("<form NAME =\"selectAddConfigForm\" METHOD=POST onSubmit=\"return doAddConfig(this);\">");
+ document.write("<input TYPE=hidden NAME=query VALUE=\"op=add_config_parameter\">");
+ document.write("<input TYPE=HIDDEN NAME=ptype VALUE=\"" + conf_type + "\">");
+ document.write("<tr>");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5> Add a new " + disp_conf_type + ": </td>");
+ document.write("<td ALIGN=LEFT width=30%> <input type=text name=pname></td> ");
+ document.write("<td ALIGN=LEFT width=30%><input TYPE=submit VALUE=Add></td></tr>");
+ document.write("</table>");
+ document.write("</form>\n");
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/selfTest.template b/base/tps/apache/docroot/tokendb/selfTest.template
new file mode 100644
index 000000000..163437d17
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/selfTest.template
@@ -0,0 +1,129 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Admin Operations : Run Self Tests</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function runSelfTest(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus"
+ } else {
+ uri += uriBase;
+ }
+ if (enabledTests > 0) {
+ document.selfTestForm.action = uri;
+ return true;
+ } else {
+ alert("Self tests are not enabled.");
+ return false;
+ }
+}
+//-->
+</SCRIPT>
+
+<FORM NAME ="selfTestForm" METHOD="POST" onSubmit="return runSelfTest(this)" >
+<input TYPE="hidden" NAME="query" VALUE="op=run_self_test">
+
+<SCRIPT type="text/JavaScript">
+<!--
+if ((typeof(test_list) != "undefined") && (test_list.length > 0)) {
+ document.write("<center>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr bgcolor=#e5e5e5>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;Enable&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;Critical&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;Test&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("</tr>\n");
+ var enabledTests = 0
+ for (var i = 0, k = 1; i < test_list.length; i++) {
+ document.write("<tr bgcolor=#efefef>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;");
+ document.write("<input type=checkbox name=\"enable"+test_list[i]+"\" value=\"enable"+test_list[i]+"\" ");
+ if ((typeof(enabled) != "undefined") && (enabled & k)) {
+ document.write("CHECKED");
+ enabledTests++;
+ }
+ document.write(" DISABLED>\n");
+ document.write("&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;");
+ document.write("<input type=checkbox name=\"critical"+test_list[i]+"\" value=\"critical"+test_list[i]+"\" ");
+ if ((typeof(critical) != "undefined") && (critical & k)) {
+ document.write("CHECKED");
+ }
+ document.write(" DISABLED>\n");
+ document.write("&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("<td><font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">&nbsp;&nbsp;&nbsp;&nbsp;");
+ document.write(test_list[i]);
+ document.write("&nbsp;&nbsp;&nbsp;&nbsp;</font></td>\n");
+ document.write("</tr>\n");
+ k *= 2;
+ }
+ document.write("</table>\n");
+ document.write("<HR NOSHADE SIZE=1>\n");
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<input TYPE=submit VALUE=\"Run\">\n");
+} else {
+ document.write("Error: Missing self test list.\n");
+ document.write("<HR NOSHADE SIZE=1>\n");
+}
+//-->
+</SCRIPT>
+
+</form>
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/selfTestResults.template b/base/tps/apache/docroot/tokendb/selfTestResults.template
new file mode 100644
index 000000000..aeb49d711
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/selfTestResults.template
@@ -0,0 +1,113 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri = "";
+if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+} else {
+ uri += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri+"\">Main Menu</a></font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+if (typeof(result) == "undefined") {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ document.write("Error: Missing self test results.</font>\n");
+} else {
+ if (typeof(test_list) == "undefined" || test_list.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ document.write("Error: List of self tests is not available.</font>\n");
+ } else {
+ var enabledTests = 0
+ for (var i = 0, k = 1; i < test_list.length; i++) {
+ if ((typeof(enabled) != "undefined") && (enabled & k)) {
+ enabledTests++;
+ }
+ k *= 2;
+ }
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">\n");
+ if (enabledTests == 0) {
+ document.write("Self tests are not enabled.");
+ } else {
+ if (result == 0) {
+ document.write("Self test"+((enabledTests > 1)?"s ":" "));
+ for (i = 0, k = 1, n = 0; i < test_list.length; i++) {
+ if ((typeof(enabled) != "undefined") && (enabled & k)) {
+ if (n > 0) {
+ document.write(", ");
+ }
+ document.write("\""+test_list[i]+"\"");
+ n++;
+ }
+ k *= 2;
+ }
+ document.write(((enabledTests > 1)?" are":" is")+" completed successfully.\n");
+ } else if (result > -4 && result < 4) {
+ document.write("Self test \""+test_list[0]+"\" encounter "+((result < 0)?"critical":"")+" failure: "+result+"\n");
+ if (result < 0) {
+ document.write("<br><b>Please stop the server immediately.</b>\n");
+ }
+ } else {
+ document.write("Self test \""+test_list[1]+"\" encounter "+((result < 0)?"critical":"")+" failure: "+result+"\n");
+ if (result < 0) {
+ document.write("<br><b>Please stop the server immediately.</b>\n");
+ }
+ }
+ }
+ document.write("</font>\n");
+ }
+}
+document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/show.template b/base/tps/apache/docroot/tokendb/show.template
new file mode 100644
index 000000000..a9dd39334
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/show.template
@@ -0,0 +1,379 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Operator Operations : Token Details</font>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Token Details</font>\n");
+}
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function breakLines(str) {
+ str = str.replace('#', '<br>');
+ return str;
+}
+
+function trim(str) {
+ var i, k, newString;
+
+ for (i = 0; i < str.length; i++) {
+ if (str.charAt(i) != ' ' )
+ break;
+ }
+ for (k = str.length - 1; k >= i; k--) {
+ if (str.charAt(k) != ' ' ) {
+ k++;
+ break;
+ }
+ }
+
+ if (k > i)
+ newString = str.substring(i, k);
+ else
+ newString = null;
+
+ return newString;
+}
+
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+function doSave(form) {
+ if (form.uid.value.length > 0) {
+ var trimmedList = "";
+ var uids = form.uid.value.split(',');
+
+ for (var i=0; i < uids.length; i++) {
+ if (i > 0) trimmedList += ",";
+ trimmedList += trim(uids[i]);
+ }
+ form.uid.value = trimmedList;
+ }
+ if (form.status.value.length > 0) {
+ form.status.value = trim(form.status.value);
+ }
+
+ if (form.status.value == "") {
+ alert("Enter token status");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=save&tid="+results[0].cn;
+
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+ if (results[0].tokenStatus != form.status.value) {
+ uri += "&s=" + form.status.value;
+ }
+ uri += "&m=" + results[0].modified;
+ location.href = uri;
+ }
+}
+
+function check_transition(state, tlist) {
+ for (var i=0; i < tlist.length; i++) {
+ if (state == tlist[i]) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many tokens to edit</font>\n");
+} else {
+ document.write("<BR>");
+
+ document.write("<p>\n");
+ document.write("<b>Token Information:</b>");
+ document.write("<p>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Reason:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenReason+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Policy:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenPolicy+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<p>\n");
+ document.write("<b>System Information:</b>");
+ document.write("<p>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Info:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].keyInfo+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Applet ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenAppletID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Creation Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modification Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td width=60%>\n");
+
+ if ((allowed_transitions != "") && ((typeof(topLevel) == "undefined") || (topLevel != "operator"))) {
+ var transitions = allowed_transitions.split(",");
+ document.write("<form method='get' action='tus'><select name=\"question\">");
+ if (check_transition(1, transitions)) {
+ document.write("<option value=\"1\" >This token has been physically damaged.</option>");
+ } else {
+ document.write("<option value=\"1\" disabled=true >This token has been physically damaged.</option>");
+ }
+ if (check_transition(2, transitions)) {
+ document.write("<option value=\"2\">This token has been permanently lost.</option>");
+ } else {
+ document.write("<option value=\"2\" disabled=true >This token has been permanently lost.</option>");
+ }
+ if (check_transition(3, transitions)) {
+ document.write("<option value=\"3\" >This token has been temporarily lost.</option>");
+ } else {
+ document.write("<option value=\"3\" disabled=true >This token has been temporarily lost.</option>");
+ }
+ if (check_transition(4, transitions)) {
+ document.write("<option value=\"4\" >This temporarily lost token has been found.</option>");
+ } else {
+ document.write("<option value=\"4\" disabled=true >This temporarily lost token has been found.</option>");
+ }
+ if (check_transition(5, transitions)) {
+ document.write("<option value=\"5\" >This temporarily lost token cannot be found (becomes permanently lost).</option>");
+ } else {
+ document.write("<option value=\"5\" disabled=true >This temporarily lost token cannot be found (becomes permanently lost).</option>");
+ }
+ if (check_transition(6, transitions)) {
+ document.write("<option value=\"6\" >This token has been terminated.</option>");
+ } else {
+ document.write("<option value=\"6\" disabled=true >This token has been terminated.</option>");
+ }
+ document.write("</select><input type=hidden name=op value=do_confirm_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>");
+ }
+ document.write("</td>\n");
+ document.write("<td align=right width=10%>\n");
+ document.write("</td>\n");
+
+ document.write("<td align=right width=10%>\n");
+ if ((typeof(topLevel) == "undefined") || (topLevel != "operator")) {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=edit><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Edit\"></form>");
+ }
+ document.write("</td>\n");
+
+ document.write("<td align=right width=10%>\n");
+ if ((typeof(topLevel) == "undefined") || (topLevel != "operator")) {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_certificate_all><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Certificates\"></form>");
+ } else {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_certificate_all><input type=hidden name=top value=operator><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Certificates\"></form>");
+ }
+ document.write("</td>\n");
+
+ document.write("<td align=right width=10%>\n");
+ if ((typeof(topLevel) == "undefined") || (topLevel != "operator")) {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity_all><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
+ } else {
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity_all><input type=hidden name=top value=operator><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
+ }
+ document.write("</td>\n");
+
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/showAdmin.template b/base/tps/apache/docroot/tokendb/showAdmin.template
new file mode 100644
index 000000000..fe3292011
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/showAdmin.template
@@ -0,0 +1,302 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Token Details</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function trim(str) {
+ var i, k, newString;
+
+ for (i = 0; i < str.length; i++) {
+ if (str.charAt(i) != ' ' )
+ break;
+ }
+ for (k = str.length - 1; k >= i; k--) {
+ if (str.charAt(k) != ' ' ) {
+ k++;
+ break;
+ }
+ }
+
+ if (k > i)
+ newString = str.substring(i, k);
+ else
+ newString = null;
+
+ return newString;
+}
+
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+function doSave(form) {
+ if (form.uid.value.length > 0) {
+ var trimmedList = "";
+ var uids = form.uid.value.split(',');
+
+ for (var i=0; i < uids.length; i++) {
+ if (i > 0) trimmedList += ",";
+ trimmedList += trim(uids[i]);
+ }
+ form.uid.value = trimmedList;
+ }
+ if (form.status.value.length > 0) {
+ form.status.value = trim(form.status.value);
+ }
+
+ if (form.status.value == "") {
+ alert("Enter token status");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=save&tid="+results[0].cn;
+
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+ if (results[0].tokenStatus != form.status.value) {
+ uri += "&s=" + form.status.value;
+ }
+ uri += "&m=" + results[0].modified;
+ location.href = uri;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many tokens to edit</font>\n");
+} else {
+ document.write("<BR>");
+
+ document.write("<p>\n");
+ document.write("<b>Token Information:</b>");
+ document.write("<p>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Reason:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenReason+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Policy:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenPolicy+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<p>\n");
+ document.write("<b>System Information:</b>");
+ document.write("<p>\n");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Info:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].keyInfo+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Applet ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenAppletID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Creation Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modification Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=view_activity_admin_all><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Show Activities\"></form>");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<form method='get' action='tus'><input type=hidden name=op value=confirm><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=Delete></form>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/showCert.template b/base/tps/apache/docroot/tokendb/showCert.template
new file mode 100644
index 000000000..964035887
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/showCert.template
@@ -0,0 +1,355 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Operator Operations : Certificate Details</font>\n");
+} else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Agent Operations : Certificate Details</font>\n");
+}
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function breakLines(str) {
+ str = str.replace('#', '<br>');
+ return str;
+}
+
+function breakLinesWithDots(str) {
+ str = str.replace(/\.\./g, '<br>');
+ return str;
+}
+
+function trim(str) {
+ var i, k, newString;
+
+ for (i = 0; i < str.length; i++) {
+ if (str.charAt(i) != ' ' )
+ break;
+ }
+ for (k = str.length - 1; k >= i; k--) {
+ if (str.charAt(k) != ' ' ) {
+ k++;
+ break;
+ }
+ }
+
+ if (k > i)
+ newString = str.substring(i, k);
+ else
+ newString = null;
+
+ return newString;
+}
+
+function checkDate(str) {
+ var newString;
+
+ if (str.length == 15 && str.charAt(14) == 'Z') {
+ newString = str.substring(0, 4);
+ newString += '/';
+ newString += str.substring(4, 6);
+ newString += '/';
+ newString += str.substring(6, 8);
+ newString += ' ';
+ newString += str.substring(8, 10);
+ newString += ':';
+ newString += str.substring(10, 12);
+ newString += ':';
+ newString += str.substring(12, 14);
+ } else {
+ newString = str;
+ }
+
+ return newString;
+}
+
+function doSave(form) {
+ if (form.uid.value.length > 0) {
+ var trimmedList = "";
+ var uids = form.uid.value.split(',');
+
+ for (var i=0; i < uids.length; i++) {
+ if (i > 0) trimmedList += ",";
+ trimmedList += trim(uids[i]);
+ }
+ form.uid.value = trimmedList;
+ }
+ if (form.status.value.length > 0) {
+ form.status.value = trim(form.status.value);
+ }
+
+ if (form.status.value == "") {
+ alert("Enter token status");
+ } else {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ uri += "?op=save&tid="+results[0].cn;
+
+ if (results[0].tokenUserID != form.uid.value) {
+ uri += "&uid=" + form.uid.value;
+ }
+ if (results[0].tokenStatus != form.status.value) {
+ uri += "&s=" + form.status.value;
+ }
+ uri += "&m=" + results[0].modified;
+ location.href = uri;
+ }
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many tokens to edit</font>\n");
+} else {
+ document.write("<BR>");
+
+ document.write("<p>\n");
+ document.write("<b>Certificate Information:</b>");
+ document.write("<p>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].cn+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Serial Number:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "0x"+results[0].tokenSerial+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ if ((typeof(topLevel) != "undefined") && (topLevel == "operator")) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"tus?op=show&top=operator&tid=" + results[0].tokenID + "\">"+
+ results[0].tokenID+"</a></font>\n");
+ } else {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\"><a href=\"tus?op=show&tid=" + results[0].tokenID + "\">"+
+ results[0].tokenID+"</a></font>\n");
+ }
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User ID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenUserID+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Key Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenKeyType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Token Type:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenType+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Issuer:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenIssuer+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Subject:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenSubject+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Not Before:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].tokenNotBefore)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Not After:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].tokenNotAfter)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Status:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].tokenStatus+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Certificate:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "-----BEGIN CERTIFICATE-----<br>" +
+ breakLinesWithDots(results[0].userCertificate)+
+ "<br>" +
+ "-----END CERTIFICATE-----<br>" +
+ "</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Creation Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfCreate)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Modification Date:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ checkDate(results[0].dateOfModify)+"</font>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>
diff --git a/base/tps/apache/docroot/tokendb/userDelete.template b/base/tps/apache/docroot/tokendb/userDelete.template
new file mode 100755
index 000000000..db4b226cd
--- /dev/null
+++ b/base/tps/apache/docroot/tokendb/userDelete.template
@@ -0,0 +1,174 @@
+<!-- --- BEGIN COPYRIGHT BLOCK ---
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Copyright (C) 2007 Red Hat, Inc.
+ All rights reserved.
+ --- END COPYRIGHT BLOCK --- -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
+<link rel="shortcut icon" href="/pki/images/favicon.ico" />
+<HEAD>
+<TITLE>TPS</Title>
+</HEAD>
+
+<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000080">
+ <tr>
+ <td>
+ <table border="0" cellspacing="12" cellpadding="0">
+ <tr>
+ <td><img src="/pki/images/logo_header.gif"></td>
+ <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+ <td><font size="+1" face="PrimaSans BT, Verdana, sans-serif" color="white"><b>Dogtag<sup><font color="#999999" size="-2">&reg;</font></sup> TPS Services</b></font></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<p>
+
+<BODY>
+
+<CMS_TEMPLATE>
+
+<SCRIPT type="text/JavaScript">
+<!--
+var uri0 = "";
+if (typeof(uriBase) == "undefined") {
+ uri0 += "/tus";
+} else {
+ uri0 += uriBase;
+}
+
+document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"+1\">"+
+ "<a href=\""+uri0+"\">Main Menu</a> : Administrator Operations : Delete User</font>\n");
+document.write("<table width=\"100%\"><tr><td align=\"right\">" +
+ "<b>UID:</b>" +
+ userid + "</td></tr></table>\n");
+document.write("<HR NOSHADE SIZE=1>\n");
+
+function doDeleteUser(form) {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ this.action = uri;
+ return true;
+}
+
+function doCancel() {
+ var uri = "";
+ if (typeof(uriBase) == "undefined") {
+ uri += "/tus";
+ } else {
+ uri += uriBase;
+ }
+ location.href = uri;
+}
+
+
+
+if (typeof(results) == "undefined" || results.length == 0) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Not Found</font>\n");
+} else if (results.length > 1) {
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Found too many users to edit</font>\n");
+} else {
+ document.write("<BR>");
+ document.write("<form NAME =\"deleteUserForm\" METHOD=POST onSubmit=\"return doDeleteUser(this);\">");
+ document.write("<input TYPE=HIDDEN NAME=query VALUE=\"op=do_delete_user\">");
+
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0 width=100%>\n");
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "UserID:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ results[0].uid+"</font>\n");
+ document.write("<input TYPE=HIDDEN NAME=uid VALUE=\"" + results[0].uid + "\">");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "First Name:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write(results[0].givenName);
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Last Name:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write(results[0].sn);
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "Role:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td ><input type=checkbox name=opOperator value=Operators disabled=true " + operator + ">Operator</td>\n");
+ document.write("<td ><input type=checkbox name=opAgent value=Agents disabled=true " + agent + ">Agent</td>\n");
+ document.write("<td ><input type=checkbox name=opAdmin value=Administrators disabled=true " + admin + ">Administrator</td>\n");
+ document.write("</tr>\n");
+
+ document.write("<tr>\n");
+ document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n");
+ document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+
+ "User Certificate:&nbsp;</font>\n");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<textarea name=userCert disabled=true cols=40 rows=10>\n");
+ document.write(results[0].userCertificate);
+ document.write("</textarea>\n");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+
+ document.write("</table>\n");
+ document.write("<BR>\n<HR NOSHADE SIZE=1>\n");
+
+ document.write("<DIV ALIGN=RIGHT>\n");
+ document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n");
+ document.write("<tr>\n");
+ document.write("<td>\n");
+ document.write("Are you sure?");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=button VALUE=Cancel onClick=\"doCancel();\">");
+ document.write("</td>\n");
+ document.write("<td>\n");
+ document.write("<input TYPE=submit VALUE=Delete>");
+ document.write("</td>\n");
+ document.write("</tr>\n");
+ document.write("</table>\n");
+ document.write("</form>");
+}
+
+//-->
+</SCRIPT>
+
+</BODY>
+</HTML>