diff options
Diffstat (limited to 'pki/linux/tps-ui/shared/cgi-bin')
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/demo/Enroll.html | 82 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/home/Enroll.html | 80 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/so/Enroll.html | 107 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/cfg.pl | 141 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/enroll.html | 193 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/enroll_temp.html | 166 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/format.html | 181 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/formatso.html | 161 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/main.html | 68 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/noaccess.html | 64 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/read.html | 79 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/read_temp.html | 79 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/search.html | 72 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/search_temp.html | 72 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/seturl.html | 166 | ||||
-rwxr-xr-x | pki/linux/tps-ui/shared/cgi-bin/sow/welcome.html | 64 |
16 files changed, 1775 insertions, 0 deletions
diff --git a/pki/linux/tps-ui/shared/cgi-bin/demo/Enroll.html b/pki/linux/tps-ui/shared/cgi-bin/demo/Enroll.html new file mode 100755 index 000000000..79d5a30f1 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/demo/Enroll.html @@ -0,0 +1,82 @@ +<!-- --- 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; either + + 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> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/demo/style.css" type="text/css"> + +<title>Enrollment</title> +</head> +<script type="text/JavaScript" src="/demo/util.js"> +</script> +<body onload="InitializeBindingTable();" onunload=cleanup()> + +<progressmeter id="progress-id" hidden="true" align = "center"/> +<table width="100%" class="logobar"> + <tr> + <td> +<img alt="" src="/demo/logo.jpg"> + </td> + <td> + <p class="headerText">Veracify Investments Smartcard Enrollment</p> + </td> + </tr> +</table> + <table id="BindingTable" width="200px" align="center"> + <tr id="HeaderRow"> + <td></td> + </tr> + </table> + <p class="bodyText">You have plugged in your Veracify Investments smartcard! After answering a few easy questions, you will be able to use your smartcard to securely manage your investment portfolio. + </p> + <p class="bodyText"> + Now we would like you to identify yourself as a current Veracify Investments Customer. + </p> + <table> + <tr> + <td><p >Veracify Account Name: </p></td> + <td> </td> + <td><input type="text" id="snametf" value=""></td> + <td> </td> + <td><p>Veracify Account Number: </p></td> + <td> </td> + <td><input type="password" id="snamepwd" value=""></td> + </tr> + + </table> + + <p class="bodyText"> Before you can use your smartcard, you will need a password to protect it.</p> + <table> + <tr> + <td><p >Password:</p></td> + <td><input type="password" id="pintf" name="pintf" value=""></td> + + <td><p >Re-Enter Password:</p></td> + <td><input type="password" id="reenterpintf" name="reenterpintf" value=""></td> + </table> + <br> + <table width="100%"> + <tr> + <td align="right"> + <input type="button" id="enrollbtn" name="enrollbtn" value="Enroll My Veracify Smartcard" onClick="DoEnrollCOOLKey();"> + </td> + </tr> + </table> +</body></html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/home/Enroll.html b/pki/linux/tps-ui/shared/cgi-bin/home/Enroll.html new file mode 100755 index 000000000..f6e72c3bc --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/home/Enroll.html @@ -0,0 +1,80 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/home/style.css" type="text/css"> + +<title>Enrollment</title> +</head> +<script type="text/JavaScript" src="/home/util.js"> +</script> +<body onload="InitializeBindingTable();" onunload=cleanup()> + +<progressmeter id="progress-id" hidden="true" align = "center"/> +<table width="100%" class="logobar"> + <tr> + <td> +<img alt="" src="/home/logo.jpg"> + </td> + <td> + <p class="headerText">Smartcard Enrollment</p> + </td> + </tr> +</table> + <table id="BindingTable" width="200px"align="center"> + <tr id="HeaderRow"> + </tr> + </table> + <p class="bodyText">You have plugged in your smartcard! After answering a few easy questions, you will be able to use your smartcard. + </p> + <p class="bodyText"> + Now we would like you to identify yourself. + </p> + <table> + <tr> + <td><p >LDAP User ID: </p></td> + <td> </td> + <td><input type="text" id="snametf" value=""></td> + <td> </td> + <td><p>LDAP Password: </p></td> + <td> </td> + <td><input type="password" id="snamepwd" value=""></td> + </tr> + + </table> + + <p class="bodyText"> Before you can use your smartcard, you will need a password to protect it.</p> + <table> + <tr> + <td><p >Password:</p></td> + <td><input type="password" id="pintf" name="pintf" value=""></td> + + <td><p >Re-Enter Password:</p></td> + <td><input type="password" id="reenterpintf" name="reenterpintf" value=""></td> + </table> + <br> + <table width="100%"> + <tr> + <td align="right"> + <input type="button" id="enrollbtn" name="enrollbtn" value="Enroll My Smartcard" onClick="DoEnrollCOOLKey();"> + </td> + </tr> + </table> +</body></html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/so/Enroll.html b/pki/linux/tps-ui/shared/cgi-bin/so/Enroll.html new file mode 100755 index 000000000..7980a9cf0 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/so/Enroll.html @@ -0,0 +1,107 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/so/style.css" type="text/css"> + +<title>Enrollment</title> +</head> +<script type="text/JavaScript" src="/so/util.js"> +</script> + +<script type="text/javascript"> +<!-- +function UserSelectRowByKeyID(keyType, keyID) +{ + DoCoolKeySetConfigValue("Operation-" + keyID, + "http://$host:$port/nk_service"); + DoCoolKeySetConfigValue("TokenType-" + keyID, "userKey"); + SelectRowByKeyID(keyType, keyID); +} + +function UserOnDoneInitializeBindingTable() +{ + var arr = GetAvailableCOOLKeys(); + var i; + for (i=0; i < arr.length; i++) + { + var keyType = arr[i][0]; + var keyID = arr[i][1]; + var keyStatus = GetStatusForKeyID(keyType, keyID); + UserSelectRowByKeyID(keyType, keyID); + } +} + +// --> +</script> + +<body onload="InitializeBindingTable();" onunload=cleanup()> + +<progressmeter id="progress-id" hidden="true" align = "center"/> +<table width="100%" class="logobar"> + <tr> + <td> +<img alt="" src="/so/logo.jpg"> + </td> + <td> + <p class="headerText">Security Officer Enrollment</p> + </td> + </tr> +</table> + <table id="BindingTable" width="200px"align="center"> + <tr id="HeaderRow"> + </tr> + </table> + <p class="bodyText">You have plugged in your smartcard! After answering a few easy questions, you will be able to use your smartcard. + </p> + <p class="bodyText"> + Now we would like you to identify yourself. + </p> + <table> + <tr> + <td><p >LDAP User ID: </p></td> + <td> </td> + <td><input type="text" id="snametf" value=""></td> + <td> </td> + <td><p>LDAP Password: </p></td> + <td> </td> + <td><input type="password" id="snamepwd" value=""></td> + </tr> + + </table> + + <p class="bodyText"> Before you can use your smartcard, you will need a password to protect it.</p> + <table> + <tr> + <td><p >Password:</p></td> + <td><input type="password" id="pintf" name="pintf" value=""></td> + + <td><p >Re-Enter Password:</p></td> + <td><input type="password" id="reenterpintf" name="reenterpintf" value=""></td> + </table> + <br> + <table width="100%"> + <tr> + <td align="right"> + <input type="button" id="enrollbtn" name="enrollbtn" value="Enroll My Smartcard" onClick="DoEnrollCOOLKey();"> + </td> + </tr> + </table> +</body></html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/cfg.pl b/pki/linux/tps-ui/shared/cgi-bin/sow/cfg.pl new file mode 100755 index 000000000..79c236bbd --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/cfg.pl @@ -0,0 +1,141 @@ +#! /usr/bin/perl +# +# --- 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; either +# +# 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 --- +# + +# +# Establish platform-dependent variables: +# +my $default_hardware_platform=""; +my $ldapsearch=""; +$default_hardware_platform=`pkiarch`; +chomp($default_hardware_platform); +if( $^O eq "linux" ) { + if( $default_hardware_platform eq "i386" ) { + $ldapsearch = "/usr/lib/mozldap/ldapsearch"; + } elsif( $default_hardware_platform eq "x86_64" ) { + $ldapsearch = "/usr/lib64/mozldap/ldapsearch"; + } +} elsif( $^O eq "solaris" ) { + if( $default_hardware_platform eq "sparc" ) { + $ldapsearch = "/usr/lib/mozldap/ldapsearch"; + } elsif( $default_hardware_platform eq "sparcv9" ) { + $ldapsearch = "/usr/lib/sparcv9/mozldap/ldapsearch"; + } +} + +# +# Feel free to modify the following parameters: +# +my $ldapHost = "localhost"; +my $ldapPort = "389"; +my $basedn = "ou=People,dc=sfbay,dc=redhat,dc=com"; +my $port = "7888"; +my $secure_port = "7889"; +my $host = "localhost"; + +my $cfg = "/var/lib/rhpki-tps/conf/CS.cfg"; + +sub get_ldapsearch() +{ + return $ldapsearch; +} + +sub get_ldap_host() +{ + my $ldapport = `grep auth.instance.0.hostport $cfg | cut -c26-`; + chomp($ldapport); + my ($ldapHost, $p) = split(/:/, $ldapport); + return $ldapHost; +} + +sub get_ldap_port() +{ + my $ldapport = `grep auth.instance.0.hostport $cfg | cut -c26-`; + chomp($ldapport); + my ($p, $ldapPort) = split(/:/, $ldapport); + return $ldapPort; +} + +sub get_base_dn() +{ + my $basedn = `grep auth.instance.0.baseDN $cfg | cut -c24-`; + chomp($basedn); + return $basedn; +} + +sub get_port() +{ + my $port = `grep service.unsecurePort $cfg | cut -c22-`; + chomp($port); + return $port; +} + +sub get_secure_port() +{ + my $secure_port = `grep service.securePort $cfg | cut -c20-`; + chomp($secure_port); + return $secure_port; +} + +sub get_host() +{ + my $host = `grep service.machineName $cfg | cut -c21-`; + chomp($host); + return $host; +} + +sub is_agent() +{ + my ($dn) = @_; + + my $uid = $dn; + # need to map a subject dn into user DN + $uid =~ /uid=([^,]*)/; # retrieve the uid + $uid = $1; + + my $x_hostport = `grep -e "^tokendb.hostport" $cfg | cut -c18-`; + chomp($x_hostport); + my ($x_host, $x_port) = split(/:/, $x_hostport); + my $x_basedn = `grep -e "^tokendb.userBaseDN" $cfg | cut -c20-`; + chomp($x_basedn); + my $x_binddn = `grep -e "^tokendb.bindDN" $cfg | cut -c16-`; + chomp($x_binddn); + my $x_bindpwdpath = `grep -e "^tokendb.bindPassPath" $cfg | cut -c22-`; + chomp($x_bindpwdpath); + my $x_bindpwd = `grep -e "^tokendbBindPass" $x_bindpwdpath | cut -c17-`; + chomp($x_bindpwd); + + my $cmd = $ldapsearch . "\" " . + "-D \"" . $x_binddn . "\" " . + "-w \"" . $x_bindpwd . "\" " . + "-b \"" . "cn=TUS Officers,ou=Groups,".$x_basedn . "\" " . + "-h \"" . $x_host . "\" " . + "-p \"" . $x_port ."\" " . + "-1 \"(uniqueMember=uid=" . $uid . "*)\" | wc -l"; + my $matched = `$cmd`; + chomp($matched); + + if ($matched eq "0") { + return 0; + } else { + return 1; + } +} diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/enroll.html b/pki/linux/tps-ui/shared/cgi-bin/sow/enroll.html new file mode 100755 index 000000000..605d2274e --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/enroll.html @@ -0,0 +1,193 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Enrollment</title> +<script type="text/javascript" src="/sow/js/prototype.js"></script> +<script type="text/javascript" src="/sow/js/scriptaculous.js?load=effects"></script> +<script type="text/JavaScript" src="/sow/util.js"></script> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +<script type="text/javascript"> +<!-- +function UserOnCOOLKeyStateError() +{ + toggleAjaxProgress('ajax-pb', 'off'); + toggleButton('enrollbtn', 'on'); + toggleButton('cancel', 'on'); +} + +function UserSelectRowByKeyID(keyType, keyID) +{ + DoCoolKeySetConfigValue("Operation-" + keyID, + "https://$host:$secure_port/nk_service"); + DoCoolKeySetConfigValue("TokenType-" + keyID, "userKey"); + SelectRowByKeyID(keyType, keyID); +} + +function updateKeyText(text) +{ + var f = document.getElementById('keytext'); + new Effect.Shake(f); + var text = document.createTextNode(text); + var len= f.childNodes.length; + for (i=0;i<len;i++){ + f.removeChild(f.childNodes[0]); + } + f.appendChild(text); +} + +function UserOnDoneInitializeBindingTable() +{ + document.body.onkeyup = onUserKeyUp; + var enrollbtn = document.getElementById('enrollbtn'); + enrollbtn.disabled = true; + var pintf = document.getElementById('pintf'); + pintf.focus(); + + // display existing blank smart + var arr = GetAvailableCOOLKeys(); + if (!arr || arr.length < 1) + return; + var i; + for (i=0; i < arr.length; i++) + { + var keyType = arr[i][0]; + var keyID = arr[i][1]; + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "BLANK") { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } else if (keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } + } +} + +function UserOnCOOLKeyInserted(keyType, keyID) +{ + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "ENROLLED" || keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } else { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } + UserSelectRowByKeyID(keyType, keyID); +} + +function UserOnCOOLKeyRemoved(keyType, keyID) +{ + updateKeyText('Please insert a blank smartcard now!'); +} + +function toggleAjaxProgress(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.style.display = 'none'; + } else { + e.style.display = 'block'; + } +} + +function toggleButton(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.disabled = true; + } else { + e.disabled = false; + } +} + +function onUserKeyUp(e) +{ + var pintf = document.getElementById('pintf'); + var reenterpintf = document.getElementById('reenterpintf'); + var enrollbtn = document.getElementById('enrollbtn'); + if (e.keyCode == 13) { + if (e.target == pintf) { + reenterpintf.focus(); + } else { + pintf.focus(); + } + } + if (pintf.value != '' && pintf.value == reenterpintf.value) { + enrollbtn.disabled = false; + } else { + enrollbtn.disabled = true; + } + return e; +} + +// --> +</script> +</head> + +<body onload="InitializeBindingTable();" onunload=cleanup()> + +<progressmeter id="progress-id" hidden="true" align = "center"/> + +<div id="pb" style="display:none;"> + <table id="BindingTable" width="200px" align="center"> + <tr id="HeaderRow"> + </tr> + </table> +</div> +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> + <blockquote><p>The security officer has identified the user as <strong>$cn</strong>. The User ID is <strong>$uid</strong>.</p> +</blockquote> +<h3><span id="keytext">Please insert new smartcard now!</span></h3> + <blockquote><p>The user must provide a password to protect the smart card.</p> </blockquote> + <h3>New Token Password:</h3> + <input type="password" id="pintf" name="pintf" value=""><br/> + <h3>Re-Enter Token Password:</h3> + <input type="password" id="reenterpintf" name="reenterpintf" value=""><br/> + <input type="hidden" id="snametf" value="$uid"> + <h3>User Password:</h3> + <input type="password" id="snamepwd" value=""><br/> + <table width="100%"> + <tr> +<td> +<div id="ajax-pb" style="display:none;"> + <img src="/sow/images/indicator.gif"> +</div> +</td> + <td align="right"> + <input type="button" id="enrollbtn" name="enrollbtn" value="Start Enrollment" onClick="toggleButton('enrollbtn','off');toggleButton('cancel', 'off');toggleAjaxProgress('ajax-pb','on');DoEnrollCOOLKey();"> + <input type="submit" id="cancel" name="cancel" value="Cancel" onClick="javascript:location.href='/cgi-bin/sow/search.cgi';"> + </td> + </tr> + </table> + </div> +</div> +</body></html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/enroll_temp.html b/pki/linux/tps-ui/shared/cgi-bin/sow/enroll_temp.html new file mode 100755 index 000000000..b72add5c5 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/enroll_temp.html @@ -0,0 +1,166 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Enrollment</title> +<script type="text/javascript" src="/sow/js/prototype.js"></script> +<script type="text/javascript" src="/sow/js/scriptaculous.js?load=effects"></script> +<script type="text/JavaScript" src="/sow/util.js"></script> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +<script type="text/javascript"> +<!-- +function UserOnCOOLKeyStateError() +{ + toggleAjaxProgress('ajax-pb', 'off'); + toggleButton('enrollbtn', 'on'); + toggleButton('cancel', 'on'); +} + +function UserSelectRowByKeyID(keyType, keyID) +{ + DoCoolKeySetConfigValue("Operation-" + keyID, + "https://$host:$secure_port/nk_service"); + DoCoolKeySetConfigValue("TokenType-" + keyID, "userKey"); + SelectRowByKeyID(keyType, keyID); +} + +function updateKeyText(text) +{ + var f = document.getElementById('keytext'); + new Effect.Shake(f); + var text = document.createTextNode(text); + var len= f.childNodes.length; + for (i=0;i<len;i++){ + f.removeChild(f.childNodes[0]); + } + f.appendChild(text); +} + +function UserOnDoneInitializeBindingTable() +{ + // display existing blank smart + var arr = GetAvailableCOOLKeys(); + if (!arr || arr.length < 1) + return; + var i; + for (i=0; i < arr.length; i++) + { + var keyType = arr[i][0]; + var keyID = arr[i][1]; + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "BLANK") { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } else if (keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } + } +} + +function UserOnCOOLKeyInserted(keyType, keyID) +{ + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "ENROLLED" || keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } else { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } + UserSelectRowByKeyID(keyType, keyID); +} + +function UserOnCOOLKeyRemoved(keyType, keyID) +{ + updateKeyText('Please insert a blank smartcard now!'); +} + +function toggleAjaxProgress(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.style.display = 'none'; + } else { + e.style.display = 'block'; + } +} + +function toggleButton(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.disabled = true; + } else { + e.disabled = false; + } +} +// --> +</script> +</head> + +<body onload="InitializeBindingTable();" onunload=cleanup()> + +<progressmeter id="progress-id" hidden="true" align = "center"/> + +<div id="pb" style="display:none;"> + <table id="BindingTable" width="200px" align="center"> + <tr id="HeaderRow"> + </tr> + </table> +</div> +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> + <blockquote><p>The security officer has identified the user as <strong>$cn</strong>. The User ID is <strong>$uid</strong>.</p> +</blockquote> +<h3><span id="keytext">Please insert new smartcard now!</span></h3> + <blockquote><p>The user must provide a password to protect the smart card.</p> </blockquote> + <h3>New Token Password:</h3> + <input type="password" id="pintf" name="pintf" value=""><br/> + <h3>Re-Enter Token Password:</h3> + <input type="password" id="reenterpintf" name="reenterpintf" value=""><br/> + <input type="hidden" id="snametf" value="$uid"> + <h3>User Password:</h3> + <input type="password" id="snamepwd" value=""><br/> + <table width="100%"> + <tr> +<td> +<div id="ajax-pb" style="display:none;"> + <img src="/sow/images/indicator.gif"> +</div> +</td> + <td align="right"> + <input type="button" id="enrollbtn" name="enrollbtn" value="Start Enrollment" onClick="toggleButton('enrollbtn','off');toggleButton('cancel', 'off');toggleAjaxProgress('ajax-pb','on');DoEnrollTempCOOLKey();"> + <input type="submit" id="cancel" name="cancel" value="Cancel" onClick="javascript:location.href='/cgi-bin/sow/search.cgi';"> + </td> + </tr> + </table> + </div> +</div> +</body></html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/format.html b/pki/linux/tps-ui/shared/cgi-bin/sow/format.html new file mode 100755 index 000000000..30989aa07 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/format.html @@ -0,0 +1,181 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Enrollment</title> +<script type="text/javascript" src="/sow/js/prototype.js"></script> +<script type="text/javascript" src="/sow/js/scriptaculous.js?load=effects"></script> +<script type="text/JavaScript" src="/sow/util.js"></script> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +<script type="text/javascript"> +<!-- +function UserOnCOOLKeyStateError() +{ + toggleAjaxProgress('ajax-pb', 'off'); + toggleButton('enrollbtn', 'on'); + toggleButton('cancel', 'on'); +} + +function UserOnCOOLKeyFormatComplete() +{ + toggleAjaxProgress('ajax-pb', 'off'); + toggleButton('enrollbtn', 'on'); + toggleButton('cancel', 'on'); +} + +function updateKeyText(text) +{ + var f = document.getElementById('keytext'); + new Effect.Shake(f); + var text = document.createTextNode(text); + var len= f.childNodes.length; + for (i=0;i<len;i++){ + f.removeChild(f.childNodes[0]); + } + f.appendChild(text); +} + +function UserSelectRowByKeyID(keyType, keyID) +{ + DoCoolKeySetConfigValue("Operation-" + keyID, + "https://$host:$secure_port/nk_service"); + DoCoolKeySetConfigValue("TokenType-" + keyID, "userKey"); + SelectRowByKeyID(keyType, keyID); +} + +function UserOnDoneInitializeBindingTable() +{ + // display existing blank smart + var arr = GetAvailableCOOLKeys(); + if (!arr || arr.length < 1) + return; + var i; + for (i=0; i < arr.length; i++) + { + var keyType = arr[i][0]; + var keyID = arr[i][1]; + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "BLANK") { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } else if (keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } + } + + if (arr && arr.length <= 1 ) + { + toggleButton('enrollbtn','off'); + } +} + +function UserOnCOOLKeyInserted(keyType, keyID) +{ + var arr = GetAvailableCOOLKeys(); + if (arr && arr.length <= 1 ) + { + toggleButton('enrollbtn','off'); + } + if (arr && arr.length > 1 ) + { + toggleButton('enrollbtn','on'); + } + + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "ENROLLED" || keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } else { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } + UserSelectRowByKeyID(keyType, keyID); +} + +function UserOnCOOLKeyRemoved(keyType, keyID) +{ + updateKeyText('Please insert a blank smartcard now!'); +} + +function toggleAjaxProgress(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.style.display = 'none'; + } else { + e.style.display = 'block'; + } +} + +function toggleButton(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.disabled = true; + } else { + e.disabled = false; + } +} +// --> +</script> +</head> + +<body onload="InitializeBindingTable();" onunload=cleanup()> + +<progressmeter id="progress-id" hidden="true" align = "center"/> + +<div id="pb" style="display:none;"> + <table id="BindingTable" width="200px" align="center"> + <tr id="HeaderRow"> + </tr> + </table> +</div> +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> +<br/> +<blockquote>This will erase the home phone URL and format the user token.</blockquote> +<h3><span id="keytext">Please insert new smartcard now!</span></h3> + <br/> + <table width="100%"> + <tr> +<td> +<div id="ajax-pb" style="display:none;"> + <img src="/sow/images/indicator.gif"> +</div> +</td> + <td align="right"> + <input type="button" id="enrollbtn" name="enrollbtn" value="Format" onClick="toggleButton('enrollbtn','off');toggleButton('cancel', 'off');toggleAjaxProgress('ajax-pb','on');DoFormatCOOLKey();"> + <input type="submit" id="cancel" name="cancel" value="Cancel" onClick="javascript:location.href='/cgi-bin/sow/search.cgi';"> + </td> + </tr> + </table> + </div> +</div> +</body></html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/formatso.html b/pki/linux/tps-ui/shared/cgi-bin/sow/formatso.html new file mode 100755 index 000000000..dcfae82d9 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/formatso.html @@ -0,0 +1,161 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Enrollment</title> +<script type="text/javascript" src="/sow/js/prototype.js"></script> +<script type="text/javascript" src="/sow/js/scriptaculous.js?load=effects"></script> +<script type="text/JavaScript" src="/sow/util.js"></script> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +<script type="text/javascript"> +<!-- +function UserOnCOOLKeyStateError() +{ + toggleAjaxProgress('ajax-pb', 'off'); + toggleButton('enrollbtn', 'on'); + toggleButton('cancel', 'on'); +} + +function UserOnCOOLKeyFormatComplete() +{ + toggleAjaxProgress('ajax-pb', 'off'); + toggleButton('enrollbtn', 'on'); + toggleButton('cancel', 'on'); +} + +function updateKeyText(text) +{ + var f = document.getElementById('keytext'); + new Effect.Shake(f); + var text = document.createTextNode(text); + var len= f.childNodes.length; + for (i=0;i<len;i++){ + f.removeChild(f.childNodes[0]); + } + f.appendChild(text); +} + +function UserSelectRowByKeyID(keyType, keyID) +{ + DoCoolKeySetConfigValue("Operation-" + keyID, + "https://$host:$secure_port/nk_service"); + DoCoolKeySetConfigValue("TokenType-" + keyID, "userKey"); + SelectRowByKeyID(keyType, keyID); +} + +function UserOnDoneInitializeBindingTable() +{ + // display existing blank smart + var arr = GetAvailableCOOLKeys(); + if (!arr || arr.length < 1) + return; + var i; + for (i=0; i < arr.length; i++) + { + var keyType = arr[i][0]; + var keyID = arr[i][1]; + var keyStatus = GetStatusForKeyID(keyType, keyID); + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } +} + +function UserOnCOOLKeyInserted(keyType, keyID) +{ + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "ENROLLED" || keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } else { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } + UserSelectRowByKeyID(keyType, keyID); +} + +function UserOnCOOLKeyRemoved(keyType, keyID) +{ + updateKeyText('Please insert a blank smartcard now!'); +} + +function toggleAjaxProgress(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.style.display = 'none'; + } else { + e.style.display = 'block'; + } +} + +function toggleButton(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.disabled = true; + } else { + e.disabled = false; + } +} +// --> +</script> +</head> + +<body onload="InitializeBindingTable();" onunload=cleanup()> + +<progressmeter id="progress-id" hidden="true" align = "center"/> + +<div id="pb" style="display:none;"> + <table id="BindingTable" width="200px" align="center"> + <tr id="HeaderRow"> + </tr> + </table> +</div> +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> +<br/> +<blockquote>This will erase the home phone URL and format the SO token, so that you can start the demonstration all over again. <br/><br/>WARNING: You will not be able to access the security officer station after this operation.</blockquote> +<h3><span id="keytext">Please insert new smartcard now!</span></h3> + <br/> + <table width="100%"> + <tr> +<td> +<div id="ajax-pb" style="display:none;"> + <img src="/sow/images/indicator.gif"> +</div> +</td> + <td align="right"> + <input type="button" id="enrollbtn" name="enrollbtn" value="Format" onClick="toggleButton('enrollbtn','off');toggleButton('cancel', 'off');toggleAjaxProgress('ajax-pb','on');DoFormatSoCOOLKey();"> + <input type="submit" id="cancel" name="cancel" value="Cancel" onClick="javascript:location.href='/cgi-bin/sow/search.cgi';"> + </td> + </tr> + </table> + </div> +</div> +</body></html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/main.html b/pki/linux/tps-ui/shared/cgi-bin/sow/main.html new file mode 100755 index 000000000..c4e5fc081 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/main.html @@ -0,0 +1,68 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Security Officer</title> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +</head> + +<body> + +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> + <blockquote><p>User Token Functions</p></blockquote> +<ul style="font-size:1.2em;"> + <a href="search.cgi">Enroll New Card</a> - enroll a new user smart card<br /> + <a href="search_temp.cgi">Enroll Temporay Card</a> - enroll a temporary smart card<br /> + <a href="format.cgi">Format Card</a> - format a user card<br /> + <a href="seturl.cgi">Set Home URL</a> - set phone home URL to a user card<br /> +</ul> + <blockquote><p>Misc Functions</p></blockquote> +<ul style="font-size:1.2em;"> + <a href="formatso.cgi">Format SO Card</a> - format a SO card<br /> +</ul> + + <br/> +<font color="red">$error</font> + <br/> + <table width="100%"> + <tr> + <td align="right"> + </td> + </tr> + </table> +</form> + + </div> +</div> + +</body> +</html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/noaccess.html b/pki/linux/tps-ui/shared/cgi-bin/sow/noaccess.html new file mode 100755 index 000000000..1a315019b --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/noaccess.html @@ -0,0 +1,64 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Security Officer</title> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +</head> + +<body> + +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + </div> + <blockquote><p>Sorry, you do not have permission to perform the requested operation.</p></blockquote> +<form method=post action="http://$host:$port/cgi-bin/sow/welcome.cgi"> + <table> + <tr> + </tr> + + </table> + + <br/> +<font color="red">$error</font> + <br/> + <table width="100%"> + <tr> + <td align="right"> + <input type="submit" id="search" name="search" value="Start Over"> + </td> + </tr> + </table> +</form> + + </div> +</div> + +</body> +</html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/read.html b/pki/linux/tps-ui/shared/cgi-bin/sow/read.html new file mode 100755 index 000000000..640053364 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/read.html @@ -0,0 +1,79 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Security Officer</title> +<script type="text/javascript" src="/sow/js/prototype.js"></script> +<script type="text/javascript" src="/sow/js/scriptaculous.js?load=effects"></script> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +</head> + +<body> + +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> + <blockquote><p>Please check user's identification and verify the user information. If the information is correct, please insert a new smart card and continue.</p></blockquote> + <table> + <tr> + <td> +<script type="text/javascript"> + if ('$departmentNumber' != '') { + document.writeln('<img alt="" border=0 src="$photoSmall">'); + } +</script> + </td> + <td> + <span class="heading">UID:</span> $uid<br/> + <span class="heading">Given Name:</span> $givenName<br/> + <span class="heading">Last Name:</span> $sn<br/> + <span class="heading">Email:</span>$mail<br/> + <span class="heading">Height:</span> $height<br/> + <span class="heading">Weight:</span> $weight<br/> + <span class="heading">Eye Color:</span> $eyecolor<br/> + </td> + </table> + <br/> + + <form method=post action="enroll.cgi"> + <input type=hidden name=uid value="$uid"> + <table width="100%"> + <tr> + <td align="right"> + <input type="submit" id="search" name="Enroll" value="Continue"> + </td> + </tr> + </table> + </form> + </div> +</div> + +</body> +</html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/read_temp.html b/pki/linux/tps-ui/shared/cgi-bin/sow/read_temp.html new file mode 100755 index 000000000..640053364 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/read_temp.html @@ -0,0 +1,79 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Security Officer</title> +<script type="text/javascript" src="/sow/js/prototype.js"></script> +<script type="text/javascript" src="/sow/js/scriptaculous.js?load=effects"></script> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +</head> + +<body> + +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> + <blockquote><p>Please check user's identification and verify the user information. If the information is correct, please insert a new smart card and continue.</p></blockquote> + <table> + <tr> + <td> +<script type="text/javascript"> + if ('$departmentNumber' != '') { + document.writeln('<img alt="" border=0 src="$photoSmall">'); + } +</script> + </td> + <td> + <span class="heading">UID:</span> $uid<br/> + <span class="heading">Given Name:</span> $givenName<br/> + <span class="heading">Last Name:</span> $sn<br/> + <span class="heading">Email:</span>$mail<br/> + <span class="heading">Height:</span> $height<br/> + <span class="heading">Weight:</span> $weight<br/> + <span class="heading">Eye Color:</span> $eyecolor<br/> + </td> + </table> + <br/> + + <form method=post action="enroll.cgi"> + <input type=hidden name=uid value="$uid"> + <table width="100%"> + <tr> + <td align="right"> + <input type="submit" id="search" name="Enroll" value="Continue"> + </td> + </tr> + </table> + </form> + </div> +</div> + +</body> +</html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/search.html b/pki/linux/tps-ui/shared/cgi-bin/sow/search.html new file mode 100755 index 000000000..b0d00f350 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/search.html @@ -0,0 +1,72 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Security Officer</title> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +</head> + +<body> + +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> + <blockquote><p>Please locate the user who is requesting for a new smart card.</p></blockquote> +<form method=post action="read.cgi"> +<div style="font-size:0.8em;"> + <table> + <tr> + <td><h3>Name: </h3></td> + <td> </td> + <td><input type="text" id="name" name="name" value="" autocomplete="off"></td> + <input type="hidden" id="name_hidden" name="name_ID"><!-- THE ID OF the country will be inserted into this hidden input --></td> + <td> </td> + </tr> + + </table> +</div> + + <br/> +<font color="red">$error</font> + <br/> + <table width="100%"> + <tr> + <td align="right"> + <input type="submit" id="search" name="search" value="Continue"> + </td> + </tr> + </table> +</form> + + </div> +</div> + +</body> +</html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/search_temp.html b/pki/linux/tps-ui/shared/cgi-bin/sow/search_temp.html new file mode 100755 index 000000000..6f9b6d1d8 --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/search_temp.html @@ -0,0 +1,72 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Security Officer</title> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +</head> + +<body> + +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> + <blockquote><p>Please locate the user who is requesting for a temporary smart card.</p></blockquote> +<form method=post action="read_temp.cgi"> +<div style="font-size:0.8em;"> + <table> + <tr> + <td><h3>Name: </h3></td> + <td> </td> + <td><input type="text" id="name" name="name" value="" autocomplete="off"></td> + <input type="hidden" id="name_hidden" name="name_ID"><!-- THE ID OF the country will be inserted into this hidden input --></td> + <td> </td> + </tr> + + </table> +</div> + + <br/> +<font color="red">$error</font> + <br/> + <table width="100%"> + <tr> + <td align="right"> + <input type="submit" id="search" name="search" value="Continue"> + </td> + </tr> + </table> +</form> + + </div> +</div> + +</body> +</html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/seturl.html b/pki/linux/tps-ui/shared/cgi-bin/sow/seturl.html new file mode 100755 index 000000000..91ece7d6f --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/seturl.html @@ -0,0 +1,166 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Enrollment</title> +<script type="text/javascript" src="/sow/js/prototype.js"></script> +<script type="text/javascript" src="/sow/js/scriptaculous.js?load=effects"></script> +<script type="text/JavaScript" src="/sow/util.js"></script> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +<script type="text/javascript"> +<!-- +function UserOnCOOLKeyStateError() +{ + toggleAjaxProgress('ajax-pb', 'off'); + toggleButton('enrollbtn', 'on'); + toggleButton('cancel', 'on'); +} + +function UserOnCOOLKeyFormatComplete() +{ + toggleAjaxProgress('ajax-pb', 'off'); + toggleButton('enrollbtn', 'on'); + toggleButton('cancel', 'on'); +} + +function updateKeyText(text) +{ + var f = document.getElementById('keytext'); + new Effect.Shake(f); + var text = document.createTextNode(text); + var len= f.childNodes.length; + for (i=0;i<len;i++){ + f.removeChild(f.childNodes[0]); + } + f.appendChild(text); +} + +function UserSelectRowByKeyID(keyType, keyID) +{ + DoCoolKeySetConfigValue("Operation-" + keyID, + "https://$host:$secure_port/nk_service"); + DoCoolKeySetConfigValue("TokenType-" + keyID, "userKey"); + SelectRowByKeyID(keyType, keyID); +} + +function UserOnDoneInitializeBindingTable() +{ + // display existing blank smart + var arr = GetAvailableCOOLKeys(); + if (!arr || arr.length < 1) + return; + var i; + for (i=0; i < arr.length; i++) + { + var keyType = arr[i][0]; + var keyID = arr[i][1]; + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "BLANK") { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } else if (keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + UserSelectRowByKeyID(keyType, keyID); + } + } +} + +function UserOnCOOLKeyInserted(keyType, keyID) +{ + var keyStatus = GetStatusForKeyID(keyType, keyID); + if (keyStatus == "ENROLLED" || keyStatus == "UNINITIALIZED") { + updateKeyText('An ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } else { + updateKeyText('A ' + keyStatus + ' smartcard "' + keyID + '" is detected!'); + } + UserSelectRowByKeyID(keyType, keyID); +} + +function UserOnCOOLKeyRemoved(keyType, keyID) +{ + updateKeyText('Please insert a blank smartcard now!'); +} + +function toggleAjaxProgress(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.style.display = 'none'; + } else { + e.style.display = 'block'; + } +} + +function toggleButton(id, i) +{ + var e = document.getElementById(id); + if (i == 'off') { + e.disabled = true; + } else { + e.disabled = false; + } +} +// --> +</script> +</head> + +<body onload="InitializeBindingTable();" onunload=cleanup()> + +<progressmeter id="progress-id" hidden="true" align = "center"/> + +<div id="pb" style="display:none;"> + <table id="BindingTable" width="200px" align="center"> + <tr id="HeaderRow"> + </tr> + </table> +</div> +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + | <a href="/cgi-bin/sow/main.cgi">Main</a> | + </div> +<br/> +<blockquote>This will burn a home phone URL on the user token.</blockquote> +<h3><span id="keytext">Please insert new smartcard now!</span></h3> + <br/> + <table width="100%"> + <tr> +<td> +<div id="ajax-pb" style="display:none;"> + <img src="/sow/images/indicator.gif"> +</div> +</td> + <td align="right"> + <input type="button" id="enrollbtn" name="enrollbtn" value="Format" onClick="toggleButton('enrollbtn','off');toggleButton('cancel', 'off');toggleAjaxProgress('ajax-pb','on');DoSetURLCOOLKey();"> + <input type="submit" id="cancel" name="cancel" value="Cancel" onClick="javascript:location.href='/cgi-bin/sow/search.cgi';"> + </td> + </tr> + </table> + </div> +</div> +</body></html> diff --git a/pki/linux/tps-ui/shared/cgi-bin/sow/welcome.html b/pki/linux/tps-ui/shared/cgi-bin/sow/welcome.html new file mode 100755 index 000000000..1ede1edbf --- /dev/null +++ b/pki/linux/tps-ui/shared/cgi-bin/sow/welcome.html @@ -0,0 +1,64 @@ +<!-- --- 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; either + + 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 --- --> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel=stylesheet href="/sow/style.css" type="text/css"> + +<title>Security Officer</title> +<link rel="stylesheet" href="/sow/css/style.css" media="screen" type="text/css"> +</head> + +<body> + +<div id="header"> + <div id="logo"> + <h3><img align=bottom src="/sow/images/badget.png">Security Officer Station</h3> + </div> +</div> + +<div id="content"> + <div id="maintext"> + <div id="topmenu"> + </div> + <blockquote><p>Welcome to the security officer interface, you will be asked to identify yourself with your token. Please click the continue button below.</p></blockquote> +<form method=post action="https://$host:$secure_port/cgi-bin/sow/main.cgi"> + <table> + <tr> + </tr> + + </table> + + <br/> +<font color="red">$error</font> + <br/> + <table width="100%"> + <tr> + <td align="right"> + <input type="submit" id="search" name="search" value="Continue"> + </td> + </tr> + </table> +</form> + + </div> +</div> + +</body> +</html> |