From 2fd7c09281cf65430477d33a45df0ac876ea04ad Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Wed, 21 Nov 2012 13:28:22 -0500 Subject: Reorganized RA templates and scripts. The templates, JS, and CGI scripts for RA have been reorganized into the RA core package. Ticket #407 --- base/ra/apache/docroot/404.html | 146 +++++++ base/ra/apache/docroot/500.html | 139 +++++++ base/ra/apache/docroot/admin/group/add.cgi | 86 ++++ base/ra/apache/docroot/admin/group/add_member.cgi | 80 ++++ base/ra/apache/docroot/admin/group/add_new.cgi | 86 ++++ base/ra/apache/docroot/admin/group/add_new.vm | 83 ++++ base/ra/apache/docroot/admin/group/delete.cgi | 79 ++++ .../apache/docroot/admin/group/delete_member.cgi | 79 ++++ base/ra/apache/docroot/admin/group/index.cgi | 115 ++++++ base/ra/apache/docroot/admin/group/index.vm | 81 ++++ base/ra/apache/docroot/admin/group/read.cgi | 125 ++++++ base/ra/apache/docroot/admin/group/read.vm | 104 +++++ base/ra/apache/docroot/admin/index.cgi | 80 ++++ base/ra/apache/docroot/admin/index.vm | 95 +++++ base/ra/apache/docroot/admin/user/add.cgi | 99 +++++ base/ra/apache/docroot/admin/user/add_new.cgi | 87 +++++ base/ra/apache/docroot/admin/user/add_new.vm | 95 +++++ base/ra/apache/docroot/admin/user/delete.cgi | 79 ++++ base/ra/apache/docroot/admin/user/index.cgi | 118 ++++++ base/ra/apache/docroot/admin/user/index.vm | 83 ++++ base/ra/apache/docroot/admin/user/read.cgi | 97 +++++ base/ra/apache/docroot/admin/user/read.vm | 88 +++++ base/ra/apache/docroot/agent/cert/index.cgi | 119 ++++++ base/ra/apache/docroot/agent/cert/index.vm | 86 ++++ base/ra/apache/docroot/agent/cert/read.cgi | 104 +++++ base/ra/apache/docroot/agent/cert/read.vm | 96 +++++ base/ra/apache/docroot/agent/cert/revoke.cgi | 89 +++++ base/ra/apache/docroot/agent/cert/revoke.vm | 111 ++++++ base/ra/apache/docroot/agent/cert/submit.cgi | 104 +++++ base/ra/apache/docroot/agent/cert/submit.vm | 91 +++++ base/ra/apache/docroot/agent/error.cgi | 81 ++++ base/ra/apache/docroot/agent/error.vm | 72 ++++ base/ra/apache/docroot/agent/index.cgi | 83 ++++ base/ra/apache/docroot/agent/index.vm | 81 ++++ base/ra/apache/docroot/agent/request/add_note.cgi | 93 +++++ base/ra/apache/docroot/agent/request/index.cgi | 146 +++++++ base/ra/apache/docroot/agent/request/index.vm | 95 +++++ base/ra/apache/docroot/agent/request/op.cgi | 153 ++++++++ base/ra/apache/docroot/agent/request/op.vm | 127 ++++++ base/ra/apache/docroot/agent/request/read.cgi | 119 ++++++ base/ra/apache/docroot/agent/request/read.vm | 149 +++++++ base/ra/apache/docroot/ee/agent/enroll.cgi | 127 ++++++ base/ra/apache/docroot/ee/agent/enroll.vm | 74 ++++ base/ra/apache/docroot/ee/agent/index.cgi | 68 ++++ base/ra/apache/docroot/ee/agent/index.vm | 83 ++++ base/ra/apache/docroot/ee/agent/new.cgi | 68 ++++ base/ra/apache/docroot/ee/agent/new.vm | 88 +++++ base/ra/apache/docroot/ee/agent/start.cgi | 69 ++++ base/ra/apache/docroot/ee/agent/start.vm | 114 ++++++ base/ra/apache/docroot/ee/agent/submit.cgi | 88 +++++ base/ra/apache/docroot/ee/agent/submit.vm | 73 ++++ base/ra/apache/docroot/ee/error.cgi | 81 ++++ base/ra/apache/docroot/ee/error.vm | 71 ++++ base/ra/apache/docroot/ee/index.cgi | 68 ++++ base/ra/apache/docroot/ee/index.vm | 102 +++++ base/ra/apache/docroot/ee/request/getcert.cgi | 93 +++++ base/ra/apache/docroot/ee/request/getcert.vm | 72 ++++ base/ra/apache/docroot/ee/request/importcert.cgi | 82 ++++ base/ra/apache/docroot/ee/request/index.cgi | 68 ++++ base/ra/apache/docroot/ee/request/index.vm | 67 ++++ base/ra/apache/docroot/ee/request/status.cgi | 94 +++++ base/ra/apache/docroot/ee/request/status.vm | 91 +++++ base/ra/apache/docroot/ee/scep/enroll.cgi | 112 ++++++ base/ra/apache/docroot/ee/scep/enroll.vm | 74 ++++ base/ra/apache/docroot/ee/scep/index.cgi | 68 ++++ base/ra/apache/docroot/ee/scep/index.vm | 83 ++++ base/ra/apache/docroot/ee/scep/installer.cgi | 74 ++++ base/ra/apache/docroot/ee/scep/installer.vm | 73 ++++ base/ra/apache/docroot/ee/scep/manager.cgi | 68 ++++ base/ra/apache/docroot/ee/scep/manager.vm | 123 ++++++ base/ra/apache/docroot/ee/scep/pkiclient.cgi | 113 ++++++ base/ra/apache/docroot/ee/scep/submit.cgi | 91 +++++ base/ra/apache/docroot/ee/scep/submit.vm | 76 ++++ base/ra/apache/docroot/ee/server/admin.cgi | 68 ++++ base/ra/apache/docroot/ee/server/admin.vm | 132 +++++++ base/ra/apache/docroot/ee/server/index.cgi | 68 ++++ base/ra/apache/docroot/ee/server/index.vm | 76 ++++ base/ra/apache/docroot/ee/server/submit.cgi | 93 +++++ base/ra/apache/docroot/ee/server/submit.vm | 75 ++++ base/ra/apache/docroot/ee/user/index.cgi | 68 ++++ base/ra/apache/docroot/ee/user/index.vm | 83 ++++ base/ra/apache/docroot/ee/user/renew.cgi | 165 ++++++++ base/ra/apache/docroot/ee/user/renew.vm | 86 ++++ base/ra/apache/docroot/ee/user/renewal.cgi | 74 ++++ base/ra/apache/docroot/ee/user/renewal.vm | 73 ++++ base/ra/apache/docroot/ee/user/submit.cgi | 112 ++++++ base/ra/apache/docroot/ee/user/submit.vm | 75 ++++ base/ra/apache/docroot/ee/user/user.cgi | 68 ++++ base/ra/apache/docroot/ee/user/user.vm | 435 +++++++++++++++++++++ base/ra/apache/docroot/footer.vm | 19 + base/ra/apache/docroot/header.vm | 26 ++ base/ra/apache/docroot/index.cgi | 76 ++++ base/ra/apache/docroot/index.vm | 90 +++++ .../admin/console/config/adminauthenticatepanel.vm | 52 +++ .../docroot/ra/admin/console/config/adminpanel.vm | 237 +++++++++++ .../admin/console/config/agentauthenticatepanel.vm | 48 +++ .../docroot/ra/admin/console/config/authdbpanel.vm | 66 ++++ .../docroot/ra/admin/console/config/cainfopanel.vm | 55 +++ .../ra/admin/console/config/certchainpanel.vm | 49 +++ .../admin/console/config/certprettyprintpanel.vm | 49 +++ .../ra/admin/console/config/certrequestpanel.vm | 225 +++++++++++ .../ra/admin/console/config/config_addhsm.vm | 96 +++++ .../docroot/ra/admin/console/config/config_db.vm | 126 ++++++ .../docroot/ra/admin/console/config/config_hsm.vm | 176 +++++++++ .../admin/console/config/config_hsmloginpanel.vm | 83 ++++ .../docroot/ra/admin/console/config/config_join.vm | 125 ++++++ .../ra/admin/console/config/config_rootca.vm | 113 ++++++ .../admin/console/config/createsubsystempanel.vm | 95 +++++ .../ra/admin/console/config/databasepanel.vm | 53 +++ .../admin/console/config/displaycertchain2panel.vm | 41 ++ .../admin/console/config/displaycertchainpanel.vm | 41 ++ .../docroot/ra/admin/console/config/donepanel.vm | 42 ++ .../ra/admin/console/config/drminfopanel.vm | 56 +++ .../docroot/ra/admin/console/config/footer.vm | 20 + .../docroot/ra/admin/console/config/header.vm | 26 ++ .../ra/admin/console/config/hierarchypanel.vm | 80 ++++ .../admin/console/config/importadmincertpanel.vm | 56 +++ .../docroot/ra/admin/console/config/login.vm | 110 ++++++ .../docroot/ra/admin/console/config/modulepanel.vm | 158 ++++++++ .../docroot/ra/admin/console/config/namepanel.vm | 91 +++++ .../console/config/securitydomainloginpanel.vm | 109 ++++++ .../ra/admin/console/config/securitydomainpanel.vm | 115 ++++++ .../docroot/ra/admin/console/config/sidemenu.vm | 30 ++ .../docroot/ra/admin/console/config/sizepanel.vm | 235 +++++++++++ .../ra/admin/console/config/tksinfopanel.vm | 51 +++ .../docroot/ra/admin/console/config/topmenu.vm | 21 + .../ra/admin/console/config/welcomepanel.vm | 57 +++ .../docroot/ra/admin/console/config/wizard.vm | 144 +++++++ .../apache/docroot/ra/admin/console/config/xml.vm | 4 + base/ra/apache/docroot/ra/admin/console/js/misc.js | 30 ++ base/ra/forms/admin/group/add.cgi | 86 ---- base/ra/forms/admin/group/add_member.cgi | 80 ---- base/ra/forms/admin/group/add_new.cgi | 86 ---- base/ra/forms/admin/group/delete.cgi | 79 ---- base/ra/forms/admin/group/delete_member.cgi | 79 ---- base/ra/forms/admin/group/index.cgi | 115 ------ base/ra/forms/admin/group/read.cgi | 125 ------ base/ra/forms/admin/index.cgi | 80 ---- base/ra/forms/admin/user/add.cgi | 99 ----- base/ra/forms/admin/user/add_new.cgi | 87 ----- base/ra/forms/admin/user/delete.cgi | 79 ---- base/ra/forms/admin/user/index.cgi | 118 ------ base/ra/forms/admin/user/read.cgi | 97 ----- base/ra/forms/agent/cert/index.cgi | 119 ------ base/ra/forms/agent/cert/read.cgi | 104 ----- base/ra/forms/agent/cert/revoke.cgi | 89 ----- base/ra/forms/agent/cert/submit.cgi | 104 ----- base/ra/forms/agent/error.cgi | 81 ---- base/ra/forms/agent/index.cgi | 83 ---- base/ra/forms/agent/request/add_note.cgi | 93 ----- base/ra/forms/agent/request/index.cgi | 146 ------- base/ra/forms/agent/request/op.cgi | 153 -------- base/ra/forms/agent/request/read.cgi | 119 ------ base/ra/forms/ee/agent/enroll.cgi | 127 ------ base/ra/forms/ee/agent/index.cgi | 68 ---- base/ra/forms/ee/agent/new.cgi | 68 ---- base/ra/forms/ee/agent/start.cgi | 69 ---- base/ra/forms/ee/agent/submit.cgi | 88 ----- base/ra/forms/ee/error.cgi | 81 ---- base/ra/forms/ee/index.cgi | 68 ---- base/ra/forms/ee/request/getcert.cgi | 93 ----- base/ra/forms/ee/request/importcert.cgi | 82 ---- base/ra/forms/ee/request/index.cgi | 68 ---- base/ra/forms/ee/request/status.cgi | 94 ----- base/ra/forms/ee/scep/enroll.cgi | 112 ------ base/ra/forms/ee/scep/index.cgi | 68 ---- base/ra/forms/ee/scep/installer.cgi | 74 ---- base/ra/forms/ee/scep/manager.cgi | 68 ---- base/ra/forms/ee/scep/pkiclient.cgi | 113 ------ base/ra/forms/ee/scep/submit.cgi | 91 ----- base/ra/forms/ee/server/admin.cgi | 68 ---- base/ra/forms/ee/server/index.cgi | 68 ---- base/ra/forms/ee/server/submit.cgi | 93 ----- base/ra/forms/ee/user/index.cgi | 68 ---- base/ra/forms/ee/user/renew.cgi | 165 -------- base/ra/forms/ee/user/renewal.cgi | 74 ---- base/ra/forms/ee/user/submit.cgi | 112 ------ base/ra/forms/ee/user/user.cgi | 68 ---- base/ra/forms/index.cgi | 76 ---- dogtag/ra-ui/shared/docroot/404.html | 146 ------- dogtag/ra-ui/shared/docroot/500.html | 139 ------- dogtag/ra-ui/shared/docroot/admin/group/add_new.vm | 83 ---- dogtag/ra-ui/shared/docroot/admin/group/index.vm | 81 ---- dogtag/ra-ui/shared/docroot/admin/group/read.vm | 104 ----- dogtag/ra-ui/shared/docroot/admin/index.vm | 95 ----- dogtag/ra-ui/shared/docroot/admin/user/add_new.vm | 95 ----- dogtag/ra-ui/shared/docroot/admin/user/index.vm | 83 ---- dogtag/ra-ui/shared/docroot/admin/user/read.vm | 88 ----- dogtag/ra-ui/shared/docroot/agent/cert/index.vm | 86 ---- dogtag/ra-ui/shared/docroot/agent/cert/read.vm | 96 ----- dogtag/ra-ui/shared/docroot/agent/cert/revoke.vm | 111 ------ dogtag/ra-ui/shared/docroot/agent/cert/submit.vm | 91 ----- dogtag/ra-ui/shared/docroot/agent/error.vm | 72 ---- dogtag/ra-ui/shared/docroot/agent/index.vm | 81 ---- dogtag/ra-ui/shared/docroot/agent/request/index.vm | 95 ----- dogtag/ra-ui/shared/docroot/agent/request/op.vm | 127 ------ dogtag/ra-ui/shared/docroot/agent/request/read.vm | 149 ------- dogtag/ra-ui/shared/docroot/ee/agent/enroll.vm | 74 ---- dogtag/ra-ui/shared/docroot/ee/agent/index.vm | 83 ---- dogtag/ra-ui/shared/docroot/ee/agent/new.vm | 88 ----- dogtag/ra-ui/shared/docroot/ee/agent/start.vm | 114 ------ dogtag/ra-ui/shared/docroot/ee/agent/submit.vm | 73 ---- dogtag/ra-ui/shared/docroot/ee/error.vm | 71 ---- dogtag/ra-ui/shared/docroot/ee/index.vm | 102 ----- dogtag/ra-ui/shared/docroot/ee/request/getcert.vm | 72 ---- dogtag/ra-ui/shared/docroot/ee/request/index.vm | 67 ---- dogtag/ra-ui/shared/docroot/ee/request/status.vm | 91 ----- dogtag/ra-ui/shared/docroot/ee/scep/enroll.vm | 74 ---- dogtag/ra-ui/shared/docroot/ee/scep/index.vm | 83 ---- dogtag/ra-ui/shared/docroot/ee/scep/installer.vm | 73 ---- dogtag/ra-ui/shared/docroot/ee/scep/manager.vm | 123 ------ dogtag/ra-ui/shared/docroot/ee/scep/submit.vm | 76 ---- dogtag/ra-ui/shared/docroot/ee/server/admin.vm | 132 ------- dogtag/ra-ui/shared/docroot/ee/server/index.vm | 76 ---- dogtag/ra-ui/shared/docroot/ee/server/submit.vm | 75 ---- dogtag/ra-ui/shared/docroot/ee/user/index.vm | 83 ---- dogtag/ra-ui/shared/docroot/ee/user/renew.vm | 86 ---- dogtag/ra-ui/shared/docroot/ee/user/renewal.vm | 73 ---- dogtag/ra-ui/shared/docroot/ee/user/submit.vm | 75 ---- dogtag/ra-ui/shared/docroot/ee/user/user.vm | 435 --------------------- dogtag/ra-ui/shared/docroot/footer.vm | 19 - dogtag/ra-ui/shared/docroot/header.vm | 26 -- dogtag/ra-ui/shared/docroot/index.vm | 90 ----- .../admin/console/config/adminauthenticatepanel.vm | 52 --- .../docroot/ra/admin/console/config/adminpanel.vm | 237 ----------- .../admin/console/config/agentauthenticatepanel.vm | 48 --- .../docroot/ra/admin/console/config/authdbpanel.vm | 66 ---- .../docroot/ra/admin/console/config/cainfopanel.vm | 55 --- .../ra/admin/console/config/certchainpanel.vm | 49 --- .../admin/console/config/certprettyprintpanel.vm | 49 --- .../ra/admin/console/config/certrequestpanel.vm | 225 ----------- .../ra/admin/console/config/config_addhsm.vm | 96 ----- .../docroot/ra/admin/console/config/config_db.vm | 126 ------ .../docroot/ra/admin/console/config/config_hsm.vm | 176 --------- .../admin/console/config/config_hsmloginpanel.vm | 83 ---- .../docroot/ra/admin/console/config/config_join.vm | 125 ------ .../ra/admin/console/config/config_rootca.vm | 113 ------ .../admin/console/config/createsubsystempanel.vm | 95 ----- .../ra/admin/console/config/databasepanel.vm | 53 --- .../admin/console/config/displaycertchain2panel.vm | 41 -- .../admin/console/config/displaycertchainpanel.vm | 41 -- .../docroot/ra/admin/console/config/donepanel.vm | 42 -- .../ra/admin/console/config/drminfopanel.vm | 56 --- .../docroot/ra/admin/console/config/footer.vm | 20 - .../docroot/ra/admin/console/config/header.vm | 26 -- .../ra/admin/console/config/hierarchypanel.vm | 80 ---- .../admin/console/config/importadmincertpanel.vm | 56 --- .../docroot/ra/admin/console/config/login.vm | 110 ------ .../docroot/ra/admin/console/config/modulepanel.vm | 158 -------- .../docroot/ra/admin/console/config/namepanel.vm | 91 ----- .../console/config/securitydomainloginpanel.vm | 109 ------ .../ra/admin/console/config/securitydomainpanel.vm | 115 ------ .../docroot/ra/admin/console/config/sidemenu.vm | 30 -- .../docroot/ra/admin/console/config/sizepanel.vm | 235 ----------- .../ra/admin/console/config/tksinfopanel.vm | 51 --- .../docroot/ra/admin/console/config/topmenu.vm | 21 - .../ra/admin/console/config/welcomepanel.vm | 57 --- .../docroot/ra/admin/console/config/wizard.vm | 144 ------- .../shared/docroot/ra/admin/console/config/xml.vm | 4 - .../shared/docroot/ra/admin/console/js/misc.js | 30 -- 260 files changed, 11946 insertions(+), 11946 deletions(-) create mode 100755 base/ra/apache/docroot/404.html create mode 100755 base/ra/apache/docroot/500.html create mode 100755 base/ra/apache/docroot/admin/group/add.cgi create mode 100755 base/ra/apache/docroot/admin/group/add_member.cgi create mode 100755 base/ra/apache/docroot/admin/group/add_new.cgi create mode 100644 base/ra/apache/docroot/admin/group/add_new.vm create mode 100755 base/ra/apache/docroot/admin/group/delete.cgi create mode 100755 base/ra/apache/docroot/admin/group/delete_member.cgi create mode 100755 base/ra/apache/docroot/admin/group/index.cgi create mode 100644 base/ra/apache/docroot/admin/group/index.vm create mode 100755 base/ra/apache/docroot/admin/group/read.cgi create mode 100644 base/ra/apache/docroot/admin/group/read.vm create mode 100755 base/ra/apache/docroot/admin/index.cgi create mode 100644 base/ra/apache/docroot/admin/index.vm create mode 100755 base/ra/apache/docroot/admin/user/add.cgi create mode 100755 base/ra/apache/docroot/admin/user/add_new.cgi create mode 100644 base/ra/apache/docroot/admin/user/add_new.vm create mode 100755 base/ra/apache/docroot/admin/user/delete.cgi create mode 100755 base/ra/apache/docroot/admin/user/index.cgi create mode 100644 base/ra/apache/docroot/admin/user/index.vm create mode 100755 base/ra/apache/docroot/admin/user/read.cgi create mode 100644 base/ra/apache/docroot/admin/user/read.vm create mode 100755 base/ra/apache/docroot/agent/cert/index.cgi create mode 100644 base/ra/apache/docroot/agent/cert/index.vm create mode 100755 base/ra/apache/docroot/agent/cert/read.cgi create mode 100644 base/ra/apache/docroot/agent/cert/read.vm create mode 100755 base/ra/apache/docroot/agent/cert/revoke.cgi create mode 100644 base/ra/apache/docroot/agent/cert/revoke.vm create mode 100755 base/ra/apache/docroot/agent/cert/submit.cgi create mode 100644 base/ra/apache/docroot/agent/cert/submit.vm create mode 100755 base/ra/apache/docroot/agent/error.cgi create mode 100644 base/ra/apache/docroot/agent/error.vm create mode 100755 base/ra/apache/docroot/agent/index.cgi create mode 100644 base/ra/apache/docroot/agent/index.vm create mode 100755 base/ra/apache/docroot/agent/request/add_note.cgi create mode 100755 base/ra/apache/docroot/agent/request/index.cgi create mode 100644 base/ra/apache/docroot/agent/request/index.vm create mode 100755 base/ra/apache/docroot/agent/request/op.cgi create mode 100644 base/ra/apache/docroot/agent/request/op.vm create mode 100755 base/ra/apache/docroot/agent/request/read.cgi create mode 100644 base/ra/apache/docroot/agent/request/read.vm create mode 100755 base/ra/apache/docroot/ee/agent/enroll.cgi create mode 100644 base/ra/apache/docroot/ee/agent/enroll.vm create mode 100755 base/ra/apache/docroot/ee/agent/index.cgi create mode 100644 base/ra/apache/docroot/ee/agent/index.vm create mode 100755 base/ra/apache/docroot/ee/agent/new.cgi create mode 100644 base/ra/apache/docroot/ee/agent/new.vm create mode 100755 base/ra/apache/docroot/ee/agent/start.cgi create mode 100644 base/ra/apache/docroot/ee/agent/start.vm create mode 100755 base/ra/apache/docroot/ee/agent/submit.cgi create mode 100644 base/ra/apache/docroot/ee/agent/submit.vm create mode 100755 base/ra/apache/docroot/ee/error.cgi create mode 100644 base/ra/apache/docroot/ee/error.vm create mode 100755 base/ra/apache/docroot/ee/index.cgi create mode 100644 base/ra/apache/docroot/ee/index.vm create mode 100755 base/ra/apache/docroot/ee/request/getcert.cgi create mode 100644 base/ra/apache/docroot/ee/request/getcert.vm create mode 100755 base/ra/apache/docroot/ee/request/importcert.cgi create mode 100755 base/ra/apache/docroot/ee/request/index.cgi create mode 100644 base/ra/apache/docroot/ee/request/index.vm create mode 100755 base/ra/apache/docroot/ee/request/status.cgi create mode 100644 base/ra/apache/docroot/ee/request/status.vm create mode 100755 base/ra/apache/docroot/ee/scep/enroll.cgi create mode 100644 base/ra/apache/docroot/ee/scep/enroll.vm create mode 100755 base/ra/apache/docroot/ee/scep/index.cgi create mode 100644 base/ra/apache/docroot/ee/scep/index.vm create mode 100755 base/ra/apache/docroot/ee/scep/installer.cgi create mode 100644 base/ra/apache/docroot/ee/scep/installer.vm create mode 100755 base/ra/apache/docroot/ee/scep/manager.cgi create mode 100644 base/ra/apache/docroot/ee/scep/manager.vm create mode 100755 base/ra/apache/docroot/ee/scep/pkiclient.cgi create mode 100755 base/ra/apache/docroot/ee/scep/submit.cgi create mode 100644 base/ra/apache/docroot/ee/scep/submit.vm create mode 100755 base/ra/apache/docroot/ee/server/admin.cgi create mode 100644 base/ra/apache/docroot/ee/server/admin.vm create mode 100755 base/ra/apache/docroot/ee/server/index.cgi create mode 100644 base/ra/apache/docroot/ee/server/index.vm create mode 100755 base/ra/apache/docroot/ee/server/submit.cgi create mode 100644 base/ra/apache/docroot/ee/server/submit.vm create mode 100755 base/ra/apache/docroot/ee/user/index.cgi create mode 100644 base/ra/apache/docroot/ee/user/index.vm create mode 100755 base/ra/apache/docroot/ee/user/renew.cgi create mode 100644 base/ra/apache/docroot/ee/user/renew.vm create mode 100755 base/ra/apache/docroot/ee/user/renewal.cgi create mode 100644 base/ra/apache/docroot/ee/user/renewal.vm create mode 100755 base/ra/apache/docroot/ee/user/submit.cgi create mode 100644 base/ra/apache/docroot/ee/user/submit.vm create mode 100755 base/ra/apache/docroot/ee/user/user.cgi create mode 100644 base/ra/apache/docroot/ee/user/user.vm create mode 100644 base/ra/apache/docroot/footer.vm create mode 100644 base/ra/apache/docroot/header.vm create mode 100755 base/ra/apache/docroot/index.cgi create mode 100644 base/ra/apache/docroot/index.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/adminauthenticatepanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/adminpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/agentauthenticatepanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/authdbpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/cainfopanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/certchainpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/certprettyprintpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/certrequestpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/config_addhsm.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/config_db.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/config_hsm.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/config_hsmloginpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/config_join.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/config_rootca.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/createsubsystempanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/databasepanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/displaycertchain2panel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/displaycertchainpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/donepanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/drminfopanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/footer.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/header.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/hierarchypanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/importadmincertpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/login.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/modulepanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/namepanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/securitydomainloginpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/securitydomainpanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/sidemenu.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/sizepanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/tksinfopanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/topmenu.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/welcomepanel.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/wizard.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/config/xml.vm create mode 100644 base/ra/apache/docroot/ra/admin/console/js/misc.js delete mode 100755 base/ra/forms/admin/group/add.cgi delete mode 100755 base/ra/forms/admin/group/add_member.cgi delete mode 100755 base/ra/forms/admin/group/add_new.cgi delete mode 100755 base/ra/forms/admin/group/delete.cgi delete mode 100755 base/ra/forms/admin/group/delete_member.cgi delete mode 100755 base/ra/forms/admin/group/index.cgi delete mode 100755 base/ra/forms/admin/group/read.cgi delete mode 100755 base/ra/forms/admin/index.cgi delete mode 100755 base/ra/forms/admin/user/add.cgi delete mode 100755 base/ra/forms/admin/user/add_new.cgi delete mode 100755 base/ra/forms/admin/user/delete.cgi delete mode 100755 base/ra/forms/admin/user/index.cgi delete mode 100755 base/ra/forms/admin/user/read.cgi delete mode 100755 base/ra/forms/agent/cert/index.cgi delete mode 100755 base/ra/forms/agent/cert/read.cgi delete mode 100755 base/ra/forms/agent/cert/revoke.cgi delete mode 100755 base/ra/forms/agent/cert/submit.cgi delete mode 100755 base/ra/forms/agent/error.cgi delete mode 100755 base/ra/forms/agent/index.cgi delete mode 100755 base/ra/forms/agent/request/add_note.cgi delete mode 100755 base/ra/forms/agent/request/index.cgi delete mode 100755 base/ra/forms/agent/request/op.cgi delete mode 100755 base/ra/forms/agent/request/read.cgi delete mode 100755 base/ra/forms/ee/agent/enroll.cgi delete mode 100755 base/ra/forms/ee/agent/index.cgi delete mode 100755 base/ra/forms/ee/agent/new.cgi delete mode 100755 base/ra/forms/ee/agent/start.cgi delete mode 100755 base/ra/forms/ee/agent/submit.cgi delete mode 100755 base/ra/forms/ee/error.cgi delete mode 100755 base/ra/forms/ee/index.cgi delete mode 100755 base/ra/forms/ee/request/getcert.cgi delete mode 100755 base/ra/forms/ee/request/importcert.cgi delete mode 100755 base/ra/forms/ee/request/index.cgi delete mode 100755 base/ra/forms/ee/request/status.cgi delete mode 100755 base/ra/forms/ee/scep/enroll.cgi delete mode 100755 base/ra/forms/ee/scep/index.cgi delete mode 100755 base/ra/forms/ee/scep/installer.cgi delete mode 100755 base/ra/forms/ee/scep/manager.cgi delete mode 100755 base/ra/forms/ee/scep/pkiclient.cgi delete mode 100755 base/ra/forms/ee/scep/submit.cgi delete mode 100755 base/ra/forms/ee/server/admin.cgi delete mode 100755 base/ra/forms/ee/server/index.cgi delete mode 100755 base/ra/forms/ee/server/submit.cgi delete mode 100755 base/ra/forms/ee/user/index.cgi delete mode 100755 base/ra/forms/ee/user/renew.cgi delete mode 100755 base/ra/forms/ee/user/renewal.cgi delete mode 100755 base/ra/forms/ee/user/submit.cgi delete mode 100755 base/ra/forms/ee/user/user.cgi delete mode 100755 base/ra/forms/index.cgi delete mode 100755 dogtag/ra-ui/shared/docroot/404.html delete mode 100755 dogtag/ra-ui/shared/docroot/500.html delete mode 100644 dogtag/ra-ui/shared/docroot/admin/group/add_new.vm delete mode 100644 dogtag/ra-ui/shared/docroot/admin/group/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/admin/group/read.vm delete mode 100644 dogtag/ra-ui/shared/docroot/admin/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/admin/user/add_new.vm delete mode 100644 dogtag/ra-ui/shared/docroot/admin/user/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/admin/user/read.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/cert/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/cert/read.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/cert/revoke.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/cert/submit.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/error.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/request/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/request/op.vm delete mode 100644 dogtag/ra-ui/shared/docroot/agent/request/read.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/agent/enroll.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/agent/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/agent/new.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/agent/start.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/agent/submit.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/error.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/request/getcert.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/request/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/request/status.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/scep/enroll.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/scep/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/scep/installer.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/scep/manager.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/scep/submit.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/server/admin.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/server/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/server/submit.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/user/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/user/renew.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/user/renewal.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/user/submit.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ee/user/user.vm delete mode 100644 dogtag/ra-ui/shared/docroot/footer.vm delete mode 100644 dogtag/ra-ui/shared/docroot/header.vm delete mode 100644 dogtag/ra-ui/shared/docroot/index.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/adminauthenticatepanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/adminpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/agentauthenticatepanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/authdbpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/cainfopanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/certchainpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/certprettyprintpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/certrequestpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_addhsm.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_db.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_hsm.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_hsmloginpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_join.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_rootca.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/createsubsystempanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/databasepanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/displaycertchain2panel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/displaycertchainpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/drminfopanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/footer.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/header.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/hierarchypanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/importadmincertpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/login.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/modulepanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/namepanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/securitydomainloginpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/securitydomainpanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/sidemenu.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/sizepanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/tksinfopanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/topmenu.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/welcomepanel.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/wizard.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/config/xml.vm delete mode 100644 dogtag/ra-ui/shared/docroot/ra/admin/console/js/misc.js diff --git a/base/ra/apache/docroot/404.html b/base/ra/apache/docroot/404.html new file mode 100755 index 000000000..39997a669 --- /dev/null +++ b/base/ra/apache/docroot/404.html @@ -0,0 +1,146 @@ + + + + + + +RA 404 Error! + + + + + + + + + +
+ +
+
+ +
+ - +
+ + +
+
+ +
+ +Certificate System RA Error Page +
+

+ +

+ +

+ + + + diff --git a/base/ra/apache/docroot/500.html b/base/ra/apache/docroot/500.html new file mode 100755 index 000000000..2d560a684 --- /dev/null +++ b/base/ra/apache/docroot/500.html @@ -0,0 +1,139 @@ + + + + + + +RA 500 Error! + + + + + + + + + +
+ +
+
+ +
+ - +
+ + +
+
+ +
+ +Certificate System RA Error Page +
+

+ +

+ +

+ + + + diff --git a/base/ra/apache/docroot/admin/group/add.cgi b/base/ra/apache/docroot/admin/group/add.cgi new file mode 100755 index 000000000..212330d0d --- /dev/null +++ b/base/ra/apache/docroot/admin/group/add.cgi @@ -0,0 +1,86 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $gid = $util->get_val($q->param('gid')); + my $name = $util->get_val($q->param('name')); + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + my $ref = $store->read_group($gid); + if (defined($ref)) { + # gid used + print $q->redirect("/admin/group/add_new.cgi?error=exist"); + return; + } + my $ref = $store->add_group($gid, $name); + $store->close(); + + print $q->redirect("/admin/group/index.cgi"); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/group/add_member.cgi b/base/ra/apache/docroot/admin/group/add_member.cgi new file mode 100755 index 000000000..d60fe965e --- /dev/null +++ b/base/ra/apache/docroot/admin/group/add_member.cgi @@ -0,0 +1,80 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $gid = $util->get_val($q->param('gid')); + my $userid = $util->get_val($q->param('uid')); + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + $store->add_user_to_group($gid, $userid); + $store->close(); + + print $q->redirect("/admin/group/read.cgi?gid=" . $gid); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/group/add_new.cgi b/base/ra/apache/docroot/admin/group/add_new.cgi new file mode 100755 index 000000000..5a1ca7eda --- /dev/null +++ b/base/ra/apache/docroot/admin/group/add_new.cgi @@ -0,0 +1,86 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + my $error = $q->param('error'); + $context{error} = $util->html_encode($error); + + my $result = $parser->execute_file_with_context("admin/group/add_new.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/group/add_new.vm b/base/ra/apache/docroot/admin/group/add_new.vm new file mode 100644 index 000000000..e9fac77b8 --- /dev/null +++ b/base/ra/apache/docroot/admin/group/add_new.vm @@ -0,0 +1,83 @@ + + + + +Add New Group + + + + + + + +#include ( "header.vm" ) + + + + +
+ +
+
+ +
+UID: $uid +
+ + +
+
+ +
+ + + +Administrator Interface +
+

+#if ($error == 'exist') +Group already exists +

+#end +

+
+ + + + + + + + + +
GID
Name
+
+Add Group +
+

+#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/admin/group/delete.cgi b/base/ra/apache/docroot/admin/group/delete.cgi new file mode 100755 index 000000000..5fb1f22ce --- /dev/null +++ b/base/ra/apache/docroot/admin/group/delete.cgi @@ -0,0 +1,79 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $gid = $util->get_val($q->param('gid')); + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + $store->delete_group($gid); + $store->close(); + + print $q->redirect("/admin/group/index.cgi"); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/group/delete_member.cgi b/base/ra/apache/docroot/admin/group/delete_member.cgi new file mode 100755 index 000000000..2e516eeee --- /dev/null +++ b/base/ra/apache/docroot/admin/group/delete_member.cgi @@ -0,0 +1,79 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $gid = $util->get_val($q->param('gid')); + my $userid = $util->get_val($q->param('uid')); + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + $store->delete_user_from_group($gid, $userid); + $store->close(); + + print $q->redirect("/admin/group/read.cgi?gid=" . $gid); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/group/index.cgi b/base/ra/apache/docroot/admin/group/index.cgi new file mode 100755 index 000000000..07dc653e6 --- /dev/null +++ b/base/ra/apache/docroot/admin/group/index.cgi @@ -0,0 +1,115 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + + my $util = PKI::Base::Util->new(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $sp = $util->get_alphanum_val($q->param('sp')); + if ($sp eq "") { + $sp = "0"; + } + $context{sp} = $sp; + my $mc = $util->get_alphanum_val($q->param('mc')); + if ($mc eq "") { + $mc = "20"; + } + $context{mc} = $mc; + $context{pp} = $sp - $mc; # previous pos (for paging) + $context{np} = $sp + $mc; # next pos (for paging) + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + my @groups = $store->list_groups($sp, $mc); + $store->close(); + + my @r; + my $i = 0; + foreach my $group (@groups) { + $r[$i] = new PKI::RA::GlobalVar( + getGID => sub { return $util->html_encode(Encode::decode('UTF-8', $group->{'gid'})) }, + getName => sub { return $util->html_encode(Encode::decode('UTF-8', $group->{'name'})) }, + ); + $i++; + } + $context{rows} = \@r; + + my $result = $parser->execute_file_with_context("admin/group/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/group/index.vm b/base/ra/apache/docroot/admin/group/index.vm new file mode 100644 index 000000000..d19cacd2d --- /dev/null +++ b/base/ra/apache/docroot/admin/group/index.vm @@ -0,0 +1,81 @@ + + + + +RA Admin + + + + + + + +#include ( "header.vm" ) + +

+ + +
+ +
+
+ +
+UID: $uid +
+ + +
+
+ +
+ + + +Administrator Interface +
+

+Add New Group +

+

+ + + + + +#foreach($r in $rows) + + + + +#end +
GIDName
$r.getGID()$r.getName()
+
+

+Previous | Next +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/admin/group/read.cgi b/base/ra/apache/docroot/admin/group/read.cgi new file mode 100755 index 000000000..9ede3aa53 --- /dev/null +++ b/base/ra/apache/docroot/admin/group/read.cgi @@ -0,0 +1,125 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $gid = $util->get_val($q->param('gid')); + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + my $ref = $store->read_group($gid); + + $context{gid} = $util->html_encode(Encode::decode('UTF-8', $ref->{'gid'})); + $context{name} = $util->html_encode(Encode::decode('UTF-8', $ref->{'name'})); + + my @members = $store->list_all_members($gid); + my @users = $store->list_all_non_members($gid); + $store->close(); + + # new member in the group + my @r; + my $i = 0; + foreach my $member (@members) { + $r[$i] = new PKI::RA::GlobalVar( + getUID => sub { return $util->html_encode($member->{'uid'}) }, + ); + $i++; + } + $context{members} = \@r; + + # read users + my @u; + $i = 0; + foreach my $user (@users) { + $u[$i] = new PKI::RA::GlobalVar( + getUID => sub { return $util->html_encode($user->{'uid'}) }, + ); + $i++; + } + if ($i == 0) { + $context{non_member_exists} = 0; + } else { + $context{non_member_exists} = 1; + } + $context{users} = \@u; + + my $result = $parser->execute_file_with_context("admin/group/read.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/group/read.vm b/base/ra/apache/docroot/admin/group/read.vm new file mode 100644 index 000000000..9aa8c8e1f --- /dev/null +++ b/base/ra/apache/docroot/admin/group/read.vm @@ -0,0 +1,104 @@ + + + + +Groups + + + + + + + +#include ( "header.vm" ) + +

+ + +
+ +
+
+ +
+UID: $uid +
+ + +
+
+ +
+ + + +Administrator Interface +
+

+

+ + + + + + + + + +
GID$gid
Name$name
+
+

+Delete This Group +

+----------------------------------------------- +
+Members +

+ +#foreach($r in $members) + + + +#end +
$r.getUID() [Delete]
+
+
+----------------------------------------------- +
+#if ($non_member_exists) +New Member +
+ + Add +
+#end +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/admin/index.cgi b/base/ra/apache/docroot/admin/index.cgi new file mode 100755 index 000000000..2db7b2500 --- /dev/null +++ b/base/ra/apache/docroot/admin/index.cgi @@ -0,0 +1,80 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::UserStore; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/agent/error.cgi?error=Authentication%20Error"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $uid; + + my $result = $parser->execute_file_with_context("admin/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/index.vm b/base/ra/apache/docroot/admin/index.vm new file mode 100644 index 000000000..c6add6e6a --- /dev/null +++ b/base/ra/apache/docroot/admin/index.vm @@ -0,0 +1,95 @@ + + + + +RA Admin + + + + + + + +#include ( "header.vm" ) + + + + +
+ +
+
+ +
+UID: $uid +
+ + +
+
+ +
+ + + +RA Admin Services +
+

+

+ + + + + + + + + + + + + +
+ +
  • List Users
  • +
    +
    + +
  • Add New User
  • +
    +
    + +
  • List Groups
  • +
    +
    + +
  • Add New Group
  • +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/admin/user/add.cgi b/base/ra/apache/docroot/admin/user/add.cgi new file mode 100755 index 000000000..94c4bae81 --- /dev/null +++ b/base/ra/apache/docroot/admin/user/add.cgi @@ -0,0 +1,99 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $uid; + + my $userid = $util->get_val($q->param('uid')); + my $name = $util->get_val($q->param('name')); + my $email = $util->get_val($q->param('email')); + my $certificate = $util->get_val($q->param('certificate')); + + if ($certificate =~ /BEGIN CERTIFICATE/ || + $certificate =~ /END CERTIFICATE/) { + # do nothing + } else { + print $q->redirect("/admin/user/add_new.cgi?error=cert_header"); + return; + } + $certificate =~ s/-----BEGIN CERTIFICATE-----//g; + $certificate =~ s/-----END CERTIFICATE-----//g; + $certificate =~ s/[\r\n]//g; + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + my $ref = $store->read_user($userid); + if (defined($ref)) { + # uid used + print $q->redirect("/admin/user/add_new.cgi?error=exist"); + return; + } + my $ref = $store->add_user($userid, $name, $email, $certificate); + $store->close(); + + print $q->redirect("/admin/user/index.cgi"); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/user/add_new.cgi b/base/ra/apache/docroot/admin/user/add_new.cgi new file mode 100755 index 000000000..8bfbd0e9e --- /dev/null +++ b/base/ra/apache/docroot/admin/user/add_new.cgi @@ -0,0 +1,87 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $uid; + + my $error = $util->get_val($q->param('error')); + $context{error} = $error; + + my $result = $parser->execute_file_with_context("admin/user/add_new.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/user/add_new.vm b/base/ra/apache/docroot/admin/user/add_new.vm new file mode 100644 index 000000000..4d90d4840 --- /dev/null +++ b/base/ra/apache/docroot/admin/user/add_new.vm @@ -0,0 +1,95 @@ + + + + +Add New User + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Administrator Interface +
    +

    +#if ($error == 'exist') +User already exists +

    +#end +#if ($error == 'cert_header') +Invalid Certificate header +

    +#end +

    +
    + + + + + + + + + + + + + + + + + +
    UID
    Name
    Email
    Certificate
    +
    +Add User +
    +

    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/admin/user/delete.cgi b/base/ra/apache/docroot/admin/user/delete.cgi new file mode 100755 index 000000000..707035edb --- /dev/null +++ b/base/ra/apache/docroot/admin/user/delete.cgi @@ -0,0 +1,79 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $cfg = PKI::Base::Registry->get_config(); + + my $util = PKI::Base::Util->new(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $uid; + + my $userid = $util->get_val($q->param('uid')); + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + $store->delete_user($userid); + $store->close(); + + print $q->redirect("/admin/user/index.cgi"); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/user/index.cgi b/base/ra/apache/docroot/admin/user/index.cgi new file mode 100755 index 000000000..c845ae1dc --- /dev/null +++ b/base/ra/apache/docroot/admin/user/index.cgi @@ -0,0 +1,118 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use PKI::Base::Registry; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my $util = PKI::Base::Util->new(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $uid; + + my $status = $util->get_alphanum_val($q->param('status')); + $context{status} = $status; + + my $sp = $util->get_alphanum_val($q->param('sp')); + if ($sp eq "") { + $sp = "0"; + } + $context{sp} = $sp; + my $mc = $util->get_alphanum_val($q->param('mc')); + if ($mc eq "") { + $mc = "20"; + } + $context{mc} = $mc; + $context{pp} = $sp - $mc; # previous pos (for paging) + $context{np} = $sp + $mc; # next pos (for paging) + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + my @users = $store->list_users($sp, $mc); + $store->close(); + + my @r; + my $i = 0; + foreach my $user (@users) { + $r[$i] = new PKI::RA::GlobalVar( + getUID => sub { return $util->html_encode($user->{'uid'}) }, + getName => sub { return $util->html_encode(Encode::decode('UTF-8',$user->{'name'})) }, + getEmail => sub { return $util->html_encode($user->{'email'}) }, + ); + $i++; + } + $context{rows} = \@r; + + my $result = $parser->execute_file_with_context("admin/user/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/user/index.vm b/base/ra/apache/docroot/admin/user/index.vm new file mode 100644 index 000000000..7262561f6 --- /dev/null +++ b/base/ra/apache/docroot/admin/user/index.vm @@ -0,0 +1,83 @@ + + + + +RA Admin + + + + + + + +#include ( "header.vm" ) + +

    + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Administrator Interface +
    +

    +Add New User +

    +

    + + + + + + +#foreach($r in $rows) + + + + + +#end +
    UIDNameEmail
    $r.getUID()$r.getName()$r.getEmail()
    +
    +

    +Previous | Next +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/admin/user/read.cgi b/base/ra/apache/docroot/admin/user/read.cgi new file mode 100755 index 000000000..08d2fd3f7 --- /dev/null +++ b/base/ra/apache/docroot/admin/user/read.cgi @@ -0,0 +1,97 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->admin_auth($cfg)) { + print $q->redirect("/admin/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $uid; + + my $userid = $util->get_val($q->param('uid')); + + my $store = PKI::Base::UserStore->new(); + $store->open($cfg); + my $ref = $store->read_user($userid); + $store->close(); + + $context{userid} = $util->html_encode($ref->{'uid'}); + $context{name} = $util->html_encode(Encode::decode('UTF-8', $ref->{'name'})); + $context{email} = $util->html_encode($ref->{'email'}); + $context{certificate} = $util->breakline($util->html_encode($ref->{'certificate'}),40); + + my $result = $parser->execute_file_with_context("admin/user/read.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/admin/user/read.vm b/base/ra/apache/docroot/admin/user/read.vm new file mode 100644 index 000000000..354d9881f --- /dev/null +++ b/base/ra/apache/docroot/admin/user/read.vm @@ -0,0 +1,88 @@ + + + + +Users + + + + + + + +#include ( "header.vm" ) + +

    + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Administrator Interface +
    +

    + +

    +

    + + + + + + + + + + + + + + + + + +
    UID$userid
    Name$name
    Email$email
    Certificate$certificate
    +
    +

    +[Delete] +

    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/cert/index.cgi b/base/ra/apache/docroot/agent/cert/index.cgi new file mode 100755 index 000000000..46e5b8c2c --- /dev/null +++ b/base/ra/apache/docroot/agent/cert/index.cgi @@ -0,0 +1,119 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Base::CertStore; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my @roles = $self->get_current_roles($cfg); + my $r = join(",",@roles); + + my $sp = $util->get_alphanum_val($q->param('sp')); + if ($sp eq "") { + $sp = "0"; + } + $context{sp} = $sp; + my $mc = $util->get_alphanum_val($q->param('mc')); + if ($mc eq "") { + $mc = "20"; + } + $context{mc} = $mc; + $context{pp} = $sp - $mc; # previous pos (for paging) + $context{np} = $sp + $mc; # next pos (for paging) + + my $cs = PKI::Base::CertStore->new(); + $cs->open($cfg); + my @certs = $cs->list_certs_by_approver($uid, $sp, $mc); + $cs->close(); + + my @r; + my $i = 0; + foreach my $cert (@certs) { + $r[$i] = new PKI::RA::GlobalVar( + getReqId => sub { return $util->html_encode($cert->{'rid'}) }, + getSerialno => sub { return $util->html_encode($cert->{'serialno'}) }, + getSubjectDN => sub { return $util->html_encode($cert->{'subject_dn'}) }, + getCertificate => sub { return $util->html_encode($cert->{'certificate'}) }, + getApprovedBy => sub { return $util->html_encode($cert->{'approved_by'}) }, + getCreatedAt => sub { return $util->html_encode($cert->{'created_at'}); }, + ); + $i++; + } + $context{rows} = \@r; + + my $result = $parser->execute_file_with_context("agent/cert/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/cert/index.vm b/base/ra/apache/docroot/agent/cert/index.vm new file mode 100644 index 000000000..f9229b0f9 --- /dev/null +++ b/base/ra/apache/docroot/agent/cert/index.vm @@ -0,0 +1,86 @@ + + + + +RA Agent + + + + + + + +#include ( "header.vm" ) + +

    + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Agent Interface +
    List Certificates Approved by: $uid +

    +

    +

    + + + + + + + + +#foreach($r in $rows) + + + + + + + +#end +
    Serial#Request IDSubject DNApproved ByCreated At
    $r.getSerialno()$r.getReqId()$r.getSubjectDN()$r.getApprovedBy()$r.getCreatedAt()
    +
    +

    +Previous | Next +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/cert/read.cgi b/base/ra/apache/docroot/agent/cert/read.cgi new file mode 100755 index 000000000..f434baedb --- /dev/null +++ b/base/ra/apache/docroot/agent/cert/read.cgi @@ -0,0 +1,104 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Conn::CA; +use Encode; +use vars qw (@ISA); +use PKI::Service::Op; + +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $serialno = $util->get_alphanum_val($q->param('serialno')); + + my $cs = PKI::Base::CertStore->new(); + $cs->open($cfg); + my $ref = $cs->read_certificate_by_approver($uid, $serialno); + $cs->close(); + + my $ca = PKI::Conn::CA->new(); + $ca->open($cfg); + my $certStatus = $ca->getCertStatus("ca1", $serialno); + $ca->close(); + + + $context{certificate} = $util->breakline($util->html_encode($ref->{'certificate'}), 40); + + $context{serialno} = $util->html_encode($ref->{'serialno'}); + $context{subject_dn} = $util->html_encode(Encode::decode('UTF-8', $ref->{'subject_dn'})); + $context{created_at} = $util->html_encode($ref->{'created_at'}); + $context{approved_by} = $util->html_encode($ref->{'approved_by'}); + $context{rid} = $util->html_encode($ref->{'rid'}); + $context{certStatus} = $util->html_encode($certStatus); + + my $result = $parser->execute_file_with_context("agent/cert/read.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/cert/read.vm b/base/ra/apache/docroot/agent/cert/read.vm new file mode 100644 index 000000000..43c78ffa4 --- /dev/null +++ b/base/ra/apache/docroot/agent/cert/read.vm @@ -0,0 +1,96 @@ + + + + +Certificates + + + + + + + +#include ( "header.vm" ) + +

    + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Agent Interface +
    Certificate Information +

    +

    + +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Serial Number$serialno
    Subject DN$subject_dn
    Certificate$certificate
    Approved By$approved_by
    Created At$created_at
    Revocation Status$certStatus
    +
    +
    +Revoke +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/cert/revoke.cgi b/base/ra/apache/docroot/agent/cert/revoke.cgi new file mode 100755 index 000000000..1e483aea0 --- /dev/null +++ b/base/ra/apache/docroot/agent/cert/revoke.cgi @@ -0,0 +1,89 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Registry; +use PKI::Base::Util; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $serialno = $util->get_alphanum_val($q->param('serialno')); + my $subject_dn = $util->get_val($q->param('subject_dn')); + my $rid = $util->get_alphanum_val($q->param('rid')); + + $context{serialno} = $util->html_encode($serialno); + $context{subject_dn} = $util->html_encode(Encode::decode('UTF-8',$subject_dn)); + $context{rid} = $util->html_encode($rid); + + my $result = $parser->execute_file_with_context("agent/cert/revoke.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/cert/revoke.vm b/base/ra/apache/docroot/agent/cert/revoke.vm new file mode 100644 index 000000000..626bbed42 --- /dev/null +++ b/base/ra/apache/docroot/agent/cert/revoke.vm @@ -0,0 +1,111 @@ + + + + +Certificate Revocation + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Agent Interface +
    Revoking Certificate: +

    +

    + +

    + + + + + + + + + +
    Serial Number:$serialno
    Subject DN:$subject_dn
    +
    +Select A Reason: +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Unspecified
    Key compromised
    CA key compromised
    Affiliation changed
    Certificate superseded
    Cessation of operation
    Certificate is on hold
    +
    +
    +Submit +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/cert/submit.cgi b/base/ra/apache/docroot/agent/cert/submit.cgi new file mode 100755 index 000000000..571385f3a --- /dev/null +++ b/base/ra/apache/docroot/agent/cert/submit.cgi @@ -0,0 +1,104 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Conn::CA; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $serialno = $util->get_alphanum_val($q->param('serialno')); + my $subject_dn = $util->get_val($q->param('subject_dn')); + my $reason = $util->get_alphanum_val($q->param('reason')); + my $rid = $util->get_alphanum_val($q->param('rid')); + + my $ca = PKI::Conn::CA->new(); + $ca->open($cfg); + $ca->revoke($rid, "ca1", $serialno, $reason); + $ca->close(); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + + my $ref = $queue->read_request($rid); + $context{errorString} = $util->html_encode($ref->{'errorString'}); + $queue->close(); + + $context{rid} = $util->html_encode($rid); + $context{serialno} = $util->html_encode($serialno); + $context{subject_dn} = $util->html_encode(Encode::decode('UTF-8', $subject_dn)); + + my $result = $parser->execute_file_with_context("agent/cert/submit.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/cert/submit.vm b/base/ra/apache/docroot/agent/cert/submit.vm new file mode 100644 index 000000000..730228715 --- /dev/null +++ b/base/ra/apache/docroot/agent/cert/submit.vm @@ -0,0 +1,91 @@ + + + + +Certificate Revocation Submission + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Agent Interface +
    Revocation of Certificate: +

    +

    + +

    + + + + + + + + + + + +#if ($errorString == "0") + +#else + +#end + + + + + +
    Serial Number:$serialno
    Subject DN:$subject_dn
    Result:RevokedFailed: $errorString
    Request ID:$rid
    +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/error.cgi b/base/ra/apache/docroot/agent/error.cgi new file mode 100755 index 000000000..fa13365a7 --- /dev/null +++ b/base/ra/apache/docroot/agent/error.cgi @@ -0,0 +1,81 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::UserStore; +use PKI::Base::Util; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $util = PKI::Base::Util->new(); + + my $error = $util->get_val($q->param('error')); + + my %context; + if ($error ne "") { + $context{has_error} = 1; + $context{'error'} = $util->html_encode($error); + } + + my $result = $parser->execute_file_with_context("agent/error.vm", \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/error.vm b/base/ra/apache/docroot/agent/error.vm new file mode 100644 index 000000000..dbe65cb58 --- /dev/null +++ b/base/ra/apache/docroot/agent/error.vm @@ -0,0 +1,72 @@ + + + + +RA Agent Error! + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +Agent Interface +
    +

    + +

    +

    +You are not authorized to access the requested page. +
    +#if ($has_error) + Error: $error +#end +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/index.cgi b/base/ra/apache/docroot/agent/index.cgi new file mode 100755 index 000000000..c8f2040fe --- /dev/null +++ b/base/ra/apache/docroot/agent/index.cgi @@ -0,0 +1,83 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::UserStore; +use PKI::Base::Registry; +use PKI::Base::Util; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi?error=Authentication%20Error"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $result = $parser->execute_file_with_context("agent/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/index.vm b/base/ra/apache/docroot/agent/index.vm new file mode 100644 index 000000000..5bd952ba2 --- /dev/null +++ b/base/ra/apache/docroot/agent/index.vm @@ -0,0 +1,81 @@ + + + + +RA Agent + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +RA Agent Services +
    +

    +

    + + + + + + + +
    + +
  • List Requests
  • +
    +
    + +
  • List Certificates
  • +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/request/add_note.cgi b/base/ra/apache/docroot/agent/request/add_note.cgi new file mode 100755 index 000000000..0ffac91c7 --- /dev/null +++ b/base/ra/apache/docroot/agent/request/add_note.cgi @@ -0,0 +1,93 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; +use PKI::Base::TimeTool; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $id = $util->get_alphanum_val($q->param('id')); + my $note = $util->get_val($q->param('note')); + + if ($note eq "") { + # dont add anything + print $q->redirect("/agent/request/read.cgi?id=" . $id); + return; + } + + my $timet = PKI::Base::TimeTool->new(); + my $now = $timet->get_time(); + my $new_note = "==== Note created by $uid at $now ====\n" . + $note . "\n"; + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $ref = $queue->read_request($id); + $queue->set_request($id, "note", $ref->{'note'} . $new_note); + $queue->close(); + + print $q->redirect("/agent/request/read.cgi?id=" . $id); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/request/index.cgi b/base/ra/apache/docroot/agent/request/index.cgi new file mode 100755 index 000000000..81b25977a --- /dev/null +++ b/base/ra/apache/docroot/agent/request/index.cgi @@ -0,0 +1,146 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::RA::GlobalVar; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; +use PKI::Service::Op; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + $self->debug_log( $cfg, "in request/index.cgi, uid == $uid"); + + my %context; + $context{uid} = $util->html_encode($uid); + + my @roles = $self->get_current_roles($cfg); +# my $r = join(",",@roles); + + my $status = $util->get_alphanum_val($q->param('status')); + if ($status eq "") { + $context{status} = ""; + } else { + $context{status} = $util->html_encode($status); + } + + my $sp = $util->get_alphanum_val($q->param('sp')); + if ($sp eq "") { + $sp = "0"; + } + $context{sp} = $sp; + my $mc = $util->get_alphanum_val($q->param('mc')); + if ($mc eq "") { + $mc = "20"; + } + $context{mc} = $mc; + $context{pp} = $sp - $mc; # previous pos (for paging) + $context{np} = $sp + $mc; # next pos (for paging) + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $total = $queue->count_requests_by_roles(\@roles, $status); + $context{total} = $util->html_encode($total); + + my @reqs = $queue->list_requests_by_roles(\@roles, $status, $sp, $mc); +# my @reqs = $queue->list_requests_by_roles($r, $status, $sp, $mc); + $queue->close(); + + my @r; + my $i = 0; + foreach my $req (@reqs) { + $r[$i] = new PKI::RA::GlobalVar( + getId => sub { return $util->html_encode($req->{'rowid'}) }, + getType => sub { return $util->html_encode($req->{'type'}) }, + getStatus => sub { return $util->html_encode($req->{'status'}) }, + getError => sub { return $util->html_encode($req->{'errorString'}) }, + getAssignedTo => sub { return $util->html_encode($req->{'assigned_to'}) }, + getData => sub { return $util->html_encode($req->{'data'}); }, + getCreatedBy => sub { return $util->html_encode($req->{'created_by'}); }, + getCreatedAt => sub { return $util->html_encode($req->{'created_at'}); }, + ); + $i++; + } + $context{rows} = \@r; + + if ($sp - $mc < 0) { + $context{show_previous} = "no"; + } else { + $context{show_previous} = "yes"; + } + + if ($i < 20) { + $context{show_next} = "no"; + } else { + $context{show_next} = "yes"; + } + + my $result = $parser->execute_file_with_context("agent/request/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/request/index.vm b/base/ra/apache/docroot/agent/request/index.vm new file mode 100644 index 000000000..dd9901fdb --- /dev/null +++ b/base/ra/apache/docroot/agent/request/index.vm @@ -0,0 +1,95 @@ + + + + +RA Agent + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Agent Interface +
    +

    +All | OPEN | APPROVED | REJECTED | FAILED +

    +

    + + + + + + + + + + +#foreach($r in $rows) + + + + + + + + + +#end +
    IdTypeStatusAssigned ToCreated ByCreated AtError
    $r.getId()$r.getType()$r.getStatus()$r.getAssignedTo()$r.getCreatedBy()$r.getCreatedAt()$r.getError()
    +
    +

    +Total: $total +
    +
    +Previous | +Next +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/request/op.cgi b/base/ra/apache/docroot/agent/request/op.cgi new file mode 100755 index 000000000..363d7121b --- /dev/null +++ b/base/ra/apache/docroot/agent/request/op.cgi @@ -0,0 +1,153 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use Benchmark; +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Registry; +use PKI::Request::Queue; +use PKI::Base::Util; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $st = new Benchmark; + + my $util = PKI::Base::Util->new(); + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + my $type = $util->get_alphanum_val($q->param('type')); + my $id = $util->get_alphanum_val($q->param('id')); + + my $db_st = new Benchmark; + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + + my $ref; + + my @roles = $self->get_current_roles($cfg); + my $pref = $queue->read_request_by_roles(\@roles, $id); + + if (! defined $pref) { + $queue->close(); + $self->debug_log($cfg, "Invalid attempt to process request id= " . $id . + " by userid= " . $uid); + print $q->redirect("/agent/error.cgi"); + return; + } + + my $curr_status = $pref->{'status'}; + if ($type eq "approve") { + if (($curr_status ne "OPEN") && ($curr_status ne "ERROR")) { + $queue->close(); + print $q->redirect("/agent/request/read.cgi?id=$id"); + return; + } + + $ref = $queue->approve_request($id, $uid); + } elsif ($type eq "reject") { + if (($curr_status ne "OPEN") && ($curr_status ne "ERROR")) { + $queue->close(); + print $q->redirect("/agent/request/read.cgi?id=$id"); + return; + } + + $ref = $queue->reject_request($id, $uid); + } + $queue->close(); + my $db_et = new Benchmark; + + $context{data} = $util->breakline($util->html_encode(Encode::decode('UTF-8', $ref->{'data'})), 40); + $context{output} = $util->breakline($util->html_encode($ref->{'output'}), 40); + $context{serialno} = $util->html_encode($ref->{'serialno'}); + $context{type} = $util->html_encode($ref->{'type'}); + $context{ip} = $util->html_encode($ref->{'ip'}); + $context{note} = $util->html_encode($ref->{'note'}); + $context{note} =~ s/\n//g; + $context{created_at} = $util->html_encode($ref->{'created_at'}); + $context{updated_at} = $util->html_encode($ref->{'updated_at'}); + $context{assigned_to} = $util->html_encode($ref->{'assigned_to'}); + $context{processed_by} = $util->html_encode($ref->{'processed_by'}); + $context{created_by} = $util->html_encode($ref->{'created_by'}); + $context{status} = $util->html_encode($ref->{'status'}); + $context{errorString} = $util->html_encode($ref->{'errorString'}); + $context{id} = $util->html_encode($ref->{'rowid'}); + + my $t_st = new Benchmark; + my $result = $parser->execute_file_with_context("agent/request/op.vm", + \%context); + my $t_et = new Benchmark; + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } + + my $et = new Benchmark; + + $self->debug_log($cfg, "benchmark " . + "total=" . timestr(timediff($et, $st)) . " " . + "db total=" . timestr(timediff($db_et, $db_st)) . " " . + "template total=" . timestr(timediff($t_et, $t_st)) . " " + ); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/request/op.vm b/base/ra/apache/docroot/agent/request/op.vm new file mode 100644 index 000000000..d5bc2dfe4 --- /dev/null +++ b/base/ra/apache/docroot/agent/request/op.vm @@ -0,0 +1,127 @@ + + + + +Certificate Request Operations + + + + + + + +#include ( "header.vm" ) + +

    + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Agent Interface +
    +

    +All | OPEN | APPROVED | REJECTED | FAILED +

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Request Id$id
    Type$type
    Data$data
    Output$output
    Serial Number$serialno
    Status$status
    Error$errorString
    Assigned To$assigned_to
    Created By$created_by
    Updated At$updated_at
    Processed By$processed_by
    Created At$created_at
    IP$ip
    Note$note
    +
    + +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/agent/request/read.cgi b/base/ra/apache/docroot/agent/request/read.cgi new file mode 100755 index 000000000..d1633c164 --- /dev/null +++ b/base/ra/apache/docroot/agent/request/read.cgi @@ -0,0 +1,119 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Registry; +use PKI::Base::Util; +use PKI::Request::Queue; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + if (!$self->agent_auth($cfg)) { + print $q->redirect("/agent/error.cgi"); + return; + } + my $uid = $self->get_current_uid($cfg); + + my %context; + $context{uid} = $util->html_encode($uid); + + + my @roles = $self->get_current_roles($cfg); +# my $r = join(",",@roles); + + my $id = $util->get_alphanum_val($q->param('id')); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $ref = $queue->read_request_by_roles(\@roles, $id); + $queue->close(); + + $context{data} = $util->breakline($util->html_encode(Encode::decode('UTF-8',$ref->{'data'})), 40); + $context{output} = $util->breakline($util->html_encode($ref->{'output'}), 40); + $context{meta_info} = $util->breakline($util->html_encode($ref->{'meta_info'}), 40); + + $context{serialno} = $util->html_encode($ref->{'serialno'}); + $context{subject_dn} = $util->html_encode($ref->{'subject_dn'}); + $context{type} = $util->html_encode($ref->{'type'}); + $context{created_at} = $util->html_encode($ref->{'created_at'}); + $context{created_by} = $util->html_encode($ref->{'created_by'}); + $context{updated_at} = $util->html_encode($ref->{'updated_at'}); + $context{ip} = $util->html_encode($ref->{'ip'}); + $context{processed_by} = $util->html_encode($ref->{'processed_by'}); + $context{note} = $util->html_encode($ref->{'note'}); + $context{note} =~ s/\n//g; + $context{assigned_to} = $util->html_encode($ref->{'assigned_to'}); + $context{status} = $util->html_encode($ref->{'status'}); + if ($ref->{'status'} eq "OPEN") { + $context{is_open} = 1; + } + if ($ref->{'status'} eq "ERROR") { + $context{is_error} = 1; + } + $context{errorString} = $util->html_encode($ref->{'errorString'}); + $context{id} = $util->html_encode($ref->{'rowid'}); + + my $result = $parser->execute_file_with_context("agent/request/read.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/agent/request/read.vm b/base/ra/apache/docroot/agent/request/read.vm new file mode 100644 index 000000000..c583be021 --- /dev/null +++ b/base/ra/apache/docroot/agent/request/read.vm @@ -0,0 +1,149 @@ + + + + +Certificate Requests + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    +UID: $uid +
    + + +
    +
    + +
    + + + +Agent Interface +
    +

    +All | OPEN | APPROVED | REJECTED| FAILED +

    +

    + + + + + + + + + + + + + + + + + + + +#if ($serialno == "unavailable") + +#else + +#end + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Request Id$id
    Type$type
    Data$data
    Output$output
    Serial Number$serialno$serialno
    Subject DN$subject_dn
    Meta Info$meta_info
    Status$status
    Error$errorString
    Assigned To$assigned_to
    Created By$created_by
    Updated At$updated_at
    Processed By$processed_by
    Created At$created_at
    IP$ip
    Note$note
    +
    +
    +#if ($is_open || $is_error) +Approve | Reject +
    +
    +#end +
    + + +
    +Add Note +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/agent/enroll.cgi b/base/ra/apache/docroot/ee/agent/enroll.cgi new file mode 100755 index 000000000..4f1af8f16 --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/enroll.cgi @@ -0,0 +1,127 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use MIME::Base64; +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Registry; +use PKI::Request::Queue; +use PKI::Conn::CA; +use PKI::Base::PinStore; +use PKI::Base::Util; + +use vars qw (@ISA); +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $uid = $util->get_val($q->param('uid')); + my $pin = $util->get_alphanum_val($q->param('pin')); + my $csr = $util->get_val($q->param('csr')); + $csr = $util->normalize_csr($csr); + + my $key = $uid; + + my $pin_store = PKI::Base::PinStore->new(); + $pin_store->open($cfg); + my $pinref = $pin_store->read_pin($key); + if (defined($pinref) && $pinref->{'pin'} eq $pin) { + $pin_store->delete($key); + } else { + $pin_store->close(); + print $q->redirect("/ee/error.cgi?error=Invalid Pin"); + return; + } + my $rid = $pinref->{'rid'}; + $pin_store->close(); + + my $profile_id = $cfg->get("request.agent.profileId"); + my $cert_request_type = $cfg->get("request.agent.reqType"); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $req = $queue->read_request($rid); + $queue->set_request($rid, "subject_dn", "uid=$uid, e=$req->{'created_by'}"); + + my $ca = PKI::Conn::CA->new(); + $ca->open($cfg); + my $cert = $ca->enroll($rid, "ca1", $profile_id, $cert_request_type, $csr); + $ca->close(); + $queue->set_request($rid, "output", $cert); + + $req = $queue->read_request($rid); + if ($cert eq "") { + my $error = $req->{'errorString'}; + $queue->close(); + print $q->redirect("/ee/error.cgi?error=$error"); + return; + } + + my $decoded = decode_base64($cert); + my $encoded = encode_base64($decoded); + + my %context; + $context{cert} = $encoded; + $context{rid} = $util->html_encode($rid); + $context{subject_dn} = $util->html_encode($req->{'subject_dn'}); + $queue->close(); + + my $result = $parser->execute_file_with_context("ee/agent/enroll.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/agent/enroll.vm b/base/ra/apache/docroot/ee/agent/enroll.vm new file mode 100644 index 000000000..203b02696 --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/enroll.vm @@ -0,0 +1,74 @@ + + + + +Agent Certificate Enrollment + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : Agent Enrollment
    +Enroll Interface +

    +

    +Your Certificate: +
    +Subject DN: $subject_dn +
    +

    +-----BEGIN CERTIFICATE-----
    +$cert
    +-----END CERTIFICATE-----
    +
    +import certificate +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/agent/index.cgi b/base/ra/apache/docroot/ee/agent/index.cgi new file mode 100755 index 000000000..66fceb8ff --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/index.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use PKI::Base::Registry; +use Template::Velocity; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/agent/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/agent/index.vm b/base/ra/apache/docroot/ee/agent/index.vm new file mode 100644 index 000000000..9fc991d6a --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/index.vm @@ -0,0 +1,83 @@ + + + + +RA End-Entity + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : Agent Enrollment
    +

    +

    +For RA agent enrollment, an agent must submit a pin creation request first before performing certificate enrollment. +

    +

    + + + + + + + +
    + +
  • Pin Creation Request
  • +
    +
    + +
  • Certificate Enrollment
  • +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/agent/new.cgi b/base/ra/apache/docroot/ee/agent/new.cgi new file mode 100755 index 000000000..c209f5e74 --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/new.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use PKI::Base::Registry; +use Template::Velocity; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/agent/new.vm", \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } + +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/agent/new.vm b/base/ra/apache/docroot/ee/agent/new.vm new file mode 100644 index 000000000..bca0a37fc --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/new.vm @@ -0,0 +1,88 @@ + + + + +Agent Certificate Request + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : Agent Enrollment
    +Agent Interface +

    +

    +This form is for new agent to request for agent certificate. +

    +

    +
    + + + + + + + + + + + + + + + + + +
    UID:
    Your Email:
      
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/agent/start.cgi b/base/ra/apache/docroot/ee/agent/start.cgi new file mode 100755 index 000000000..27aedb546 --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/start.cgi @@ -0,0 +1,69 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use PKI::Base::Registry; +use Template::Velocity; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + + my $result = $parser->execute_file_with_context("ee/agent/start.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/agent/start.vm b/base/ra/apache/docroot/ee/agent/start.vm new file mode 100644 index 000000000..b2b21dc1b --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/start.vm @@ -0,0 +1,114 @@ + + + + +Agent Certificate Request Using a One-Time Pin + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + + + +RA Services : Agent Enrollment
    +Agent Interface +

    +

    +This form is for new RA agent to request a certificate. +

    +

    +
    + + + + + + + + + + + + + + + + + +
    UID:
    One-Time Pin:
      
    + +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/agent/submit.cgi b/base/ra/apache/docroot/ee/agent/submit.cgi new file mode 100755 index 000000000..a68242114 --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/submit.cgi @@ -0,0 +1,88 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my $uid = $util->get_val($q->param('uid')); + my $email = $util->get_val($q->param('email')); + + $self->debug_params($cfg, $q); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $request_id = $queue->create_request("agent", + "uid=" . $uid, + "0", + $email); + my %context; + $context{request_id} = $util->html_encode($request_id); + $self->debug_log($cfg, "request $request_id created"); + $queue->close(); + + my $result = $parser->execute_file_with_context("ee/agent/submit.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/agent/submit.vm b/base/ra/apache/docroot/ee/agent/submit.vm new file mode 100644 index 000000000..aaabee929 --- /dev/null +++ b/base/ra/apache/docroot/ee/agent/submit.vm @@ -0,0 +1,73 @@ + + + + +Agent Certificate Request Submission + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : Agent Enrollment
    +

    +

    +Your request has been successfully submitted. +

    +

    + + + + + +
    Request ID:$request_id
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/error.cgi b/base/ra/apache/docroot/ee/error.cgi new file mode 100755 index 000000000..1417d4b61 --- /dev/null +++ b/base/ra/apache/docroot/ee/error.cgi @@ -0,0 +1,81 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::UserStore; +use PKI::Base::Util; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $util = PKI::Base::Util->new(); + + my %context; + + my $error = $util->get_val($q->param('error')); + if ($error ne "") { + $context{has_error} = 1; + $context{'error'} = $util->html_encode($error); + } + + my $result = $parser->execute_file_with_context("ee/error.vm", \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/error.vm b/base/ra/apache/docroot/ee/error.vm new file mode 100644 index 000000000..0c4e7afcb --- /dev/null +++ b/base/ra/apache/docroot/ee/error.vm @@ -0,0 +1,71 @@ + + + + +RA End-Entity Error! + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +EE Interface +
    +

    +

    +Request process error +
    +#if ($has_error) + Error: $error +#end + +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/index.cgi b/base/ra/apache/docroot/ee/index.cgi new file mode 100755 index 000000000..453b2873b --- /dev/null +++ b/base/ra/apache/docroot/ee/index.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/index.vm", \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/index.vm b/base/ra/apache/docroot/ee/index.vm new file mode 100644 index 000000000..70f3443ab --- /dev/null +++ b/base/ra/apache/docroot/ee/index.vm @@ -0,0 +1,102 @@ + + + + +RA End-Entity + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA EE Services +
    +

    +

    + + + + + + + + + + + + + + + + +
    + +
  • SCEP Enrollment
  • +
    +
    + +
  • Server Enrollment
  • +
    +
    + +
  • User Enrollment
  • +
    +
    + +
  • Agent Enrollment
  • +
    +
    + +
  • Request Status Check
  • +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/request/getcert.cgi b/base/ra/apache/docroot/ee/request/getcert.cgi new file mode 100755 index 000000000..b22444dc1 --- /dev/null +++ b/base/ra/apache/docroot/ee/request/getcert.cgi @@ -0,0 +1,93 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use PKI::Service::Op; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; +use Template::Velocity; +use MIME::Base64; +use Encode; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $id = $util->get_alphanum_val($q->param('id')); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $req = $queue->read_request($id); + $queue->close(); + + my %context; + $context{id} = $util->html_encode($req->{'rowid'}); + $context{serialno} = $util->html_encode($req->{'serialno'}); + $context{subject_dn} = $util->html_encode(Encode::decode('UTF-8', $req->{'subject_dn'})); + if ($req->{'serialno'} eq "unavailable") { + $context{output} = ""; + } else { + $context{output} = "-----BEGIN CERTIFICATE-----\n".$util->breakline($util->html_encode($req->{'output'}), 40)."\n-----END CERTIFICATE-----"; + } + my $result = $parser->execute_file_with_context("ee/request/getcert.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/request/getcert.vm b/base/ra/apache/docroot/ee/request/getcert.vm new file mode 100644 index 000000000..40387a7ef --- /dev/null +++ b/base/ra/apache/docroot/ee/request/getcert.vm @@ -0,0 +1,72 @@ + + + + +Import Certificate + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : Request Status Check +
    +Certificate Import +

    +

    +

    +Serial Number:$serialno
    +Subject DN:$subject_dn

    +Base64 Encoding:
    +

    $output
    +Import Certificate (click on the following link to import):
    +import certificate +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/request/importcert.cgi b/base/ra/apache/docroot/ee/request/importcert.cgi new file mode 100755 index 000000000..fdc309746 --- /dev/null +++ b/base/ra/apache/docroot/ee/request/importcert.cgi @@ -0,0 +1,82 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use PKI::Service::Op; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; +use Template::Velocity; +use MIME::Base64; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $id = $util->get_alphanum_val($q->param('id')); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $req = $queue->read_request($id); + $queue->close(); + + my %context; +# $::symbol{id} = $req->{'rowid'}; +# $::symbol{status} = $req->{'status'}; + +# my $result = $parser->execute_file("ee/request/status.vm"); + + my $cert = MIME::Base64::decode($req->{'output'}); + + print "Content-Type: application/x-x509-user-cert\n\n"; + print $cert; +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/request/index.cgi b/base/ra/apache/docroot/ee/request/index.cgi new file mode 100755 index 000000000..ef2a68b23 --- /dev/null +++ b/base/ra/apache/docroot/ee/request/index.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/request/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/request/index.vm b/base/ra/apache/docroot/ee/request/index.vm new file mode 100644 index 000000000..42dc259ac --- /dev/null +++ b/base/ra/apache/docroot/ee/request/index.vm @@ -0,0 +1,67 @@ + + + + +RA End-Entity + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : Request Status
    +

    +

    +

    +Request Id: +
    +Check +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/request/status.cgi b/base/ra/apache/docroot/ee/request/status.cgi new file mode 100755 index 000000000..6a3154716 --- /dev/null +++ b/base/ra/apache/docroot/ee/request/status.cgi @@ -0,0 +1,94 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use PKI::Service::Op; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; +use Template::Velocity; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + + my $util = PKI::Base::Util->new(); + + my $id = $util->get_alphanum_val($q->param('id')); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $req = $queue->read_request($id); + $queue->close(); + if ($req == "") { + print $q->redirect("/ee/error.cgi?error=request%20not%20found"); + return; + } + + my %context; + $context{id} = $util->html_encode($req->{'rowid'}); + $context{type} =$util->html_encode($req->{'type'}); + $context{status} = $util->html_encode($req->{'status'}); + $context{serialno} = $util->html_encode($req->{'serialno'}); + $context{errorString} = $util->html_encode($req->{'errorString'}); + + my $result = $parser->execute_file_with_context("ee/request/status.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/request/status.vm b/base/ra/apache/docroot/ee/request/status.vm new file mode 100644 index 000000000..ed61cdbe4 --- /dev/null +++ b/base/ra/apache/docroot/ee/request/status.vm @@ -0,0 +1,91 @@ + + + + +Certificate Request Status + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : Request Status Check +
    +Request Status +

    +

    +

    +

    + + + + + + + + + + + + + +#if ($status == "APPROVED") +#if ($serialno != "unavailable") + + + + +#end +#end +
    Request ID:$id
    Status:$status
    Error Message:$errorString
    Import Certificate:$id
    + +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/scep/enroll.cgi b/base/ra/apache/docroot/ee/scep/enroll.cgi new file mode 100755 index 000000000..53291636a --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/enroll.cgi @@ -0,0 +1,112 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use MIME::Base64; +use URI::URL; +use URI::Escape; +use XML::Simple; +use CGI; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Conn::CA; +use PKI::Base::PinStore; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $client_id = $util->get_val($q->param('client_id')); + my $site_id = $util->get_val($q->param('site_id')); + my $pin = $util->get_alphanum_val($q->param('pin')); + my $csr = $util->get_val($q->param('csr')); + + my $key = $client_id . "/" . $site_id; + + my $pin_store = PKI::Base::PinStore->new(); + $pin_store->open($cfg); + my $pinref = $pin_store->read_pin($key); + if (defined($pinref) && $pinref->{'pin'} eq $pin) { + $pin_store->delete($key); + } else { + $pin_store->close(); + # error, redirect user back to the original enrollment page + print $q->redirect("/ee/scep/installer.cgi"); + return; + } + $pin_store->close(); + + my $profile_id = $cfg->get("request.scep.profileId"); + my $cert_request_type = $cfg->get("request.scep.reqType"); + + my $ca = PKI::Conn::CA->new(); + $ca->open($cfg); + my $cert = $ca->enroll($pinref->{'rid'}, "ca1", $profile_id, $cert_request_type, $csr); + $ca->close(); + my $decoded = decode_base64($cert); + my $encoded = encode_base64($decoded); + + my %context; + $context{cert} = $encoded; + + my $result = $parser->execute_file_with_context("ee/scep/enroll.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/scep/enroll.vm b/base/ra/apache/docroot/ee/scep/enroll.vm new file mode 100644 index 000000000..2893eac1c --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/enroll.vm @@ -0,0 +1,74 @@ + + + + +SCEP Router Enrollment + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : +SCEP Enrollment
    +Installer Interface +

    +

    +This form is for router installer to retrieve the requested certificate. +

    + Your Certificate: +
    +

    +-----BEGIN CERTIFICATE-----
    +$cert
    +-----END CERTIFICATE-----
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/scep/index.cgi b/base/ra/apache/docroot/ee/scep/index.cgi new file mode 100755 index 000000000..c73fc379a --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/index.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/scep/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/scep/index.vm b/base/ra/apache/docroot/ee/scep/index.vm new file mode 100644 index 000000000..3d75a8d40 --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/index.vm @@ -0,0 +1,83 @@ + + + + +RA End-Entity + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : SCEP Enrollment
    +

    +

    +In the SCEP enrollment, a manager must firstly submit a one-time pin creation request to the RA. RA Agent will then approve and generate an one-time pin. The pin will be returned to the manager who will give the pin to a local router installer. The router installer visits the enrollment form where certificate request, one time pin and other necessary information are submitted. The system will issue the certificate immediately. +

    +

    + + + + + + + +
    + +
  • Request Submission - Manager
  • +
    +
    + +
  • SCEP Enrollment - Installer
  • +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/scep/installer.cgi b/base/ra/apache/docroot/ee/scep/installer.cgi new file mode 100755 index 000000000..8453c2cc4 --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/installer.cgi @@ -0,0 +1,74 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my %context; + $context{machine} = $cfg->get("service.machineName"); + $context{port} = $cfg->get("service.unsecurePort"); + + my $result = $parser->execute_file_with_context("ee/scep/installer.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/scep/installer.vm b/base/ra/apache/docroot/ee/scep/installer.vm new file mode 100644 index 000000000..be9f969ac --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/installer.vm @@ -0,0 +1,73 @@ + + + + +SCEP Router Request Using a One-Time Pin + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : +SCEP Enrollment
    +Installer Interface +

    +

    +This form is for router installer to request a certificate with the given one time pin. +

    +

    +The SCEP enrollment URL for the router is: +
    +
    +http://$machine:$port/ee/scep/pkiclient.cgi +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/scep/manager.cgi b/base/ra/apache/docroot/ee/scep/manager.cgi new file mode 100755 index 000000000..8b547a928 --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/manager.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/scep/manager.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/scep/manager.vm b/base/ra/apache/docroot/ee/scep/manager.vm new file mode 100644 index 000000000..e5b6abed5 --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/manager.vm @@ -0,0 +1,123 @@ + + + + +SCEP Router Manager Request for a One-Time Pin + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + + + +RA Services : +SCEP Enrollment
    +Manager Interface +

    +

    +This form is for manager to request for a one time pin so that router installer can request for a certificate. +

    + + +

    + + + + + + + + + + + + + + + + + + + + + +
    Client ID:
    Site ID (IP Address):
    Your Email:
      
    + +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/scep/pkiclient.cgi b/base/ra/apache/docroot/ee/scep/pkiclient.cgi new file mode 100755 index 000000000..a54558f37 --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/pkiclient.cgi @@ -0,0 +1,113 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use MIME::Base64; +use URI::URL; +use URI::Escape; +use XML::Simple; +use CGI; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Conn::CA; +use PKI::Base::PinStore; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $operation = $util->get_alphanum_val($q->param('operation')); + my $message = $util->get_val($q->param('message')); + $message = uri_escape($message); + + my $ca = PKI::Conn::CA->new(); + $ca->open($cfg); + if ($operation eq "GetCACert") { + my $content = $ca->scep_get_ca_cert("ca1", $operation, $message); + + print "Content-Type: application/x-x509-ca-cert\n\n"; + print $content; + } elsif ($operation eq "PKIOperation") { + my $decoded = $ca->scep_decode("ca1", $operation, $message); + $decoded =~ /(\.*\<\/XMLResponse\>)/; + $decoded = $1; + my $parser = XML::Simple->new(); + my $response = $parser->XMLin($decoded); + + # one time pin + my $pin = $response->{'PKCS10'}->{'ChallengePassword'}->{'Password'} ; + # IP Address + my $key = $ENV{'REMOTE_ADDR'}; + + # check PIN + if (1) { + my $pin_store = PKI::Base::PinStore->new(); + $pin_store->open($cfg); + my $pinref = $pin_store->read_pin($key); + if (defined($pinref) && $pinref->{'pin'} eq $pin) { + $pin_store->delete($key); + } else { + $pin_store->close(); + # XXX - return SCEP error + print $q->redirect("/ee/scep/installer.cgi"); + return; + } + $pin_store->close(); + } + + my $content = $ca->scep_pki_message("ca1", $operation, $message); + + print "Content-Type: application/x-pki-message\n\n"; + print $content; + } + $ca->close(); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/scep/submit.cgi b/base/ra/apache/docroot/ee/scep/submit.cgi new file mode 100755 index 000000000..b3dfd7a5d --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/submit.cgi @@ -0,0 +1,91 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use DBI; +use CGI; +use PKI::Service::Op; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $client_id = $util->get_val($q->param('client_id')); + my $site_id = $util->get_val($q->param('site_id')); + my $email = $util->get_val($q->param('email')); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $request_id = $queue->create_request("scep", + "client_id=" . $client_id . ";" . + "site_id=" . $site_id, + "0", + $email); + my %context; + $context{request_id} = $util->html_encode($request_id); + $self->debug_log($cfg, "request $request_id created"); + $queue->close(); + + my $result = $parser->execute_file_with_context("ee/scep/submit.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/scep/submit.vm b/base/ra/apache/docroot/ee/scep/submit.vm new file mode 100644 index 000000000..6786bf936 --- /dev/null +++ b/base/ra/apache/docroot/ee/scep/submit.vm @@ -0,0 +1,76 @@ + + + + +SCEP Router Request Submission + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : +SCEP Enrollment
    +Manager Interface +

    +

    +Your request has been successfully submitted. +

    +

    + + + + + +
    Request ID:$request_id
    + +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/server/admin.cgi b/base/ra/apache/docroot/ee/server/admin.cgi new file mode 100755 index 000000000..18945da02 --- /dev/null +++ b/base/ra/apache/docroot/ee/server/admin.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/server/admin.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/server/admin.vm b/base/ra/apache/docroot/ee/server/admin.vm new file mode 100644 index 000000000..35af32ca8 --- /dev/null +++ b/base/ra/apache/docroot/ee/server/admin.vm @@ -0,0 +1,132 @@ + + + + +Server Certificate Request + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + + +RA Services : +Server Enrollment
    +Server Administrator Interface +

    +

    +This form is for server administrator to request for a server certificate. +

    + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Server ID:
    Site ID:
    Your Email:
    CSR:
      
    + +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/server/index.cgi b/base/ra/apache/docroot/ee/server/index.cgi new file mode 100755 index 000000000..830409a8b --- /dev/null +++ b/base/ra/apache/docroot/ee/server/index.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/server/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/server/index.vm b/base/ra/apache/docroot/ee/server/index.vm new file mode 100644 index 000000000..04727ae41 --- /dev/null +++ b/base/ra/apache/docroot/ee/server/index.vm @@ -0,0 +1,76 @@ + + + + +RA End-Entity + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : Server Enrollment
    +

    +

    +Server Administrator must use the following form to submit a request which will later be approved by a RA agent. Upon approval, the administrator will be notified by email and the server certificate can be retrieved. +

    +

    + + + + +
    + +
  • Request Submission - Administrator
  • +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/server/submit.cgi b/base/ra/apache/docroot/ee/server/submit.cgi new file mode 100755 index 000000000..4916033ee --- /dev/null +++ b/base/ra/apache/docroot/ee/server/submit.cgi @@ -0,0 +1,93 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Request::Queue; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $util = PKI::Base::Util->new(); + + my $server_id = $util->get_val($q->param('server_id')); + my $site_id = $util->get_val($q->param('site_id')); + my $email = $util->get_val($q->param('email')); + my $csr = $util->get_val($q->param('csr')); + + $csr = $util->normalize_csr($csr); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $request_id = $queue->create_request("server", + "server_id=" . $server_id . ";" . + "site_id=" . $site_id . ";" . + "csr=" . $csr, + "0", + $email); + my %context; + $context{request_id} = $util->html_encode($request_id); + $self->debug_log($cfg, "request $request_id created"); + $queue->close(); + + my $result = $parser->execute_file_with_context("ee/server/submit.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/server/submit.vm b/base/ra/apache/docroot/ee/server/submit.vm new file mode 100644 index 000000000..f08914583 --- /dev/null +++ b/base/ra/apache/docroot/ee/server/submit.vm @@ -0,0 +1,75 @@ + + + + +Server Certificate Request Submission + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : +Server Enrollment
    +Server Administrator Interface +

    +

    +Your request has been successfully submitted. +

    +

    + + + + + +
    Request ID:$request_id
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/user/index.cgi b/base/ra/apache/docroot/ee/user/index.cgi new file mode 100755 index 000000000..ef6b3aa47 --- /dev/null +++ b/base/ra/apache/docroot/ee/user/index.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/user/index.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/user/index.vm b/base/ra/apache/docroot/ee/user/index.vm new file mode 100644 index 000000000..76b06a91c --- /dev/null +++ b/base/ra/apache/docroot/ee/user/index.vm @@ -0,0 +1,83 @@ + + + + +RA End-Entity + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : User Enrollment
    +

    +

    +For user enrollment, user must access the following forms with appropriate client (i.e. browser) where key pair will be generated. +

    +

    + + + + + + + +
    + +
  • Request Submission - User
  • +
    +
    + +
  • Renewal - User
  • +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/user/renew.cgi b/base/ra/apache/docroot/ee/user/renew.cgi new file mode 100755 index 000000000..63d646ec9 --- /dev/null +++ b/base/ra/apache/docroot/ee/user/renew.cgi @@ -0,0 +1,165 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Base::Conf; +use PKI::Request::Queue; +use Template::Velocity; +use PKI::Service::Op; +use PKI::Base::Util; +use PKI::Base::Registry; + +use vars qw (@ISA); +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my $util = PKI::Base::Util->new(); + my $error = ""; + + my $host = $cfg->get("service.machineName"); + my $port = $cfg->get("service.non_clientauth_securePort"); + + $self->debug_params($cfg, $q); + + my $cert = $self->get_cert_record($cfg); + $self->debug_log( $cfg, "after get_cert_record"); + if (!defined($cert) || ($cert eq "")) { + $self->debug_log( $cfg, "cert not defined"); + $error = "certificate not found in database"; + print $q->redirect("/ee/error.cgi?error=$error"); + return; + } + $self->debug_log( $cfg, "got cert"); + + my $csr = $cert->{'csr'}; + if ($csr eq "") { + $error = "csr not found in database"; + print $q->redirect("/ee/error.cgi?error=$error"); + return; + } + $self->debug_log( $cfg, "got csr"); + + my $req_id = $cert->{'rid'}; + if ($req_id eq "") { + $error = "reqid not found in database"; + print $q->redirect("/ee/error.cgi?error=$error"); + return; + } + $self->debug_log( $cfg, "got req_id = $req_id"); + $self->debug_log( $cfg, "before renewl read/create request"); + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $o_req = $queue->read_request($req_id); + if ($o_req eq "") { + $self->debug_log( $cfg, "got null o_req"); + print $q->redirect("/ee/error.cgi?error=$error"); + return; + } + + my $uid = ""; + my $site_id = ""; + my $org_csr = ""; + my $csr_type = ""; + + my $data = $o_req->{'data'}; + foreach $nv (split(/;/, $data)) { + my ($n, $v) = split(/=/, $nv); + if ($n eq "uid") { + $uid = $v; + } + if ($n eq "site_id") { + $site_id = $v; + } + if ($n eq "csr") { + $org_csr = $v; + } + if ($n eq "csr_type") { + $csr_type = $v; + } + } + + my $new_request = $queue->create_request("renewal", + "uid=" . $uid . ";" . + "site_id=" . $site_id . ";" . + "csr_type=" . $csr_type . ";" . + "csr=" . $csr, + "orig_reqid=" . $o_req->{'rowid'}, + $o_req->{'created_by'}); + + #self-renewal is created and processed by the same user + $ref = $queue->approve_request($new_request, $o_req->{'created_by'}); + my $nreq = $queue->read_request($new_request); + $error = $nreq->{'errorString'}; + if ($error ne "0") { + $self->debug_log( $cfg, "after approve request, got error=$error"); + print $q->redirect("/ee/error.cgi?error=$error"); + return; + } + + my %context; + $context{request_id} = $util->html_encode($new_request); + $self->debug_log($cfg, "request $new_request created"); + $queue->close(); + $self->debug_log( $cfg, "after renewl read/create request $new_request"); + + $context{data} = $util->breakline($util->html_encode($ref->{'data'}), 40); + $context{output} = $util->breakline($util->html_encode($ref->{'output'}), 40); + $context{serialno} = $util->html_encode($ref->{'serialno'}); + $context{host} = $util->html_encode($host); + $context{port} = $util->html_encode($port); + + #print $q->redirect("/ee/request/getcert.cgi?id=$new_request"); + my $result = $parser->execute_file_with_context("ee/user/renew.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/user/renew.vm b/base/ra/apache/docroot/ee/user/renew.vm new file mode 100644 index 000000000..dee119c65 --- /dev/null +++ b/base/ra/apache/docroot/ee/user/renew.vm @@ -0,0 +1,86 @@ + + + + +User Certificate Renewal Notification + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : +User Enrollment
    +Renewal Interface +

    +

    +Your certificate has been successfully renewed. +

    +

    + + + + + + + + + + + + + + + + +
    Request ID:$request_id
    Data$data
    Output$output
    Serial Number$serialno
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/user/renewal.cgi b/base/ra/apache/docroot/ee/user/renewal.cgi new file mode 100755 index 000000000..63a211eff --- /dev/null +++ b/base/ra/apache/docroot/ee/user/renewal.cgi @@ -0,0 +1,74 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Registry; + +use vars qw (@ISA); +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $host = $cfg->get("service.machineName"); + my $port = $cfg->get("service.securePort"); + + my %context; + $context{url} = "https://$host:$port/ee/user/renew.cgi"; + my $result = $parser->execute_file_with_context("ee/user/renewal.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/user/renewal.vm b/base/ra/apache/docroot/ee/user/renewal.vm new file mode 100644 index 000000000..1e2b438a1 --- /dev/null +++ b/base/ra/apache/docroot/ee/user/renewal.vm @@ -0,0 +1,73 @@ + + + + +User Certificate Renewal + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : +User Enrollment
    +User Renewal Interface +

    +

    +This form is for end user to renew his/her certificates.
    +At popup, please select the user certificate to renew. +

    +

    +
    + +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/user/submit.cgi b/base/ra/apache/docroot/ee/user/submit.cgi new file mode 100755 index 000000000..26c900e00 --- /dev/null +++ b/base/ra/apache/docroot/ee/user/submit.cgi @@ -0,0 +1,112 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use Benchmark; +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Util; +use PKI::Base::Registry; +use PKI::Request::Queue; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $st = new Benchmark; + + my $util = PKI::Base::Util->new(); + + my $userid = $util->get_val($q->param('uid')); + my $fullname = $util->get_val($q->param('cn')); + my $site_id = $util->get_val($q->param('site_id')); + my $email = $util->get_val($q->param('email')); + my $csr_type = $util->get_alphanum_val($q->param('csr_type')); + my $csr = $util->get_val($q->param('csr')); + + $csr = $util->normalize_csr($csr); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + my $db_st = new Benchmark; + my $queue = PKI::Request::Queue->new(); + $queue->open($cfg); + my $request_id = $queue->create_request("user", + "uid=" . $userid . ";" . + "cn=" . $fullname . ";" . + "site_id=" . $site_id . ";" . + "csr_type=" . $csr_type . ";" . + "csr=" . $csr, + "0", + $email); + my %context; + $context{request_id} = $util->html_encode($request_id); + $self->debug_log($cfg, "request $request_id created"); + $queue->close(); + my $db_et = new Benchmark; + + my $t_st = new Benchmark; + my $result = $parser->execute_file_with_context("ee/user/submit.vm", + \%context); + my $t_et = new Benchmark; + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } + + my $et = new Benchmark; + $self->debug_log($cfg, "benchmark " . + "total=" . timestr(timediff($et, $st)) . " " . + "db total=" . timestr(timediff($db_et, $db_st)) . " " . + "template total=" . timestr(timediff($t_et, $t_st)) . " " + ); +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/user/submit.vm b/base/ra/apache/docroot/ee/user/submit.vm new file mode 100644 index 000000000..6c7a0cd44 --- /dev/null +++ b/base/ra/apache/docroot/ee/user/submit.vm @@ -0,0 +1,75 @@ + + + + +User Certificate Request Submission + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +RA Services : +User Enrollment
    +Manager Interface +

    +

    +Your request has been successfully submitted. +

    +

    + + + + + +
    Request ID:$request_id
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ee/user/user.cgi b/base/ra/apache/docroot/ee/user/user.cgi new file mode 100755 index 000000000..2d58a532b --- /dev/null +++ b/base/ra/apache/docroot/ee/user/user.cgi @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + my %context; + my $result = $parser->execute_file_with_context("ee/user/user.vm", + \%context); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%context); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/ee/user/user.vm b/base/ra/apache/docroot/ee/user/user.vm new file mode 100644 index 000000000..04763d7cf --- /dev/null +++ b/base/ra/apache/docroot/ee/user/user.vm @@ -0,0 +1,435 @@ + + + + + + + + + + +User Certificate Request + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + + + +RA Services : +User Enrollment
    +User Interface +

    +

    +This form is for user to request for an end-user certificate. +

    + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    UID:
    Full Name:
    Site ID:
    Your Email:
      
    + +
    +
    + + + +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/footer.vm b/base/ra/apache/docroot/footer.vm new file mode 100644 index 000000000..a596e45b1 --- /dev/null +++ b/base/ra/apache/docroot/footer.vm @@ -0,0 +1,19 @@ + + diff --git a/base/ra/apache/docroot/header.vm b/base/ra/apache/docroot/header.vm new file mode 100644 index 000000000..3824b87f3 --- /dev/null +++ b/base/ra/apache/docroot/header.vm @@ -0,0 +1,26 @@ + + diff --git a/base/ra/apache/docroot/index.cgi b/base/ra/apache/docroot/index.cgi new file mode 100755 index 000000000..0e643166b --- /dev/null +++ b/base/ra/apache/docroot/index.cgi @@ -0,0 +1,76 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + $::symbol{machineName} = $cfg->get("service.machineName"); + $::symbol{non_clientauth_securePort} = $cfg->get("service.non_clientauth_securePort"); + $::symbol{securePort} = $cfg->get("service.securePort"); + $::symbol{unsecurePort} = $cfg->get("service.unsecurePort"); + + my $result = $parser->execute_file("index.vm"); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%::symbol); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + + +my $op = op->new(); +$op->execute(); diff --git a/base/ra/apache/docroot/index.vm b/base/ra/apache/docroot/index.vm new file mode 100644 index 000000000..f17efb658 --- /dev/null +++ b/base/ra/apache/docroot/index.vm @@ -0,0 +1,90 @@ + + + + +RA Services + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +Certificate System RA Services Page +
    +

    + +

    +

    + + + + + + + + + + +
    + +
  • SSL End Users Services
  • +
    +
    + +
  • Agent Services
  • +
    +
    + +
  • Administrator Services
  • +
    +
    +
    +#include ( "footer.vm" ) + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/adminauthenticatepanel.vm b/base/ra/apache/docroot/ra/admin/console/config/adminauthenticatepanel.vm new file mode 100644 index 000000000..b27042cfb --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/adminauthenticatepanel.vm @@ -0,0 +1,52 @@ + + + +

    Authentication

    +

    +The uid and password are used to authenticate to the master subsystem. These are the administrator's credential information for the master subsystem. +#if ($systemType != "tps") +
    +If authentication is successful, a cloned subsystem will retrieve the configuration information from the master one. +#end +
    +#if ($errorString != "") + $errorString +#end + + + + + + + + + + + +
    Uid:
    Password:
    +

    diff --git a/base/ra/apache/docroot/ra/admin/console/config/adminpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/adminpanel.vm new file mode 100644 index 000000000..3c32c4901 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/adminpanel.vm @@ -0,0 +1,237 @@ + + + + + + +The administrator is a privileged user who manages this subsystem. Please enter the following relevant information, and a certificate request will be automatically generated and submitted. An administrator's entry will be created in the internal database and an administrator's certificate will be imported into this browser automatically in the next panel. +
    +#if ($errorString != "") + $errorString +#end +
    +
    + + + + +#if ($clone != 'clone') + +#else + +#end + + + +#if ($clone != 'clone') + +#else + +#end + + + +#if ($clone != 'clone') + +#else + +#end + + + +#if ($clone != 'clone') + +#else + +#end + + + + +#if ($clone != 'clone') + +#else + +#end + + + + + + + + + + +
    UID:
    Name:
    Email:
    Password:
    Password (Again):
    +

    +
    +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/agentauthenticatepanel.vm b/base/ra/apache/docroot/ra/admin/console/config/agentauthenticatepanel.vm new file mode 100644 index 000000000..abb7678ae --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/agentauthenticatepanel.vm @@ -0,0 +1,48 @@ + + + +

    Authentication

    +
    +The uid and password are used to authenticate to the CA from which this subsystem's certificates are issued. Enter the uid and password of the Certificate Manager Agent who will approve the certificate requests. +
    +#if ($errorString != "") + $errorString +#end + + + + + + + + + + + +
    Uid:
    Password:
    +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/authdbpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/authdbpanel.vm new file mode 100644 index 000000000..f2e0697e7 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/authdbpanel.vm @@ -0,0 +1,66 @@ + + + + Please provide information about the LDAP server that will be used to authenticate the identity of end users. [Details] + + +

    +#if ($errorString != "") + $errorString +#end +

    + + + + + + + + + + + + + + + + +
    Host:
    Port:
    Base DN:
    + +

    +
    +   +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/cainfopanel.vm b/base/ra/apache/docroot/ra/admin/console/config/cainfopanel.vm new file mode 100644 index 000000000..933861a93 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/cainfopanel.vm @@ -0,0 +1,55 @@ + + + +A Certificate Authority (CA) is responsible for issuing different kinds of certificates. Select an HTTPS EE URL of a CA from the list below. +

    +#if ($errorString != "") + $errorString +#end +

    + + + + + +
    URL: +
    + + +

    +
    +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/certchainpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/certchainpanel.vm new file mode 100644 index 000000000..08bcc1331 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/certchainpanel.vm @@ -0,0 +1,49 @@ + + + +Pretty Print of Certificates on this subsystem. +

    +#foreach ($item in $ppcerts) +

    $item.getDN()

    + + + + + + + + +
    Certificate: $item.getNickname()
    +#end + +
    + +
    +
    +   +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/certprettyprintpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/certprettyprintpanel.vm new file mode 100644 index 000000000..ac8da10ee --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/certprettyprintpanel.vm @@ -0,0 +1,49 @@ + + + +The following certificates were installed on this instance. +

    +#foreach ($item in $ppcerts) +

    $item.getDN()

    + + + + + + + + +
    Certificate: $item.getNickname()
    +#end + +
    + +
    +
    +   +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/certrequestpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/certrequestpanel.vm new file mode 100644 index 000000000..f1327db47 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/certrequestpanel.vm @@ -0,0 +1,225 @@ + + + + +A certificate signing request (CSR) contains a public key and is an unsigned copy of the certificate. +

    +If a given CSR has been successfully signed by a CA, then the certificate will be designated below by a certificate icon labeled Certificate Generated Successfully. +

    +However, if a given CSR contains an action required label under its certificate icon, then those requests must be manually submitted to a CA for certificate generation. +

    +Press the [Apply] button after certificates and chains are pasted in. +

    +Press the [Next] button once all certificates have been generated successfully. +

    +#foreach ($item in $reqscerts) +

    $item.getDN()

    + + + + + + + + + +#if ($item.getCert() == "...paste certificate here...") + +#else + #if ($item.getCert() == "...certificate be generated internally...") + + #else + #if ($item.getCert() == "") + + #else + + #end + #end +#end + + + +
     action required
    +
    +
    + certificate will be generated internally +
    +
    + No Certificate Generated. Please import.
    +
    +
    + Certificate Generated Successfully +
    + + +#if ($item.getCert() == "...paste certificate here...") + Step 1: Copy the Certificate Request (CSR) to enroll at an external CA

    + Step 2: Import the PKCS #7 Certificate Chain (optional if the certificate already contains the chain)

    + Step 3: Paste in the Base64-encoded Certificate after enrollment at an external CA (NOTE: this text box does not accept PKCS #7 certificate chains)

    +#else + #if ($item.getCert() == "...certificate be generated internally...") +

    + #else + View Certificate Request (CSR)

    + View Certificate in Base64-Encoding

    + View Certificate Pretty Print

    + #end +#end + + +

    + +
    +
    X
    + + + + + + + +
    $item.getCert()
    +
    + +
    +
    X
    + + + + + + + +
    +
    + +
    +
    X
    + + + + + + + +
    +
    + + +#end + +

    + + +

    +
    +   +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/config_addhsm.vm b/base/ra/apache/docroot/ra/admin/console/config/config_addhsm.vm new file mode 100644 index 000000000..839cff56a --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/config_addhsm.vm @@ -0,0 +1,96 @@ + + + + + + + + Dogtag Certificate System + + + + + + + +
    + + + + + + +
    + + + + +
    +

    + Security Modules

    +Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. +

    +

    Registering a New Security Module

    +
    +

    +If the desired security module is not listed, it is possible that this security module's PKCS #11 library was not registered with the system. Please register a new security module here. + + + + + + + + +
    +Library Path: +
    +Module Name: +
    +

    + + + + +
    + +
    +

    +
    + +
    +
    + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/config_db.vm b/base/ra/apache/docroot/ra/admin/console/config/config_db.vm new file mode 100644 index 000000000..10e1cd2dc --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/config_db.vm @@ -0,0 +1,126 @@ + + + + + + + + Dogtag Certificate System + + + + + + + + + +
    +#include ( "admin/console/config/header.vm" ) + + + + + +
    + + + + +
    +

    + Internal Database

    + +
    + Internal Database Connection

    This option allows sharing an internal database to improve managability.

    +#if ($errorString != "") + $errorString +#end + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Host:
    Port:
    Base DN:
    Database:
    Bind DN:
    Bind Password:
    + +

    +
    +   +
    + + +

    + + + + +
    + +
    + +

    + +
    + +
    +
    + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/config_hsm.vm b/base/ra/apache/docroot/ra/admin/console/config/config_hsm.vm new file mode 100644 index 000000000..8812c5b36 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/config_hsm.vm @@ -0,0 +1,176 @@ + + + + + + + + Dogtag Certificate System + + + + + + + +
    + + + + + + +
    + + + + +
    +

    + Security Modules

    + +
    + +Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. Please make sure that at least one security module is listed below. +

    +

    Supported Security Modules

    + + + + + + + +#foreach ($module in $sms) + + + + + + +#foreach ($token in $module.getTokens()) + + + + + + +#end +#end + +
    Module/TokenStatusDefaultOperations

    $module.getUserFriendlyName()
    + #if ($module.isFound()) + Found + #else + Not Found + #end +
    - $token.getNickName() + #if ($token.isLoggedIn()) + Logged In + #else + Not logged In + #end + + #if ($defTok == $token.getNickName()) + + #else + + #end +
    +

    Other Security Modules

    +

    The security modules listed below are modules found by the server but not recognized as one of the supported modules. If the user believes that any listed modules below should have been supported, please check the "CS.cfg" configuration file to see if there is a name mismatch and adjust this accordingly.

    + + + + + + + +#foreach ($module in $oms) + + + + + + +#foreach ($token in $module.getTokens()) + + + + + + +#end +#end + +
    Module/TokenStatusDefaultOperations
    $module.getUserFriendlyName() + #if ($module.isFound()) + Found + #else + Not Found + #end +
    - $token.getNickName() + #if ($token.isLoggedIn()) + Logged In + #else + Not logged In + #end + + #if ($defTok == $token.getNickName()) + + #else + + #end +
    + +
    +

    + + + + +
    + +
    + + + + + +

    +
    + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/config_hsmloginpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/config_hsmloginpanel.vm new file mode 100644 index 000000000..46d8ae0ea --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/config_hsmloginpanel.vm @@ -0,0 +1,83 @@ + + + +

    + Security Modules Login Panel

    +Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. +

    +

    Security Token Login

    +
    +

    +The user has chosen to login to the following security module: $SecToken +

    +#if ($status == "alreadyLoggedIn") + Token already logged in. +#else + #if ($status == "tokenPasswordNotInitialized") + Token password not initialized. + #else + #if ($status == "justLoggedIn") + Token logged in successfully. + #else + + + + + + + + +
    +Security Module Token Name: +
    +Security Module Token Password: +
    +

    + #end + #end +#end + + + + + +
    + +
    + + + + +

    + +

    +
    +   +
    + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/config_join.vm b/base/ra/apache/docroot/ra/admin/console/config/config_join.vm new file mode 100644 index 000000000..d5adb78f3 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/config_join.vm @@ -0,0 +1,125 @@ + + + + + + + + Dogtag Certificate System + + + + + + + + + +
    + +#include ( "admin/console/config/header.vm" ) + + + + + +
    + + + + +
    +

    + Join the PKI Network

    + +To join this PKI network, the setup wizard needs to submit the certificate request to a Root or another subordinate CA for signing. +

    + + +Manually submit this request to a CA. +

    + + + + + + + + + + +
    Certificate Request to a CA:Certificate Chain From a CA:
    + + + +
    +

    +Automatically submit the request to a Dogtag Certificate Authority +
    + + + + + + + + + + + + + + +
    URL:
    UID:
    Password:
    +

    + +

    +
    +
    + + + +

    + + + + +
    + +
    +

    + +
    +
    + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/config_rootca.vm b/base/ra/apache/docroot/ra/admin/console/config/config_rootca.vm new file mode 100644 index 000000000..4cf5ea946 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/config_rootca.vm @@ -0,0 +1,113 @@ + + + + + + + + Dogtag Certificate System + + + + + + + + + +
    + +#include ( "admin/console/config/header.vm" ) + + + + + +
    + + + + +
    +

    + Root CA

    + +A Root CA provides a set of predefined signing capabilities. Please select the capabilities that this CA needs to provide. +

    + +

    + +

    CA Certificate Profile

    + +

    + + + + + + +
    Profile: +
    +

    + +

    +
    +   +
    + +
    + +

    + + + + +
    + +
    + + +

    + +
    +
    + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/createsubsystempanel.vm b/base/ra/apache/docroot/ra/admin/console/config/createsubsystempanel.vm new file mode 100644 index 000000000..feee8962f --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/createsubsystempanel.vm @@ -0,0 +1,95 @@ + + + +

    Subsystem Configuration

    +

    +This instance can be configured as a new $systemname subsystem. +
    +#if ($errorString != "") + $errorString +#end +
    + Configure this Instance as a New $systemname Subsystem +
    + + + + + + + + + + + + + + + + + +
    Subsystem Name: (e.g. - $fullsystemname)
    Subsystem HTTP URL (unsecure): http://$machineName:$http_port
    Subsystem HTTPS URL (clientauth): https://$machineName:$https_port
    Subsystem HTTPS URL (non-clientauth): https://$machineName:$non_clientauth_https_port
    +

    +#if ($disableClone) + Clone an Existing $systemname Subsystem +#else + Clone an Existing $systemname Subsystem +#end +
    + + + +#if ($disableClone) + +#else + +#end + + + +#if ($disableClone) + + +
    Subsystem Name: (e.g. - $fullsystemname + Clone 1) (e.g. - $fullsystemname + Clone 1)
    Subsystem URL: +
    +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/databasepanel.vm b/base/ra/apache/docroot/ra/admin/console/config/databasepanel.vm new file mode 100644 index 000000000..a887176ab --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/databasepanel.vm @@ -0,0 +1,53 @@ + + + +An SQL Lite database will be created to store RA internal information. + +

    +

    +
    +#if ($errorString != "") + $errorString +#end +
    +

    +
    +   +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/displaycertchain2panel.vm b/base/ra/apache/docroot/ra/admin/console/config/displaycertchain2panel.vm new file mode 100644 index 000000000..eff21eca4 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/displaycertchain2panel.vm @@ -0,0 +1,41 @@ + + + +

    +A certificate chain is a list of all certificates chained up to the root. +

    +If the entire certificate chain is displayed below, click the Next button to import it into this subsystem. This certificate chain will then be trusted for this instance. +

    +If no certificate chain is listed below, simply click the Next button to move on to the next panel. +

    +

    +$certchain
    +
    +#if ($errorString != "") + $errorString +#end diff --git a/base/ra/apache/docroot/ra/admin/console/config/displaycertchainpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/displaycertchainpanel.vm new file mode 100644 index 000000000..d5e32263a --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/displaycertchainpanel.vm @@ -0,0 +1,41 @@ + + + +
    +A certificate chain is a list of all certificates chained up to the root. +
    +If a certificate chain is displayed below, click the Next button to trust this certificate chain for this instance. +
    +If no certificate chain is listed below, simply click the Next button to move on to the next panel. +
    +
    +$certchain
    +
    +#if ($errorString != "") + $errorString +#end diff --git a/base/ra/apache/docroot/ra/admin/console/config/donepanel.vm b/base/ra/apache/docroot/ra/admin/console/config/donepanel.vm new file mode 100644 index 000000000..86e4068ea --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/donepanel.vm @@ -0,0 +1,42 @@ + + + + + + +#if ($errorString != "") + $errorString +#end +As 'root', restart the server on the command line by typing "$initCommand + restart $instanceID". After performing this restart, the server should become operational. +
    +Please go to the services page to access all of the available interfaces. +
    +
    +To create additional instances, type "/usr/bin/pkicreate" on the command line. +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/drminfopanel.vm b/base/ra/apache/docroot/ra/admin/console/config/drminfopanel.vm new file mode 100644 index 000000000..c26f3c0c2 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/drminfopanel.vm @@ -0,0 +1,56 @@ + + + +A Data Recovery Manager (DRM) is responsible for server-side key generation, archival, and recovery. If server-side key generation is not needed, this step can be skipped. +

    +#if ($errorString != "") + $errorString +

    +#end + Connect this instance to an HTTPS Agent URL of a DRM to support server-side key generation. +

    +

    + + + + + +
    URL: +
    +

    +
    +
    +

    + Configure this instance to NOT support server-side key generation. +

    diff --git a/base/ra/apache/docroot/ra/admin/console/config/footer.vm b/base/ra/apache/docroot/ra/admin/console/config/footer.vm new file mode 100644 index 000000000..22d7213ba --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/footer.vm @@ -0,0 +1,20 @@ + + +

    diff --git a/base/ra/apache/docroot/ra/admin/console/config/header.vm b/base/ra/apache/docroot/ra/admin/console/config/header.vm new file mode 100644 index 000000000..e653da5c1 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/header.vm @@ -0,0 +1,26 @@ + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/hierarchypanel.vm b/base/ra/apache/docroot/ra/admin/console/config/hierarchypanel.vm new file mode 100644 index 000000000..41cba696d --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/hierarchypanel.vm @@ -0,0 +1,80 @@ + + + +

    PKI Hierarchy

    +

    +This CA instance can be either a Self-Signed Root CA or a Subordinate CA. [Details] + + +

    + +

    + Make this a Self-Signed Root CA within this new PKI hierarchy. +

    + Make this a subordinate CA of another CA. + + + + + + +
    URL: +
    +

    diff --git a/base/ra/apache/docroot/ra/admin/console/config/importadmincertpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/importadmincertpanel.vm new file mode 100644 index 000000000..37df00c02 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/importadmincertpanel.vm @@ -0,0 +1,56 @@ + + + +An administrator's certificate has been created and imported into this browser. This certificate is used to access the agent interface of this subsystem. +

    +#if ($errorString != "") + $errorString +#end +$info +

    +

    + + + +#if ($ca == 'true' && $import == 'true') + +#else +#if ($caType == 'ca' && $import == 'true') + +#else + +#end +#end + + + + +
    +

    +
    +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/login.vm b/base/ra/apache/docroot/ra/admin/console/config/login.vm new file mode 100644 index 000000000..14593ad9c --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/login.vm @@ -0,0 +1,110 @@ + + + + + + + + Certificate System + + + + + + +
    + +#include ( "ra/admin/console/config/header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + +
    + + + + + +
    +

    + Login

    + +A one time random pin has been generated during setup to protect unauthorized access to this configuration wizard. This pin has been stored in the "CS.cfg" configuration file as the value of the 'preop.pin' parameter. Please enter this pin to continue. + +

    +#if ($errorString != "") + $errorString +#end +

    +

    + + + + + + +
    PIN:
    +
    +
    +
    +
    + +

    + + + + +
    + +
    + + +

    + +
    +
    + +#include ( "ra/admin/console/config/footer.vm" ) + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/modulepanel.vm b/base/ra/apache/docroot/ra/admin/console/config/modulepanel.vm new file mode 100644 index 000000000..cb9a1eaf8 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/modulepanel.vm @@ -0,0 +1,158 @@ + + + +Two lists of security modules are provided below. The Supported Security Modules list consists of both software-based and hardware-based security modules that this PKI solution supports, while the Other Security Modules list consists of any other security modules found by this PKI subsystem that are not recognized as one of the supported security modules. [Details] + + +
    +

    Supported Security Modules

    + + + + + + + +#foreach ($module in $sms) + + + + + + +#foreach ($token in $module.getTokens()) + + + + + + +#end +#end + +
    Module/TokenStatusDefaultOperations

    $module.getUserFriendlyName()
    + #if ($module.isFound()) + Found + #else + Not Found + #end +
    - $token.getNickName() + #if ($token.isLoggedIn()) + Logged In + #else + Not logged In + #end + + #if ($token.isLoggedIn()) + #if ($defTok == $token.getNickName()) + + #else + + #end + #end + + #if (!$token.isLoggedIn()) +Login + #end +
    +

    Other Security Modules

    +

    The security modules listed below are modules found by the server but not recognized as one of the supported modules. If the user believes that any listed modules below should have been supported, please check the "CS.cfg" configuration file to see if there is a name mismatch and adjust this accordingly.

    + + + + + + + +#foreach ($module in $oms) + + + + + + +#foreach ($token in $module.getTokens()) + + + + + + +#end +#end + +
    Module/TokenStatusDefaultOperations
    $module.getUserFriendlyName() + #if ($module.isFound()) + Found + #else + Not Found + #end +
    - $token.getNickName() + #if ($token.isLoggedIn()) + Logged In + #else + Not logged In + #end + + #if ($defTok == $token.getNickName()) + + #else + + #end +
    + + +
    + +
    +
    +   +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/namepanel.vm b/base/ra/apache/docroot/ra/admin/console/config/namepanel.vm new file mode 100644 index 000000000..071b523a9 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/namepanel.vm @@ -0,0 +1,91 @@ + + + +Each certificate associated with this instance needs to have a unique name within the PKI hierarchy. The following information will be used to generate these unique names. Each certificate will be stored in the security module using a unique nickname. [Details] + + + + +

    +#if ($errorString != "") + $errorString +#end +
    +#foreach ($item in $certs) +

    $item.getUserFriendlyName()

    + + + + + + + + + + +
    DN:
    Nickname:
    +

    +#end +

    +


    +

    +Please select the CA to submit these system certificate requests: +

    + + + + + +
    URL: +
    + +

    +
    +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/securitydomainloginpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/securitydomainloginpanel.vm new file mode 100644 index 000000000..58ace3f68 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/securitydomainloginpanel.vm @@ -0,0 +1,109 @@ + + + + + + + + Dogtag Certificate System + + + + + + + +
    + + + + + + +
    + + + + +
    +

    + Security Domain ($name) Login

    + +
    +

    The Enterprise $subsystem Administrator will register this $subsystem Subsystem located at $host under this Security Domain located at $sdhost. The credential information will be provided to the Security Domain for authentication.

    +#if ($errorString != "") + $errorString +#end + + + + + + + + + + + + + + +
    Uid:
    Password:
    + +

    +
    +   +
    + + +

    + + + + +
    +
    + +
    +
    + +

    + +
    + +
    +
    + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/securitydomainpanel.vm b/base/ra/apache/docroot/ra/admin/console/config/securitydomainpanel.vm new file mode 100644 index 000000000..f67f7b242 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/securitydomainpanel.vm @@ -0,0 +1,115 @@ + + + +

    $panelname

    +
    +A security domain is a registry for all of the PKI services within an enterprise. Applications may use the security domain to locate other PKI services. [Details] + + + +#if ($errorString != "") + $errorString +#end +
    +#if ($cstype == "CA") + Create a New Security Domain +
    +If no security domain exists, a new one must be created for this CA. + + + + + + + + + + + + + + + + + + + + + +
    Security Domain Name: (e.g. - Dogtag Security Domain)
    Security Domain HTTP EE URL (unsecure): http://$machineName:$http_ee_port
    Security Domain HTTPS Agent URL (clientauth): https://$machineName:$https_agent_port
    Security Domain HTTPS EE URL (non-clientauth): https://$machineName:$https_ee_port
    Security Domain HTTPS Admin URL (non-clientauth): https://$machineName:$https_admin_port
    +
    + Join an Existing Security Domain +#else + Create a New Security Domain +
    +If no security domain exists, a new one must be created for this CA. + + + + + +
    Security Domain Name: (e.g. - Dogtag Security Domain)
    +
    + Join an Existing Security Domain +#end +
    +Enter the URL to an existing security domain. +
    + + + + + +
    Security Domain HTTPS Admin URL (non-clientauth): (e.g. - https://example.com:9445)
    +
    + + + + + +
    NOTE:   Since a Security Domain MUST be a CA (although all CAs are NOT necessarily Security Domains), an appropriate value for this URL may be obtained by logging into the machine which hosts the desired Security Domain CA as 'root' and running the command "$initCommand status $instanceID" from the command-line.
    +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/sidemenu.vm b/base/ra/apache/docroot/ra/admin/console/config/sidemenu.vm new file mode 100644 index 000000000..09fe16870 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/sidemenu.vm @@ -0,0 +1,30 @@ + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/sizepanel.vm b/base/ra/apache/docroot/ra/admin/console/config/sizepanel.vm new file mode 100644 index 000000000..76b1d18a2 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/sizepanel.vm @@ -0,0 +1,235 @@ + + + + + +Select the key pair type(s) and associated key pair size(s) from the pulldown menus. [Details] + + +#if ($errorString != "") + $errorString +#end +

    +

    +

    + + + + +
    [Advanced]
    +

    +

    Common Key Settings

    +

    + + + + + +
    Key Type:
    +

    + Use the default key size ($default_keysize bits for RSA, $default_ecc_keysize bits for ECC). +

    + Use the following custom key size: + +

    + + + + + +
    Key Size:
    +

    +

    +

    +

    + + + + +
    [Simple]
    +#foreach ($item in $certs) +

    Key for $item.getUserFriendlyName()

    +

    + + + + + +
    Key Type:
    +

    + Use the default key size ($default_keysize bits for RSA, $default_ecc_keysize bits for ECC). +

    + Use the following custom key size: + +

    + + + + + +
    Key Size:
    +#end +

    +
    +
    +
    +#if ($firsttime == 'false') +New Keys

    +#end +

    +

    +
    +Note: After pressing Next, keys will be generated on the server, which will take some time to complete. Please wait for the next panel to appear. +   +
    diff --git a/base/ra/apache/docroot/ra/admin/console/config/tksinfopanel.vm b/base/ra/apache/docroot/ra/admin/console/config/tksinfopanel.vm new file mode 100644 index 000000000..f4a0a3fd7 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/tksinfopanel.vm @@ -0,0 +1,51 @@ + + + +The Token Key Service (TKS) is responsible for managing master keys that are used for establishing secure channels. Select an HTTPS Agent URL of a TKS from the list below. +

    +#if ($errorString != "") + $errorString +#end +

    + + + + + +
    URL: +
    +

    +
    +
    +

    diff --git a/base/ra/apache/docroot/ra/admin/console/config/topmenu.vm b/base/ra/apache/docroot/ra/admin/console/config/topmenu.vm new file mode 100644 index 000000000..64881066f --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/topmenu.vm @@ -0,0 +1,21 @@ + + +

    diff --git a/base/ra/apache/docroot/ra/admin/console/config/welcomepanel.vm b/base/ra/apache/docroot/ra/admin/console/config/welcomepanel.vm new file mode 100644 index 000000000..fd478d1a8 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/welcomepanel.vm @@ -0,0 +1,57 @@ + + + +

    $wizardname

    +The $fullsystemname + configuration wizard will guide the administrator through the process of configuring a single instance of the $fullsystemname + ($systemname). [Details] + + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/wizard.vm b/base/ra/apache/docroot/ra/admin/console/config/wizard.vm new file mode 100644 index 000000000..4c7472817 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/wizard.vm @@ -0,0 +1,144 @@ + + + + + + + + Dogtag Certificate System + + + + + + + + + + +
    + +#include ( "ra/admin/console/config/header.vm" ) + + + + +
    + +
    +
    + +
    +
    + + +
    +
    + +
    + + +
    + + + + + +
    +

    + $title

    + +
    + + +#parse ( $panel ) + + + +
    + + + + + + +
    + +#if ($showApplyButton == "true") + +#end + +#if ($lastpanel) +  +#else + +#end + +
    + +
    + +#include ( "ra/admin/console/config/footer.vm" ) + +
    +
    + + + diff --git a/base/ra/apache/docroot/ra/admin/console/config/xml.vm b/base/ra/apache/docroot/ra/admin/console/config/xml.vm new file mode 100644 index 000000000..31ff72aa2 --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/config/xml.vm @@ -0,0 +1,4 @@ + + + $xml + diff --git a/base/ra/apache/docroot/ra/admin/console/js/misc.js b/base/ra/apache/docroot/ra/admin/console/js/misc.js new file mode 100644 index 000000000..d4dc336ab --- /dev/null +++ b/base/ra/apache/docroot/ra/admin/console/js/misc.js @@ -0,0 +1,30 @@ +// --- 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 --- + +/** + * This function is to submit the form's parameters and to decide if the + * window should remain open. + * + * @param f The form + * @param fclose true if you want to close the window; otherwise false. + */ +function saveConfig(f, fclose) { + f.submit(); + if (fclose == true) + window.close(); +} diff --git a/base/ra/forms/admin/group/add.cgi b/base/ra/forms/admin/group/add.cgi deleted file mode 100755 index 212330d0d..000000000 --- a/base/ra/forms/admin/group/add.cgi +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $gid = $util->get_val($q->param('gid')); - my $name = $util->get_val($q->param('name')); - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - my $ref = $store->read_group($gid); - if (defined($ref)) { - # gid used - print $q->redirect("/admin/group/add_new.cgi?error=exist"); - return; - } - my $ref = $store->add_group($gid, $name); - $store->close(); - - print $q->redirect("/admin/group/index.cgi"); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/group/add_member.cgi b/base/ra/forms/admin/group/add_member.cgi deleted file mode 100755 index d60fe965e..000000000 --- a/base/ra/forms/admin/group/add_member.cgi +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $gid = $util->get_val($q->param('gid')); - my $userid = $util->get_val($q->param('uid')); - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - $store->add_user_to_group($gid, $userid); - $store->close(); - - print $q->redirect("/admin/group/read.cgi?gid=" . $gid); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/group/add_new.cgi b/base/ra/forms/admin/group/add_new.cgi deleted file mode 100755 index 5a1ca7eda..000000000 --- a/base/ra/forms/admin/group/add_new.cgi +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - my $error = $q->param('error'); - $context{error} = $util->html_encode($error); - - my $result = $parser->execute_file_with_context("admin/group/add_new.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/group/delete.cgi b/base/ra/forms/admin/group/delete.cgi deleted file mode 100755 index 5fb1f22ce..000000000 --- a/base/ra/forms/admin/group/delete.cgi +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $gid = $util->get_val($q->param('gid')); - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - $store->delete_group($gid); - $store->close(); - - print $q->redirect("/admin/group/index.cgi"); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/group/delete_member.cgi b/base/ra/forms/admin/group/delete_member.cgi deleted file mode 100755 index 2e516eeee..000000000 --- a/base/ra/forms/admin/group/delete_member.cgi +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $gid = $util->get_val($q->param('gid')); - my $userid = $util->get_val($q->param('uid')); - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - $store->delete_user_from_group($gid, $userid); - $store->close(); - - print $q->redirect("/admin/group/read.cgi?gid=" . $gid); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/group/index.cgi b/base/ra/forms/admin/group/index.cgi deleted file mode 100755 index 07dc653e6..000000000 --- a/base/ra/forms/admin/group/index.cgi +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - - my $util = PKI::Base::Util->new(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $sp = $util->get_alphanum_val($q->param('sp')); - if ($sp eq "") { - $sp = "0"; - } - $context{sp} = $sp; - my $mc = $util->get_alphanum_val($q->param('mc')); - if ($mc eq "") { - $mc = "20"; - } - $context{mc} = $mc; - $context{pp} = $sp - $mc; # previous pos (for paging) - $context{np} = $sp + $mc; # next pos (for paging) - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - my @groups = $store->list_groups($sp, $mc); - $store->close(); - - my @r; - my $i = 0; - foreach my $group (@groups) { - $r[$i] = new PKI::RA::GlobalVar( - getGID => sub { return $util->html_encode(Encode::decode('UTF-8', $group->{'gid'})) }, - getName => sub { return $util->html_encode(Encode::decode('UTF-8', $group->{'name'})) }, - ); - $i++; - } - $context{rows} = \@r; - - my $result = $parser->execute_file_with_context("admin/group/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/group/read.cgi b/base/ra/forms/admin/group/read.cgi deleted file mode 100755 index 9ede3aa53..000000000 --- a/base/ra/forms/admin/group/read.cgi +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $gid = $util->get_val($q->param('gid')); - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - my $ref = $store->read_group($gid); - - $context{gid} = $util->html_encode(Encode::decode('UTF-8', $ref->{'gid'})); - $context{name} = $util->html_encode(Encode::decode('UTF-8', $ref->{'name'})); - - my @members = $store->list_all_members($gid); - my @users = $store->list_all_non_members($gid); - $store->close(); - - # new member in the group - my @r; - my $i = 0; - foreach my $member (@members) { - $r[$i] = new PKI::RA::GlobalVar( - getUID => sub { return $util->html_encode($member->{'uid'}) }, - ); - $i++; - } - $context{members} = \@r; - - # read users - my @u; - $i = 0; - foreach my $user (@users) { - $u[$i] = new PKI::RA::GlobalVar( - getUID => sub { return $util->html_encode($user->{'uid'}) }, - ); - $i++; - } - if ($i == 0) { - $context{non_member_exists} = 0; - } else { - $context{non_member_exists} = 1; - } - $context{users} = \@u; - - my $result = $parser->execute_file_with_context("admin/group/read.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/index.cgi b/base/ra/forms/admin/index.cgi deleted file mode 100755 index 2db7b2500..000000000 --- a/base/ra/forms/admin/index.cgi +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::UserStore; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/agent/error.cgi?error=Authentication%20Error"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $uid; - - my $result = $parser->execute_file_with_context("admin/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/user/add.cgi b/base/ra/forms/admin/user/add.cgi deleted file mode 100755 index 94c4bae81..000000000 --- a/base/ra/forms/admin/user/add.cgi +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $uid; - - my $userid = $util->get_val($q->param('uid')); - my $name = $util->get_val($q->param('name')); - my $email = $util->get_val($q->param('email')); - my $certificate = $util->get_val($q->param('certificate')); - - if ($certificate =~ /BEGIN CERTIFICATE/ || - $certificate =~ /END CERTIFICATE/) { - # do nothing - } else { - print $q->redirect("/admin/user/add_new.cgi?error=cert_header"); - return; - } - $certificate =~ s/-----BEGIN CERTIFICATE-----//g; - $certificate =~ s/-----END CERTIFICATE-----//g; - $certificate =~ s/[\r\n]//g; - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - my $ref = $store->read_user($userid); - if (defined($ref)) { - # uid used - print $q->redirect("/admin/user/add_new.cgi?error=exist"); - return; - } - my $ref = $store->add_user($userid, $name, $email, $certificate); - $store->close(); - - print $q->redirect("/admin/user/index.cgi"); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/user/add_new.cgi b/base/ra/forms/admin/user/add_new.cgi deleted file mode 100755 index 8bfbd0e9e..000000000 --- a/base/ra/forms/admin/user/add_new.cgi +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $uid; - - my $error = $util->get_val($q->param('error')); - $context{error} = $error; - - my $result = $parser->execute_file_with_context("admin/user/add_new.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/user/delete.cgi b/base/ra/forms/admin/user/delete.cgi deleted file mode 100755 index 707035edb..000000000 --- a/base/ra/forms/admin/user/delete.cgi +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $cfg = PKI::Base::Registry->get_config(); - - my $util = PKI::Base::Util->new(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $uid; - - my $userid = $util->get_val($q->param('uid')); - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - $store->delete_user($userid); - $store->close(); - - print $q->redirect("/admin/user/index.cgi"); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/user/index.cgi b/base/ra/forms/admin/user/index.cgi deleted file mode 100755 index c845ae1dc..000000000 --- a/base/ra/forms/admin/user/index.cgi +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use PKI::Base::Registry; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my $util = PKI::Base::Util->new(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $uid; - - my $status = $util->get_alphanum_val($q->param('status')); - $context{status} = $status; - - my $sp = $util->get_alphanum_val($q->param('sp')); - if ($sp eq "") { - $sp = "0"; - } - $context{sp} = $sp; - my $mc = $util->get_alphanum_val($q->param('mc')); - if ($mc eq "") { - $mc = "20"; - } - $context{mc} = $mc; - $context{pp} = $sp - $mc; # previous pos (for paging) - $context{np} = $sp + $mc; # next pos (for paging) - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - my @users = $store->list_users($sp, $mc); - $store->close(); - - my @r; - my $i = 0; - foreach my $user (@users) { - $r[$i] = new PKI::RA::GlobalVar( - getUID => sub { return $util->html_encode($user->{'uid'}) }, - getName => sub { return $util->html_encode(Encode::decode('UTF-8',$user->{'name'})) }, - getEmail => sub { return $util->html_encode($user->{'email'}) }, - ); - $i++; - } - $context{rows} = \@r; - - my $result = $parser->execute_file_with_context("admin/user/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/admin/user/read.cgi b/base/ra/forms/admin/user/read.cgi deleted file mode 100755 index 08d2fd3f7..000000000 --- a/base/ra/forms/admin/user/read.cgi +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->admin_auth($cfg)) { - print $q->redirect("/admin/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $uid; - - my $userid = $util->get_val($q->param('uid')); - - my $store = PKI::Base::UserStore->new(); - $store->open($cfg); - my $ref = $store->read_user($userid); - $store->close(); - - $context{userid} = $util->html_encode($ref->{'uid'}); - $context{name} = $util->html_encode(Encode::decode('UTF-8', $ref->{'name'})); - $context{email} = $util->html_encode($ref->{'email'}); - $context{certificate} = $util->breakline($util->html_encode($ref->{'certificate'}),40); - - my $result = $parser->execute_file_with_context("admin/user/read.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/cert/index.cgi b/base/ra/forms/agent/cert/index.cgi deleted file mode 100755 index 46e5b8c2c..000000000 --- a/base/ra/forms/agent/cert/index.cgi +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Base::CertStore; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my @roles = $self->get_current_roles($cfg); - my $r = join(",",@roles); - - my $sp = $util->get_alphanum_val($q->param('sp')); - if ($sp eq "") { - $sp = "0"; - } - $context{sp} = $sp; - my $mc = $util->get_alphanum_val($q->param('mc')); - if ($mc eq "") { - $mc = "20"; - } - $context{mc} = $mc; - $context{pp} = $sp - $mc; # previous pos (for paging) - $context{np} = $sp + $mc; # next pos (for paging) - - my $cs = PKI::Base::CertStore->new(); - $cs->open($cfg); - my @certs = $cs->list_certs_by_approver($uid, $sp, $mc); - $cs->close(); - - my @r; - my $i = 0; - foreach my $cert (@certs) { - $r[$i] = new PKI::RA::GlobalVar( - getReqId => sub { return $util->html_encode($cert->{'rid'}) }, - getSerialno => sub { return $util->html_encode($cert->{'serialno'}) }, - getSubjectDN => sub { return $util->html_encode($cert->{'subject_dn'}) }, - getCertificate => sub { return $util->html_encode($cert->{'certificate'}) }, - getApprovedBy => sub { return $util->html_encode($cert->{'approved_by'}) }, - getCreatedAt => sub { return $util->html_encode($cert->{'created_at'}); }, - ); - $i++; - } - $context{rows} = \@r; - - my $result = $parser->execute_file_with_context("agent/cert/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/cert/read.cgi b/base/ra/forms/agent/cert/read.cgi deleted file mode 100755 index f434baedb..000000000 --- a/base/ra/forms/agent/cert/read.cgi +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Conn::CA; -use Encode; -use vars qw (@ISA); -use PKI::Service::Op; - -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $serialno = $util->get_alphanum_val($q->param('serialno')); - - my $cs = PKI::Base::CertStore->new(); - $cs->open($cfg); - my $ref = $cs->read_certificate_by_approver($uid, $serialno); - $cs->close(); - - my $ca = PKI::Conn::CA->new(); - $ca->open($cfg); - my $certStatus = $ca->getCertStatus("ca1", $serialno); - $ca->close(); - - - $context{certificate} = $util->breakline($util->html_encode($ref->{'certificate'}), 40); - - $context{serialno} = $util->html_encode($ref->{'serialno'}); - $context{subject_dn} = $util->html_encode(Encode::decode('UTF-8', $ref->{'subject_dn'})); - $context{created_at} = $util->html_encode($ref->{'created_at'}); - $context{approved_by} = $util->html_encode($ref->{'approved_by'}); - $context{rid} = $util->html_encode($ref->{'rid'}); - $context{certStatus} = $util->html_encode($certStatus); - - my $result = $parser->execute_file_with_context("agent/cert/read.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/cert/revoke.cgi b/base/ra/forms/agent/cert/revoke.cgi deleted file mode 100755 index 1e483aea0..000000000 --- a/base/ra/forms/agent/cert/revoke.cgi +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Registry; -use PKI::Base::Util; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $serialno = $util->get_alphanum_val($q->param('serialno')); - my $subject_dn = $util->get_val($q->param('subject_dn')); - my $rid = $util->get_alphanum_val($q->param('rid')); - - $context{serialno} = $util->html_encode($serialno); - $context{subject_dn} = $util->html_encode(Encode::decode('UTF-8',$subject_dn)); - $context{rid} = $util->html_encode($rid); - - my $result = $parser->execute_file_with_context("agent/cert/revoke.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/cert/submit.cgi b/base/ra/forms/agent/cert/submit.cgi deleted file mode 100755 index 571385f3a..000000000 --- a/base/ra/forms/agent/cert/submit.cgi +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Conn::CA; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $serialno = $util->get_alphanum_val($q->param('serialno')); - my $subject_dn = $util->get_val($q->param('subject_dn')); - my $reason = $util->get_alphanum_val($q->param('reason')); - my $rid = $util->get_alphanum_val($q->param('rid')); - - my $ca = PKI::Conn::CA->new(); - $ca->open($cfg); - $ca->revoke($rid, "ca1", $serialno, $reason); - $ca->close(); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - - my $ref = $queue->read_request($rid); - $context{errorString} = $util->html_encode($ref->{'errorString'}); - $queue->close(); - - $context{rid} = $util->html_encode($rid); - $context{serialno} = $util->html_encode($serialno); - $context{subject_dn} = $util->html_encode(Encode::decode('UTF-8', $subject_dn)); - - my $result = $parser->execute_file_with_context("agent/cert/submit.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/error.cgi b/base/ra/forms/agent/error.cgi deleted file mode 100755 index fa13365a7..000000000 --- a/base/ra/forms/agent/error.cgi +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::UserStore; -use PKI::Base::Util; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $util = PKI::Base::Util->new(); - - my $error = $util->get_val($q->param('error')); - - my %context; - if ($error ne "") { - $context{has_error} = 1; - $context{'error'} = $util->html_encode($error); - } - - my $result = $parser->execute_file_with_context("agent/error.vm", \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/index.cgi b/base/ra/forms/agent/index.cgi deleted file mode 100755 index c8f2040fe..000000000 --- a/base/ra/forms/agent/index.cgi +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::UserStore; -use PKI::Base::Registry; -use PKI::Base::Util; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi?error=Authentication%20Error"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $result = $parser->execute_file_with_context("agent/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/request/add_note.cgi b/base/ra/forms/agent/request/add_note.cgi deleted file mode 100755 index 0ffac91c7..000000000 --- a/base/ra/forms/agent/request/add_note.cgi +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; -use PKI::Base::TimeTool; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $id = $util->get_alphanum_val($q->param('id')); - my $note = $util->get_val($q->param('note')); - - if ($note eq "") { - # dont add anything - print $q->redirect("/agent/request/read.cgi?id=" . $id); - return; - } - - my $timet = PKI::Base::TimeTool->new(); - my $now = $timet->get_time(); - my $new_note = "==== Note created by $uid at $now ====\n" . - $note . "\n"; - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $ref = $queue->read_request($id); - $queue->set_request($id, "note", $ref->{'note'} . $new_note); - $queue->close(); - - print $q->redirect("/agent/request/read.cgi?id=" . $id); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/request/index.cgi b/base/ra/forms/agent/request/index.cgi deleted file mode 100755 index 81b25977a..000000000 --- a/base/ra/forms/agent/request/index.cgi +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::RA::GlobalVar; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; -use PKI::Service::Op; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - $self->debug_log( $cfg, "in request/index.cgi, uid == $uid"); - - my %context; - $context{uid} = $util->html_encode($uid); - - my @roles = $self->get_current_roles($cfg); -# my $r = join(",",@roles); - - my $status = $util->get_alphanum_val($q->param('status')); - if ($status eq "") { - $context{status} = ""; - } else { - $context{status} = $util->html_encode($status); - } - - my $sp = $util->get_alphanum_val($q->param('sp')); - if ($sp eq "") { - $sp = "0"; - } - $context{sp} = $sp; - my $mc = $util->get_alphanum_val($q->param('mc')); - if ($mc eq "") { - $mc = "20"; - } - $context{mc} = $mc; - $context{pp} = $sp - $mc; # previous pos (for paging) - $context{np} = $sp + $mc; # next pos (for paging) - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $total = $queue->count_requests_by_roles(\@roles, $status); - $context{total} = $util->html_encode($total); - - my @reqs = $queue->list_requests_by_roles(\@roles, $status, $sp, $mc); -# my @reqs = $queue->list_requests_by_roles($r, $status, $sp, $mc); - $queue->close(); - - my @r; - my $i = 0; - foreach my $req (@reqs) { - $r[$i] = new PKI::RA::GlobalVar( - getId => sub { return $util->html_encode($req->{'rowid'}) }, - getType => sub { return $util->html_encode($req->{'type'}) }, - getStatus => sub { return $util->html_encode($req->{'status'}) }, - getError => sub { return $util->html_encode($req->{'errorString'}) }, - getAssignedTo => sub { return $util->html_encode($req->{'assigned_to'}) }, - getData => sub { return $util->html_encode($req->{'data'}); }, - getCreatedBy => sub { return $util->html_encode($req->{'created_by'}); }, - getCreatedAt => sub { return $util->html_encode($req->{'created_at'}); }, - ); - $i++; - } - $context{rows} = \@r; - - if ($sp - $mc < 0) { - $context{show_previous} = "no"; - } else { - $context{show_previous} = "yes"; - } - - if ($i < 20) { - $context{show_next} = "no"; - } else { - $context{show_next} = "yes"; - } - - my $result = $parser->execute_file_with_context("agent/request/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/request/op.cgi b/base/ra/forms/agent/request/op.cgi deleted file mode 100755 index 363d7121b..000000000 --- a/base/ra/forms/agent/request/op.cgi +++ /dev/null @@ -1,153 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use Benchmark; -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Registry; -use PKI::Request::Queue; -use PKI::Base::Util; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $st = new Benchmark; - - my $util = PKI::Base::Util->new(); - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - my $type = $util->get_alphanum_val($q->param('type')); - my $id = $util->get_alphanum_val($q->param('id')); - - my $db_st = new Benchmark; - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - - my $ref; - - my @roles = $self->get_current_roles($cfg); - my $pref = $queue->read_request_by_roles(\@roles, $id); - - if (! defined $pref) { - $queue->close(); - $self->debug_log($cfg, "Invalid attempt to process request id= " . $id . - " by userid= " . $uid); - print $q->redirect("/agent/error.cgi"); - return; - } - - my $curr_status = $pref->{'status'}; - if ($type eq "approve") { - if (($curr_status ne "OPEN") && ($curr_status ne "ERROR")) { - $queue->close(); - print $q->redirect("/agent/request/read.cgi?id=$id"); - return; - } - - $ref = $queue->approve_request($id, $uid); - } elsif ($type eq "reject") { - if (($curr_status ne "OPEN") && ($curr_status ne "ERROR")) { - $queue->close(); - print $q->redirect("/agent/request/read.cgi?id=$id"); - return; - } - - $ref = $queue->reject_request($id, $uid); - } - $queue->close(); - my $db_et = new Benchmark; - - $context{data} = $util->breakline($util->html_encode(Encode::decode('UTF-8', $ref->{'data'})), 40); - $context{output} = $util->breakline($util->html_encode($ref->{'output'}), 40); - $context{serialno} = $util->html_encode($ref->{'serialno'}); - $context{type} = $util->html_encode($ref->{'type'}); - $context{ip} = $util->html_encode($ref->{'ip'}); - $context{note} = $util->html_encode($ref->{'note'}); - $context{note} =~ s/\n//g; - $context{created_at} = $util->html_encode($ref->{'created_at'}); - $context{updated_at} = $util->html_encode($ref->{'updated_at'}); - $context{assigned_to} = $util->html_encode($ref->{'assigned_to'}); - $context{processed_by} = $util->html_encode($ref->{'processed_by'}); - $context{created_by} = $util->html_encode($ref->{'created_by'}); - $context{status} = $util->html_encode($ref->{'status'}); - $context{errorString} = $util->html_encode($ref->{'errorString'}); - $context{id} = $util->html_encode($ref->{'rowid'}); - - my $t_st = new Benchmark; - my $result = $parser->execute_file_with_context("agent/request/op.vm", - \%context); - my $t_et = new Benchmark; - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } - - my $et = new Benchmark; - - $self->debug_log($cfg, "benchmark " . - "total=" . timestr(timediff($et, $st)) . " " . - "db total=" . timestr(timediff($db_et, $db_st)) . " " . - "template total=" . timestr(timediff($t_et, $t_st)) . " " - ); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/agent/request/read.cgi b/base/ra/forms/agent/request/read.cgi deleted file mode 100755 index d1633c164..000000000 --- a/base/ra/forms/agent/request/read.cgi +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Registry; -use PKI::Base::Util; -use PKI::Request::Queue; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - if (!$self->agent_auth($cfg)) { - print $q->redirect("/agent/error.cgi"); - return; - } - my $uid = $self->get_current_uid($cfg); - - my %context; - $context{uid} = $util->html_encode($uid); - - - my @roles = $self->get_current_roles($cfg); -# my $r = join(",",@roles); - - my $id = $util->get_alphanum_val($q->param('id')); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $ref = $queue->read_request_by_roles(\@roles, $id); - $queue->close(); - - $context{data} = $util->breakline($util->html_encode(Encode::decode('UTF-8',$ref->{'data'})), 40); - $context{output} = $util->breakline($util->html_encode($ref->{'output'}), 40); - $context{meta_info} = $util->breakline($util->html_encode($ref->{'meta_info'}), 40); - - $context{serialno} = $util->html_encode($ref->{'serialno'}); - $context{subject_dn} = $util->html_encode($ref->{'subject_dn'}); - $context{type} = $util->html_encode($ref->{'type'}); - $context{created_at} = $util->html_encode($ref->{'created_at'}); - $context{created_by} = $util->html_encode($ref->{'created_by'}); - $context{updated_at} = $util->html_encode($ref->{'updated_at'}); - $context{ip} = $util->html_encode($ref->{'ip'}); - $context{processed_by} = $util->html_encode($ref->{'processed_by'}); - $context{note} = $util->html_encode($ref->{'note'}); - $context{note} =~ s/\n//g; - $context{assigned_to} = $util->html_encode($ref->{'assigned_to'}); - $context{status} = $util->html_encode($ref->{'status'}); - if ($ref->{'status'} eq "OPEN") { - $context{is_open} = 1; - } - if ($ref->{'status'} eq "ERROR") { - $context{is_error} = 1; - } - $context{errorString} = $util->html_encode($ref->{'errorString'}); - $context{id} = $util->html_encode($ref->{'rowid'}); - - my $result = $parser->execute_file_with_context("agent/request/read.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/agent/enroll.cgi b/base/ra/forms/ee/agent/enroll.cgi deleted file mode 100755 index 4f1af8f16..000000000 --- a/base/ra/forms/ee/agent/enroll.cgi +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use MIME::Base64; -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Registry; -use PKI::Request::Queue; -use PKI::Conn::CA; -use PKI::Base::PinStore; -use PKI::Base::Util; - -use vars qw (@ISA); -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $uid = $util->get_val($q->param('uid')); - my $pin = $util->get_alphanum_val($q->param('pin')); - my $csr = $util->get_val($q->param('csr')); - $csr = $util->normalize_csr($csr); - - my $key = $uid; - - my $pin_store = PKI::Base::PinStore->new(); - $pin_store->open($cfg); - my $pinref = $pin_store->read_pin($key); - if (defined($pinref) && $pinref->{'pin'} eq $pin) { - $pin_store->delete($key); - } else { - $pin_store->close(); - print $q->redirect("/ee/error.cgi?error=Invalid Pin"); - return; - } - my $rid = $pinref->{'rid'}; - $pin_store->close(); - - my $profile_id = $cfg->get("request.agent.profileId"); - my $cert_request_type = $cfg->get("request.agent.reqType"); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $req = $queue->read_request($rid); - $queue->set_request($rid, "subject_dn", "uid=$uid, e=$req->{'created_by'}"); - - my $ca = PKI::Conn::CA->new(); - $ca->open($cfg); - my $cert = $ca->enroll($rid, "ca1", $profile_id, $cert_request_type, $csr); - $ca->close(); - $queue->set_request($rid, "output", $cert); - - $req = $queue->read_request($rid); - if ($cert eq "") { - my $error = $req->{'errorString'}; - $queue->close(); - print $q->redirect("/ee/error.cgi?error=$error"); - return; - } - - my $decoded = decode_base64($cert); - my $encoded = encode_base64($decoded); - - my %context; - $context{cert} = $encoded; - $context{rid} = $util->html_encode($rid); - $context{subject_dn} = $util->html_encode($req->{'subject_dn'}); - $queue->close(); - - my $result = $parser->execute_file_with_context("ee/agent/enroll.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/agent/index.cgi b/base/ra/forms/ee/agent/index.cgi deleted file mode 100755 index 66fceb8ff..000000000 --- a/base/ra/forms/ee/agent/index.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use PKI::Base::Registry; -use Template::Velocity; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/agent/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/agent/new.cgi b/base/ra/forms/ee/agent/new.cgi deleted file mode 100755 index c209f5e74..000000000 --- a/base/ra/forms/ee/agent/new.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use PKI::Base::Registry; -use Template::Velocity; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/agent/new.vm", \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } - -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/agent/start.cgi b/base/ra/forms/ee/agent/start.cgi deleted file mode 100755 index 27aedb546..000000000 --- a/base/ra/forms/ee/agent/start.cgi +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use PKI::Base::Registry; -use Template::Velocity; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - - my $result = $parser->execute_file_with_context("ee/agent/start.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/agent/submit.cgi b/base/ra/forms/ee/agent/submit.cgi deleted file mode 100755 index a68242114..000000000 --- a/base/ra/forms/ee/agent/submit.cgi +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my $uid = $util->get_val($q->param('uid')); - my $email = $util->get_val($q->param('email')); - - $self->debug_params($cfg, $q); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $request_id = $queue->create_request("agent", - "uid=" . $uid, - "0", - $email); - my %context; - $context{request_id} = $util->html_encode($request_id); - $self->debug_log($cfg, "request $request_id created"); - $queue->close(); - - my $result = $parser->execute_file_with_context("ee/agent/submit.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/error.cgi b/base/ra/forms/ee/error.cgi deleted file mode 100755 index 1417d4b61..000000000 --- a/base/ra/forms/ee/error.cgi +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::UserStore; -use PKI::Base::Util; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $util = PKI::Base::Util->new(); - - my %context; - - my $error = $util->get_val($q->param('error')); - if ($error ne "") { - $context{has_error} = 1; - $context{'error'} = $util->html_encode($error); - } - - my $result = $parser->execute_file_with_context("ee/error.vm", \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/index.cgi b/base/ra/forms/ee/index.cgi deleted file mode 100755 index 453b2873b..000000000 --- a/base/ra/forms/ee/index.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/index.vm", \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/request/getcert.cgi b/base/ra/forms/ee/request/getcert.cgi deleted file mode 100755 index b22444dc1..000000000 --- a/base/ra/forms/ee/request/getcert.cgi +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use PKI::Service::Op; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; -use Template::Velocity; -use MIME::Base64; -use Encode; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $id = $util->get_alphanum_val($q->param('id')); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $req = $queue->read_request($id); - $queue->close(); - - my %context; - $context{id} = $util->html_encode($req->{'rowid'}); - $context{serialno} = $util->html_encode($req->{'serialno'}); - $context{subject_dn} = $util->html_encode(Encode::decode('UTF-8', $req->{'subject_dn'})); - if ($req->{'serialno'} eq "unavailable") { - $context{output} = ""; - } else { - $context{output} = "-----BEGIN CERTIFICATE-----\n".$util->breakline($util->html_encode($req->{'output'}), 40)."\n-----END CERTIFICATE-----"; - } - my $result = $parser->execute_file_with_context("ee/request/getcert.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/request/importcert.cgi b/base/ra/forms/ee/request/importcert.cgi deleted file mode 100755 index fdc309746..000000000 --- a/base/ra/forms/ee/request/importcert.cgi +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use PKI::Service::Op; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; -use Template::Velocity; -use MIME::Base64; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $id = $util->get_alphanum_val($q->param('id')); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $req = $queue->read_request($id); - $queue->close(); - - my %context; -# $::symbol{id} = $req->{'rowid'}; -# $::symbol{status} = $req->{'status'}; - -# my $result = $parser->execute_file("ee/request/status.vm"); - - my $cert = MIME::Base64::decode($req->{'output'}); - - print "Content-Type: application/x-x509-user-cert\n\n"; - print $cert; -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/request/index.cgi b/base/ra/forms/ee/request/index.cgi deleted file mode 100755 index ef2a68b23..000000000 --- a/base/ra/forms/ee/request/index.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/request/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/request/status.cgi b/base/ra/forms/ee/request/status.cgi deleted file mode 100755 index 6a3154716..000000000 --- a/base/ra/forms/ee/request/status.cgi +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use PKI::Service::Op; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; -use Template::Velocity; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - - my $util = PKI::Base::Util->new(); - - my $id = $util->get_alphanum_val($q->param('id')); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $req = $queue->read_request($id); - $queue->close(); - if ($req == "") { - print $q->redirect("/ee/error.cgi?error=request%20not%20found"); - return; - } - - my %context; - $context{id} = $util->html_encode($req->{'rowid'}); - $context{type} =$util->html_encode($req->{'type'}); - $context{status} = $util->html_encode($req->{'status'}); - $context{serialno} = $util->html_encode($req->{'serialno'}); - $context{errorString} = $util->html_encode($req->{'errorString'}); - - my $result = $parser->execute_file_with_context("ee/request/status.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/scep/enroll.cgi b/base/ra/forms/ee/scep/enroll.cgi deleted file mode 100755 index 53291636a..000000000 --- a/base/ra/forms/ee/scep/enroll.cgi +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use MIME::Base64; -use URI::URL; -use URI::Escape; -use XML::Simple; -use CGI; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Conn::CA; -use PKI::Base::PinStore; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $client_id = $util->get_val($q->param('client_id')); - my $site_id = $util->get_val($q->param('site_id')); - my $pin = $util->get_alphanum_val($q->param('pin')); - my $csr = $util->get_val($q->param('csr')); - - my $key = $client_id . "/" . $site_id; - - my $pin_store = PKI::Base::PinStore->new(); - $pin_store->open($cfg); - my $pinref = $pin_store->read_pin($key); - if (defined($pinref) && $pinref->{'pin'} eq $pin) { - $pin_store->delete($key); - } else { - $pin_store->close(); - # error, redirect user back to the original enrollment page - print $q->redirect("/ee/scep/installer.cgi"); - return; - } - $pin_store->close(); - - my $profile_id = $cfg->get("request.scep.profileId"); - my $cert_request_type = $cfg->get("request.scep.reqType"); - - my $ca = PKI::Conn::CA->new(); - $ca->open($cfg); - my $cert = $ca->enroll($pinref->{'rid'}, "ca1", $profile_id, $cert_request_type, $csr); - $ca->close(); - my $decoded = decode_base64($cert); - my $encoded = encode_base64($decoded); - - my %context; - $context{cert} = $encoded; - - my $result = $parser->execute_file_with_context("ee/scep/enroll.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/scep/index.cgi b/base/ra/forms/ee/scep/index.cgi deleted file mode 100755 index c73fc379a..000000000 --- a/base/ra/forms/ee/scep/index.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/scep/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/scep/installer.cgi b/base/ra/forms/ee/scep/installer.cgi deleted file mode 100755 index 8453c2cc4..000000000 --- a/base/ra/forms/ee/scep/installer.cgi +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my %context; - $context{machine} = $cfg->get("service.machineName"); - $context{port} = $cfg->get("service.unsecurePort"); - - my $result = $parser->execute_file_with_context("ee/scep/installer.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/scep/manager.cgi b/base/ra/forms/ee/scep/manager.cgi deleted file mode 100755 index 8b547a928..000000000 --- a/base/ra/forms/ee/scep/manager.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/scep/manager.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/scep/pkiclient.cgi b/base/ra/forms/ee/scep/pkiclient.cgi deleted file mode 100755 index a54558f37..000000000 --- a/base/ra/forms/ee/scep/pkiclient.cgi +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use MIME::Base64; -use URI::URL; -use URI::Escape; -use XML::Simple; -use CGI; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Conn::CA; -use PKI::Base::PinStore; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $operation = $util->get_alphanum_val($q->param('operation')); - my $message = $util->get_val($q->param('message')); - $message = uri_escape($message); - - my $ca = PKI::Conn::CA->new(); - $ca->open($cfg); - if ($operation eq "GetCACert") { - my $content = $ca->scep_get_ca_cert("ca1", $operation, $message); - - print "Content-Type: application/x-x509-ca-cert\n\n"; - print $content; - } elsif ($operation eq "PKIOperation") { - my $decoded = $ca->scep_decode("ca1", $operation, $message); - $decoded =~ /(\.*\<\/XMLResponse\>)/; - $decoded = $1; - my $parser = XML::Simple->new(); - my $response = $parser->XMLin($decoded); - - # one time pin - my $pin = $response->{'PKCS10'}->{'ChallengePassword'}->{'Password'} ; - # IP Address - my $key = $ENV{'REMOTE_ADDR'}; - - # check PIN - if (1) { - my $pin_store = PKI::Base::PinStore->new(); - $pin_store->open($cfg); - my $pinref = $pin_store->read_pin($key); - if (defined($pinref) && $pinref->{'pin'} eq $pin) { - $pin_store->delete($key); - } else { - $pin_store->close(); - # XXX - return SCEP error - print $q->redirect("/ee/scep/installer.cgi"); - return; - } - $pin_store->close(); - } - - my $content = $ca->scep_pki_message("ca1", $operation, $message); - - print "Content-Type: application/x-pki-message\n\n"; - print $content; - } - $ca->close(); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/scep/submit.cgi b/base/ra/forms/ee/scep/submit.cgi deleted file mode 100755 index b3dfd7a5d..000000000 --- a/base/ra/forms/ee/scep/submit.cgi +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use DBI; -use CGI; -use PKI::Service::Op; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $client_id = $util->get_val($q->param('client_id')); - my $site_id = $util->get_val($q->param('site_id')); - my $email = $util->get_val($q->param('email')); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $request_id = $queue->create_request("scep", - "client_id=" . $client_id . ";" . - "site_id=" . $site_id, - "0", - $email); - my %context; - $context{request_id} = $util->html_encode($request_id); - $self->debug_log($cfg, "request $request_id created"); - $queue->close(); - - my $result = $parser->execute_file_with_context("ee/scep/submit.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/server/admin.cgi b/base/ra/forms/ee/server/admin.cgi deleted file mode 100755 index 18945da02..000000000 --- a/base/ra/forms/ee/server/admin.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/server/admin.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/server/index.cgi b/base/ra/forms/ee/server/index.cgi deleted file mode 100755 index 830409a8b..000000000 --- a/base/ra/forms/ee/server/index.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/server/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/server/submit.cgi b/base/ra/forms/ee/server/submit.cgi deleted file mode 100755 index 4916033ee..000000000 --- a/base/ra/forms/ee/server/submit.cgi +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Request::Queue; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $util = PKI::Base::Util->new(); - - my $server_id = $util->get_val($q->param('server_id')); - my $site_id = $util->get_val($q->param('site_id')); - my $email = $util->get_val($q->param('email')); - my $csr = $util->get_val($q->param('csr')); - - $csr = $util->normalize_csr($csr); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $request_id = $queue->create_request("server", - "server_id=" . $server_id . ";" . - "site_id=" . $site_id . ";" . - "csr=" . $csr, - "0", - $email); - my %context; - $context{request_id} = $util->html_encode($request_id); - $self->debug_log($cfg, "request $request_id created"); - $queue->close(); - - my $result = $parser->execute_file_with_context("ee/server/submit.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/user/index.cgi b/base/ra/forms/ee/user/index.cgi deleted file mode 100755 index ef6b3aa47..000000000 --- a/base/ra/forms/ee/user/index.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/user/index.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/user/renew.cgi b/base/ra/forms/ee/user/renew.cgi deleted file mode 100755 index 63d646ec9..000000000 --- a/base/ra/forms/ee/user/renew.cgi +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Base::Conf; -use PKI::Request::Queue; -use Template::Velocity; -use PKI::Service::Op; -use PKI::Base::Util; -use PKI::Base::Registry; - -use vars qw (@ISA); -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my $util = PKI::Base::Util->new(); - my $error = ""; - - my $host = $cfg->get("service.machineName"); - my $port = $cfg->get("service.non_clientauth_securePort"); - - $self->debug_params($cfg, $q); - - my $cert = $self->get_cert_record($cfg); - $self->debug_log( $cfg, "after get_cert_record"); - if (!defined($cert) || ($cert eq "")) { - $self->debug_log( $cfg, "cert not defined"); - $error = "certificate not found in database"; - print $q->redirect("/ee/error.cgi?error=$error"); - return; - } - $self->debug_log( $cfg, "got cert"); - - my $csr = $cert->{'csr'}; - if ($csr eq "") { - $error = "csr not found in database"; - print $q->redirect("/ee/error.cgi?error=$error"); - return; - } - $self->debug_log( $cfg, "got csr"); - - my $req_id = $cert->{'rid'}; - if ($req_id eq "") { - $error = "reqid not found in database"; - print $q->redirect("/ee/error.cgi?error=$error"); - return; - } - $self->debug_log( $cfg, "got req_id = $req_id"); - $self->debug_log( $cfg, "before renewl read/create request"); - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $o_req = $queue->read_request($req_id); - if ($o_req eq "") { - $self->debug_log( $cfg, "got null o_req"); - print $q->redirect("/ee/error.cgi?error=$error"); - return; - } - - my $uid = ""; - my $site_id = ""; - my $org_csr = ""; - my $csr_type = ""; - - my $data = $o_req->{'data'}; - foreach $nv (split(/;/, $data)) { - my ($n, $v) = split(/=/, $nv); - if ($n eq "uid") { - $uid = $v; - } - if ($n eq "site_id") { - $site_id = $v; - } - if ($n eq "csr") { - $org_csr = $v; - } - if ($n eq "csr_type") { - $csr_type = $v; - } - } - - my $new_request = $queue->create_request("renewal", - "uid=" . $uid . ";" . - "site_id=" . $site_id . ";" . - "csr_type=" . $csr_type . ";" . - "csr=" . $csr, - "orig_reqid=" . $o_req->{'rowid'}, - $o_req->{'created_by'}); - - #self-renewal is created and processed by the same user - $ref = $queue->approve_request($new_request, $o_req->{'created_by'}); - my $nreq = $queue->read_request($new_request); - $error = $nreq->{'errorString'}; - if ($error ne "0") { - $self->debug_log( $cfg, "after approve request, got error=$error"); - print $q->redirect("/ee/error.cgi?error=$error"); - return; - } - - my %context; - $context{request_id} = $util->html_encode($new_request); - $self->debug_log($cfg, "request $new_request created"); - $queue->close(); - $self->debug_log( $cfg, "after renewl read/create request $new_request"); - - $context{data} = $util->breakline($util->html_encode($ref->{'data'}), 40); - $context{output} = $util->breakline($util->html_encode($ref->{'output'}), 40); - $context{serialno} = $util->html_encode($ref->{'serialno'}); - $context{host} = $util->html_encode($host); - $context{port} = $util->html_encode($port); - - #print $q->redirect("/ee/request/getcert.cgi?id=$new_request"); - my $result = $parser->execute_file_with_context("ee/user/renew.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/user/renewal.cgi b/base/ra/forms/ee/user/renewal.cgi deleted file mode 100755 index 63a211eff..000000000 --- a/base/ra/forms/ee/user/renewal.cgi +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Registry; - -use vars qw (@ISA); -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $host = $cfg->get("service.machineName"); - my $port = $cfg->get("service.securePort"); - - my %context; - $context{url} = "https://$host:$port/ee/user/renew.cgi"; - my $result = $parser->execute_file_with_context("ee/user/renewal.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/user/submit.cgi b/base/ra/forms/ee/user/submit.cgi deleted file mode 100755 index 26c900e00..000000000 --- a/base/ra/forms/ee/user/submit.cgi +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use Benchmark; -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Util; -use PKI::Base::Registry; -use PKI::Request::Queue; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $st = new Benchmark; - - my $util = PKI::Base::Util->new(); - - my $userid = $util->get_val($q->param('uid')); - my $fullname = $util->get_val($q->param('cn')); - my $site_id = $util->get_val($q->param('site_id')); - my $email = $util->get_val($q->param('email')); - my $csr_type = $util->get_alphanum_val($q->param('csr_type')); - my $csr = $util->get_val($q->param('csr')); - - $csr = $util->normalize_csr($csr); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - my $db_st = new Benchmark; - my $queue = PKI::Request::Queue->new(); - $queue->open($cfg); - my $request_id = $queue->create_request("user", - "uid=" . $userid . ";" . - "cn=" . $fullname . ";" . - "site_id=" . $site_id . ";" . - "csr_type=" . $csr_type . ";" . - "csr=" . $csr, - "0", - $email); - my %context; - $context{request_id} = $util->html_encode($request_id); - $self->debug_log($cfg, "request $request_id created"); - $queue->close(); - my $db_et = new Benchmark; - - my $t_st = new Benchmark; - my $result = $parser->execute_file_with_context("ee/user/submit.vm", - \%context); - my $t_et = new Benchmark; - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } - - my $et = new Benchmark; - $self->debug_log($cfg, "benchmark " . - "total=" . timestr(timediff($et, $st)) . " " . - "db total=" . timestr(timediff($db_et, $db_st)) . " " . - "template total=" . timestr(timediff($t_et, $t_st)) . " " - ); -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/ee/user/user.cgi b/base/ra/forms/ee/user/user.cgi deleted file mode 100755 index 2d58a532b..000000000 --- a/base/ra/forms/ee/user/user.cgi +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - my %context; - my $result = $parser->execute_file_with_context("ee/user/user.vm", - \%context); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%context); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - -my $op = op->new(); -$op->execute(); diff --git a/base/ra/forms/index.cgi b/base/ra/forms/index.cgi deleted file mode 100755 index 0e643166b..000000000 --- a/base/ra/forms/index.cgi +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - $::symbol{machineName} = $cfg->get("service.machineName"); - $::symbol{non_clientauth_securePort} = $cfg->get("service.non_clientauth_securePort"); - $::symbol{securePort} = $cfg->get("service.securePort"); - $::symbol{unsecurePort} = $cfg->get("service.unsecurePort"); - - my $result = $parser->execute_file("index.vm"); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%::symbol); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - - -my $op = op->new(); -$op->execute(); diff --git a/dogtag/ra-ui/shared/docroot/404.html b/dogtag/ra-ui/shared/docroot/404.html deleted file mode 100755 index 39997a669..000000000 --- a/dogtag/ra-ui/shared/docroot/404.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -RA 404 Error! - - - - - - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - -Certificate System RA Error Page -
    -

    - -

    - -

    - - - - diff --git a/dogtag/ra-ui/shared/docroot/500.html b/dogtag/ra-ui/shared/docroot/500.html deleted file mode 100755 index 2d560a684..000000000 --- a/dogtag/ra-ui/shared/docroot/500.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - -RA 500 Error! - - - - - - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - -Certificate System RA Error Page -
    -

    - -

    - -

    - - - - diff --git a/dogtag/ra-ui/shared/docroot/admin/group/add_new.vm b/dogtag/ra-ui/shared/docroot/admin/group/add_new.vm deleted file mode 100644 index e9fac77b8..000000000 --- a/dogtag/ra-ui/shared/docroot/admin/group/add_new.vm +++ /dev/null @@ -1,83 +0,0 @@ - - - - -Add New Group - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Administrator Interface -
    -

    -#if ($error == 'exist') -Group already exists -

    -#end -

    -
    - - - - - - - - - -
    GID
    Name
    -
    -Add Group -
    -

    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/admin/group/index.vm b/dogtag/ra-ui/shared/docroot/admin/group/index.vm deleted file mode 100644 index d19cacd2d..000000000 --- a/dogtag/ra-ui/shared/docroot/admin/group/index.vm +++ /dev/null @@ -1,81 +0,0 @@ - - - - -RA Admin - - - - - - - -#include ( "header.vm" ) - -

    - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Administrator Interface -
    -

    -Add New Group -

    -

    - - - - - -#foreach($r in $rows) - - - - -#end -
    GIDName
    $r.getGID()$r.getName()
    -
    -

    -Previous | Next -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/admin/group/read.vm b/dogtag/ra-ui/shared/docroot/admin/group/read.vm deleted file mode 100644 index 9aa8c8e1f..000000000 --- a/dogtag/ra-ui/shared/docroot/admin/group/read.vm +++ /dev/null @@ -1,104 +0,0 @@ - - - - -Groups - - - - - - - -#include ( "header.vm" ) - -

    - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Administrator Interface -
    -

    -

    - - - - - - - - - -
    GID$gid
    Name$name
    -
    -

    -Delete This Group -

    ------------------------------------------------ -
    -Members -

    - -#foreach($r in $members) - - - -#end -
    $r.getUID() [Delete]
    -
    -
    ------------------------------------------------ -
    -#if ($non_member_exists) -New Member -
    - - Add -
    -#end -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/admin/index.vm b/dogtag/ra-ui/shared/docroot/admin/index.vm deleted file mode 100644 index c6add6e6a..000000000 --- a/dogtag/ra-ui/shared/docroot/admin/index.vm +++ /dev/null @@ -1,95 +0,0 @@ - - - - -RA Admin - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -RA Admin Services -
    -

    -

    - - - - - - - - - - - - - -
    - -
  • List Users
  • -
    -
    - -
  • Add New User
  • -
    -
    - -
  • List Groups
  • -
    -
    - -
  • Add New Group
  • -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/admin/user/add_new.vm b/dogtag/ra-ui/shared/docroot/admin/user/add_new.vm deleted file mode 100644 index 4d90d4840..000000000 --- a/dogtag/ra-ui/shared/docroot/admin/user/add_new.vm +++ /dev/null @@ -1,95 +0,0 @@ - - - - -Add New User - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Administrator Interface -
    -

    -#if ($error == 'exist') -User already exists -

    -#end -#if ($error == 'cert_header') -Invalid Certificate header -

    -#end -

    -
    - - - - - - - - - - - - - - - - - -
    UID
    Name
    Email
    Certificate
    -
    -Add User -
    -

    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/admin/user/index.vm b/dogtag/ra-ui/shared/docroot/admin/user/index.vm deleted file mode 100644 index 7262561f6..000000000 --- a/dogtag/ra-ui/shared/docroot/admin/user/index.vm +++ /dev/null @@ -1,83 +0,0 @@ - - - - -RA Admin - - - - - - - -#include ( "header.vm" ) - -

    - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Administrator Interface -
    -

    -Add New User -

    -

    - - - - - - -#foreach($r in $rows) - - - - - -#end -
    UIDNameEmail
    $r.getUID()$r.getName()$r.getEmail()
    -
    -

    -Previous | Next -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/admin/user/read.vm b/dogtag/ra-ui/shared/docroot/admin/user/read.vm deleted file mode 100644 index 354d9881f..000000000 --- a/dogtag/ra-ui/shared/docroot/admin/user/read.vm +++ /dev/null @@ -1,88 +0,0 @@ - - - - -Users - - - - - - - -#include ( "header.vm" ) - -

    - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Administrator Interface -
    -

    - -

    -

    - - - - - - - - - - - - - - - - - -
    UID$userid
    Name$name
    Email$email
    Certificate$certificate
    -
    -

    -[Delete] -

    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/cert/index.vm b/dogtag/ra-ui/shared/docroot/agent/cert/index.vm deleted file mode 100644 index f9229b0f9..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/cert/index.vm +++ /dev/null @@ -1,86 +0,0 @@ - - - - -RA Agent - - - - - - - -#include ( "header.vm" ) - -

    - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Agent Interface -
    List Certificates Approved by: $uid -

    -

    -

    - - - - - - - - -#foreach($r in $rows) - - - - - - - -#end -
    Serial#Request IDSubject DNApproved ByCreated At
    $r.getSerialno()$r.getReqId()$r.getSubjectDN()$r.getApprovedBy()$r.getCreatedAt()
    -
    -

    -Previous | Next -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/cert/read.vm b/dogtag/ra-ui/shared/docroot/agent/cert/read.vm deleted file mode 100644 index 43c78ffa4..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/cert/read.vm +++ /dev/null @@ -1,96 +0,0 @@ - - - - -Certificates - - - - - - - -#include ( "header.vm" ) - -

    - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Agent Interface -
    Certificate Information -

    -

    - -

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Serial Number$serialno
    Subject DN$subject_dn
    Certificate$certificate
    Approved By$approved_by
    Created At$created_at
    Revocation Status$certStatus
    -
    -
    -Revoke -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/cert/revoke.vm b/dogtag/ra-ui/shared/docroot/agent/cert/revoke.vm deleted file mode 100644 index 626bbed42..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/cert/revoke.vm +++ /dev/null @@ -1,111 +0,0 @@ - - - - -Certificate Revocation - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Agent Interface -
    Revoking Certificate: -

    -

    - -

    - - - - - - - - - -
    Serial Number:$serialno
    Subject DN:$subject_dn
    -
    -Select A Reason: -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Unspecified
    Key compromised
    CA key compromised
    Affiliation changed
    Certificate superseded
    Cessation of operation
    Certificate is on hold
    -
    -
    -Submit -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/cert/submit.vm b/dogtag/ra-ui/shared/docroot/agent/cert/submit.vm deleted file mode 100644 index 730228715..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/cert/submit.vm +++ /dev/null @@ -1,91 +0,0 @@ - - - - -Certificate Revocation Submission - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Agent Interface -
    Revocation of Certificate: -

    -

    - -

    - - - - - - - - - - - -#if ($errorString == "0") - -#else - -#end - - - - - -
    Serial Number:$serialno
    Subject DN:$subject_dn
    Result:RevokedFailed: $errorString
    Request ID:$rid
    -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/error.vm b/dogtag/ra-ui/shared/docroot/agent/error.vm deleted file mode 100644 index dbe65cb58..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/error.vm +++ /dev/null @@ -1,72 +0,0 @@ - - - - -RA Agent Error! - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -Agent Interface -
    -

    - -

    -

    -You are not authorized to access the requested page. -
    -#if ($has_error) - Error: $error -#end -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/index.vm b/dogtag/ra-ui/shared/docroot/agent/index.vm deleted file mode 100644 index 5bd952ba2..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/index.vm +++ /dev/null @@ -1,81 +0,0 @@ - - - - -RA Agent - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -RA Agent Services -
    -

    -

    - - - - - - - -
    - -
  • List Requests
  • -
    -
    - -
  • List Certificates
  • -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/request/index.vm b/dogtag/ra-ui/shared/docroot/agent/request/index.vm deleted file mode 100644 index dd9901fdb..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/request/index.vm +++ /dev/null @@ -1,95 +0,0 @@ - - - - -RA Agent - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Agent Interface -
    -

    -All | OPEN | APPROVED | REJECTED | FAILED -

    -

    - - - - - - - - - - -#foreach($r in $rows) - - - - - - - - - -#end -
    IdTypeStatusAssigned ToCreated ByCreated AtError
    $r.getId()$r.getType()$r.getStatus()$r.getAssignedTo()$r.getCreatedBy()$r.getCreatedAt()$r.getError()
    -
    -

    -Total: $total -
    -
    -Previous | -Next -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/request/op.vm b/dogtag/ra-ui/shared/docroot/agent/request/op.vm deleted file mode 100644 index d5bc2dfe4..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/request/op.vm +++ /dev/null @@ -1,127 +0,0 @@ - - - - -Certificate Request Operations - - - - - - - -#include ( "header.vm" ) - -

    - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Agent Interface -
    -

    -All | OPEN | APPROVED | REJECTED | FAILED -

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Request Id$id
    Type$type
    Data$data
    Output$output
    Serial Number$serialno
    Status$status
    Error$errorString
    Assigned To$assigned_to
    Created By$created_by
    Updated At$updated_at
    Processed By$processed_by
    Created At$created_at
    IP$ip
    Note$note
    -
    - -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/agent/request/read.vm b/dogtag/ra-ui/shared/docroot/agent/request/read.vm deleted file mode 100644 index c583be021..000000000 --- a/dogtag/ra-ui/shared/docroot/agent/request/read.vm +++ /dev/null @@ -1,149 +0,0 @@ - - - - -Certificate Requests - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    -UID: $uid -
    - - -
    -
    - -
    - - - -Agent Interface -
    -

    -All | OPEN | APPROVED | REJECTED| FAILED -

    -

    - - - - - - - - - - - - - - - - - - - -#if ($serialno == "unavailable") - -#else - -#end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Request Id$id
    Type$type
    Data$data
    Output$output
    Serial Number$serialno$serialno
    Subject DN$subject_dn
    Meta Info$meta_info
    Status$status
    Error$errorString
    Assigned To$assigned_to
    Created By$created_by
    Updated At$updated_at
    Processed By$processed_by
    Created At$created_at
    IP$ip
    Note$note
    -
    -
    -#if ($is_open || $is_error) -Approve | Reject -
    -
    -#end -
    - - -
    -Add Note -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/agent/enroll.vm b/dogtag/ra-ui/shared/docroot/ee/agent/enroll.vm deleted file mode 100644 index 203b02696..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/agent/enroll.vm +++ /dev/null @@ -1,74 +0,0 @@ - - - - -Agent Certificate Enrollment - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : Agent Enrollment
    -Enroll Interface -

    -

    -Your Certificate: -
    -Subject DN: $subject_dn -
    -

    ------BEGIN CERTIFICATE-----
    -$cert
    ------END CERTIFICATE-----
    -
    -import certificate -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/agent/index.vm b/dogtag/ra-ui/shared/docroot/ee/agent/index.vm deleted file mode 100644 index 9fc991d6a..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/agent/index.vm +++ /dev/null @@ -1,83 +0,0 @@ - - - - -RA End-Entity - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : Agent Enrollment
    -

    -

    -For RA agent enrollment, an agent must submit a pin creation request first before performing certificate enrollment. -

    -

    - - - - - - - -
    - -
  • Pin Creation Request
  • -
    -
    - -
  • Certificate Enrollment
  • -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/agent/new.vm b/dogtag/ra-ui/shared/docroot/ee/agent/new.vm deleted file mode 100644 index bca0a37fc..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/agent/new.vm +++ /dev/null @@ -1,88 +0,0 @@ - - - - -Agent Certificate Request - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : Agent Enrollment
    -Agent Interface -

    -

    -This form is for new agent to request for agent certificate. -

    -

    -
    - - - - - - - - - - - - - - - - - -
    UID:
    Your Email:
      
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/agent/start.vm b/dogtag/ra-ui/shared/docroot/ee/agent/start.vm deleted file mode 100644 index b2b21dc1b..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/agent/start.vm +++ /dev/null @@ -1,114 +0,0 @@ - - - - -Agent Certificate Request Using a One-Time Pin - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - - - -RA Services : Agent Enrollment
    -Agent Interface -

    -

    -This form is for new RA agent to request a certificate. -

    -

    -
    - - - - - - - - - - - - - - - - - -
    UID:
    One-Time Pin:
      
    - -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/agent/submit.vm b/dogtag/ra-ui/shared/docroot/ee/agent/submit.vm deleted file mode 100644 index aaabee929..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/agent/submit.vm +++ /dev/null @@ -1,73 +0,0 @@ - - - - -Agent Certificate Request Submission - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : Agent Enrollment
    -

    -

    -Your request has been successfully submitted. -

    -

    - - - - - -
    Request ID:$request_id
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/error.vm b/dogtag/ra-ui/shared/docroot/ee/error.vm deleted file mode 100644 index 0c4e7afcb..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/error.vm +++ /dev/null @@ -1,71 +0,0 @@ - - - - -RA End-Entity Error! - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -EE Interface -
    -

    -

    -Request process error -
    -#if ($has_error) - Error: $error -#end - -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/index.vm b/dogtag/ra-ui/shared/docroot/ee/index.vm deleted file mode 100644 index 70f3443ab..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/index.vm +++ /dev/null @@ -1,102 +0,0 @@ - - - - -RA End-Entity - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA EE Services -
    -

    -

    - - - - - - - - - - - - - - - - -
    - -
  • SCEP Enrollment
  • -
    -
    - -
  • Server Enrollment
  • -
    -
    - -
  • User Enrollment
  • -
    -
    - -
  • Agent Enrollment
  • -
    -
    - -
  • Request Status Check
  • -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/request/getcert.vm b/dogtag/ra-ui/shared/docroot/ee/request/getcert.vm deleted file mode 100644 index 40387a7ef..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/request/getcert.vm +++ /dev/null @@ -1,72 +0,0 @@ - - - - -Import Certificate - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : Request Status Check -
    -Certificate Import -

    -

    -

    -Serial Number:$serialno
    -Subject DN:$subject_dn

    -Base64 Encoding:
    -

    $output
    -Import Certificate (click on the following link to import):
    -import certificate -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/request/index.vm b/dogtag/ra-ui/shared/docroot/ee/request/index.vm deleted file mode 100644 index 42dc259ac..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/request/index.vm +++ /dev/null @@ -1,67 +0,0 @@ - - - - -RA End-Entity - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : Request Status
    -

    -

    -

    -Request Id: -
    -Check -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/request/status.vm b/dogtag/ra-ui/shared/docroot/ee/request/status.vm deleted file mode 100644 index ed61cdbe4..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/request/status.vm +++ /dev/null @@ -1,91 +0,0 @@ - - - - -Certificate Request Status - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : Request Status Check -
    -Request Status -

    -

    -

    -

    - - - - - - - - - - - - - -#if ($status == "APPROVED") -#if ($serialno != "unavailable") - - - - -#end -#end -
    Request ID:$id
    Status:$status
    Error Message:$errorString
    Import Certificate:$id
    - -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/scep/enroll.vm b/dogtag/ra-ui/shared/docroot/ee/scep/enroll.vm deleted file mode 100644 index 2893eac1c..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/scep/enroll.vm +++ /dev/null @@ -1,74 +0,0 @@ - - - - -SCEP Router Enrollment - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : -SCEP Enrollment
    -Installer Interface -

    -

    -This form is for router installer to retrieve the requested certificate. -

    - Your Certificate: -
    -

    ------BEGIN CERTIFICATE-----
    -$cert
    ------END CERTIFICATE-----
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/scep/index.vm b/dogtag/ra-ui/shared/docroot/ee/scep/index.vm deleted file mode 100644 index 3d75a8d40..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/scep/index.vm +++ /dev/null @@ -1,83 +0,0 @@ - - - - -RA End-Entity - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : SCEP Enrollment
    -

    -

    -In the SCEP enrollment, a manager must firstly submit a one-time pin creation request to the RA. RA Agent will then approve and generate an one-time pin. The pin will be returned to the manager who will give the pin to a local router installer. The router installer visits the enrollment form where certificate request, one time pin and other necessary information are submitted. The system will issue the certificate immediately. -

    -

    - - - - - - - -
    - -
  • Request Submission - Manager
  • -
    -
    - -
  • SCEP Enrollment - Installer
  • -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/scep/installer.vm b/dogtag/ra-ui/shared/docroot/ee/scep/installer.vm deleted file mode 100644 index be9f969ac..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/scep/installer.vm +++ /dev/null @@ -1,73 +0,0 @@ - - - - -SCEP Router Request Using a One-Time Pin - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : -SCEP Enrollment
    -Installer Interface -

    -

    -This form is for router installer to request a certificate with the given one time pin. -

    -

    -The SCEP enrollment URL for the router is: -
    -
    -http://$machine:$port/ee/scep/pkiclient.cgi -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/scep/manager.vm b/dogtag/ra-ui/shared/docroot/ee/scep/manager.vm deleted file mode 100644 index e5b6abed5..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/scep/manager.vm +++ /dev/null @@ -1,123 +0,0 @@ - - - - -SCEP Router Manager Request for a One-Time Pin - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - - - -RA Services : -SCEP Enrollment
    -Manager Interface -

    -

    -This form is for manager to request for a one time pin so that router installer can request for a certificate. -

    - - -

    - - - - - - - - - - - - - - - - - - - - - -
    Client ID:
    Site ID (IP Address):
    Your Email:
      
    - -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/scep/submit.vm b/dogtag/ra-ui/shared/docroot/ee/scep/submit.vm deleted file mode 100644 index 6786bf936..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/scep/submit.vm +++ /dev/null @@ -1,76 +0,0 @@ - - - - -SCEP Router Request Submission - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : -SCEP Enrollment
    -Manager Interface -

    -

    -Your request has been successfully submitted. -

    -

    - - - - - -
    Request ID:$request_id
    - -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/server/admin.vm b/dogtag/ra-ui/shared/docroot/ee/server/admin.vm deleted file mode 100644 index 35af32ca8..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/server/admin.vm +++ /dev/null @@ -1,132 +0,0 @@ - - - - -Server Certificate Request - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - - -RA Services : -Server Enrollment
    -Server Administrator Interface -

    -

    -This form is for server administrator to request for a server certificate. -

    - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    Server ID:
    Site ID:
    Your Email:
    CSR:
      
    - -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/server/index.vm b/dogtag/ra-ui/shared/docroot/ee/server/index.vm deleted file mode 100644 index 04727ae41..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/server/index.vm +++ /dev/null @@ -1,76 +0,0 @@ - - - - -RA End-Entity - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : Server Enrollment
    -

    -

    -Server Administrator must use the following form to submit a request which will later be approved by a RA agent. Upon approval, the administrator will be notified by email and the server certificate can be retrieved. -

    -

    - - - - -
    - -
  • Request Submission - Administrator
  • -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/server/submit.vm b/dogtag/ra-ui/shared/docroot/ee/server/submit.vm deleted file mode 100644 index f08914583..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/server/submit.vm +++ /dev/null @@ -1,75 +0,0 @@ - - - - -Server Certificate Request Submission - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : -Server Enrollment
    -Server Administrator Interface -

    -

    -Your request has been successfully submitted. -

    -

    - - - - - -
    Request ID:$request_id
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/user/index.vm b/dogtag/ra-ui/shared/docroot/ee/user/index.vm deleted file mode 100644 index 76b06a91c..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/user/index.vm +++ /dev/null @@ -1,83 +0,0 @@ - - - - -RA End-Entity - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : User Enrollment
    -

    -

    -For user enrollment, user must access the following forms with appropriate client (i.e. browser) where key pair will be generated. -

    -

    - - - - - - - -
    - -
  • Request Submission - User
  • -
    -
    - -
  • Renewal - User
  • -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/user/renew.vm b/dogtag/ra-ui/shared/docroot/ee/user/renew.vm deleted file mode 100644 index dee119c65..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/user/renew.vm +++ /dev/null @@ -1,86 +0,0 @@ - - - - -User Certificate Renewal Notification - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : -User Enrollment
    -Renewal Interface -

    -

    -Your certificate has been successfully renewed. -

    -

    - - - - - - - - - - - - - - - - -
    Request ID:$request_id
    Data$data
    Output$output
    Serial Number$serialno
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/user/renewal.vm b/dogtag/ra-ui/shared/docroot/ee/user/renewal.vm deleted file mode 100644 index 1e2b438a1..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/user/renewal.vm +++ /dev/null @@ -1,73 +0,0 @@ - - - - -User Certificate Renewal - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : -User Enrollment
    -User Renewal Interface -

    -

    -This form is for end user to renew his/her certificates.
    -At popup, please select the user certificate to renew. -

    -

    -
    - -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/user/submit.vm b/dogtag/ra-ui/shared/docroot/ee/user/submit.vm deleted file mode 100644 index 6c7a0cd44..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/user/submit.vm +++ /dev/null @@ -1,75 +0,0 @@ - - - - -User Certificate Request Submission - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -RA Services : -User Enrollment
    -Manager Interface -

    -

    -Your request has been successfully submitted. -

    -

    - - - - - -
    Request ID:$request_id
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ee/user/user.vm b/dogtag/ra-ui/shared/docroot/ee/user/user.vm deleted file mode 100644 index 04763d7cf..000000000 --- a/dogtag/ra-ui/shared/docroot/ee/user/user.vm +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - - - - -User Certificate Request - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - - - -RA Services : -User Enrollment
    -User Interface -

    -

    -This form is for user to request for an end-user certificate. -

    - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    UID:
    Full Name:
    Site ID:
    Your Email:
      
    - -
    -
    - - - -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/footer.vm b/dogtag/ra-ui/shared/docroot/footer.vm deleted file mode 100644 index a596e45b1..000000000 --- a/dogtag/ra-ui/shared/docroot/footer.vm +++ /dev/null @@ -1,19 +0,0 @@ - - diff --git a/dogtag/ra-ui/shared/docroot/header.vm b/dogtag/ra-ui/shared/docroot/header.vm deleted file mode 100644 index 3824b87f3..000000000 --- a/dogtag/ra-ui/shared/docroot/header.vm +++ /dev/null @@ -1,26 +0,0 @@ - - diff --git a/dogtag/ra-ui/shared/docroot/index.vm b/dogtag/ra-ui/shared/docroot/index.vm deleted file mode 100644 index f17efb658..000000000 --- a/dogtag/ra-ui/shared/docroot/index.vm +++ /dev/null @@ -1,90 +0,0 @@ - - - - -RA Services - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -Certificate System RA Services Page -
    -

    - -

    -

    - - - - - - - - - - -
    - -
  • SSL End Users Services
  • -
    -
    - -
  • Agent Services
  • -
    -
    - -
  • Administrator Services
  • -
    -
    -
    -#include ( "footer.vm" ) - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/adminauthenticatepanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/adminauthenticatepanel.vm deleted file mode 100644 index b27042cfb..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/adminauthenticatepanel.vm +++ /dev/null @@ -1,52 +0,0 @@ - - - -

    Authentication

    -

    -The uid and password are used to authenticate to the master subsystem. These are the administrator's credential information for the master subsystem. -#if ($systemType != "tps") -
    -If authentication is successful, a cloned subsystem will retrieve the configuration information from the master one. -#end -
    -#if ($errorString != "") - $errorString -#end - - - - - - - - - - - -
    Uid:
    Password:
    -

    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/adminpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/adminpanel.vm deleted file mode 100644 index 3c32c4901..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/adminpanel.vm +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - -The administrator is a privileged user who manages this subsystem. Please enter the following relevant information, and a certificate request will be automatically generated and submitted. An administrator's entry will be created in the internal database and an administrator's certificate will be imported into this browser automatically in the next panel. -
    -#if ($errorString != "") - $errorString -#end -
    -
    - - - - -#if ($clone != 'clone') - -#else - -#end - - - -#if ($clone != 'clone') - -#else - -#end - - - -#if ($clone != 'clone') - -#else - -#end - - - -#if ($clone != 'clone') - -#else - -#end - - - - -#if ($clone != 'clone') - -#else - -#end - - - - - - - - - - -
    UID:
    Name:
    Email:
    Password:
    Password (Again):
    -

    -
    -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/agentauthenticatepanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/agentauthenticatepanel.vm deleted file mode 100644 index abb7678ae..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/agentauthenticatepanel.vm +++ /dev/null @@ -1,48 +0,0 @@ - - - -

    Authentication

    -
    -The uid and password are used to authenticate to the CA from which this subsystem's certificates are issued. Enter the uid and password of the Certificate Manager Agent who will approve the certificate requests. -
    -#if ($errorString != "") - $errorString -#end - - - - - - - - - - - -
    Uid:
    Password:
    -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/authdbpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/authdbpanel.vm deleted file mode 100644 index f2e0697e7..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/authdbpanel.vm +++ /dev/null @@ -1,66 +0,0 @@ - - - - Please provide information about the LDAP server that will be used to authenticate the identity of end users. [Details] - - -

    -#if ($errorString != "") - $errorString -#end -

    - - - - - - - - - - - - - - - - -
    Host:
    Port:
    Base DN:
    - -

    -
    -   -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/cainfopanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/cainfopanel.vm deleted file mode 100644 index 933861a93..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/cainfopanel.vm +++ /dev/null @@ -1,55 +0,0 @@ - - - -A Certificate Authority (CA) is responsible for issuing different kinds of certificates. Select an HTTPS EE URL of a CA from the list below. -

    -#if ($errorString != "") - $errorString -#end -

    - - - - - -
    URL: -
    - - -

    -
    -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certchainpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certchainpanel.vm deleted file mode 100644 index 08bcc1331..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certchainpanel.vm +++ /dev/null @@ -1,49 +0,0 @@ - - - -Pretty Print of Certificates on this subsystem. -

    -#foreach ($item in $ppcerts) -

    $item.getDN()

    - - - - - - - - -
    Certificate: $item.getNickname()
    -#end - -
    - -
    -
    -   -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certprettyprintpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certprettyprintpanel.vm deleted file mode 100644 index ac8da10ee..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certprettyprintpanel.vm +++ /dev/null @@ -1,49 +0,0 @@ - - - -The following certificates were installed on this instance. -

    -#foreach ($item in $ppcerts) -

    $item.getDN()

    - - - - - - - - -
    Certificate: $item.getNickname()
    -#end - -
    - -
    -
    -   -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certrequestpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certrequestpanel.vm deleted file mode 100644 index f1327db47..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/certrequestpanel.vm +++ /dev/null @@ -1,225 +0,0 @@ - - - - -A certificate signing request (CSR) contains a public key and is an unsigned copy of the certificate. -

    -If a given CSR has been successfully signed by a CA, then the certificate will be designated below by a certificate icon labeled Certificate Generated Successfully. -

    -However, if a given CSR contains an action required label under its certificate icon, then those requests must be manually submitted to a CA for certificate generation. -

    -Press the [Apply] button after certificates and chains are pasted in. -

    -Press the [Next] button once all certificates have been generated successfully. -

    -#foreach ($item in $reqscerts) -

    $item.getDN()

    - - - - - - - - - -#if ($item.getCert() == "...paste certificate here...") - -#else - #if ($item.getCert() == "...certificate be generated internally...") - - #else - #if ($item.getCert() == "") - - #else - - #end - #end -#end - - - -
     action required
    -
    -
    - certificate will be generated internally -
    -
    - No Certificate Generated. Please import.
    -
    -
    - Certificate Generated Successfully -
    - - -#if ($item.getCert() == "...paste certificate here...") - Step 1: Copy the Certificate Request (CSR) to enroll at an external CA

    - Step 2: Import the PKCS #7 Certificate Chain (optional if the certificate already contains the chain)

    - Step 3: Paste in the Base64-encoded Certificate after enrollment at an external CA (NOTE: this text box does not accept PKCS #7 certificate chains)

    -#else - #if ($item.getCert() == "...certificate be generated internally...") -

    - #else - View Certificate Request (CSR)

    - View Certificate in Base64-Encoding

    - View Certificate Pretty Print

    - #end -#end - - -

    - -
    -
    X
    - - - - - - - -
    $item.getCert()
    -
    - -
    -
    X
    - - - - - - - -
    -
    - -
    -
    X
    - - - - - - - -
    -
    - - -#end - -

    - - -

    -
    -   -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_addhsm.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_addhsm.vm deleted file mode 100644 index 839cff56a..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_addhsm.vm +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - Dogtag Certificate System - - - - - - - -
    - - - - - - -
    - - - - -
    -

    - Security Modules

    -Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. -

    -

    Registering a New Security Module

    -
    -

    -If the desired security module is not listed, it is possible that this security module's PKCS #11 library was not registered with the system. Please register a new security module here. - - - - - - - - -
    -Library Path: -
    -Module Name: -
    -

    - - - - -
    - -
    -

    -
    - -
    -
    - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_db.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_db.vm deleted file mode 100644 index 10e1cd2dc..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_db.vm +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - Dogtag Certificate System - - - - - - - - - -
    -#include ( "admin/console/config/header.vm" ) - - - - - -
    - - - - -
    -

    - Internal Database

    - -
    - Internal Database Connection

    This option allows sharing an internal database to improve managability.

    -#if ($errorString != "") - $errorString -#end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Host:
    Port:
    Base DN:
    Database:
    Bind DN:
    Bind Password:
    - -

    -
    -   -
    - - -

    - - - - -
    - -
    - -

    - -
    - -
    -
    - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_hsm.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_hsm.vm deleted file mode 100644 index 8812c5b36..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_hsm.vm +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - Dogtag Certificate System - - - - - - - -
    - - - - - - -
    - - - - -
    -

    - Security Modules

    - -
    - -Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. Please make sure that at least one security module is listed below. -

    -

    Supported Security Modules

    - - - - - - - -#foreach ($module in $sms) - - - - - - -#foreach ($token in $module.getTokens()) - - - - - - -#end -#end - -
    Module/TokenStatusDefaultOperations

    $module.getUserFriendlyName()
    - #if ($module.isFound()) - Found - #else - Not Found - #end -
    - $token.getNickName() - #if ($token.isLoggedIn()) - Logged In - #else - Not logged In - #end - - #if ($defTok == $token.getNickName()) - - #else - - #end -
    -

    Other Security Modules

    -

    The security modules listed below are modules found by the server but not recognized as one of the supported modules. If the user believes that any listed modules below should have been supported, please check the "CS.cfg" configuration file to see if there is a name mismatch and adjust this accordingly.

    - - - - - - - -#foreach ($module in $oms) - - - - - - -#foreach ($token in $module.getTokens()) - - - - - - -#end -#end - -
    Module/TokenStatusDefaultOperations
    $module.getUserFriendlyName() - #if ($module.isFound()) - Found - #else - Not Found - #end -
    - $token.getNickName() - #if ($token.isLoggedIn()) - Logged In - #else - Not logged In - #end - - #if ($defTok == $token.getNickName()) - - #else - - #end -
    - -
    -

    - - - - -
    - -
    - - - - - -

    -
    - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_hsmloginpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_hsmloginpanel.vm deleted file mode 100644 index 46d8ae0ea..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_hsmloginpanel.vm +++ /dev/null @@ -1,83 +0,0 @@ - - - -

    - Security Modules Login Panel

    -Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. -

    -

    Security Token Login

    -
    -

    -The user has chosen to login to the following security module: $SecToken -

    -#if ($status == "alreadyLoggedIn") - Token already logged in. -#else - #if ($status == "tokenPasswordNotInitialized") - Token password not initialized. - #else - #if ($status == "justLoggedIn") - Token logged in successfully. - #else - - - - - - - - -
    -Security Module Token Name: -
    -Security Module Token Password: -
    -

    - #end - #end -#end - - - - - -
    - -
    - - - - -

    - -

    -
    -   -
    - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_join.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_join.vm deleted file mode 100644 index d5adb78f3..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_join.vm +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - Dogtag Certificate System - - - - - - - - - -
    - -#include ( "admin/console/config/header.vm" ) - - - - - -
    - - - - -
    -

    - Join the PKI Network

    - -To join this PKI network, the setup wizard needs to submit the certificate request to a Root or another subordinate CA for signing. -

    - - -Manually submit this request to a CA. -

    - - - - - - - - - - -
    Certificate Request to a CA:Certificate Chain From a CA:
    - - - -
    -

    -Automatically submit the request to a Dogtag Certificate Authority -
    - - - - - - - - - - - - - - -
    URL:
    UID:
    Password:
    -

    - -

    -
    -
    - - - -

    - - - - -
    - -
    -

    - -
    -
    - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_rootca.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_rootca.vm deleted file mode 100644 index 4cf5ea946..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/config_rootca.vm +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - Dogtag Certificate System - - - - - - - - - -
    - -#include ( "admin/console/config/header.vm" ) - - - - - -
    - - - - -
    -

    - Root CA

    - -A Root CA provides a set of predefined signing capabilities. Please select the capabilities that this CA needs to provide. -

    - -

    - -

    CA Certificate Profile

    - -

    - - - - - - -
    Profile: -
    -

    - -

    -
    -   -
    - -
    - -

    - - - - -
    - -
    - - -

    - -
    -
    - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/createsubsystempanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/createsubsystempanel.vm deleted file mode 100644 index feee8962f..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/createsubsystempanel.vm +++ /dev/null @@ -1,95 +0,0 @@ - - - -

    Subsystem Configuration

    -

    -This instance can be configured as a new $systemname subsystem. -
    -#if ($errorString != "") - $errorString -#end -
    - Configure this Instance as a New $systemname Subsystem -
    - - - - - - - - - - - - - - - - - -
    Subsystem Name: (e.g. - $fullsystemname)
    Subsystem HTTP URL (unsecure): http://$machineName:$http_port
    Subsystem HTTPS URL (clientauth): https://$machineName:$https_port
    Subsystem HTTPS URL (non-clientauth): https://$machineName:$non_clientauth_https_port
    -

    -#if ($disableClone) - Clone an Existing $systemname Subsystem -#else - Clone an Existing $systemname Subsystem -#end -
    - - - -#if ($disableClone) - -#else - -#end - - - -#if ($disableClone) - - -
    Subsystem Name: (e.g. - $fullsystemname - Clone 1) (e.g. - $fullsystemname - Clone 1)
    Subsystem URL: -
    -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/databasepanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/databasepanel.vm deleted file mode 100644 index a887176ab..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/databasepanel.vm +++ /dev/null @@ -1,53 +0,0 @@ - - - -An SQL Lite database will be created to store RA internal information. - -

    -

    -
    -#if ($errorString != "") - $errorString -#end -
    -

    -
    -   -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/displaycertchain2panel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/displaycertchain2panel.vm deleted file mode 100644 index eff21eca4..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/displaycertchain2panel.vm +++ /dev/null @@ -1,41 +0,0 @@ - - - -

    -A certificate chain is a list of all certificates chained up to the root. -

    -If the entire certificate chain is displayed below, click the Next button to import it into this subsystem. This certificate chain will then be trusted for this instance. -

    -If no certificate chain is listed below, simply click the Next button to move on to the next panel. -

    -

    -$certchain
    -
    -#if ($errorString != "") - $errorString -#end diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/displaycertchainpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/displaycertchainpanel.vm deleted file mode 100644 index d5e32263a..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/displaycertchainpanel.vm +++ /dev/null @@ -1,41 +0,0 @@ - - - -
    -A certificate chain is a list of all certificates chained up to the root. -
    -If a certificate chain is displayed below, click the Next button to trust this certificate chain for this instance. -
    -If no certificate chain is listed below, simply click the Next button to move on to the next panel. -
    -
    -$certchain
    -
    -#if ($errorString != "") - $errorString -#end diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm deleted file mode 100644 index 86e4068ea..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/donepanel.vm +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - -#if ($errorString != "") - $errorString -#end -As 'root', restart the server on the command line by typing "$initCommand - restart $instanceID". After performing this restart, the server should become operational. -
    -Please go to the services page to access all of the available interfaces. -
    -
    -To create additional instances, type "/usr/bin/pkicreate" on the command line. -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/drminfopanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/drminfopanel.vm deleted file mode 100644 index c26f3c0c2..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/drminfopanel.vm +++ /dev/null @@ -1,56 +0,0 @@ - - - -A Data Recovery Manager (DRM) is responsible for server-side key generation, archival, and recovery. If server-side key generation is not needed, this step can be skipped. -

    -#if ($errorString != "") - $errorString -

    -#end - Connect this instance to an HTTPS Agent URL of a DRM to support server-side key generation. -

    -

    - - - - - -
    URL: -
    -

    -
    -
    -

    - Configure this instance to NOT support server-side key generation. -

    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/footer.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/footer.vm deleted file mode 100644 index 22d7213ba..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/footer.vm +++ /dev/null @@ -1,20 +0,0 @@ - - -

    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/header.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/header.vm deleted file mode 100644 index e653da5c1..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/header.vm +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/hierarchypanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/hierarchypanel.vm deleted file mode 100644 index 41cba696d..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/hierarchypanel.vm +++ /dev/null @@ -1,80 +0,0 @@ - - - -

    PKI Hierarchy

    -

    -This CA instance can be either a Self-Signed Root CA or a Subordinate CA. [Details] - - -

    - -

    - Make this a Self-Signed Root CA within this new PKI hierarchy. -

    - Make this a subordinate CA of another CA. - - - - - - -
    URL: -
    -

    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/importadmincertpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/importadmincertpanel.vm deleted file mode 100644 index 37df00c02..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/importadmincertpanel.vm +++ /dev/null @@ -1,56 +0,0 @@ - - - -An administrator's certificate has been created and imported into this browser. This certificate is used to access the agent interface of this subsystem. -

    -#if ($errorString != "") - $errorString -#end -$info -

    -

    - - - -#if ($ca == 'true' && $import == 'true') - -#else -#if ($caType == 'ca' && $import == 'true') - -#else - -#end -#end - - - - -
    -

    -
    -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/login.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/login.vm deleted file mode 100644 index 14593ad9c..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/login.vm +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - Certificate System - - - - - - -
    - -#include ( "ra/admin/console/config/header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - -
    - - - - - -
    -

    - Login

    - -A one time random pin has been generated during setup to protect unauthorized access to this configuration wizard. This pin has been stored in the "CS.cfg" configuration file as the value of the 'preop.pin' parameter. Please enter this pin to continue. - -

    -#if ($errorString != "") - $errorString -#end -

    -

    - - - - - - -
    PIN:
    -
    -
    -
    -
    - -

    - - - - -
    - -
    - - -

    - -
    -
    - -#include ( "ra/admin/console/config/footer.vm" ) - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/modulepanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/modulepanel.vm deleted file mode 100644 index cb9a1eaf8..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/modulepanel.vm +++ /dev/null @@ -1,158 +0,0 @@ - - - -Two lists of security modules are provided below. The Supported Security Modules list consists of both software-based and hardware-based security modules that this PKI solution supports, while the Other Security Modules list consists of any other security modules found by this PKI subsystem that are not recognized as one of the supported security modules. [Details] - - -
    -

    Supported Security Modules

    - - - - - - - -#foreach ($module in $sms) - - - - - - -#foreach ($token in $module.getTokens()) - - - - - - -#end -#end - -
    Module/TokenStatusDefaultOperations

    $module.getUserFriendlyName()
    - #if ($module.isFound()) - Found - #else - Not Found - #end -
    - $token.getNickName() - #if ($token.isLoggedIn()) - Logged In - #else - Not logged In - #end - - #if ($token.isLoggedIn()) - #if ($defTok == $token.getNickName()) - - #else - - #end - #end - - #if (!$token.isLoggedIn()) -Login - #end -
    -

    Other Security Modules

    -

    The security modules listed below are modules found by the server but not recognized as one of the supported modules. If the user believes that any listed modules below should have been supported, please check the "CS.cfg" configuration file to see if there is a name mismatch and adjust this accordingly.

    - - - - - - - -#foreach ($module in $oms) - - - - - - -#foreach ($token in $module.getTokens()) - - - - - - -#end -#end - -
    Module/TokenStatusDefaultOperations
    $module.getUserFriendlyName() - #if ($module.isFound()) - Found - #else - Not Found - #end -
    - $token.getNickName() - #if ($token.isLoggedIn()) - Logged In - #else - Not logged In - #end - - #if ($defTok == $token.getNickName()) - - #else - - #end -
    - - -
    - -
    -
    -   -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/namepanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/namepanel.vm deleted file mode 100644 index 071b523a9..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/namepanel.vm +++ /dev/null @@ -1,91 +0,0 @@ - - - -Each certificate associated with this instance needs to have a unique name within the PKI hierarchy. The following information will be used to generate these unique names. Each certificate will be stored in the security module using a unique nickname. [Details] - - - - -

    -#if ($errorString != "") - $errorString -#end -
    -#foreach ($item in $certs) -

    $item.getUserFriendlyName()

    - - - - - - - - - - -
    DN:
    Nickname:
    -

    -#end -

    -


    -

    -Please select the CA to submit these system certificate requests: -

    - - - - - -
    URL: -
    - -

    -
    -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/securitydomainloginpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/securitydomainloginpanel.vm deleted file mode 100644 index 58ace3f68..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/securitydomainloginpanel.vm +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - Dogtag Certificate System - - - - - - - -
    - - - - - - -
    - - - - -
    -

    - Security Domain ($name) Login

    - -
    -

    The Enterprise $subsystem Administrator will register this $subsystem Subsystem located at $host under this Security Domain located at $sdhost. The credential information will be provided to the Security Domain for authentication.

    -#if ($errorString != "") - $errorString -#end - - - - - - - - - - - - - - -
    Uid:
    Password:
    - -

    -
    -   -
    - - -

    - - - - -
    -
    - -
    -
    - -

    - -
    - -
    -
    - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/securitydomainpanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/securitydomainpanel.vm deleted file mode 100644 index f67f7b242..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/securitydomainpanel.vm +++ /dev/null @@ -1,115 +0,0 @@ - - - -

    $panelname

    -
    -A security domain is a registry for all of the PKI services within an enterprise. Applications may use the security domain to locate other PKI services. [Details] - - - -#if ($errorString != "") - $errorString -#end -
    -#if ($cstype == "CA") - Create a New Security Domain -
    -If no security domain exists, a new one must be created for this CA. - - - - - - - - - - - - - - - - - - - - - -
    Security Domain Name: (e.g. - Dogtag Security Domain)
    Security Domain HTTP EE URL (unsecure): http://$machineName:$http_ee_port
    Security Domain HTTPS Agent URL (clientauth): https://$machineName:$https_agent_port
    Security Domain HTTPS EE URL (non-clientauth): https://$machineName:$https_ee_port
    Security Domain HTTPS Admin URL (non-clientauth): https://$machineName:$https_admin_port
    -
    - Join an Existing Security Domain -#else - Create a New Security Domain -
    -If no security domain exists, a new one must be created for this CA. - - - - - -
    Security Domain Name: (e.g. - Dogtag Security Domain)
    -
    - Join an Existing Security Domain -#end -
    -Enter the URL to an existing security domain. -
    - - - - - -
    Security Domain HTTPS Admin URL (non-clientauth): (e.g. - https://example.com:9445)
    -
    - - - - - -
    NOTE:   Since a Security Domain MUST be a CA (although all CAs are NOT necessarily Security Domains), an appropriate value for this URL may be obtained by logging into the machine which hosts the desired Security Domain CA as 'root' and running the command "$initCommand status $instanceID" from the command-line.
    -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/sidemenu.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/sidemenu.vm deleted file mode 100644 index 09fe16870..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/sidemenu.vm +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/sizepanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/sizepanel.vm deleted file mode 100644 index 76b1d18a2..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/sizepanel.vm +++ /dev/null @@ -1,235 +0,0 @@ - - - - - -Select the key pair type(s) and associated key pair size(s) from the pulldown menus. [Details] - - -#if ($errorString != "") - $errorString -#end -

    -

    -

    - - - - -
    [Advanced]
    -

    -

    Common Key Settings

    -

    - - - - - -
    Key Type:
    -

    - Use the default key size ($default_keysize bits for RSA, $default_ecc_keysize bits for ECC). -

    - Use the following custom key size: - -

    - - - - - -
    Key Size:
    -

    -

    -

    -

    - - - - -
    [Simple]
    -#foreach ($item in $certs) -

    Key for $item.getUserFriendlyName()

    -

    - - - - - -
    Key Type:
    -

    - Use the default key size ($default_keysize bits for RSA, $default_ecc_keysize bits for ECC). -

    - Use the following custom key size: - -

    - - - - - -
    Key Size:
    -#end -

    -
    -
    -
    -#if ($firsttime == 'false') -New Keys

    -#end -

    -

    -
    -Note: After pressing Next, keys will be generated on the server, which will take some time to complete. Please wait for the next panel to appear. -   -
    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/tksinfopanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/tksinfopanel.vm deleted file mode 100644 index f4a0a3fd7..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/tksinfopanel.vm +++ /dev/null @@ -1,51 +0,0 @@ - - - -The Token Key Service (TKS) is responsible for managing master keys that are used for establishing secure channels. Select an HTTPS Agent URL of a TKS from the list below. -

    -#if ($errorString != "") - $errorString -#end -

    - - - - - -
    URL: -
    -

    -
    -
    -

    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/topmenu.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/topmenu.vm deleted file mode 100644 index 64881066f..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/topmenu.vm +++ /dev/null @@ -1,21 +0,0 @@ - - -

    diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/welcomepanel.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/welcomepanel.vm deleted file mode 100644 index fd478d1a8..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/welcomepanel.vm +++ /dev/null @@ -1,57 +0,0 @@ - - - -

    $wizardname

    -The $fullsystemname - configuration wizard will guide the administrator through the process of configuring a single instance of the $fullsystemname - ($systemname). [Details] - - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/wizard.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/wizard.vm deleted file mode 100644 index 4c7472817..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/wizard.vm +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - Dogtag Certificate System - - - - - - - - - - -
    - -#include ( "ra/admin/console/config/header.vm" ) - - - - -
    - -
    -
    - -
    -
    - - -
    -
    - -
    - - -
    - - - - - -
    -

    - $title

    - -
    - - -#parse ( $panel ) - - - -
    - - - - - - -
    - -#if ($showApplyButton == "true") - -#end - -#if ($lastpanel) -  -#else - -#end - -
    - -
    - -#include ( "ra/admin/console/config/footer.vm" ) - -
    -
    - - - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/xml.vm b/dogtag/ra-ui/shared/docroot/ra/admin/console/config/xml.vm deleted file mode 100644 index 31ff72aa2..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/config/xml.vm +++ /dev/null @@ -1,4 +0,0 @@ - - - $xml - diff --git a/dogtag/ra-ui/shared/docroot/ra/admin/console/js/misc.js b/dogtag/ra-ui/shared/docroot/ra/admin/console/js/misc.js deleted file mode 100644 index d4dc336ab..000000000 --- a/dogtag/ra-ui/shared/docroot/ra/admin/console/js/misc.js +++ /dev/null @@ -1,30 +0,0 @@ -// --- 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 --- - -/** - * This function is to submit the form's parameters and to decide if the - * window should remain open. - * - * @param f The form - * @param fclose true if you want to close the window; otherwise false. - */ -function saveConfig(f, fclose) { - f.submit(); - if (fclose == true) - window.close(); -} -- cgit From df7b62b20ecbab7d319be6292c9a201b4021d52f Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Wed, 21 Nov 2012 14:30:45 -0500 Subject: Reorganized TPS templates and scripts. The templates, JS, and CGI scripts for TPS have been reorganized into the TPS core package. Removed unused cfg.pl. Ticket #407 --- base/tps/apache/cgi-bin/demo/Enroll.html | 81 + base/tps/apache/cgi-bin/demo/enroll.cgi | 183 ++ base/tps/apache/cgi-bin/demo/index.cgi | 47 + base/tps/apache/cgi-bin/esc.cgi | 1239 ++++++++++++++ base/tps/apache/cgi-bin/home.cgi | 40 + base/tps/apache/cgi-bin/home/Enroll.html | 79 + base/tps/apache/cgi-bin/home/cachain.cgi | 52 + base/tps/apache/cgi-bin/home/enroll.cgi | 183 ++ base/tps/apache/cgi-bin/home/index.cgi | 51 + base/tps/apache/cgi-bin/so/Enroll.html | 138 ++ base/tps/apache/cgi-bin/so/enroll.cgi | 193 +++ base/tps/apache/cgi-bin/so/index.cgi | 48 + base/tps/apache/cgi-bin/sow/ajax-list.cgi | 79 + base/tps/apache/cgi-bin/sow/cfg.pl | 168 ++ base/tps/apache/cgi-bin/sow/enroll.cgi | 246 +++ base/tps/apache/cgi-bin/sow/enroll.html | 260 +++ base/tps/apache/cgi-bin/sow/enroll_temp.cgi | 246 +++ base/tps/apache/cgi-bin/sow/enroll_temp.html | 231 +++ base/tps/apache/cgi-bin/sow/format.cgi | 207 +++ base/tps/apache/cgi-bin/sow/format.html | 236 +++ base/tps/apache/cgi-bin/sow/formatso.cgi | 207 +++ base/tps/apache/cgi-bin/sow/formatso.html | 186 ++ base/tps/apache/cgi-bin/sow/index.cgi | 42 + base/tps/apache/cgi-bin/sow/is_agent.cgi | 69 + base/tps/apache/cgi-bin/sow/is_user.cgi | 71 + base/tps/apache/cgi-bin/sow/main.cgi | 70 + base/tps/apache/cgi-bin/sow/main.html | 67 + base/tps/apache/cgi-bin/sow/noaccess.cgi | 56 + base/tps/apache/cgi-bin/sow/noaccess.html | 63 + base/tps/apache/cgi-bin/sow/read.cgi | 128 ++ base/tps/apache/cgi-bin/sow/read.html | 78 + base/tps/apache/cgi-bin/sow/read_temp.cgi | 125 ++ base/tps/apache/cgi-bin/sow/read_temp.html | 78 + base/tps/apache/cgi-bin/sow/search.cgi | 70 + base/tps/apache/cgi-bin/sow/search.html | 71 + base/tps/apache/cgi-bin/sow/search_temp.cgi | 70 + base/tps/apache/cgi-bin/sow/search_temp.html | 71 + base/tps/apache/cgi-bin/sow/seturl.cgi | 207 +++ base/tps/apache/cgi-bin/sow/seturl.html | 174 ++ base/tps/apache/cgi-bin/sow/welcome.cgi | 57 + base/tps/apache/cgi-bin/sow/welcome.html | 63 + base/tps/apache/docroot/404.html | 146 ++ base/tps/apache/docroot/500.html | 139 ++ base/tps/apache/docroot/esc/AdminEsc.html | 57 + base/tps/apache/docroot/esc/AdvancePopup.html | 1713 +++++++++++++++++++ base/tps/apache/docroot/esc/EnrollPopup.html | 1717 +++++++++++++++++++ base/tps/apache/docroot/esc/GenericAuth.html | 536 ++++++ base/tps/apache/docroot/esc/SettingsEsc.html | 737 ++++++++ base/tps/apache/docroot/esc/TokenManager.html | 1705 +++++++++++++++++++ base/tps/apache/docroot/esc/TokenPin.html | 76 + .../tps/apache/docroot/esc/demo/EnrollSuccess.html | 51 + base/tps/apache/docroot/esc/demo/GenericAuth.html | 537 ++++++ base/tps/apache/docroot/esc/demo/util.js | 1503 ++++++++++++++++ .../tps/apache/docroot/esc/home/EnrollSuccess.html | 46 + base/tps/apache/docroot/esc/home/GenericAuth.html | 538 ++++++ base/tps/apache/docroot/esc/home/util.js | 1502 ++++++++++++++++ base/tps/apache/docroot/esc/so/EnrollSuccess.html | 46 + base/tps/apache/docroot/esc/so/GenericAuth.html | 538 ++++++ base/tps/apache/docroot/esc/so/util.js | 1513 +++++++++++++++++ base/tps/apache/docroot/esc/sow/EnrollSuccess.html | 50 + base/tps/apache/docroot/esc/sow/GenericAuth.html | 538 ++++++ .../apache/docroot/esc/sow/js/ajax-dynamic-list.js | 288 ++++ base/tps/apache/docroot/esc/sow/js/ajax.js | 193 +++ base/tps/apache/docroot/esc/sow/js/effects.js | 903 ++++++++++ base/tps/apache/docroot/esc/sow/js/lightbox.js | 689 ++++++++ base/tps/apache/docroot/esc/sow/js/prototype.js | 1785 ++++++++++++++++++++ .../tps/apache/docroot/esc/sow/js/scriptaculous.js | 45 + base/tps/apache/docroot/esc/sow/util.js | 1769 +++++++++++++++++++ base/tps/apache/docroot/footer.vm | 19 + base/tps/apache/docroot/header.vm | 26 + base/tps/apache/docroot/index.cgi | 76 + base/tps/apache/docroot/index.html | 22 + base/tps/apache/docroot/index.vm | 89 + base/tps/apache/docroot/tokendb/addConfig.template | 164 ++ .../tps/apache/docroot/tokendb/addResults.template | 74 + .../docroot/tokendb/agentSelectConfig.template | 123 ++ .../docroot/tokendb/agentViewConfig.template | 187 ++ .../tps/apache/docroot/tokendb/auditAdmin.template | 213 +++ .../docroot/tokendb/confirmConfigChanges.template | 234 +++ .../docroot/tokendb/confirmDeleteConfig.template | 173 ++ base/tps/apache/docroot/tokendb/delete.template | 294 ++++ .../apache/docroot/tokendb/deleteResults.template | 74 + base/tps/apache/docroot/tokendb/doToken.template | 360 ++++ .../apache/docroot/tokendb/doTokenConfirm.template | 344 ++++ base/tps/apache/docroot/tokendb/edit.template | 199 +++ .../tps/apache/docroot/tokendb/editConfig.template | 237 +++ .../apache/docroot/tokendb/editResults.template | 75 + base/tps/apache/docroot/tokendb/editUser.template | 313 ++++ base/tps/apache/docroot/tokendb/error.template | 73 + base/tps/apache/docroot/tokendb/index.template | 151 ++ .../tps/apache/docroot/tokendb/indexAdmin.template | 176 ++ .../apache/docroot/tokendb/indexOperator.template | 129 ++ base/tps/apache/docroot/tokendb/new.template | 93 + base/tps/apache/docroot/tokendb/newUser.template | 179 ++ base/tps/apache/docroot/tokendb/revoke.template | 317 ++++ base/tps/apache/docroot/tokendb/search.template | 118 ++ .../apache/docroot/tokendb/searchActivity.template | 123 ++ .../docroot/tokendb/searchActivityAdmin.template | 119 ++ .../tokendb/searchActivityAdminResults.template | 234 +++ .../docroot/tokendb/searchActivityResults.template | 239 +++ .../apache/docroot/tokendb/searchAdmin.template | 115 ++ .../docroot/tokendb/searchAdminResults.template | 222 +++ .../docroot/tokendb/searchCertificate.template | 118 ++ .../tokendb/searchCertificateResults.template | 226 +++ .../apache/docroot/tokendb/searchResults.template | 227 +++ .../tps/apache/docroot/tokendb/searchUser.template | 126 ++ .../docroot/tokendb/searchUserResults.template | 190 +++ .../apache/docroot/tokendb/selectConfig.template | 137 ++ base/tps/apache/docroot/tokendb/selfTest.template | 129 ++ .../docroot/tokendb/selfTestResults.template | 113 ++ base/tps/apache/docroot/tokendb/show.template | 379 +++++ base/tps/apache/docroot/tokendb/showAdmin.template | 302 ++++ base/tps/apache/docroot/tokendb/showCert.template | 355 ++++ .../tps/apache/docroot/tokendb/userDelete.template | 174 ++ .../admin/console/config/adminauthenticatepanel.vm | 51 + .../docroot/tps/admin/console/config/adminpanel.vm | 246 +++ .../admin/console/config/agentauthenticatepanel.vm | 47 + .../tps/admin/console/config/authdbpanel.vm | 67 + .../tps/admin/console/config/cainfopanel.vm | 54 + .../tps/admin/console/config/certchainpanel.vm | 48 + .../admin/console/config/certprettyprintpanel.vm | 48 + .../tps/admin/console/config/certrequestpanel.vm | 224 +++ .../tps/admin/console/config/config_addhsm.vm | 95 ++ .../docroot/tps/admin/console/config/config_db.vm | 125 ++ .../docroot/tps/admin/console/config/config_hsm.vm | 175 ++ .../admin/console/config/config_hsmloginpanel.vm | 82 + .../tps/admin/console/config/config_join.vm | 124 ++ .../tps/admin/console/config/config_rootca.vm | 112 ++ .../admin/console/config/createsubsystempanel.vm | 98 ++ .../tps/admin/console/config/databasepanel.vm | 93 + .../admin/console/config/displaycertchain2panel.vm | 40 + .../admin/console/config/displaycertchainpanel.vm | 40 + .../docroot/tps/admin/console/config/donepanel.vm | 54 + .../tps/admin/console/config/drminfopanel.vm | 55 + .../docroot/tps/admin/console/config/footer.vm | 19 + .../docroot/tps/admin/console/config/header.vm | 25 + .../tps/admin/console/config/hierarchypanel.vm | 79 + .../admin/console/config/importadmincertpanel.vm | 55 + .../docroot/tps/admin/console/config/login.vm | 109 ++ .../tps/admin/console/config/modulepanel.vm | 161 ++ .../docroot/tps/admin/console/config/namepanel.vm | 90 + .../console/config/securitydomainloginpanel.vm | 108 ++ .../admin/console/config/securitydomainpanel.vm | 114 ++ .../docroot/tps/admin/console/config/sidemenu.vm | 29 + .../docroot/tps/admin/console/config/sizepanel.vm | 303 ++++ .../tps/admin/console/config/tksinfopanel.vm | 50 + .../docroot/tps/admin/console/config/topmenu.vm | 20 + .../tps/admin/console/config/welcomepanel.vm | 57 + .../docroot/tps/admin/console/config/wizard.vm | 147 ++ .../apache/docroot/tps/admin/console/config/xml.vm | 4 + .../apache/docroot/tps/admin/console/js/misc.js | 30 + base/tps/forms/esc/cgi-bin/demo/enroll.cgi | 183 -- base/tps/forms/esc/cgi-bin/demo/index.cgi | 47 - base/tps/forms/esc/cgi-bin/home/cachain.cgi | 52 - base/tps/forms/esc/cgi-bin/home/enroll.cgi | 183 -- base/tps/forms/esc/cgi-bin/home/index.cgi | 51 - base/tps/forms/esc/cgi-bin/so/enroll.cgi | 193 --- base/tps/forms/esc/cgi-bin/so/index.cgi | 48 - base/tps/forms/esc/cgi-bin/sow/ajax-list.cgi | 79 - base/tps/forms/esc/cgi-bin/sow/cfg.pl | 174 -- base/tps/forms/esc/cgi-bin/sow/enroll.cgi | 246 --- base/tps/forms/esc/cgi-bin/sow/enroll_temp.cgi | 246 --- base/tps/forms/esc/cgi-bin/sow/format.cgi | 207 --- base/tps/forms/esc/cgi-bin/sow/formatso.cgi | 207 --- base/tps/forms/esc/cgi-bin/sow/index.cgi | 42 - base/tps/forms/esc/cgi-bin/sow/is_agent.cgi | 69 - base/tps/forms/esc/cgi-bin/sow/is_user.cgi | 71 - base/tps/forms/esc/cgi-bin/sow/main.cgi | 70 - base/tps/forms/esc/cgi-bin/sow/noaccess.cgi | 56 - base/tps/forms/esc/cgi-bin/sow/read.cgi | 128 -- base/tps/forms/esc/cgi-bin/sow/read_temp.cgi | 125 -- base/tps/forms/esc/cgi-bin/sow/search.cgi | 70 - base/tps/forms/esc/cgi-bin/sow/search_temp.cgi | 70 - base/tps/forms/esc/cgi-bin/sow/seturl.cgi | 207 --- base/tps/forms/esc/cgi-bin/sow/welcome.cgi | 57 - base/tps/forms/esc/esc.cgi | 1239 -------------- base/tps/forms/esc/home.cgi | 40 - base/tps/forms/index.cgi | 76 - base/tps/forms/index.html | 22 - dogtag/tps-ui/shared/cgi-bin/demo/Enroll.html | 81 - dogtag/tps-ui/shared/cgi-bin/home/Enroll.html | 79 - dogtag/tps-ui/shared/cgi-bin/so/Enroll.html | 138 -- dogtag/tps-ui/shared/cgi-bin/sow/cfg.pl | 168 -- dogtag/tps-ui/shared/cgi-bin/sow/enroll.html | 260 --- dogtag/tps-ui/shared/cgi-bin/sow/enroll_temp.html | 231 --- dogtag/tps-ui/shared/cgi-bin/sow/format.html | 236 --- dogtag/tps-ui/shared/cgi-bin/sow/formatso.html | 186 -- dogtag/tps-ui/shared/cgi-bin/sow/main.html | 67 - dogtag/tps-ui/shared/cgi-bin/sow/noaccess.html | 63 - dogtag/tps-ui/shared/cgi-bin/sow/read.html | 78 - dogtag/tps-ui/shared/cgi-bin/sow/read_temp.html | 78 - dogtag/tps-ui/shared/cgi-bin/sow/search.html | 71 - dogtag/tps-ui/shared/cgi-bin/sow/search_temp.html | 71 - dogtag/tps-ui/shared/cgi-bin/sow/seturl.html | 174 -- dogtag/tps-ui/shared/cgi-bin/sow/welcome.html | 63 - dogtag/tps-ui/shared/docroot/404.html | 146 -- dogtag/tps-ui/shared/docroot/500.html | 139 -- dogtag/tps-ui/shared/docroot/esc/AdminEsc.html | 57 - dogtag/tps-ui/shared/docroot/esc/AdvancePopup.html | 1713 ------------------- dogtag/tps-ui/shared/docroot/esc/EnrollPopup.html | 1717 ------------------- dogtag/tps-ui/shared/docroot/esc/GenericAuth.html | 536 ------ dogtag/tps-ui/shared/docroot/esc/SettingsEsc.html | 737 -------- dogtag/tps-ui/shared/docroot/esc/TokenManager.html | 1705 ------------------- dogtag/tps-ui/shared/docroot/esc/TokenPin.html | 76 - .../shared/docroot/esc/demo/EnrollSuccess.html | 51 - .../shared/docroot/esc/demo/GenericAuth.html | 537 ------ dogtag/tps-ui/shared/docroot/esc/demo/util.js | 1503 ---------------- .../shared/docroot/esc/home/EnrollSuccess.html | 46 - .../shared/docroot/esc/home/GenericAuth.html | 538 ------ dogtag/tps-ui/shared/docroot/esc/home/util.js | 1502 ---------------- .../shared/docroot/esc/so/EnrollSuccess.html | 46 - .../tps-ui/shared/docroot/esc/so/GenericAuth.html | 538 ------ dogtag/tps-ui/shared/docroot/esc/so/util.js | 1513 ----------------- .../shared/docroot/esc/sow/EnrollSuccess.html | 50 - .../tps-ui/shared/docroot/esc/sow/GenericAuth.html | 538 ------ .../shared/docroot/esc/sow/js/ajax-dynamic-list.js | 288 ---- dogtag/tps-ui/shared/docroot/esc/sow/js/ajax.js | 193 --- dogtag/tps-ui/shared/docroot/esc/sow/js/effects.js | 903 ---------- .../tps-ui/shared/docroot/esc/sow/js/lightbox.js | 689 -------- .../tps-ui/shared/docroot/esc/sow/js/prototype.js | 1785 -------------------- .../shared/docroot/esc/sow/js/scriptaculous.js | 45 - dogtag/tps-ui/shared/docroot/esc/sow/util.js | 1769 ------------------- dogtag/tps-ui/shared/docroot/footer.vm | 19 - dogtag/tps-ui/shared/docroot/header.vm | 26 - dogtag/tps-ui/shared/docroot/index.vm | 89 - .../shared/docroot/tokendb/addConfig.template | 164 -- .../shared/docroot/tokendb/addResults.template | 74 - .../docroot/tokendb/agentSelectConfig.template | 123 -- .../docroot/tokendb/agentViewConfig.template | 187 -- .../shared/docroot/tokendb/auditAdmin.template | 213 --- .../docroot/tokendb/confirmConfigChanges.template | 234 --- .../docroot/tokendb/confirmDeleteConfig.template | 173 -- .../tps-ui/shared/docroot/tokendb/delete.template | 294 ---- .../shared/docroot/tokendb/deleteResults.template | 74 - .../tps-ui/shared/docroot/tokendb/doToken.template | 360 ---- .../shared/docroot/tokendb/doTokenConfirm.template | 344 ---- dogtag/tps-ui/shared/docroot/tokendb/edit.template | 199 --- .../shared/docroot/tokendb/editConfig.template | 237 --- .../shared/docroot/tokendb/editResults.template | 75 - .../shared/docroot/tokendb/editUser.template | 313 ---- .../tps-ui/shared/docroot/tokendb/error.template | 73 - .../tps-ui/shared/docroot/tokendb/index.template | 151 -- .../shared/docroot/tokendb/indexAdmin.template | 176 -- .../shared/docroot/tokendb/indexOperator.template | 129 -- dogtag/tps-ui/shared/docroot/tokendb/new.template | 93 - .../tps-ui/shared/docroot/tokendb/newUser.template | 179 -- .../tps-ui/shared/docroot/tokendb/revoke.template | 317 ---- .../tps-ui/shared/docroot/tokendb/search.template | 118 -- .../shared/docroot/tokendb/searchActivity.template | 123 -- .../docroot/tokendb/searchActivityAdmin.template | 119 -- .../tokendb/searchActivityAdminResults.template | 234 --- .../docroot/tokendb/searchActivityResults.template | 239 --- .../shared/docroot/tokendb/searchAdmin.template | 115 -- .../docroot/tokendb/searchAdminResults.template | 222 --- .../docroot/tokendb/searchCertificate.template | 118 -- .../tokendb/searchCertificateResults.template | 226 --- .../shared/docroot/tokendb/searchResults.template | 227 --- .../shared/docroot/tokendb/searchUser.template | 126 -- .../docroot/tokendb/searchUserResults.template | 190 --- .../shared/docroot/tokendb/selectConfig.template | 137 -- .../shared/docroot/tokendb/selfTest.template | 129 -- .../docroot/tokendb/selfTestResults.template | 113 -- dogtag/tps-ui/shared/docroot/tokendb/show.template | 379 ----- .../shared/docroot/tokendb/showAdmin.template | 302 ---- .../shared/docroot/tokendb/showCert.template | 355 ---- .../shared/docroot/tokendb/userDelete.template | 174 -- .../admin/console/config/adminauthenticatepanel.vm | 51 - .../docroot/tps/admin/console/config/adminpanel.vm | 246 --- .../admin/console/config/agentauthenticatepanel.vm | 47 - .../tps/admin/console/config/authdbpanel.vm | 67 - .../tps/admin/console/config/cainfopanel.vm | 54 - .../tps/admin/console/config/certchainpanel.vm | 48 - .../admin/console/config/certprettyprintpanel.vm | 48 - .../tps/admin/console/config/certrequestpanel.vm | 224 --- .../tps/admin/console/config/config_addhsm.vm | 95 -- .../docroot/tps/admin/console/config/config_db.vm | 125 -- .../docroot/tps/admin/console/config/config_hsm.vm | 175 -- .../admin/console/config/config_hsmloginpanel.vm | 82 - .../tps/admin/console/config/config_join.vm | 124 -- .../tps/admin/console/config/config_rootca.vm | 112 -- .../admin/console/config/createsubsystempanel.vm | 98 -- .../tps/admin/console/config/databasepanel.vm | 93 - .../admin/console/config/displaycertchain2panel.vm | 40 - .../admin/console/config/displaycertchainpanel.vm | 40 - .../docroot/tps/admin/console/config/donepanel.vm | 54 - .../tps/admin/console/config/drminfopanel.vm | 55 - .../docroot/tps/admin/console/config/footer.vm | 19 - .../docroot/tps/admin/console/config/header.vm | 25 - .../tps/admin/console/config/hierarchypanel.vm | 79 - .../admin/console/config/importadmincertpanel.vm | 55 - .../docroot/tps/admin/console/config/login.vm | 109 -- .../tps/admin/console/config/modulepanel.vm | 161 -- .../docroot/tps/admin/console/config/namepanel.vm | 90 - .../console/config/securitydomainloginpanel.vm | 108 -- .../admin/console/config/securitydomainpanel.vm | 114 -- .../docroot/tps/admin/console/config/sidemenu.vm | 29 - .../docroot/tps/admin/console/config/sizepanel.vm | 303 ---- .../tps/admin/console/config/tksinfopanel.vm | 50 - .../docroot/tps/admin/console/config/topmenu.vm | 20 - .../tps/admin/console/config/welcomepanel.vm | 57 - .../docroot/tps/admin/console/config/wizard.vm | 147 -- .../shared/docroot/tps/admin/console/config/xml.vm | 4 - .../shared/docroot/tps/admin/console/js/misc.js | 30 - 303 files changed, 36728 insertions(+), 36902 deletions(-) create mode 100755 base/tps/apache/cgi-bin/demo/Enroll.html create mode 100755 base/tps/apache/cgi-bin/demo/enroll.cgi create mode 100755 base/tps/apache/cgi-bin/demo/index.cgi create mode 100755 base/tps/apache/cgi-bin/esc.cgi create mode 100755 base/tps/apache/cgi-bin/home.cgi create mode 100755 base/tps/apache/cgi-bin/home/Enroll.html create mode 100755 base/tps/apache/cgi-bin/home/cachain.cgi create mode 100755 base/tps/apache/cgi-bin/home/enroll.cgi create mode 100755 base/tps/apache/cgi-bin/home/index.cgi create mode 100755 base/tps/apache/cgi-bin/so/Enroll.html create mode 100755 base/tps/apache/cgi-bin/so/enroll.cgi create mode 100755 base/tps/apache/cgi-bin/so/index.cgi create mode 100755 base/tps/apache/cgi-bin/sow/ajax-list.cgi create mode 100755 base/tps/apache/cgi-bin/sow/cfg.pl create mode 100755 base/tps/apache/cgi-bin/sow/enroll.cgi create mode 100755 base/tps/apache/cgi-bin/sow/enroll.html create mode 100755 base/tps/apache/cgi-bin/sow/enroll_temp.cgi create mode 100755 base/tps/apache/cgi-bin/sow/enroll_temp.html create mode 100755 base/tps/apache/cgi-bin/sow/format.cgi create mode 100755 base/tps/apache/cgi-bin/sow/format.html create mode 100755 base/tps/apache/cgi-bin/sow/formatso.cgi create mode 100755 base/tps/apache/cgi-bin/sow/formatso.html create mode 100755 base/tps/apache/cgi-bin/sow/index.cgi create mode 100755 base/tps/apache/cgi-bin/sow/is_agent.cgi create mode 100755 base/tps/apache/cgi-bin/sow/is_user.cgi create mode 100755 base/tps/apache/cgi-bin/sow/main.cgi create mode 100755 base/tps/apache/cgi-bin/sow/main.html create mode 100755 base/tps/apache/cgi-bin/sow/noaccess.cgi create mode 100755 base/tps/apache/cgi-bin/sow/noaccess.html create mode 100755 base/tps/apache/cgi-bin/sow/read.cgi create mode 100755 base/tps/apache/cgi-bin/sow/read.html create mode 100755 base/tps/apache/cgi-bin/sow/read_temp.cgi create mode 100755 base/tps/apache/cgi-bin/sow/read_temp.html create mode 100755 base/tps/apache/cgi-bin/sow/search.cgi create mode 100755 base/tps/apache/cgi-bin/sow/search.html create mode 100755 base/tps/apache/cgi-bin/sow/search_temp.cgi create mode 100755 base/tps/apache/cgi-bin/sow/search_temp.html create mode 100755 base/tps/apache/cgi-bin/sow/seturl.cgi create mode 100755 base/tps/apache/cgi-bin/sow/seturl.html create mode 100755 base/tps/apache/cgi-bin/sow/welcome.cgi create mode 100755 base/tps/apache/cgi-bin/sow/welcome.html create mode 100755 base/tps/apache/docroot/404.html create mode 100755 base/tps/apache/docroot/500.html create mode 100755 base/tps/apache/docroot/esc/AdminEsc.html create mode 100755 base/tps/apache/docroot/esc/AdvancePopup.html create mode 100755 base/tps/apache/docroot/esc/EnrollPopup.html create mode 100755 base/tps/apache/docroot/esc/GenericAuth.html create mode 100755 base/tps/apache/docroot/esc/SettingsEsc.html create mode 100755 base/tps/apache/docroot/esc/TokenManager.html create mode 100755 base/tps/apache/docroot/esc/TokenPin.html create mode 100644 base/tps/apache/docroot/esc/demo/EnrollSuccess.html create mode 100755 base/tps/apache/docroot/esc/demo/GenericAuth.html create mode 100755 base/tps/apache/docroot/esc/demo/util.js create mode 100644 base/tps/apache/docroot/esc/home/EnrollSuccess.html create mode 100755 base/tps/apache/docroot/esc/home/GenericAuth.html create mode 100755 base/tps/apache/docroot/esc/home/util.js create mode 100644 base/tps/apache/docroot/esc/so/EnrollSuccess.html create mode 100755 base/tps/apache/docroot/esc/so/GenericAuth.html create mode 100755 base/tps/apache/docroot/esc/so/util.js create mode 100644 base/tps/apache/docroot/esc/sow/EnrollSuccess.html create mode 100755 base/tps/apache/docroot/esc/sow/GenericAuth.html create mode 100755 base/tps/apache/docroot/esc/sow/js/ajax-dynamic-list.js create mode 100755 base/tps/apache/docroot/esc/sow/js/ajax.js create mode 100755 base/tps/apache/docroot/esc/sow/js/effects.js create mode 100755 base/tps/apache/docroot/esc/sow/js/lightbox.js create mode 100755 base/tps/apache/docroot/esc/sow/js/prototype.js create mode 100755 base/tps/apache/docroot/esc/sow/js/scriptaculous.js create mode 100755 base/tps/apache/docroot/esc/sow/util.js create mode 100755 base/tps/apache/docroot/footer.vm create mode 100755 base/tps/apache/docroot/header.vm create mode 100755 base/tps/apache/docroot/index.cgi create mode 100644 base/tps/apache/docroot/index.html create mode 100755 base/tps/apache/docroot/index.vm create mode 100644 base/tps/apache/docroot/tokendb/addConfig.template create mode 100644 base/tps/apache/docroot/tokendb/addResults.template create mode 100644 base/tps/apache/docroot/tokendb/agentSelectConfig.template create mode 100644 base/tps/apache/docroot/tokendb/agentViewConfig.template create mode 100644 base/tps/apache/docroot/tokendb/auditAdmin.template create mode 100644 base/tps/apache/docroot/tokendb/confirmConfigChanges.template create mode 100644 base/tps/apache/docroot/tokendb/confirmDeleteConfig.template create mode 100644 base/tps/apache/docroot/tokendb/delete.template create mode 100644 base/tps/apache/docroot/tokendb/deleteResults.template create mode 100644 base/tps/apache/docroot/tokendb/doToken.template create mode 100644 base/tps/apache/docroot/tokendb/doTokenConfirm.template create mode 100644 base/tps/apache/docroot/tokendb/edit.template create mode 100644 base/tps/apache/docroot/tokendb/editConfig.template create mode 100644 base/tps/apache/docroot/tokendb/editResults.template create mode 100644 base/tps/apache/docroot/tokendb/editUser.template create mode 100644 base/tps/apache/docroot/tokendb/error.template create mode 100644 base/tps/apache/docroot/tokendb/index.template create mode 100644 base/tps/apache/docroot/tokendb/indexAdmin.template create mode 100644 base/tps/apache/docroot/tokendb/indexOperator.template create mode 100644 base/tps/apache/docroot/tokendb/new.template create mode 100644 base/tps/apache/docroot/tokendb/newUser.template create mode 100644 base/tps/apache/docroot/tokendb/revoke.template create mode 100644 base/tps/apache/docroot/tokendb/search.template create mode 100644 base/tps/apache/docroot/tokendb/searchActivity.template create mode 100644 base/tps/apache/docroot/tokendb/searchActivityAdmin.template create mode 100644 base/tps/apache/docroot/tokendb/searchActivityAdminResults.template create mode 100644 base/tps/apache/docroot/tokendb/searchActivityResults.template create mode 100644 base/tps/apache/docroot/tokendb/searchAdmin.template create mode 100644 base/tps/apache/docroot/tokendb/searchAdminResults.template create mode 100644 base/tps/apache/docroot/tokendb/searchCertificate.template create mode 100644 base/tps/apache/docroot/tokendb/searchCertificateResults.template create mode 100644 base/tps/apache/docroot/tokendb/searchResults.template create mode 100644 base/tps/apache/docroot/tokendb/searchUser.template create mode 100644 base/tps/apache/docroot/tokendb/searchUserResults.template create mode 100644 base/tps/apache/docroot/tokendb/selectConfig.template create mode 100644 base/tps/apache/docroot/tokendb/selfTest.template create mode 100644 base/tps/apache/docroot/tokendb/selfTestResults.template create mode 100644 base/tps/apache/docroot/tokendb/show.template create mode 100644 base/tps/apache/docroot/tokendb/showAdmin.template create mode 100644 base/tps/apache/docroot/tokendb/showCert.template create mode 100755 base/tps/apache/docroot/tokendb/userDelete.template create mode 100644 base/tps/apache/docroot/tps/admin/console/config/adminauthenticatepanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/adminpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/agentauthenticatepanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/authdbpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/cainfopanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/certchainpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/certprettyprintpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/certrequestpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/config_addhsm.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/config_db.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/config_hsm.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/config_hsmloginpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/config_join.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/config_rootca.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/createsubsystempanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/databasepanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/displaycertchain2panel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/displaycertchainpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/donepanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/drminfopanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/footer.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/header.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/hierarchypanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/importadmincertpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/login.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/modulepanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/namepanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/securitydomainloginpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/securitydomainpanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/sidemenu.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/sizepanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/tksinfopanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/topmenu.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/welcomepanel.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/wizard.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/config/xml.vm create mode 100644 base/tps/apache/docroot/tps/admin/console/js/misc.js delete mode 100755 base/tps/forms/esc/cgi-bin/demo/enroll.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/demo/index.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/home/cachain.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/home/enroll.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/home/index.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/so/enroll.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/so/index.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/ajax-list.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/cfg.pl delete mode 100755 base/tps/forms/esc/cgi-bin/sow/enroll.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/enroll_temp.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/format.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/formatso.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/index.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/is_agent.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/is_user.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/main.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/noaccess.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/read.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/read_temp.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/search.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/search_temp.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/seturl.cgi delete mode 100755 base/tps/forms/esc/cgi-bin/sow/welcome.cgi delete mode 100755 base/tps/forms/esc/esc.cgi delete mode 100755 base/tps/forms/esc/home.cgi delete mode 100755 base/tps/forms/index.cgi delete mode 100644 base/tps/forms/index.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/demo/Enroll.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/home/Enroll.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/so/Enroll.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/cfg.pl delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/enroll.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/enroll_temp.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/format.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/formatso.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/main.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/noaccess.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/read.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/read_temp.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/search.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/search_temp.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/seturl.html delete mode 100755 dogtag/tps-ui/shared/cgi-bin/sow/welcome.html delete mode 100755 dogtag/tps-ui/shared/docroot/404.html delete mode 100755 dogtag/tps-ui/shared/docroot/500.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/AdminEsc.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/AdvancePopup.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/EnrollPopup.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/GenericAuth.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/SettingsEsc.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/TokenManager.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/TokenPin.html delete mode 100644 dogtag/tps-ui/shared/docroot/esc/demo/EnrollSuccess.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/demo/GenericAuth.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/demo/util.js delete mode 100644 dogtag/tps-ui/shared/docroot/esc/home/EnrollSuccess.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/home/GenericAuth.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/home/util.js delete mode 100644 dogtag/tps-ui/shared/docroot/esc/so/EnrollSuccess.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/so/GenericAuth.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/so/util.js delete mode 100644 dogtag/tps-ui/shared/docroot/esc/sow/EnrollSuccess.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/GenericAuth.html delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/js/ajax-dynamic-list.js delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/js/ajax.js delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/js/effects.js delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/js/lightbox.js delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/js/prototype.js delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/js/scriptaculous.js delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/util.js delete mode 100755 dogtag/tps-ui/shared/docroot/footer.vm delete mode 100755 dogtag/tps-ui/shared/docroot/header.vm delete mode 100755 dogtag/tps-ui/shared/docroot/index.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/addConfig.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/addResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/agentSelectConfig.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/agentViewConfig.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/auditAdmin.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/confirmConfigChanges.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/confirmDeleteConfig.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/delete.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/doToken.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/edit.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/editConfig.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/editResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/editUser.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/error.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/index.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/indexOperator.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/new.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/newUser.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/revoke.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/search.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdmin.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdminResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchAdmin.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchAdminResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchUser.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/searchUserResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/selectConfig.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/selfTest.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/selfTestResults.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/show.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template delete mode 100644 dogtag/tps-ui/shared/docroot/tokendb/showCert.template delete mode 100755 dogtag/tps-ui/shared/docroot/tokendb/userDelete.template delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/adminauthenticatepanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/adminpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/agentauthenticatepanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/authdbpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/cainfopanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/certchainpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/certprettyprintpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/certrequestpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_addhsm.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_db.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_hsm.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_hsmloginpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_join.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_rootca.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/createsubsystempanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/databasepanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/displaycertchain2panel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/displaycertchainpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/drminfopanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/footer.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/header.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/hierarchypanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/importadmincertpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/login.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/modulepanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/namepanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/securitydomainloginpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/securitydomainpanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/sidemenu.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/sizepanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/tksinfopanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/topmenu.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/welcomepanel.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/wizard.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/config/xml.vm delete mode 100644 dogtag/tps-ui/shared/docroot/tps/admin/console/js/misc.js diff --git a/base/tps/apache/cgi-bin/demo/Enroll.html b/base/tps/apache/cgi-bin/demo/Enroll.html new file mode 100755 index 000000000..79c660712 --- /dev/null +++ b/base/tps/apache/cgi-bin/demo/Enroll.html @@ -0,0 +1,81 @@ + + + + + + + +Enrollment + + + + +
    + diff --git a/base/tps/apache/cgi-bin/sow/enroll_temp.cgi b/base/tps/apache/cgi-bin/sow/enroll_temp.cgi new file mode 100755 index 000000000..5817039a2 --- /dev/null +++ b/base/tps/apache/cgi-bin/sow/enroll_temp.cgi @@ -0,0 +1,246 @@ +#! /usr/bin/perl -w +# +# --- 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; +# version 2.1 of the License. +# +# 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 --- +# +######################################################################## +# +# Script: esc.cgi +# Author: Kin Blas () +# Date: 12/19/2003 +# +# CGI.pm Docs: +# +# http://stein.cshl.org/WWW/software/CGI/ +# +######################################################################## + +[REQUIRE_CFG_PL] + +use CGI; +use Mozilla::LDAP::Conn; +use PKI::TPS::Common; + +$gQuery = new CGI; + +sub authorize +{ + my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; + $client_dn =~ tr/A-Z/a-z/; # all lower cases + $client_dn =~ s/\s+//g; # remove all spacing + + if (&is_agent($client_dn)) { + return 1; + } + return 0; +} + +sub DoPage +{ + if (!&authorize()) { + print $gQuery->redirect("/cgi-bin/sow/noaccess.cgi"); + return; + } + + $gQueryAction = "default"; + $gQueryOverrideAction = "default"; + + @gCookieNames = ("ascScreenName", + "ascSubscriptionType", + "ascBindings"); + + $gQueryAction = $gQuery->param("action") if + (defined $gQuery->param("action")); + + $gQueryOverrideAction = $gQuery->param("override_action") + if (defined $gQuery->param("override_action")); + + if ($gQueryOverrideAction ne "default") + { + $gQueryAction = $gQueryOverrideAction; + } + +######################################################################## +# +# If no action was provided, we default to showing our +# admin page! +# +# http://www.foo.com/esc.cgi +# +######################################################################## + + if ($gQueryAction eq "default") + { + GenerateEnrollmentPage(); + exit 0; + } +} + +sub ExitError +{ + my($str) = @_; + print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); + exit 0; +} + +sub GetScreenName +{ + my $sn = ""; + + if (defined $gQuery->param("screenname")) + { + $sn = $gQuery->param("screenname"); + } else { + $sn = "default"; + } + + return $sn; +} + +sub GetKeyType +{ + my $keyType = 0; + + if (defined $gQuery->param("keytype")) + { + $keyType = $gQuery->param("keytype"); + } + + return $keyType; +} + +sub GetKeyID +{ + my $keyID = ""; + + if (defined $gQuery->param("keyid")) + { + $keyID = $gQuery->param("keyid"); + } + + return $keyID; +} + +sub GetKeyLabelArg +{ + my $keyLabel = ""; + + if (defined $gQuery->param("keylabel")) + { + $keyLabel = $gQuery->param("keylabel"); + } + + return $keyLabel; +} + +sub HaveScreenName +{ + return 1 if (GetScreenName() ne ""); + return 0; +} + +sub IsSubscriber +{ + my $subType = $gUserObj{'SUBSCRIPTION'}; + return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); + + return 0; +} + +sub GetNextAction +{ + my($nextActn) = "default"; + + if (defined $gQuery->param('nextaction')) + { + $nextActn = $gQuery->param('nextaction'); + } + elsif (defined $gQuery->param('action')) + { + $nextActn = $gQuery->param('action'); + } + + return $nextActn; +} + +sub GenerateEnrollmentPage +{ + my ($l); + my $ldap_host = get_ldap_host(); + my $ldap_port = get_ldap_port(); + my $secureconn = get_ldap_secure(); + my $basedn = get_base_dn(); + my $port = get_port(); + my $host = get_host(); + my $secure_port = get_secure_port(); + my $certdir = get_ldap_certdir(); + + ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< enroll_temp.html")); + + print $gQuery->header(); + + my $uid = $gQuery->param("uid"); + + my $conn = PKI::TPS::Common::make_connection( + {host => $ldap_host, port => $ldap_port, cert => $certdir}, + $secureconn); + + ExitError("Failed to connect to the database. $msg") if (!$conn); + + my $entry = $conn->search ( $basedn, + "sub", + "uid=$uid", + 0 + ); + + if (!$entry) { + $conn->close(); + ExitError("User $uid not found"); + } + + my $givenName = ($entry->getValues("givenName"))[0] || "-"; + my $cn = ($entry->getValues("cn"))[0] || "-"; + my $sn = ($entry->getValues("sn"))[0] ||"-"; + $uid = ($entry->getValues("uid"))[0] || "-"; + my $mail = ($entry->getValues("mail"))[0] || "-"; + my $phone = ($entry->getValues("telephoneNumber"))[0] || "-"; + my $departmentNumber = ($entry->getValues("departmentNumber"))[0] || ""; + my $employeeNumber = ($entry->getValues("employeeNumber"))[0] || ""; + + while ($l = ) + { + $l =~ s/\$mail/$mail/g; + $l =~ s/\$uid/$uid/g; + $l =~ s/\$givenName/$givenName/g; + $l =~ s/\$sn/$sn/g; + $l =~ s/\$cn/$cn/g; + $l =~ s/\$phone/$phone/g; + $l =~ s/\$departmentNumber/$departmentNumber/g; + $l =~ s/\$employeeNumber/$employeeNumber/g; + $l =~ s/\$host/$host/g; + $l =~ s/\$port/$port/g; + $l =~ s/\$secure_port/$secure_port/g; + print $l; + } + + close(ENROLL_FILE); +} + +&DoPage(); diff --git a/base/tps/apache/cgi-bin/sow/enroll_temp.html b/base/tps/apache/cgi-bin/sow/enroll_temp.html new file mode 100755 index 000000000..342eddb1b --- /dev/null +++ b/base/tps/apache/cgi-bin/sow/enroll_temp.html @@ -0,0 +1,231 @@ + + + + + + +Enrollment + + + + + + + + + +
    + // + + + var objBody = document.getElementsByTagName("body").item(0); + + var objOverlay = document.createElement("div"); + objOverlay.setAttribute('id','overlay'); + objOverlay.style.display = 'none'; + objOverlay.onclick = function() { myLightbox.end(); return false; } + objBody.appendChild(objOverlay); + + var objLightbox = document.createElement("div"); + objLightbox.setAttribute('id','lightbox'); + objLightbox.style.display = 'none'; + objBody.appendChild(objLightbox); + + var objOuterImageContainer = document.createElement("div"); + objOuterImageContainer.setAttribute('id','outerImageContainer'); + objLightbox.appendChild(objOuterImageContainer); + + var objImageContainer = document.createElement("div"); + objImageContainer.setAttribute('id','imageContainer'); + objOuterImageContainer.appendChild(objImageContainer); + + var objLightboxImage = document.createElement("img"); + objLightboxImage.setAttribute('id','lightboxImage'); + objImageContainer.appendChild(objLightboxImage); + + var objHoverNav = document.createElement("div"); + objHoverNav.setAttribute('id','hoverNav'); + objImageContainer.appendChild(objHoverNav); + + var objPrevLink = document.createElement("a"); + objPrevLink.setAttribute('id','prevLink'); + objPrevLink.setAttribute('href','#'); + objHoverNav.appendChild(objPrevLink); + + var objNextLink = document.createElement("a"); + objNextLink.setAttribute('id','nextLink'); + objNextLink.setAttribute('href','#'); + objHoverNav.appendChild(objNextLink); + + var objLoading = document.createElement("div"); + objLoading.setAttribute('id','loading'); + objImageContainer.appendChild(objLoading); + + var objLoadingLink = document.createElement("a"); + objLoadingLink.setAttribute('id','loadingLink'); + objLoadingLink.setAttribute('href','#'); + objLoadingLink.onclick = function() { myLightbox.end(); return false; } + objLoading.appendChild(objLoadingLink); + + var objLoadingImage = document.createElement("img"); + objLoadingImage.setAttribute('src', fileLoadingImage); + objLoadingLink.appendChild(objLoadingImage); + + var objImageDataContainer = document.createElement("div"); + objImageDataContainer.setAttribute('id','imageDataContainer'); + objImageDataContainer.className = 'clearfix'; + objLightbox.appendChild(objImageDataContainer); + + var objImageData = document.createElement("div"); + objImageData.setAttribute('id','imageData'); + objImageDataContainer.appendChild(objImageData); + + var objImageDetails = document.createElement("div"); + objImageDetails.setAttribute('id','imageDetails'); + objImageData.appendChild(objImageDetails); + + var objCaption = document.createElement("span"); + objCaption.setAttribute('id','caption'); + objImageDetails.appendChild(objCaption); + + var objNumberDisplay = document.createElement("span"); + objNumberDisplay.setAttribute('id','numberDisplay'); + objImageDetails.appendChild(objNumberDisplay); + + var objBottomNav = document.createElement("div"); + objBottomNav.setAttribute('id','bottomNav'); + objImageData.appendChild(objBottomNav); + + var objBottomNavCloseLink = document.createElement("a"); + objBottomNavCloseLink.setAttribute('id','bottomNavClose'); + objBottomNavCloseLink.setAttribute('href','#'); + objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; } + objBottomNav.appendChild(objBottomNavCloseLink); + + var objBottomNavCloseImage = document.createElement("img"); + objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage); + objBottomNavCloseLink.appendChild(objBottomNavCloseImage); + }, + + // + // start() + // Display overlay and lightbox. If image is part of a set, add siblings to imageArray. + // + start: function(imageLink) { + + hideSelectBoxes(); + + // stretch overlay to fill page and fade in + var arrayPageSize = getPageSize(); + Element.setHeight('overlay', arrayPageSize[1]); + new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.8 }); + + imageArray = []; + imageNum = 0; + + if (!document.getElementsByTagName){ return; } + var anchors = document.getElementsByTagName('a'); + + // if image is NOT part of a set.. + if((imageLink.getAttribute('rel') == 'lightbox')){ + // add single image to imageArray + imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title'))); + } else { + // if image is part of a set.. + + // loop through anchors, find other images in set, and add them to imageArray + for (var i=0; i 1){ + Element.show('numberDisplay'); + Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length); + } + + new Effect.Parallel( + [ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration + 0.25, from: 0.0, to: 1.0 }), + new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ], + { duration: 0.65, afterFinish: function() { myLightbox.updateNav();} } + ); + }, + + // + // updateNav() + // Display appropriate previous and next hover navigation. + // + updateNav: function() { + + Element.show('hoverNav'); + + // if not first image in set, display prev image button + if(activeImage != 0){ + Element.show('prevLink'); + document.getElementById('prevLink').onclick = function() { + myLightbox.changeImage(activeImage - 1); return false; + } + } + + // if not last image in set, display next image button + if(activeImage != (imageArray.length - 1)){ + Element.show('nextLink'); + document.getElementById('nextLink').onclick = function() { + myLightbox.changeImage(activeImage + 1); return false; + } + } + + this.enableKeyboardNav(); + }, + + // + // enableKeyboardNav() + // + enableKeyboardNav: function() { + document.onkeydown = this.keyboardAction; + }, + + // + // disableKeyboardNav() + // + disableKeyboardNav: function() { + document.onkeydown = ''; + }, + + // + // keyboardAction() + // + keyboardAction: function(e) { + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + + key = String.fromCharCode(keycode).toLowerCase(); + + if((key == 'x') || (key == 'o') || (key == 'c')){ // close lightbox + myLightbox.end(); + } else if(key == 'p'){ // display previous image + if(activeImage != 0){ + myLightbox.disableKeyboardNav(); + myLightbox.changeImage(activeImage - 1); + } + } else if(key == 'n'){ // display next image + if(activeImage != (imageArray.length - 1)){ + myLightbox.disableKeyboardNav(); + myLightbox.changeImage(activeImage + 1); + } + } + + + }, + + // + // preloadNeighborImages() + // Preload previous and next images. + // + preloadNeighborImages: function(){ + + if((imageArray.length - 1) > activeImage){ + preloadNextImage = new Image(); + preloadNextImage.src = imageArray[activeImage + 1][0]; + } + if(activeImage > 0){ + preloadPrevImage = new Image(); + preloadPrevImage.src = imageArray[activeImage - 1][0]; + } + + }, + + // + // end() + // + end: function() { + this.disableKeyboardNav(); + Element.hide('lightbox'); + new Effect.Fade('overlay', { duration: 0.2}); + showSelectBoxes(); + } +} + +// ----------------------------------------------------------------------------------- + +// +// getPageScroll() +// Returns array with x,y page scroll values. +// Core code from - quirksmode.org +// +function getPageScroll(){ + + var yScroll; + + if (self.pageYOffset) { + yScroll = self.pageYOffset; + } else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict + yScroll = document.documentElement.scrollTop; + } else if (document.body) {// all other Explorers + yScroll = document.body.scrollTop; + } + + arrayPageScroll = new Array('',yScroll) + return arrayPageScroll; +} + +// ----------------------------------------------------------------------------------- + +// +// getPageSize() +// Returns array with page width, height and window width, height +// Core code from - quirksmode.org +// Edit for Firefox by pHaez +// +function getPageSize(){ + + var xScroll, yScroll; + + if (window.innerHeight && window.scrollMaxY) { + xScroll = document.body.scrollWidth; + yScroll = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac + xScroll = document.body.scrollWidth; + yScroll = document.body.scrollHeight; + } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari + xScroll = document.body.offsetWidth; + yScroll = document.body.offsetHeight; + } + + var windowWidth, windowHeight; + if (self.innerHeight) { // all except Explorer + windowWidth = self.innerWidth; + windowHeight = self.innerHeight; + } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode + windowWidth = document.documentElement.clientWidth; + windowHeight = document.documentElement.clientHeight; + } else if (document.body) { // other Explorers + windowWidth = document.body.clientWidth; + windowHeight = document.body.clientHeight; + } + + // for small pages with total height less then height of the viewport + if(yScroll < windowHeight){ + pageHeight = windowHeight; + } else { + pageHeight = yScroll; + } + + // for small pages with total width less then width of the viewport + if(xScroll < windowWidth){ + pageWidth = windowWidth; + } else { + pageWidth = xScroll; + } + + + arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) + return arrayPageSize; +} + +// ----------------------------------------------------------------------------------- + +// +// getKey(key) +// Gets keycode. If 'x' is pressed then it hides the lightbox. +// +function getKey(e){ + if (e == null) { // ie + keycode = event.keyCode; + } else { // mozilla + keycode = e.which; + } + key = String.fromCharCode(keycode).toLowerCase(); + + if(key == 'x'){ + } +} + +// ----------------------------------------------------------------------------------- + +// +// listenKey() +// +function listenKey () { document.onkeypress = getKey; } + +// --------------------------------------------------- + +function showSelectBoxes(){ + selects = document.getElementsByTagName("select"); + for (i = 0; i != selects.length; i++) { + selects[i].style.visibility = "visible"; + } +} + +// --------------------------------------------------- + +function hideSelectBoxes(){ + selects = document.getElementsByTagName("select"); + for (i = 0; i != selects.length; i++) { + selects[i].style.visibility = "hidden"; + } +} + +// --------------------------------------------------- + +// +// pause(numberMillis) +// Pauses code execution for specified time. Uses busy code, not good. +// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602 +// +function pause(numberMillis) { + var now = new Date(); + var exitTime = now.getTime() + numberMillis; + while (true) { + now = new Date(); + if (now.getTime() > exitTime) + return; + } +} + +// --------------------------------------------------- + + + +function initLightbox() { myLightbox = new Lightbox(); } +Event.observe(window, 'load', initLightbox, false); diff --git a/base/tps/apache/docroot/esc/sow/js/prototype.js b/base/tps/apache/docroot/esc/sow/js/prototype.js new file mode 100755 index 000000000..e9ccd3c88 --- /dev/null +++ b/base/tps/apache/docroot/esc/sow/js/prototype.js @@ -0,0 +1,1785 @@ +/* Prototype JavaScript framework, version 1.4.0 + * (c) 2005 Sam Stephenson + * + * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff + * against the source tree, available from the Prototype darcs repository. + * + * Prototype is freely distributable under the terms of an MIT-style license. + * + * For details, see the Prototype web site: http://prototype.conio.net/ + * +/*--------------------------------------------------------------------------*/ + +var Prototype = { + Version: '1.4.0', + ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', + + emptyFunction: function() {}, + K: function(x) {return x} +} + +var Class = { + create: function() { + return function() { + this.initialize.apply(this, arguments); + } + } +} + +var Abstract = new Object(); + +Object.extend = function(destination, source) { + for (property in source) { + destination[property] = source[property]; + } + return destination; +} + +Object.inspect = function(object) { + try { + if (object == undefined) return 'undefined'; + if (object == null) return 'null'; + return object.inspect ? object.inspect() : object.toString(); + } catch (e) { + if (e instanceof RangeError) return '...'; + throw e; + } +} + +Function.prototype.bind = function() { + var __method = this, args = $A(arguments), object = args.shift(); + return function() { + return __method.apply(object, args.concat($A(arguments))); + } +} + +Function.prototype.bindAsEventListener = function(object) { + var __method = this; + return function(event) { + return __method.call(object, event || window.event); + } +} + +Object.extend(Number.prototype, { + toColorPart: function() { + var digits = this.toString(16); + if (this < 16) return '0' + digits; + return digits; + }, + + succ: function() { + return this + 1; + }, + + times: function(iterator) { + $R(0, this, true).each(iterator); + return this; + } +}); + +var Try = { + these: function() { + var returnValue; + + for (var i = 0; i < arguments.length; i++) { + var lambda = arguments[i]; + try { + returnValue = lambda(); + break; + } catch (e) {} + } + + return returnValue; + } +} + +/*--------------------------------------------------------------------------*/ + +var PeriodicalExecuter = Class.create(); +PeriodicalExecuter.prototype = { + initialize: function(callback, frequency) { + this.callback = callback; + this.frequency = frequency; + this.currentlyExecuting = false; + + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + if (!this.currentlyExecuting) { + try { + this.currentlyExecuting = true; + this.callback(); + } finally { + this.currentlyExecuting = false; + } + } + } +} + +/*--------------------------------------------------------------------------*/ + +function $() { + var elements = new Array(); + + for (var i = 0; i < arguments.length; i++) { + var element = arguments[i]; + if (typeof element == 'string') + element = document.getElementById(element); + + if (arguments.length == 1) + return element; + + elements.push(element); + } + + return elements; +} +Object.extend(String.prototype, { + stripTags: function() { + return this.replace(/<\/?[^>]+>/gi, ''); + }, + + stripScripts: function() { + return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); + }, + + extractScripts: function() { + var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); + var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); + return (this.match(matchAll) || []).map(function(scriptTag) { + return (scriptTag.match(matchOne) || ['', ''])[1]; + }); + }, + + evalScripts: function() { + return this.extractScripts().map(eval); + }, + + escapeHTML: function() { + var div = document.createElement('div'); + var text = document.createTextNode(this); + div.appendChild(text); + return div.innerHTML; + }, + + unescapeHTML: function() { + var div = document.createElement('div'); + div.innerHTML = this.stripTags(); + return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; + }, + + toQueryParams: function() { + var pairs = this.match(/^\??(.*)$/)[1].split('&'); + return pairs.inject({}, function(params, pairString) { + var pair = pairString.split('='); + params[pair[0]] = pair[1]; + return params; + }); + }, + + toArray: function() { + return this.split(''); + }, + + camelize: function() { + var oStringList = this.split('-'); + if (oStringList.length == 1) return oStringList[0]; + + var camelizedString = this.indexOf('-') == 0 + ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) + : oStringList[0]; + + for (var i = 1, len = oStringList.length; i < len; i++) { + var s = oStringList[i]; + camelizedString += s.charAt(0).toUpperCase() + s.substring(1); + } + + return camelizedString; + }, + + inspect: function() { + return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'"; + } +}); + +String.prototype.parseQuery = String.prototype.toQueryParams; + +var $break = new Object(); +var $continue = new Object(); + +var Enumerable = { + each: function(iterator) { + var index = 0; + try { + this._each(function(value) { + try { + iterator(value, index++); + } catch (e) { + if (e != $continue) throw e; + } + }); + } catch (e) { + if (e != $break) throw e; + } + }, + + all: function(iterator) { + var result = true; + this.each(function(value, index) { + result = result && !!(iterator || Prototype.K)(value, index); + if (!result) throw $break; + }); + return result; + }, + + any: function(iterator) { + var result = true; + this.each(function(value, index) { + if (result = !!(iterator || Prototype.K)(value, index)) + throw $break; + }); + return result; + }, + + collect: function(iterator) { + var results = []; + this.each(function(value, index) { + results.push(iterator(value, index)); + }); + return results; + }, + + detect: function (iterator) { + var result; + this.each(function(value, index) { + if (iterator(value, index)) { + result = value; + throw $break; + } + }); + return result; + }, + + findAll: function(iterator) { + var results = []; + this.each(function(value, index) { + if (iterator(value, index)) + results.push(value); + }); + return results; + }, + + grep: function(pattern, iterator) { + var results = []; + this.each(function(value, index) { + var stringValue = value.toString(); + if (stringValue.match(pattern)) + results.push((iterator || Prototype.K)(value, index)); + }) + return results; + }, + + include: function(object) { + var found = false; + this.each(function(value) { + if (value == object) { + found = true; + throw $break; + } + }); + return found; + }, + + inject: function(memo, iterator) { + this.each(function(value, index) { + memo = iterator(memo, value, index); + }); + return memo; + }, + + invoke: function(method) { + var args = $A(arguments).slice(1); + return this.collect(function(value) { + return value[method].apply(value, args); + }); + }, + + max: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value >= (result || value)) + result = value; + }); + return result; + }, + + min: function(iterator) { + var result; + this.each(function(value, index) { + value = (iterator || Prototype.K)(value, index); + if (value <= (result || value)) + result = value; + }); + return result; + }, + + partition: function(iterator) { + var trues = [], falses = []; + this.each(function(value, index) { + ((iterator || Prototype.K)(value, index) ? + trues : falses).push(value); + }); + return [trues, falses]; + }, + + pluck: function(property) { + var results = []; + this.each(function(value, index) { + results.push(value[property]); + }); + return results; + }, + + reject: function(iterator) { + var results = []; + this.each(function(value, index) { + if (!iterator(value, index)) + results.push(value); + }); + return results; + }, + + sortBy: function(iterator) { + return this.collect(function(value, index) { + return {value: value, criteria: iterator(value, index)}; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }).pluck('value'); + }, + + toArray: function() { + return this.collect(Prototype.K); + }, + + zip: function() { + var iterator = Prototype.K, args = $A(arguments); + if (typeof args.last() == 'function') + iterator = args.pop(); + + var collections = [this].concat(args).map($A); + return this.map(function(value, index) { + iterator(value = collections.pluck(index)); + return value; + }); + }, + + inspect: function() { + return '#'; + } +} + +Object.extend(Enumerable, { + map: Enumerable.collect, + find: Enumerable.detect, + select: Enumerable.findAll, + member: Enumerable.include, + entries: Enumerable.toArray +}); +var $A = Array.from = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) { + return iterable.toArray(); + } else { + var results = []; + for (var i = 0; i < iterable.length; i++) + results.push(iterable[i]); + return results; + } +} + +Object.extend(Array.prototype, Enumerable); + +Array.prototype._reverse = Array.prototype.reverse; + +Object.extend(Array.prototype, { + _each: function(iterator) { + for (var i = 0; i < this.length; i++) + iterator(this[i]); + }, + + clear: function() { + this.length = 0; + return this; + }, + + first: function() { + return this[0]; + }, + + last: function() { + return this[this.length - 1]; + }, + + compact: function() { + return this.select(function(value) { + return value != undefined || value != null; + }); + }, + + flatten: function() { + return this.inject([], function(array, value) { + return array.concat(value.constructor == Array ? + value.flatten() : [value]); + }); + }, + + without: function() { + var values = $A(arguments); + return this.select(function(value) { + return !values.include(value); + }); + }, + + indexOf: function(object) { + for (var i = 0; i < this.length; i++) + if (this[i] == object) return i; + return -1; + }, + + reverse: function(inline) { + return (inline !== false ? this : this.toArray())._reverse(); + }, + + shift: function() { + var result = this[0]; + for (var i = 0; i < this.length - 1; i++) + this[i] = this[i + 1]; + this.length--; + return result; + }, + + inspect: function() { + return '[' + this.map(Object.inspect).join(', ') + ']'; + } +}); +var Hash = { + _each: function(iterator) { + for (key in this) { + var value = this[key]; + if (typeof value == 'function') continue; + + var pair = [key, value]; + pair.key = key; + pair.value = value; + iterator(pair); + } + }, + + keys: function() { + return this.pluck('key'); + }, + + values: function() { + return this.pluck('value'); + }, + + merge: function(hash) { + return $H(hash).inject($H(this), function(mergedHash, pair) { + mergedHash[pair.key] = pair.value; + return mergedHash; + }); + }, + + toQueryString: function() { + return this.map(function(pair) { + return pair.map(encodeURIComponent).join('='); + }).join('&'); + }, + + inspect: function() { + return '#'; + } +} + +function $H(object) { + var hash = Object.extend({}, object || {}); + Object.extend(hash, Enumerable); + Object.extend(hash, Hash); + return hash; +} +ObjectRange = Class.create(); +Object.extend(ObjectRange.prototype, Enumerable); +Object.extend(ObjectRange.prototype, { + initialize: function(start, end, exclusive) { + this.start = start; + this.end = end; + this.exclusive = exclusive; + }, + + _each: function(iterator) { + var value = this.start; + do { + iterator(value); + value = value.succ(); + } while (this.include(value)); + }, + + include: function(value) { + if (value < this.start) + return false; + if (this.exclusive) + return value < this.end; + return value <= this.end; + } +}); + +var $R = function(start, end, exclusive) { + return new ObjectRange(start, end, exclusive); +} + +var Ajax = { + getTransport: function() { + return Try.these( + function() {return new ActiveXObject('Msxml2.XMLHTTP')}, + function() {return new ActiveXObject('Microsoft.XMLHTTP')}, + function() {return new XMLHttpRequest()} + ) || false; + }, + + activeRequestCount: 0 +} + +Ajax.Responders = { + responders: [], + + _each: function(iterator) { + this.responders._each(iterator); + }, + + register: function(responderToAdd) { + if (!this.include(responderToAdd)) + this.responders.push(responderToAdd); + }, + + unregister: function(responderToRemove) { + this.responders = this.responders.without(responderToRemove); + }, + + dispatch: function(callback, request, transport, json) { + this.each(function(responder) { + if (responder[callback] && typeof responder[callback] == 'function') { + try { + responder[callback].apply(responder, [request, transport, json]); + } catch (e) {} + } + }); + } +}; + +Object.extend(Ajax.Responders, Enumerable); + +Ajax.Responders.register({ + onCreate: function() { + Ajax.activeRequestCount++; + }, + + onComplete: function() { + Ajax.activeRequestCount--; + } +}); + +Ajax.Base = function() {}; +Ajax.Base.prototype = { + setOptions: function(options) { + this.options = { + method: 'post', + asynchronous: true, + parameters: '' + } + Object.extend(this.options, options || {}); + }, + + responseIsSuccess: function() { + return this.transport.status == undefined + || this.transport.status == 0 + || (this.transport.status >= 200 && this.transport.status < 300); + }, + + responseIsFailure: function() { + return !this.responseIsSuccess(); + } +} + +Ajax.Request = Class.create(); +Ajax.Request.Events = + ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; + +Ajax.Request.prototype = Object.extend(new Ajax.Base(), { + initialize: function(url, options) { + this.transport = Ajax.getTransport(); + this.setOptions(options); + this.request(url); + }, + + request: function(url) { + var parameters = this.options.parameters || ''; + if (parameters.length > 0) parameters += '&_='; + + try { + this.url = url; + if (this.options.method == 'get' && parameters.length > 0) + this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; + + Ajax.Responders.dispatch('onCreate', this, this.transport); + + this.transport.open(this.options.method, this.url, + this.options.asynchronous); + + if (this.options.asynchronous) { + this.transport.onreadystatechange = this.onStateChange.bind(this); + setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); + } + + this.setRequestHeaders(); + + var body = this.options.postBody ? this.options.postBody : parameters; + this.transport.send(this.options.method == 'post' ? body : null); + + } catch (e) { + this.dispatchException(e); + } + }, + + setRequestHeaders: function() { + var requestHeaders = + ['X-Requested-With', 'XMLHttpRequest', + 'X-Prototype-Version', Prototype.Version]; + + if (this.options.method == 'post') { + requestHeaders.push('Content-type', + 'application/x-www-form-urlencoded'); + + /* Force "Connection: close" for Mozilla browsers to work around + * a bug where XMLHttpReqeuest sends an incorrect Content-length + * header. See Mozilla Bugzilla #246651. + */ + if (this.transport.overrideMimeType) + requestHeaders.push('Connection', 'close'); + } + + if (this.options.requestHeaders) + requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); + + for (var i = 0; i < requestHeaders.length; i += 2) + this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); + }, + + onStateChange: function() { + var readyState = this.transport.readyState; + if (readyState != 1) + this.respondToReadyState(this.transport.readyState); + }, + + header: function(name) { + try { + return this.transport.getResponseHeader(name); + } catch (e) {} + }, + + evalJSON: function() { + try { + return eval(this.header('X-JSON')); + } catch (e) {} + }, + + evalResponse: function() { + try { + return eval(this.transport.responseText); + } catch (e) { + this.dispatchException(e); + } + }, + + respondToReadyState: function(readyState) { + var event = Ajax.Request.Events[readyState]; + var transport = this.transport, json = this.evalJSON(); + + if (event == 'Complete') { + try { + (this.options['on' + this.transport.status] + || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] + || Prototype.emptyFunction)(transport, json); + } catch (e) { + this.dispatchException(e); + } + + if ((this.header('Content-type') || '').match(/^text\/javascript/i)) + this.evalResponse(); + } + + try { + (this.options['on' + event] || Prototype.emptyFunction)(transport, json); + Ajax.Responders.dispatch('on' + event, this, transport, json); + } catch (e) { + this.dispatchException(e); + } + + /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ + if (event == 'Complete') + this.transport.onreadystatechange = Prototype.emptyFunction; + }, + + dispatchException: function(exception) { + (this.options.onException || Prototype.emptyFunction)(this, exception); + Ajax.Responders.dispatch('onException', this, exception); + } +}); + +Ajax.Updater = Class.create(); + +Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { + initialize: function(container, url, options) { + this.containers = { + success: container.success ? $(container.success) : $(container), + failure: container.failure ? $(container.failure) : + (container.success ? null : $(container)) + } + + this.transport = Ajax.getTransport(); + this.setOptions(options); + + var onComplete = this.options.onComplete || Prototype.emptyFunction; + this.options.onComplete = (function(transport, object) { + this.updateContent(); + onComplete(transport, object); + }).bind(this); + + this.request(url); + }, + + updateContent: function() { + var receiver = this.responseIsSuccess() ? + this.containers.success : this.containers.failure; + var response = this.transport.responseText; + + if (!this.options.evalScripts) + response = response.stripScripts(); + + if (receiver) { + if (this.options.insertion) { + new this.options.insertion(receiver, response); + } else { + Element.update(receiver, response); + } + } + + if (this.responseIsSuccess()) { + if (this.onComplete) + setTimeout(this.onComplete.bind(this), 10); + } + } +}); + +Ajax.PeriodicalUpdater = Class.create(); +Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { + initialize: function(container, url, options) { + this.setOptions(options); + this.onComplete = this.options.onComplete; + + this.frequency = (this.options.frequency || 2); + this.decay = (this.options.decay || 1); + + this.updater = {}; + this.container = container; + this.url = url; + + this.start(); + }, + + start: function() { + this.options.onComplete = this.updateComplete.bind(this); + this.onTimerEvent(); + }, + + stop: function() { + this.updater.onComplete = undefined; + clearTimeout(this.timer); + (this.onComplete || Prototype.emptyFunction).apply(this, arguments); + }, + + updateComplete: function(request) { + if (this.options.decay) { + this.decay = (request.responseText == this.lastText ? + this.decay * this.options.decay : 1); + + this.lastText = request.responseText; + } + this.timer = setTimeout(this.onTimerEvent.bind(this), + this.decay * this.frequency * 1000); + }, + + onTimerEvent: function() { + this.updater = new Ajax.Updater(this.container, this.url, this.options); + } +}); +document.getElementsByClassName = function(className, parentElement) { + var children = ($(parentElement) || document.body).getElementsByTagName('*'); + return $A(children).inject([], function(elements, child) { + if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) + elements.push(child); + return elements; + }); +} + +/*--------------------------------------------------------------------------*/ + +if (!window.Element) { + var Element = new Object(); +} + +Object.extend(Element, { + visible: function(element) { + return $(element).style.display != 'none'; + }, + + toggle: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + Element[Element.visible(element) ? 'hide' : 'show'](element); + } + }, + + hide: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = 'none'; + } + }, + + show: function() { + for (var i = 0; i < arguments.length; i++) { + var element = $(arguments[i]); + element.style.display = ''; + } + }, + + remove: function(element) { + element = $(element); + element.parentNode.removeChild(element); + }, + + update: function(element, html) { + $(element).innerHTML = html.stripScripts(); + setTimeout(function() {html.evalScripts()}, 10); + }, + + getHeight: function(element) { + element = $(element); + return element.offsetHeight; + }, + + classNames: function(element) { + return new Element.ClassNames(element); + }, + + hasClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).include(className); + }, + + addClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).add(className); + }, + + removeClassName: function(element, className) { + if (!(element = $(element))) return; + return Element.classNames(element).remove(className); + }, + + // removes whitespace-only text node children + cleanWhitespace: function(element) { + element = $(element); + for (var i = 0; i < element.childNodes.length; i++) { + var node = element.childNodes[i]; + if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) + Element.remove(node); + } + }, + + empty: function(element) { + return $(element).innerHTML.match(/^\s*$/); + }, + + scrollTo: function(element) { + element = $(element); + var x = element.x ? element.x : element.offsetLeft, + y = element.y ? element.y : element.offsetTop; + window.scrollTo(x, y); + }, + + getStyle: function(element, style) { + element = $(element); + var value = element.style[style.camelize()]; + if (!value) { + if (document.defaultView && document.defaultView.getComputedStyle) { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css.getPropertyValue(style) : null; + } else if (element.currentStyle) { + value = element.currentStyle[style.camelize()]; + } + } + + if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) + if (Element.getStyle(element, 'position') == 'static') value = 'auto'; + + return value == 'auto' ? null : value; + }, + + setStyle: function(element, style) { + element = $(element); + for (name in style) + element.style[name.camelize()] = style[name]; + }, + + getDimensions: function(element) { + element = $(element); + if (Element.getStyle(element, 'display') != 'none') + return {width: element.offsetWidth, height: element.offsetHeight}; + + // All *Width and *Height properties give 0 on elements with display none, + // so enable the element temporarily + var els = element.style; + var originalVisibility = els.visibility; + var originalPosition = els.position; + els.visibility = 'hidden'; + els.position = 'absolute'; + els.display = ''; + var originalWidth = element.clientWidth; + var originalHeight = element.clientHeight; + els.display = 'none'; + els.position = originalPosition; + els.visibility = originalVisibility; + return {width: originalWidth, height: originalHeight}; + }, + + makePositioned: function(element) { + element = $(element); + var pos = Element.getStyle(element, 'position'); + if (pos == 'static' || !pos) { + element._madePositioned = true; + element.style.position = 'relative'; + // Opera returns the offset relative to the positioning context, when an + // element is position relative but top and left have not been defined + if (window.opera) { + element.style.top = 0; + element.style.left = 0; + } + } + }, + + undoPositioned: function(element) { + element = $(element); + if (element._madePositioned) { + element._madePositioned = undefined; + element.style.position = + element.style.top = + element.style.left = + element.style.bottom = + element.style.right = ''; + } + }, + + makeClipping: function(element) { + element = $(element); + if (element._overflow) return; + element._overflow = element.style.overflow; + if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') + element.style.overflow = 'hidden'; + }, + + undoClipping: function(element) { + element = $(element); + if (element._overflow) return; + element.style.overflow = element._overflow; + element._overflow = undefined; + } +}); + +var Toggle = new Object(); +Toggle.display = Element.toggle; + +/*--------------------------------------------------------------------------*/ + +Abstract.Insertion = function(adjacency) { + this.adjacency = adjacency; +} + +Abstract.Insertion.prototype = { + initialize: function(element, content) { + this.element = $(element); + this.content = content.stripScripts(); + + if (this.adjacency && this.element.insertAdjacentHTML) { + try { + this.element.insertAdjacentHTML(this.adjacency, this.content); + } catch (e) { + if (this.element.tagName.toLowerCase() == 'tbody') { + this.insertContent(this.contentFromAnonymousTable()); + } else { + throw e; + } + } + } else { + this.range = this.element.ownerDocument.createRange(); + if (this.initializeRange) this.initializeRange(); + this.insertContent([this.range.createContextualFragment(this.content)]); + } + + setTimeout(function() {content.evalScripts()}, 10); + }, + + contentFromAnonymousTable: function() { + var div = document.createElement('div'); + div.innerHTML = '' + this.content + '
    '; + return $A(div.childNodes[0].childNodes[0].childNodes); + } +} + +var Insertion = new Object(); + +Insertion.Before = Class.create(); +Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { + initializeRange: function() { + this.range.setStartBefore(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, this.element); + }).bind(this)); + } +}); + +Insertion.Top = Class.create(); +Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(true); + }, + + insertContent: function(fragments) { + fragments.reverse(false).each((function(fragment) { + this.element.insertBefore(fragment, this.element.firstChild); + }).bind(this)); + } +}); + +Insertion.Bottom = Class.create(); +Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { + initializeRange: function() { + this.range.selectNodeContents(this.element); + this.range.collapse(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.appendChild(fragment); + }).bind(this)); + } +}); + +Insertion.After = Class.create(); +Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { + initializeRange: function() { + this.range.setStartAfter(this.element); + }, + + insertContent: function(fragments) { + fragments.each((function(fragment) { + this.element.parentNode.insertBefore(fragment, + this.element.nextSibling); + }).bind(this)); + } +}); + +/*--------------------------------------------------------------------------*/ + +Element.ClassNames = Class.create(); +Element.ClassNames.prototype = { + initialize: function(element) { + this.element = $(element); + }, + + _each: function(iterator) { + this.element.className.split(/\s+/).select(function(name) { + return name.length > 0; + })._each(iterator); + }, + + set: function(className) { + this.element.className = className; + }, + + add: function(classNameToAdd) { + if (this.include(classNameToAdd)) return; + this.set(this.toArray().concat(classNameToAdd).join(' ')); + }, + + remove: function(classNameToRemove) { + if (!this.include(classNameToRemove)) return; + this.set(this.select(function(className) { + return className != classNameToRemove; + }).join(' ')); + }, + + toString: function() { + return this.toArray().join(' '); + } +} + +Object.extend(Element.ClassNames.prototype, Enumerable); +var Field = { + clear: function() { + for (var i = 0; i < arguments.length; i++) + $(arguments[i]).value = ''; + }, + + focus: function(element) { + $(element).focus(); + }, + + present: function() { + for (var i = 0; i < arguments.length; i++) + if ($(arguments[i]).value == '') return false; + return true; + }, + + select: function(element) { + $(element).select(); + }, + + activate: function(element) { + element = $(element); + element.focus(); + if (element.select) + element.select(); + } +} + +/*--------------------------------------------------------------------------*/ + +var Form = { + serialize: function(form) { + var elements = Form.getElements($(form)); + var queryComponents = new Array(); + + for (var i = 0; i < elements.length; i++) { + var queryComponent = Form.Element.serialize(elements[i]); + if (queryComponent) + queryComponents.push(queryComponent); + } + + return queryComponents.join('&'); + }, + + getElements: function(form) { + form = $(form); + var elements = new Array(); + + for (tagName in Form.Element.Serializers) { + var tagElements = form.getElementsByTagName(tagName); + for (var j = 0; j < tagElements.length; j++) + elements.push(tagElements[j]); + } + return elements; + }, + + getInputs: function(form, typeName, name) { + form = $(form); + var inputs = form.getElementsByTagName('input'); + + if (!typeName && !name) + return inputs; + + var matchingInputs = new Array(); + for (var i = 0; i < inputs.length; i++) { + var input = inputs[i]; + if ((typeName && input.type != typeName) || + (name && input.name != name)) + continue; + matchingInputs.push(input); + } + + return matchingInputs; + }, + + disable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.blur(); + element.disabled = 'true'; + } + }, + + enable: function(form) { + var elements = Form.getElements(form); + for (var i = 0; i < elements.length; i++) { + var element = elements[i]; + element.disabled = ''; + } + }, + + findFirstElement: function(form) { + return Form.getElements(form).find(function(element) { + return element.type != 'hidden' && !element.disabled && + ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); + }); + }, + + focusFirstElement: function(form) { + Field.activate(Form.findFirstElement(form)); + }, + + reset: function(form) { + $(form).reset(); + } +} + +Form.Element = { + serialize: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) { + var key = encodeURIComponent(parameter[0]); + if (key.length == 0) return; + + if (parameter[1].constructor != Array) + parameter[1] = [parameter[1]]; + + return parameter[1].map(function(value) { + return key + '=' + encodeURIComponent(value); + }).join('&'); + } + }, + + getValue: function(element) { + element = $(element); + var method = element.tagName.toLowerCase(); + var parameter = Form.Element.Serializers[method](element); + + if (parameter) + return parameter[1]; + } +} + +Form.Element.Serializers = { + input: function(element) { + switch (element.type.toLowerCase()) { + case 'submit': + case 'hidden': + case 'password': + case 'text': + return Form.Element.Serializers.textarea(element); + case 'checkbox': + case 'radio': + return Form.Element.Serializers.inputSelector(element); + } + return false; + }, + + inputSelector: function(element) { + if (element.checked) + return [element.name, element.value]; + }, + + textarea: function(element) { + return [element.name, element.value]; + }, + + select: function(element) { + return Form.Element.Serializers[element.type == 'select-one' ? + 'selectOne' : 'selectMany'](element); + }, + + selectOne: function(element) { + var value = '', opt, index = element.selectedIndex; + if (index >= 0) { + opt = element.options[index]; + value = opt.value; + if (!value && !('value' in opt)) + value = opt.text; + } + return [element.name, value]; + }, + + selectMany: function(element) { + var value = new Array(); + for (var i = 0; i < element.length; i++) { + var opt = element.options[i]; + if (opt.selected) { + var optValue = opt.value; + if (!optValue && !('value' in opt)) + optValue = opt.text; + value.push(optValue); + } + } + return [element.name, value]; + } +} + +/*--------------------------------------------------------------------------*/ + +var $F = Form.Element.getValue; + +/*--------------------------------------------------------------------------*/ + +Abstract.TimedObserver = function() {} +Abstract.TimedObserver.prototype = { + initialize: function(element, frequency, callback) { + this.frequency = frequency; + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + this.registerCallback(); + }, + + registerCallback: function() { + setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); + }, + + onTimerEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + } +} + +Form.Element.Observer = Class.create(); +Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.Observer = Class.create(); +Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); + +/*--------------------------------------------------------------------------*/ + +Abstract.EventObserver = function() {} +Abstract.EventObserver.prototype = { + initialize: function(element, callback) { + this.element = $(element); + this.callback = callback; + + this.lastValue = this.getValue(); + if (this.element.tagName.toLowerCase() == 'form') + this.registerFormCallbacks(); + else + this.registerCallback(this.element); + }, + + onElementEvent: function() { + var value = this.getValue(); + if (this.lastValue != value) { + this.callback(this.element, value); + this.lastValue = value; + } + }, + + registerFormCallbacks: function() { + var elements = Form.getElements(this.element); + for (var i = 0; i < elements.length; i++) + this.registerCallback(elements[i]); + }, + + registerCallback: function(element) { + if (element.type) { + switch (element.type.toLowerCase()) { + case 'checkbox': + case 'radio': + Event.observe(element, 'click', this.onElementEvent.bind(this)); + break; + case 'password': + case 'text': + case 'textarea': + case 'select-one': + case 'select-multiple': + Event.observe(element, 'change', this.onElementEvent.bind(this)); + break; + } + } + } +} + +Form.Element.EventObserver = Class.create(); +Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.Element.getValue(this.element); + } +}); + +Form.EventObserver = Class.create(); +Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { + getValue: function() { + return Form.serialize(this.element); + } +}); +if (!window.Event) { + var Event = new Object(); +} + +Object.extend(Event, { + KEY_BACKSPACE: 8, + KEY_TAB: 9, + KEY_RETURN: 13, + KEY_ESC: 27, + KEY_LEFT: 37, + KEY_UP: 38, + KEY_RIGHT: 39, + KEY_DOWN: 40, + KEY_DELETE: 46, + + element: function(event) { + return event.target || event.srcElement; + }, + + isLeftClick: function(event) { + return (((event.which) && (event.which == 1)) || + ((event.button) && (event.button == 1))); + }, + + pointerX: function(event) { + return event.pageX || (event.clientX + + (document.documentElement.scrollLeft || document.body.scrollLeft)); + }, + + pointerY: function(event) { + return event.pageY || (event.clientY + + (document.documentElement.scrollTop || document.body.scrollTop)); + }, + + stop: function(event) { + if (event.preventDefault) { + event.preventDefault(); + event.stopPropagation(); + } else { + event.returnValue = false; + event.cancelBubble = true; + } + }, + + // find the first node with the given tagName, starting from the + // node the event was triggered on; traverses the DOM upwards + findElement: function(event, tagName) { + var element = Event.element(event); + while (element.parentNode && (!element.tagName || + (element.tagName.toUpperCase() != tagName.toUpperCase()))) + element = element.parentNode; + return element; + }, + + observers: false, + + _observeAndCache: function(element, name, observer, useCapture) { + if (!this.observers) this.observers = []; + if (element.addEventListener) { + this.observers.push([element, name, observer, useCapture]); + element.addEventListener(name, observer, useCapture); + } else if (element.attachEvent) { + this.observers.push([element, name, observer, useCapture]); + element.attachEvent('on' + name, observer); + } + }, + + unloadCache: function() { + if (!Event.observers) return; + for (var i = 0; i < Event.observers.length; i++) { + Event.stopObserving.apply(this, Event.observers[i]); + Event.observers[i][0] = null; + } + Event.observers = false; + }, + + observe: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.attachEvent)) + name = 'keydown'; + + this._observeAndCache(element, name, observer, useCapture); + }, + + stopObserving: function(element, name, observer, useCapture) { + var element = $(element); + useCapture = useCapture || false; + + if (name == 'keypress' && + (navigator.appVersion.match(/Konqueror|Safari|KHTML/) + || element.detachEvent)) + name = 'keydown'; + + if (element.removeEventListener) { + element.removeEventListener(name, observer, useCapture); + } else if (element.detachEvent) { + element.detachEvent('on' + name, observer); + } + } +}); + +/* prevent memory leaks in IE */ +Event.observe(window, 'unload', Event.unloadCache, false); +var Position = { + // set to true if needed, warning: firefox performance problems + // NOT neeeded for page scrolling, only if draggable contained in + // scrollable elements + includeScrollOffsets: false, + + // must be called before calling withinIncludingScrolloffset, every time the + // page is scrolled + prepare: function() { + this.deltaX = window.pageXOffset + || document.documentElement.scrollLeft + || document.body.scrollLeft + || 0; + this.deltaY = window.pageYOffset + || document.documentElement.scrollTop + || document.body.scrollTop + || 0; + }, + + realOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.scrollTop || 0; + valueL += element.scrollLeft || 0; + element = element.parentNode; + } while (element); + return [valueL, valueT]; + }, + + cumulativeOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + } while (element); + return [valueL, valueT]; + }, + + positionedOffset: function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + element = element.offsetParent; + if (element) { + p = Element.getStyle(element, 'position'); + if (p == 'relative' || p == 'absolute') break; + } + } while (element); + return [valueL, valueT]; + }, + + offsetParent: function(element) { + if (element.offsetParent) return element.offsetParent; + if (element == document.body) return element; + + while ((element = element.parentNode) && element != document.body) + if (Element.getStyle(element, 'position') != 'static') + return element; + + return document.body; + }, + + // caches x/y coordinate pair to use with overlap + within: function(element, x, y) { + if (this.includeScrollOffsets) + return this.withinIncludingScrolloffsets(element, x, y); + this.xcomp = x; + this.ycomp = y; + this.offset = this.cumulativeOffset(element); + + return (y >= this.offset[1] && + y < this.offset[1] + element.offsetHeight && + x >= this.offset[0] && + x < this.offset[0] + element.offsetWidth); + }, + + withinIncludingScrolloffsets: function(element, x, y) { + var offsetcache = this.realOffset(element); + + this.xcomp = x + offsetcache[0] - this.deltaX; + this.ycomp = y + offsetcache[1] - this.deltaY; + this.offset = this.cumulativeOffset(element); + + return (this.ycomp >= this.offset[1] && + this.ycomp < this.offset[1] + element.offsetHeight && + this.xcomp >= this.offset[0] && + this.xcomp < this.offset[0] + element.offsetWidth); + }, + + // within must be called directly before + overlap: function(mode, element) { + if (!mode) return 0; + if (mode == 'vertical') + return ((this.offset[1] + element.offsetHeight) - this.ycomp) / + element.offsetHeight; + if (mode == 'horizontal') + return ((this.offset[0] + element.offsetWidth) - this.xcomp) / + element.offsetWidth; + }, + + clone: function(source, target) { + source = $(source); + target = $(target); + target.style.position = 'absolute'; + var offsets = this.cumulativeOffset(source); + target.style.top = offsets[1] + 'px'; + target.style.left = offsets[0] + 'px'; + target.style.width = source.offsetWidth + 'px'; + target.style.height = source.offsetHeight + 'px'; + }, + + page: function(forElement) { + var valueT = 0, valueL = 0; + + var element = forElement; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + + // Safari fix + if (element.offsetParent==document.body) + if (Element.getStyle(element,'position')=='absolute') break; + + } while (element = element.offsetParent); + + element = forElement; + do { + valueT -= element.scrollTop || 0; + valueL -= element.scrollLeft || 0; + } while (element = element.parentNode); + + return [valueL, valueT]; + }, + + clone: function(source, target) { + var options = Object.extend({ + setLeft: true, + setTop: true, + setWidth: true, + setHeight: true, + offsetTop: 0, + offsetLeft: 0 + }, arguments[2] || {}) + + // find page position of source + source = $(source); + var p = Position.page(source); + + // find coordinate system to use + target = $(target); + var delta = [0, 0]; + var parent = null; + // delta [0,0] will do fine with position: fixed elements, + // position:absolute needs offsetParent deltas + if (Element.getStyle(target,'position') == 'absolute') { + parent = Position.offsetParent(target); + delta = Position.page(parent); + } + + // correct by body offsets (fixes Safari) + if (parent == document.body) { + delta[0] -= document.body.offsetLeft; + delta[1] -= document.body.offsetTop; + } + + // set position + if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; + if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; + if(options.setWidth) target.style.width = source.offsetWidth + 'px'; + if(options.setHeight) target.style.height = source.offsetHeight + 'px'; + }, + + absolutize: function(element) { + element = $(element); + if (element.style.position == 'absolute') return; + Position.prepare(); + + var offsets = Position.positionedOffset(element); + var top = offsets[1]; + var left = offsets[0]; + var width = element.clientWidth; + var height = element.clientHeight; + + element._originalLeft = left - parseFloat(element.style.left || 0); + element._originalTop = top - parseFloat(element.style.top || 0); + element._originalWidth = element.style.width; + element._originalHeight = element.style.height; + + element.style.position = 'absolute'; + element.style.top = top + 'px';; + element.style.left = left + 'px';; + element.style.width = width + 'px';; + element.style.height = height + 'px';; + }, + + relativize: function(element) { + element = $(element); + if (element.style.position == 'relative') return; + Position.prepare(); + + element.style.position = 'relative'; + var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); + var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); + + element.style.top = top + 'px'; + element.style.left = left + 'px'; + element.style.height = element._originalHeight; + element.style.width = element._originalWidth; + } +} + +// Safari returns margins on body which is incorrect if the child is absolutely +// positioned. For performance reasons, redefine Position.cumulativeOffset for +// KHTML/WebKit only. +if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { + Position.cumulativeOffset = function(element) { + var valueT = 0, valueL = 0; + do { + valueT += element.offsetTop || 0; + valueL += element.offsetLeft || 0; + if (element.offsetParent == document.body) + if (Element.getStyle(element, 'position') == 'absolute') break; + + element = element.offsetParent; + } while (element); + + return [valueL, valueT]; + } +} \ No newline at end of file diff --git a/base/tps/apache/docroot/esc/sow/js/scriptaculous.js b/base/tps/apache/docroot/esc/sow/js/scriptaculous.js new file mode 100755 index 000000000..dac1228fb --- /dev/null +++ b/base/tps/apache/docroot/esc/sow/js/scriptaculous.js @@ -0,0 +1,45 @@ +// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Scriptaculous = { + Version: '1.5.1', + require: function(libraryName) { + // inserting via DOM fails in Safari 2.0, so brute force approach + document.write(''); + }, + load: function() { + if((typeof Prototype=='undefined') || + parseFloat(Prototype.Version.split(".")[0] + "." + + Prototype.Version.split(".")[1]) < 1.4) + throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0"); + + $A(document.getElementsByTagName("script")).findAll( function(s) { + return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) + }).each( function(s) { + var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,''); + var includes = s.src.match(/\?.*load=([a-z,]*)/); + (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each( + function(include) { Scriptaculous.require(path+include+'.js') }); + }); + } +} + +Scriptaculous.load(); \ No newline at end of file diff --git a/base/tps/apache/docroot/esc/sow/util.js b/base/tps/apache/docroot/esc/sow/util.js new file mode 100755 index 000000000..967e6e5ed --- /dev/null +++ b/base/tps/apache/docroot/esc/sow/util.js @@ -0,0 +1,1769 @@ +// --- 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 --- + +// +// initialize netkey globals +var netkey; + + +var keyUITable = new Array(); +var keyTypeTable = new Array(); +var curChildWindow = null; + +var gWindow = null; + +const ErrorText = "For additional assistance contact your Technical Support"; + + +function getUIForKey(aKeyID) +{ + return keyUITable[aKeyID]; + +} + +function getTypeForKey(aKeyID) +{ + return keyTypeTable[aKeyID]; +} + + +// +// Notify callback for GECKO +// +function jsNotify() {} + +jsNotify.prototype = { + + rhNotifyKeyStateChange: function(aKeyType,aKeyID,aKeyState,aData,strData) + { + OnCOOLKeyStateChange(aKeyType, aKeyID, aKeyState, aData,strData); + }, + + QueryInterface: function(iid) + { + + if(!iid.equals(Components.interfaces.rhIKeyNotify) && + !iid.equals(Components.interfaces.nsISupports)) + { + MyAlert("Can't find jsNotify interface"); + throw Components.results.NS_ERROR_NO_INTERFACE; + } + return this; + } +}; + +// +// Attach to the object. +// + // GECKO ONLY initialization + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + netkey = Components.classes["@redhat.com/rhCoolKey"].getService(); + netkey = netkey.QueryInterface(Components.interfaces.rhICoolKey); + gNotify = new jsNotify; + netkey.rhCoolKeySetNotifyCallback(gNotify); + } catch(e) { + MyAlert("Can't get UniversalXPConnect: " + e); + } + +// +// unregister our notify event +// +function cleanup() +{ + + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + netkey.rhCoolKeyUnSetNotifyCallback(gNotify); + } catch(e) { + MyAlert("Can't get UniversalXPConnect: " + e); + } +} + +var gScreenName = ""; +var gKeyEnrollmentType = "userKey"; + +var gCurrentSelectedRow = null; + + +var gCurKeyType = null; +var gCurKeyID = null; + +//////////////////////////////////////////////////////////////// +// +// Utility functions specific to this page. +// +//////////////////////////////////////////////////////////////// + + +// List of Error Messages to be printed out + +var Status_Messages = new Array( + + "Operation Completed Successfully.", + "Smartcard Server error.", + "Problem communicating with the smartcard.", + "Problem communicating with the smartcard.", + "Problem resetting smartcard's pin.", + "Internal Smartcard Server error.", + "Internal Smartcard Server error.", + "Smartcard enrollment error.", + "Can not communicate with the smartcard.", + "Internal Smartcard Server error.", + "Problem communicating with the Certificattion Authority.", + "Internal Smartcard Server error.", + "Error resetting the smartcard's password.", + "Internal Smartcard Server error.", + "Smartcard Server authentication failure.", + "Internal Smartcard Server error.", + "Your Smartcard is listed as disabled.", + "Problem communicating with the smartcard.", + "Internal Smartcard Server error.", + "Cannot upgrade smartcard software.", + "Internal Smartcard Server error.", + "Problem communicating with the smartcard.", + "Invalid smartcard type.", + "Invalid smartcard type.", + "Cannot publish smartcard information.", + "Cannot communicate with smartcard database.", + "Smartcard is disabled.", + "Cannot reset password value for the smartcard.", + "Connection to Smartcard Server lost.", + "Cannot create entry for smartcard in smartcard database.", + "Smartcard found to be in an inconsistent state.", + "Invalid reason for lost smartcard submitted.", + "Smartcard found to be unusable due to compromise.", + "No such inactive smartcard found.", + "Cannot process more than one active smartcard.", + "Internal Smartcard Server error.", + "Smartcard key recovery has been processed.", + "Smartcard key recovery failed.", + "Cannot process this smartcard, which has been reported lost.", + "Smartcard key archival error.", + "Problem connecting to the Smartcard TKS Server.", + "Failed to update smartcard database.", + "Internal certificate revocation error discovered.", + "User does not own this smartcard.", + "Smart Card Manager has been misconfigured.", + "Smart Card Manager can not talk to smart card reader.", + "Smart Card Manager can not establish a session with the smart card.", + "Smart Card Manager can not talk to Smart Card Server.", + "Smart Card Manager can not talk to smart card reader." + ); + +function GetAuthDataFromPopUp(aKeyType,aKeyID,aUiData) +{ + + keyUITable[aKeyID] = aUiData; + keyTypeTable[aKeyID] = aKeyType; + + //alert("GetAuthDataFromPopUp data " + aUiData); + var child = window.open("/GenericAuth.html",aKeyID,"height=400,width=400"); + + //alert("Attempted to create child window " + child); + + curChildWindow = child; + +} + +function COOLKeySetDataValue(aKeyType,aKeyID,name,value) +{ + //alert("In COOLKeySetDataValue aKeyType " + aKeyType + " aKeyID " + aKeyID + " name " + name + " value " + value); + if(netkey) + { + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + netkey.SetCoolKeyDataValue(aKeyType,aKeyID,name,value); + + + } catch(e) { + MyAlert("Error Setting data values: " + e); + } + } + +} + +function COOLKeySetTokenPin(pin) +{ + if(netkey) + { + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"TokenPin",pin); + + + } catch(e) { + MyAlert("Error Setting data values: " + e); + } + } +} + +function COOLKeySetUidPassword(uid,pwd) +{ + + if(netkey) + { + + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + + netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"UserId",uid); + + netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"Password",pwd); + + } catch(e) { + MyAlert("Error Setting data values: " + e); + } + + } + +} + + +function MyGetErrorMessage(status_code) +{ + + var result = "Internal Server Error"; + + if(status_code < 0 && status_code >= Status_Messages.length) + { + return result; + + } + + return Status_Messages[status_code]; + +} + +function KeyToRowID(keyType, keyID) +{ + return keyType + "--" + keyID; +} + +function RowIDToKeyInfo(rowID) +{ + return rowID.split("--"); +} + +function GetRowForKey(keyType, keyID) +{ + return document.getElementById(KeyToRowID(keyType, keyID)); +} + +function ReportException(msg, e) +{ + MyAlert(msg + " " + e.description + "(" + e.number + ")"); +} + +function GetCOOLKeyStatus(keyType, keyID) +{ + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + return netkey.GetCoolKeyStatus(keyType, keyID); + } catch (e) { + ReportException("netkey.GetCOOLKeyStatus() failed!", e); + return 0; + } +} + +function GetCOOLKeyPolicy(keyType, keyID) +{ + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + return netkey.GetCoolKeyPolicy(keyType, keyID); + } catch (e) { + // ReportException("netkey.GetCOOLKeyPolicy() failed!", e); + return ""; + } +} + +function GetCOOLKeyRequiresAuth(keyType, keyID) +{ + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + return netkey.GetCoolKeyRequiresAuthentication(keyType, keyID); + } catch(e) { + ReportException("netkey.GetCoolKeyRequiresAuthentication() failed!", e); + return false; + } +} + +function GetCOOLKeyIsAuthed(keyType, keyID) +{ + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + return netkey.GetCoolKeyIsAuthenticated(keyType, keyID); + } catch(e) { + ReportException("netkey.GetCoolKeyIsAuthenticated() failed!", e); + return false; + } +} + +function GetAvailableCOOLKeys() +{ + try { + var keyArr; + + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + var inArray = netkey.GetAvailableCoolKeys( {} ); + keyArr = new Array(inArray.length); + var i; + + for (i=0; i < keyArr.length; i++) { + keyArr[i] = new Array( "1", inArray[i]); + } + return keyArr; + } catch(e) { + ReportException("netkey.GetAvailableCoolKeys() failed!", e); + return []; + } +} + +function EnrollCOOLKey(keyType, keyID, enrollmentType, screenname, pin,screennamepwd,tokencode) +{ + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + netkey.EnrollCoolKey(keyType, keyID, enrollmentType, screenname, pin,screennamepwd,tokencode); + } catch(e) { + ReportException("netkey.EnrollCoolKey() failed!", e); + return false; + } + + return true; +} + +function GetCOOLKeyIsEnrolled(keyType, keyID) +{ + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + return netkey.GetCoolKeyIsEnrolled(keyType, keyID); + } catch(e) { + ReportException("netkey.GetCoolKeyIsEnrolled() failed!", e); + return false; + } +} + +function CancelCOOLKeyOperation(keyType, keyID) +{ + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + netkey.CancelCoolKeyOperation(keyType, keyID); + } catch(e) { + ReportException("netkey.CancelCoolKeyOperation() failed!", e); + return false; + } + return true; +} + +function MyAlert(message) +{ + if(message) + DoMyAlert(message,"Smart Card Manager"); + +} +function DoMyAlert(message,title) +{ + + if(!message || !title) + return; + + try { + + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + + var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); + + + prompts.alert(window,title,message); + + } catch(e) { + + + alert("Problem with nsIPromptService " + e); + } + +} + +// +// MSHTML/GECKO compatibility functions. +// +function RemoveRow(table, row) +{ + table.deleteRow(row.rowIndex); +} + +function GetCell(row, index) +{ + var cell; + + cell = row.cells[index]; + return cell; +} + +function GetNode(parent, index) +{ + var node; + node = parent.childNodes[index]; + return node; +} + +function InsertRow(table) +{ + var row; + + row = table.insertRow(table.rows.length); + return row; +} + +function InsertCell(row) +{ + var cell; + + cell = row.insertCell(row.cells.length); + return cell; +} + +function RemoveAllChildNodes(parent) +{ + var numChildren = parent.childNodes.length; + var i; + + i = numChildren; + while (numChildren) + { + parent.removeChild(GetNode(parent,0)); + numChildren--; + } + +} + + +function UpdateInfoForKeyID(keyType, keyID, keyStatus, reqAuth, isAuthed) +{ + var row = GetRowForKey(keyType, keyID); + + if (!row) + return; + + var cell = GetCell(row,1) + RemoveAllChildNodes(cell); + cell.appendChild(document.createTextNode(keyStatus)); + +// cell = GetCell(row,2); + // RemoveAllChildNodes(cell); + // cell.appendChild(document.createTextNode(reqAuth)); + + // cell = GetCell(row,3); + // RemoveAllChildNodes(cell); + // cell.appendChild(document.createTextNode(isAuthed)); +} + +function GetStatusForKeyID(keyType, keyID) +{ + var keyStatus = "BLANK"; + + var status; + + try { + status = GetCOOLKeyStatus(keyType, keyID); + } catch(e) { + status = 0; + } + + switch (status) { + case 0: // Unavailable + keyStatus = "UNAVAILABLE"; + break; + case 1: // AppletNotFound + keyStatus = "NO APPLET"; + break; + case 2: // Uninitialized + keyStatus = "UNINITIALIZED"; + break; + case 3: // Unknown + keyStatus = "UNKNOWN"; + break; + case 4: // Available + case 6: // UnblockInProgress + case 7: // PINResetInProgress + case 8: // RenewInProgress + keyStatus = PolicyToKeyType(GetCOOLKeyPolicy(keyType, keyID)); + break; + case 5: // EnrollmentInProgress + keyStatus = "BUSY"; + break; + break; + case 9: // FormatInProgress + keyStatus = "BUSY"; + break; + } + + return keyStatus; +} + +function InsertCOOLKeyIntoBindingTable(keyType, keyID) +{ + var row = GetRowForKey(keyType, keyID); + + gWindow = window; + if (!row) + { + var table = document.getElementById("BindingTable"); + if (table) + { + var keyStatus = GetStatusForKeyID(keyType, keyID); + var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); + var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); + + row = CreateTableRow(table, keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); + } + + if (!row) + return null; + } + + return row; +} + +function ConvertVariantArrayToJScriptArray(varr) +{ + // C++ native methods, like netkey.GetAvailableCOOLKeys(), can only + // return variant SafeArrays, so to access the data inside, you must + // first convert it to a VBArray, and then call toArray() to convert + // it to a JScript array. Lame, but that's what it takes to + // use an array returned from an ActiveX component. + + return new VBArray(varr).toArray(); +} + +function UpdateBindingTableAvailability() +{ + var arr = GetAvailableCOOLKeys(); + + if (!arr || arr.length < 1) + return; + + var i; + + for (i=0; i < arr.length; i++) + { + InsertCOOLKeyIntoBindingTable(arr[i][0], arr[i][1]); + + if (!gCurrentSelectedRow) + SelectRowByKeyID(arr[i][0], arr[i][1]); + } +} + +function InitializeBindingTable() +{ + UpdateBindingTableAvailability(); + UpdateButtonStates(); + if (UserOnDoneInitializeBindingTable) { + UserOnDoneInitializeBindingTable(); + } +} + +function KeyIsPresent(keyType, keyID) +{ + row = document.all.item(keyType, keyID); + + if (!row) + return false; + + return true; +} + +function SetStatusMessage(str) +{ + var cell = document.getElementById("statusMsg"); + + if (!cell) + return; + RemoveAllChildNodes(cell); + cell.appendChild(document.createTextNode(str)); +} + +function UpdateButtonStates() +{ + if (gCurrentSelectedRow) + { + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + var keyStatus = GetStatusForKeyID(keyType, keyID); + + document.getElementById("enrollbtn").disabled = false; + } + else + { + document.getElementById("enrollbtn").disabled = true; + } + + refresh(); +} + +function GetCurrentKeyID() +{ + if (gCurrentSelectedRow) + { + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + return keyID; + } else { + return "No Key Found!"; + } +} + +function SetEnrollmentType(type) +{ + gKeyEnrollmentType = type; + UpdateButtonStates(); +} + +function FindRow(node) +{ + while (node && node.tagName != "TR") + { + node = node.parentNode; + } + + return node; +} + +function SelectRow(row) +{ + if (!row || gCurrentSelectedRow == row) + return; + + if (gCurrentSelectedRow) + gCurrentSelectedRow.removeAttribute("style"); + + gCurrentSelectedRow = row; + gCurrentSelectedRow.style.backgroundColor="rgb(200,200,200)"; + UpdateButtonStates(); +} + +function SelectRowByKeyID(keyType, keyID) +{ + var row = GetRowForKey(keyType, keyID); + SelectRow(row); +} + +function DoSelectRow(event) +{ + var row; + + row = FindRow(event.parentNode); + SelectRow(row); +} + +function KeyToUIString(keyType, keyID) +{ + // If it's an COOLKey, format the keyID string. + + if (keyType == 1 && keyID.length == 20) + { + var re = /([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})/i; + keyID = keyID.replace(re, "$1-$2-$3-$4-$5").toLowerCase(); + } + + return keyID; +} + + + +function CreateTableRow(table, keyType, keyID, keyStatus, reqAuth, isAuthed) +{ + var row = InsertRow(table); + if (!row) + return null; + + row.setAttribute("id", KeyToRowID(keyType, keyID)); + + row.onclick = DoSelectRow; + + // Create the key ID cell. + //cell = InsertCell(row); + //cell.appendChild(document.createTextNode(KeyToUIString(keyType, keyID))); + + //cell.setAttribute("onClick", "DoSelectRow(this);"); + + // Create the keyStatus cell. + //cell = InsertCell(row); + //cell.appendChild(document.createTextNode(keyStatus)); + + // Create the requires auth cell. + // cell = InsertCell(row); + // cell.appendChild(document.createTextNode(reqAuth)); + + cell = InsertCell(row); + cell.appendChild(document.createTextNode("Enrollment Progress")); + + // Create the status bar cell + + cell = InsertCell(row); + + var progressMeter = document.createElement("div"); + progressMeter.setAttribute("id", KeyToProgressBarID(keyType, keyID)); + progressMeter.className = "ProgressMeter"; + progressMeter.style.width = "100px"; + progressMeter.style.height = "1.5em"; +// progressMeter.style.visibility = "hidden"; + progressMeter.setAttribute("value", 0); + + var progressBar = document.createElement("div"); + progressBar.className = "ProgressBar"; + progressBar.style.width = "0px"; + progressBar.style.height = "100%"; +// progressBar.style.visibility = "hidden"; + + var progressBarStatus = document.createElement("div"); + progressBarStatus.className = "ProgressBarStatus"; + progressBarStatus.appendChild(document.createTextNode("")); + + progressMeter.appendChild(progressBar); + progressMeter.appendChild(progressBarStatus); + cell.appendChild(progressMeter); + + //row.style.display ="none"; + + return row; +} + +gAnimationMSecs = 1000/30; + +function SetCylonTimer(cylonID, cylonEyeID) +{ + setTimeout("AnimateCylonStatusBar(\"" + cylonID + + "\", \"" + cylonEyeID + "\");", gAnimationMSecs); +} + +function AnimateCylonStatusBar(cylonID, cylonEyeID) +{ + var cylon = document.getElementById(cylonID); + + if (!cylon) + return; + + var active = cylon.getAttribute("cylonactive"); + + if (!active) + return; + + var eye = document.getElementById(cylonEyeID); + + if (!eye) + return; + + var dir = eye.getAttribute("direction"); + var wid = parseInt(eye.style.width); + var cywid = parseInt(cylon.style.width); + var left = parseInt(eye.style.left); + + var dx = 10; + + if (!dir || dir >= 0) + { + left += dx; + + if (left + wid > cywid) + { + left = cywid - wid; + eye.setAttribute("direction", "-1"); + } + } + else + { + left -= dx; + + if (left < 0) + { + left = 0; + eye.setAttribute("direction", "1"); + } + } + + eye.style.left = left + "px"; + + SetCylonTimer(cylonID, cylonEyeID); +} + +function StartCylonAnimation(cylonID, cylonEyeID) +{ + var cylon = document.getElementById(cylonID) + + if (!cylon) + return; + + var active = cylon.getAttribute("cylonactive"); + + if (!active) + { + cylon.setAttribute("cylonactive", "true"); + + var eye = document.getElementById(cylonEyeID); + if (eye) + { + eye.style.left = "0px"; + eye.style.visibility = "visible"; + } + + SetCylonTimer(cylonID, cylonEyeID); + } +} + +function StopCylonAnimation(cylonID, cylonEyeID) +{ + var cylon = document.getElementById(cylonID) + + if (cylon) + cylon.removeAttribute("cylonactive"); + + var eye = document.getElementById(cylonEyeID); + + if (eye) + eye.style.visibility = "hidden"; +} + +function GetProgressMeterValue(progMeterID) +{ + var progMeter = document.getElementById(progMeterID); + + if (!progMeter) + return -1; + + return parseInt(progMeter.getAttribute("value")); +} + +function SetProgressMeterValue(progMeterID, value) +{ + var progMeter = document.getElementById(progMeterID); + + if (!progMeter || value < 0) + return; + + if (value > 100) + value = 100; + + var progBar = progMeter.firstChild; + + if (value == 0) + { + progBar.style.width = "0px"; + progBar.style.visibility = "hidden"; + progMeter.setAttribute("value", 0); + return; + } + + progBar.style.visibility = "visible"; + + var newWidth = parseInt(progMeter.style.width) * value / 100 - 2; + + progBar.style.width = newWidth + "px"; + progMeter.setAttribute("value", value); +} + +function SetProgressMeterStatus(progMeterID, statusMsg) +{ + var progMeter = document.getElementById(progMeterID); + + if (!progMeter) + return; + + var progBar = progMeter.firstChild; + + // If it exists, the meter status should be + // div that is the next sibling of the progressMeter. + + var meterStatus = progBar.nextSibling; + + // Just replace the data in the text node, it's much faster, + // and reduces flashing! + + meterStatus.firstChild.replaceData(0, meterStatus.firstChild.length, statusMsg); +} + +function ClearProgressBar(progMeterID) +{ + SetProgressMeterValue(progMeterID, 0); + SetProgressMeterStatus(progMeterID, ""); +} + +function KeyToProgressBarID(keyType, keyID) +{ + return "PM" + keyType + "-" + keyID; +} + +//////////////////////////////////////////////////////////////// +// +// Functions that contact the server or talk directly to +// ESC native code. +// +// ESC Native Functions: +// +// netkey.GetAvailableCOOLKeys() +// +// - Returns an ActiveX Variant SafeArray containing the ID for each key +// that is currentlly plugged into the computer. Before accessing any +// data in this array you must convert it to a JScript Array with a +// call to ConvertVariantArrayToJScriptArray(). +// +// netkey.GetCOOLKeyIsEnrolled(keyType, keyID) +// +// - Returns true if a key has been initialized, false if it hasn't. +// Initialized means the card has been formatted with certificates +// for either an COOL HouseKey or NetKey. +// +// netkey.EnrollCOOLKey(keyType, keyID, enrollmentType, screenName, pin) +// +// - Initiates an async connection to the RA to initialize a specific +// key. If you want the key to be initialized as a HouseKey, you should +// pass "houseKey" as the enrollmentType, and null values for both +// screenName and pin. For a NetKey, use "netKey" as the enrollmentType, +// and pass a valid screenName and pin. +// +// +//////////////////////////////////////////////////////////////// + +function GetScreenNameValue() +{ + var sname = document.getElementById("snametf").value; + + if (! sname) + { + MyAlert("You must provide a valid LDAP User ID!"); + if (UserOnCOOLKeyStateError) { + UserOnCOOLKeyStateError(); // call user-level + } + return null; + } + + return sname; +} + +function GetPINValue() +{ + var pinVal = document.getElementById("pintf").value; + var rpinVal = document.getElementById("reenterpintf").value; + + if (! pinVal) + { + MyAlert("You must provide a valid Key Password!"); + if (UserOnCOOLKeyStateError) { + UserOnCOOLKeyStateError(); // call user-level + } + return null; + } + + if ( pinVal != rpinVal) + { + MyAlert("The Key Password values you entered do not match!"); + if (UserOnCOOLKeyStateError) { + UserOnCOOLKeyStateError(); // call user-level + } + return null; + } + + return pinVal; +} + +function GetScreenNamePwd() +{ + + var pwd = document.getElementById("snamepwd").value; + + if(!pwd) + { + MyAlert("You must provide a valid LDAP User ID !"); + if (UserOnCOOLKeyStateError) { + UserOnCOOLKeyStateError(); // call user-level + } + return null; + } + return pwd; +} + +function GetTokenCode() +{ + + return null; +} +function DoEnrollTempCOOLKey() +{ + + if (!gCurrentSelectedRow) + { + MyAlert("Please select a key."); + return; + } + + if(!Validate()) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + var type = gKeyEnrollmentType; + var screenname = null; + var pin = null; + + var screennamepwd = null; + var tokencode = null; + + screenname = GetScreenNameValue(); + + pin = GetPINValue(); + + + screennamepwd = GetScreenNamePwd(); + + tokencode = GetTokenCode(); + + //SetStatusMessage("Enrolling UserKey \"" + KeyToUIString(keyType, keyID) + "\"..."); + + StartCylonAnimation("cylon1", "eye1"); + + var doShow = true; + + ShowProgressBar(keyType,keyID,doShow ); + + if (!EnrollCOOLKey(keyType, keyID, 'userKeyTemporary', screenname, pin,screennamepwd,tokencode)) + { + SetStatusMessage(""); + StopCylonAnimation("cylon1", "eye1"); + var doShow = false; + ShowProgressBar(aKeyType,aKeyID,doShow ); + } +} +function DoEnrollCOOLKey() +{ + + if (!gCurrentSelectedRow) + { + MyAlert("Please select a key."); + return; + } + + if(!Validate()) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + var type = gKeyEnrollmentType; + var screenname = null; + var pin = null; + + var screennamepwd = null; + var tokencode = null; + + if (type == "userKey") + { + screenname = GetScreenNameValue(); + + pin = GetPINValue(); + + + screennamepwd = GetScreenNamePwd(); + + tokencode = GetTokenCode(); + + //SetStatusMessage("Enrolling UserKey \"" + KeyToUIString(keyType, keyID) + "\"..."); + } + + StartCylonAnimation("cylon1", "eye1"); + + var doShow = true; + + ShowProgressBar(keyType,keyID,doShow ); + + if (!EnrollCOOLKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)) + { + SetStatusMessage(""); + StopCylonAnimation("cylon1", "eye1"); + var doShow = false; + ShowProgressBar(aKeyType,aKeyID,doShow ); + } +} + +function DoResetSelectedCOOLKeyPIN() +{ + if (!gCurrentSelectedRow) + return; + + if(!Validate()) + return; + + //alert("In DoResetSelectedCOOLKeyPIN!"); + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + var screenname = null; + var pin = null; + var screennamepwd = null; + + if (GetCOOLKeyIsEnrolled(keyType, keyID)) + { + + SetStatusMessage("Resetting PIN for \"" + keyID + "\"..."); + StartCylonAnimation("cylon1", "eye1"); + + if (!ResetCOOLKeyPIN(keyType, keyID, screenname, pin,screennamepwd)) + { + SetStatusMessage(""); + StopCylonAnimation("cylon1", "eye1"); + } + } +} + +function DoSetURLCOOLKey() +{ + if (!gCurrentSelectedRow) + return; + + if(!Validate1()) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + var type = 'soUserKey'; + var screenname = null; + var pin = null; + + var screennamepwd = null; + var tokencode = null; + + SetStatusMessage("Formatting \"" + KeyToUIString(keyType, keyID) + "\" ..."); + StartCylonAnimation("cylon1", "eye1"); + + if (!FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)) + { + SetStatusMessage(""); + StopCylonAnimation("cylon1", "eye1"); + } +} + +function DoFormatSoCOOLKey() +{ + if (!gCurrentSelectedRow) + return; + + if(!Validate1()) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + var type = 'soCleanSOToken'; + var screenname = null; + var pin = null; + + var screennamepwd = null; + var tokencode = null; + + SetStatusMessage("Formatting \"" + KeyToUIString(keyType, keyID) + "\" ..."); + StartCylonAnimation("cylon1", "eye1"); + + if (!FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)) + { + SetStatusMessage(""); + StopCylonAnimation("cylon1", "eye1"); + } +} + +function DoFormatCOOLKey() +{ + if (!gCurrentSelectedRow) + return; + + if(!Validate1()) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + var type = 'soCleanUserToken'; + var screenname = null; + var pin = null; + + var screennamepwd = null; + var tokencode = null; + + SetStatusMessage("Formatting \"" + KeyToUIString(keyType, keyID) + "\" ..."); + StartCylonAnimation("cylon1", "eye1"); + + if (!FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)) + { + SetStatusMessage(""); + StopCylonAnimation("cylon1", "eye1"); + } +} + +function FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode) +{ + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + netkey.FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode); + } catch(e) { + ReportException(getBundleString("errorFormatCoolKey"), e); + return false; + } + return true; +} + +function DoCancelOperation() +{ + + if (!gCurrentSelectedRow) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + SetStatusMessage("Cancel operation for \"" + KeyToUIString(keyType, keyID) + "\" ..."); + StartCylonAnimation("cylon1", "eye1"); + + CancelCOOLKeyOperation(keyType, keyID); + + SetStatusMessage(""); + StopCylonAnimation("cylon1", "eye1"); +} + +function DoChallengeSelectedKey() +{ + if (!gCurrentSelectedRow) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + if (!keyID) + return; + + SetStatusMessage("Generating Challenge ..."); + + var challengeArray = ChallengeCOOLKey(keyType, keyID, document.forms[0].challengedata.value); + + if (challengeArray.length != 4) + { + MyAlert("Challenge for key \"" + KeyToUIString(keyType, keyID) + "\" failed!"); + SetStatusMessage(""); + return; + } + + MyAlert("ChallengeCOOLKey(\""+ KeyToUIString(keyType, keyID) + "\") returned:\n\n" + + "challenge[0]: " + challengeArray[0] + "\n" + + "challenge[1]: " + challengeArray[1] + "\n" + + "challenge[2]: " + challengeArray[2] + "\n" + + "challenge[3]: " + challengeArray[3] + "\n"); + + SetStatusMessage(""); +} + +function DoBlinkCOOLKey() +{ + if (!gCurrentSelectedRow) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + if (!keyID) + return; + + SetStatusMessage("Blinking \"" + KeyToUIString(keyType, keyID) + "\" ..."); + StartCylonAnimation("cylon1", "eye1"); + + BlinkCOOLKey(keyType, keyID, 400, 5000); + + StopCylonAnimation("cylon1", "eye1"); + SetStatusMessage(""); +} + +function OnCOOLKeyBlinkComplete(keyType,keyID) +{ + //StopCylonAnimation("cylon1", "eye1"); + //SetStatusMessage(" "); +} + +function DoHelp() +{ + if (!gCurrentSelectedRow) + return; + + var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); + var keyType = keyInfo[0]; + var keyID = keyInfo[1]; + + if (!keyID) + return; + + var policy = GetCOOLKeyPolicy(keyType, keyID); + var type = PolicyToKeyType(policy); + MyAlert("Policy: " + policy + "\n" + "Type: " + type); +} + +//////////////////////////////////////////////////////////////// +// +// Functions called directly from ASC native code. +// +//////////////////////////////////////////////////////////////// + +function OnCOOLKeyInserted(keyType, keyID) +{ + var row = InsertCOOLKeyIntoBindingTable(keyType, keyID); + + if (!gCurrentSelectedRow) + SelectRowByKeyID(keyType, keyID); + if (UserOnCOOLKeyInserted) { + UserOnCOOLKeyInserted(keyType, keyID); + } +} + + +function OnCOOLKeyRemoved(keyType, keyID) +{ + var row = GetRowForKey(keyType, keyID); + var table = document.getElementById("BindingTable"); + + if (row && table) + { + RemoveRow(table,row); + + if (row == gCurrentSelectedRow) + gCurrentSelectedRow = null; + } + + UpdateButtonStates(); + if (UserOnCOOLKeyRemoved) { + UserOnCOOLKeyRemoved(keyType, keyID); + } +} + +var gKnownPolicies = [ + + // OID Value, precedence, name value + + [ "OID.1.3.6.1.4.1.1066.1.1000.1.0.1.1", 1, "HOUSEKEY" ], // Bronze - HouseKey + [ "OID.1.3.6.1.4.1.1066.1.1000.1.0.1.2", 2, "NETKEY" ], // Silver - Member + [ "OID.1.3.6.1.4.1.1066.1.1000.1.0.1.3", 3, "NETKEY" ], // Gold - Associate + [ "OID.1.3.6.1.4.1.1066.1.1000.1.0.1.4", 4, "NETKEY" ], // Platinum - MyDoctor + + // XXX: Remove the Old OIDs below, after the RA starts generating + // certificates with the OIDs listed above! + [ "OID.1.3.6.1.4.1.1066.1.1000.2.1", 1, "HOUSEKEY" ], // Bronze - HouseKey + [ "OID.1.3.6.1.4.1.1066.1.1000.2.2", 2, "NETKEY" ], // Silver - Member + [ "OID.1.3.6.1.4.1.1066.1.1000.2.3", 3, "NETKEY" ], // Gold - Associate + [ "OID.1.3.6.1.4.1.1066.1.1000.2.4", 4, "NETKEY" ] // Platinum - MyDoctor +]; + +function PolicyToKeyType(policy) +{ + return "ENROLLED"; +} + +function OldPolicyToKeyType(policy) +{ + var i, j; + + var knownPoliciesIndex = -1; + + + var policies; + + + if (policy.indexOf(",")== -1) + { + policies = new Array(1); + policies[0] = policy; + } + else + { + policies = policy.split(","); + } + + for (j = 0; j < policies.length; j++) + { + for (i = 0; i < gKnownPolicies.length; i++) + { + if (gKnownPolicies[i][0] == policies[j]) + { + if (knownPoliciesIndex < gKnownPolicies[i][1]) + knownPoliciesIndex = i; + } + } + } + + if (knownPoliciesIndex == -1) + return "INITIALIZED"; + + return gKnownPolicies[knownPoliciesIndex][2]; +} + +function BoolToYesNoStr(b) +{ + if (b) + return "YES"; + return "NO"; +} + +function OnCOOLKeyEnrollmentComplete(keyType, keyID) +{ + var keyStatus = PolicyToKeyType(GetCOOLKeyPolicy(keyType, keyID)); + var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); + var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); + + //UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); + UpdateButtonStates(); + + StopCylonAnimation("cylon1", "eye1"); + var doShow = false; + ShowProgressBar(keyType,keyID, doShow); + SetStatusMessage(""); + MyAlert("Enrollment of smartcard complete!"); + ClearProgressBar(KeyToProgressBarID(keyType, keyID)); + + window.setTimeout("loadSuccessPage()",4); +} + +function OnCOOLKeyPINResetComplete(keyType, keyID) +{ + var keyStatus = PolicyToKeyType(GetCOOLKeyPolicy(keyType, keyID)); + var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); + var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); + + UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); + UpdateButtonStates(); + + StopCylonAnimation("cylon1", "eye1"); + SetStatusMessage(""); + MyAlert("Password Reset was successful!"); + ClearProgressBar(KeyToProgressBarID(keyType, keyID)); +} + +function OnCOOLKeyFormatComplete(keyType, keyID) +{ + var keyStatus = GetStatusForKeyID(keyType, keyID); + var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); + var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); + + UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); + + StopCylonAnimation("cylon1", "eye1"); + SetStatusMessage(""); + MyAlert("Format of \"" + KeyToUIString(keyType, keyID)+ "\" was successful!"); + ClearProgressBar(KeyToProgressBarID(keyType, keyID)); + if (UserOnCOOLKeyFormatComplete) { + UserOnCOOLKeyFormatComplete(); // call user-level + } +} + +function OnCOOLKeyStateError(keyType, keyID, keyState, errorCode) +{ + var keyStatus = GetStatusForKeyID(keyType, keyID); + var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); + var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); + + if(curChildWindow) + { + curChildWindow.close(); + curChildWindow = null; + + } + + var doShow = false; + ShowProgressBar(keyType,keyID, doShow); + + //UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); + + StopCylonAnimation("cylon1", "eye1"); + SetStatusMessage(""); + + var typeStr = "Error(" + errorCode + ")"; + + var messageStr = " \n\n Error Response: " + MyGetErrorMessage(errorCode) ; + + var keyIDStr = KeyToUIString(keyType, keyID); + + if (keyState == 1004) + typeStr = "Enrollment of key failed. " + typeStr + messageStr ; + else if (keyState == 1016) + typeStr = "Formatting of key failed. " + typeStr + messageStr; + else if (keyState == 1010) + typeStr = "PIN Reset for key failed. " + typeStr + messageStr; + else if (keyState == 1020) + typeStr = "Operation for key canceled."; + + typeStr += " \n " + ErrorText; + MyAlert(typeStr); + ClearProgressBar(KeyToProgressBarID(keyType, keyID)); + if (UserOnCOOLKeyStateError) { + UserOnCOOLKeyStateError(); // call user-level + } +} + +function OnCOOLKeyStatusUpdate(progMeterID, statusUpdate) +{ + SetProgressMeterValue(progMeterID, statusUpdate); + SetProgressMeterStatus(progMeterID, statusUpdate + "%"); +} + +function Validate1() +{ + + var type = gKeyEnrollmentType; + var screenname = null; + var pin = null; + + var screennamepwd = null; + var tokencode = null; + + screenname = ''; + screennamepwd = 'netscape'; + pin = 'netscape' + + return 1; +} +function Validate() +{ + + var type = gKeyEnrollmentType; + var screenname = null; + var pin = null; + + var screennamepwd = null; + var tokencode = null; + + if (type == "userKey") + { + screenname = GetScreenNameValue(); + if (! screenname) + return 0; + + screennamepwd = GetScreenNamePwd(); + + if(! screennamepwd) + return 0; + + pin = GetPINValue(); + + if (! pin) + return 0; + + } + + return 1; +} + +function OnCOOLKeyStateChange(keyType, keyID, keyState, data,strData) +{ + // alert("KeyID: " + keyID + "\n" + + // "KeyState: " + keyState + "\n" + + // "Data: " + data); + //alert("State Change ="+keyState); + + switch(keyState) + { + case 1000: // KeyInserted + OnCOOLKeyInserted(keyType, keyID); + break; + case 1001: // KeyRemoved + OnCOOLKeyRemoved(keyType, keyID); + break; + case 1002: // EnrollmentStart + // OnCOOLKeyEnrollmentStart(keyType, keyID); + break; + case 1003: // EnrollmentComplete + OnCOOLKeyEnrollmentComplete(keyType, keyID); + break; + case 1004: // EnrollmentError + OnCOOLKeyStateError(keyType, keyID, keyState, data); + break; + case 1008: // PINResetStart + // OnCOOLKeyPINResetStart(keyType, keyID); + break; + case 1009: // PINResetComplete + OnCOOLKeyPINResetComplete(keyType, keyID); + break; + case 1010: // PINResetError + OnCOOLKeyStateError(keyType, keyID, keyState, data); + break; + case 1014: // FormatStart + // OnCOOLKeyFormatStart(keyType, keyID); + break; + case 1015: // FormatComplete + OnCOOLKeyFormatComplete(keyType, keyID); + break; + case 1016: // FormatError + OnCOOLKeyStateError(keyType, keyID, keyState, data); + break; + case 1017: // BlinkStatus Update? + //OnCOOLKeyStateError(keyType, keyID, keyState, data); + break; + case 1018: + OnCOOLKeyBlinkComplete(keyType, keyID); + break; + case 1020: // OperationCancelled + OnCOOLKeyStateError(keyType, keyID, keyState, data); + break; + case 1021: // OperationStatusUpdate + OnCOOLKeyStatusUpdate(KeyToProgressBarID(keyType, keyID), data); + if(UserOnCOOLKeyStatusUpdate) + UserOnCOOLKeyStatusUpdate(data); + break; + + case 1022: //Need Auth + + + gCurKeyID = keyID; + gCurKeyType = keyType; + + GetAuthDataFromPopUp(keyType,keyID,strData); + + break; + + } +} + +function refresh() +{ + window.resizeBy(0,1); + window.resizeBy(0,-1); + +} + +function loadSuccessPage() +{ + window.location="/esc/sow/EnrollSuccess.html"; +} + +function ShowProgressBar(aKeyType,aKeyID, doShow) +{ + if(!gCurrentSelectedRow) + return; + + if(doShow) + gCurrentSelectedRow.style.display="table-row"; + else + { + gCurrentSelectedRow.style.display="none"; + } +} +function DoCoolKeySetConfigValue(configValue,newValue) +{ + if(!configValue || !newValue) + return null; + + var result = null; + + if(netkey) + { + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + + result = netkey.SetCoolKeyConfigValue(configValue,newValue); + + } catch(e) { + MyAlert(getBundleString("errorConfigValue") + " " + e); + } + + } + + return result; +} + +//Is the user "uid" an "agent" or "user" +// Input "type" either "agent" or "user" + +function IsAgentOrUser(uid,type) +{ + var url = window.location.href; + var lastSlash = 0; + + var result = false; + + if(!uid || !type) + return false; + + var isAgent = 0; + + if(type == "agent") + isAgent = 1; + + //Accept either uid=name or name + + if(uid.lastIndexOf("uid=") < 0) + { + uid = "uid=" + uid; + } + + if(url) + { + lastSlash = url.lastIndexOf("/"); + } + if(lastSlash > 0) + { + url = url.substring(0,lastSlash); + } + + if(isAgent) + url = url + "/is_agent.cgi?" + uid; + else + url = url + "/is_user.cgi?" + uid; + + var req = new XMLHttpRequest(); + req.open('GET',url,false); + req.send(null); + if(req.status == 200) + { + //alert(req.responseText); + if(req.responseText.lastIndexOf("yes") >= 0) + { + result = true; + } + } + return result; +} + +function GetCoolKeyIssuedTo(keyType,keyID) +{ + var keyStatus = GetStatusForKeyID(keyType,keyID); + + var issuedTo = null; + + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + issuedTo = netkey.GetCoolKeyUID(keyType,keyID); + + } catch (e) + { + } + return issuedTo; +} + diff --git a/base/tps/apache/docroot/footer.vm b/base/tps/apache/docroot/footer.vm new file mode 100755 index 000000000..a596e45b1 --- /dev/null +++ b/base/tps/apache/docroot/footer.vm @@ -0,0 +1,19 @@ + + diff --git a/base/tps/apache/docroot/header.vm b/base/tps/apache/docroot/header.vm new file mode 100755 index 000000000..3824b87f3 --- /dev/null +++ b/base/tps/apache/docroot/header.vm @@ -0,0 +1,26 @@ + + diff --git a/base/tps/apache/docroot/index.cgi b/base/tps/apache/docroot/index.cgi new file mode 100755 index 000000000..0e643166b --- /dev/null +++ b/base/tps/apache/docroot/index.cgi @@ -0,0 +1,76 @@ +#!/usr/bin/perl +# +# --- 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 --- +# +# +# +# + +package op; + +use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; + +use CGI; +use PKI::Service::Op; +use Template::Velocity; +use PKI::Base::Conf; +use PKI::Base::Registry; + +use vars qw (@ISA); +use PKI::Service::Op; +@ISA = qw(PKI::Service::Op); + +sub new { + my $self = {}; + bless ($self); + return $self; +} + +sub process() +{ + my $self = shift; + + my $q = CGI->new(); + + my $docroot = PKI::Base::Registry->get_docroot(); + my $parser = PKI::Base::Registry->get_parser(); + my $cfg = PKI::Base::Registry->get_config(); + + $self->debug_params($cfg, $q); + + $::symbol{machineName} = $cfg->get("service.machineName"); + $::symbol{non_clientauth_securePort} = $cfg->get("service.non_clientauth_securePort"); + $::symbol{securePort} = $cfg->get("service.securePort"); + $::symbol{unsecurePort} = $cfg->get("service.unsecurePort"); + + my $result = $parser->execute_file("index.vm"); + + my $xml = $q->param('xml'); + if ($xml eq "true") { + print "Content-Type: text/xml\n\n"; + print $self->xml_output(\%::symbol); + } else { + print "Content-Type: text/html\n\n"; + print "$result"; + } +} + + +my $op = op->new(); +$op->execute(); diff --git a/base/tps/apache/docroot/index.html b/base/tps/apache/docroot/index.html new file mode 100644 index 000000000..b225251a1 --- /dev/null +++ b/base/tps/apache/docroot/index.html @@ -0,0 +1,22 @@ + + + + diff --git a/base/tps/apache/docroot/index.vm b/base/tps/apache/docroot/index.vm new file mode 100755 index 000000000..438d014ef --- /dev/null +++ b/base/tps/apache/docroot/index.vm @@ -0,0 +1,89 @@ + + + + +TPS Services + + + + + + + +#include ( "header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + + +Certificate System TPS Services Page +
    +

    + +

    +

    + + + + + + + + + + +
    + +
  • Operator Services
  • +
    +
    + +
  • Agent Services
  • +
    +
    + +
  • Administrator Services
  • +
    +
    +
    +#include ( "footer.vm" ) + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
                  Red Hat® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
                  Red Hat® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
                  Red Hat® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
                  Red Hat® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
                  Red Hat® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
                  Red Hat® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS Error! + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS Agent + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tokens
    • List/Search Tokens
     
    Certificates
    • List/Search Certificates
     
    Activities
    • List/Search Activities
     
    Advanced Configuration
    +


    +
    + + 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 @@ + + + + + + +TPS Admin + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Tokens
    • List/Search Tokens
    • Add New Token
     
    Users
    • Add User
    • List Users
    • Search Users
     
    Activities
    • List/Search Activities
     
    Self Tests
    • Run Self Tests
     
    Auditing
    • Configure Signed Audit
     
    Advanced Configuration
    • General
    +


    +
    + + 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 @@ + + + + + + +TPS Operator + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + + + +
     
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Tokens
    • List/Search Tokens
     
    Certificates
    • List/Search Certificates
     
    Activities
    • List/Search Activities
    +


    +
    + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + + +
    + + Token ID: + + + +
    +
    +
    + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + + + + + + + + + + + + + + + + + + + +
    + + User ID: + + + +
    + + User First Name: + + + +
    + + User Last Name: + + + +
    + + Role: + + Operator + +     Agent + +     Admin + +
    + + Certificate: + + + +
    +
    +
    + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + + + + + + + + + + +
    + + Token ID: + + + +
    + + User ID: + + + +
    + + Max Count: + + + +
    +
    +
    + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + + + + + + + + + + +
    + + Token ID: + + + +
    + + User ID: + + + +
    + + Max Count: + + + +
    +
    +
    + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + + + + + + + + + + +
    + + Token ID: + + + +
    + + User ID: + + + +
    + + Max Count: + + + +
    +
    +
    + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + + + + + + + + + + +
    + + Token ID: + + + +
    + + User ID: + + + +
    + + Max Count: + + + +
    +
    +
    + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + + + + + + + + + + +
    + + Token ID: + + + +
    + + User ID: + + + +
    + + Max Count: + + + +
    +
    +
    + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + + + + + + + + + + + + + + +
    + + User ID: + + + +
    + + First Name: + + + +
    + + Last Name: + + + +
    + + Max Count: + + + +
    +
    +
    + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
                  Red Hat® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + +

    + + + + +
    + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + 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 @@ + + + + + + +TPS + + + + + + +
    + + + + + + +
         Dogtag® TPS Services
    +
    +

    + + + + + + + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/adminauthenticatepanel.vm b/base/tps/apache/docroot/tps/admin/console/config/adminauthenticatepanel.vm new file mode 100644 index 000000000..cfa53c628 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/adminauthenticatepanel.vm @@ -0,0 +1,51 @@ + + +

    Authentication

    +

    +The uid and password are used to authenticate to the master subsystem. These are the administrator's credential information for the master subsystem. +#if ($systemType != "tps") +
    +If authentication is successful, a cloned subsystem will retrieve the configuration information from the master one. +#end +
    +#if ($errorString != "") + $errorString +#end + + + + + + + + + + + +
    Uid:
    Password:
    +

    diff --git a/base/tps/apache/docroot/tps/admin/console/config/adminpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/adminpanel.vm new file mode 100644 index 000000000..46d3e25a2 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/adminpanel.vm @@ -0,0 +1,246 @@ + + + + + +The administrator is a privileged user who manages this subsystem. Please enter the following relevant information, and a certificate request will be automatically generated and submitted. An administrator's entry will be created in the internal database and an administrator's certificate will be imported into this browser automatically in the next panel. +
    +#if ($errorString != "") + $errorString +#end +
    +
    + + + + +#if ($clone != 'clone') + +#else + +#end + + + +#if ($clone != 'clone') + +#else + +#end + + + +#if ($clone != 'clone') + +#else + +#end + + + +#if ($clone != 'clone') + +#else + +#end + + + + +#if ($clone != 'clone') + +#else + +#end + + + + + + + + + + + + + + +
    UID:
    Name:
    Email:
    Password:
    Password (Again):
    Key Type:
    +

    +
    +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/agentauthenticatepanel.vm b/base/tps/apache/docroot/tps/admin/console/config/agentauthenticatepanel.vm new file mode 100644 index 000000000..738efe5b3 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/agentauthenticatepanel.vm @@ -0,0 +1,47 @@ + + +

    Authentication

    +
    +The uid and password are used to authenticate to the CA from which this subsystem's certificates are issued. Enter the uid and password of the Certificate Manager Agent who will approve the certificate requests. +
    +#if ($errorString != "") + $errorString +#end + + + + + + + + + + + +
    Uid:
    Password:
    +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/authdbpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/authdbpanel.vm new file mode 100644 index 000000000..3ebb96853 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/authdbpanel.vm @@ -0,0 +1,67 @@ + + + Please provide information about the LDAP server that will be used to authenticate the identity of end users. [Details] + + +

    +#if ($errorString != "") + $errorString +#end +

    + + + + + + + + + + + + + + + + + +
    Host:
    Port: + SSL
    Base DN:
    + +

    +
    +   +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/cainfopanel.vm b/base/tps/apache/docroot/tps/admin/console/config/cainfopanel.vm new file mode 100644 index 000000000..8d2e54251 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/cainfopanel.vm @@ -0,0 +1,54 @@ + + +A Certificate Authority (CA) is responsible for issuing different kinds of certificates. Each Enterprise Security Client (ESC) interfaces with a TPS subsystem to request end user certificates. Consequently, to obtain these certificates, an HTTPS EE URL to a CA that has been registered in the security domain must also be selected. +

    +#if ($errorString != "") + $errorString +#end +

    + + + + + +
    URL: +
    + + +

    +
    +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/certchainpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/certchainpanel.vm new file mode 100644 index 000000000..d6b7b3fe4 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/certchainpanel.vm @@ -0,0 +1,48 @@ + + +Pretty Print of Certificates on this subsystem. +

    +#foreach ($item in $ppcerts) +

    $item.getDN()

    + + + + + + + + +
    Certificate: $item.getNickname()
    +#end + +
    + +
    +
    +   +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/certprettyprintpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/certprettyprintpanel.vm new file mode 100644 index 000000000..0e5f05af6 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/certprettyprintpanel.vm @@ -0,0 +1,48 @@ + + +The following certificates were installed on this instance. +

    +#foreach ($item in $ppcerts) +

    $item.getDN()

    + + + + + + + + +
    Certificate: $item.getNickname()
    +#end + +
    + +
    +
    +   +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/certrequestpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/certrequestpanel.vm new file mode 100644 index 000000000..632b27c34 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/certrequestpanel.vm @@ -0,0 +1,224 @@ + + + +A certificate signing request (CSR) contains a public key and is an unsigned copy of the certificate. +

    +If a given CSR has been successfully signed by a CA, then the certificate will be designated below by a certificate icon labeled Certificate Generated Successfully. +

    +However, if a given CSR contains an action required label under its certificate icon, then those requests must be manually submitted to a CA for certificate generation. +

    +Press the [Apply] button after certificates and chains are pasted in. +

    +Press the [Next] button once all certificates have been generated successfully. +

    +#foreach ($item in $reqscerts) +

    $item.getDN()

    + + + + + + + + + +#if ($item.getCert() == "...paste certificate here...") + +#else + #if ($item.getCert() == "...certificate be generated internally...") + + #else + #if ($item.getCert() == "") + + #else + + #end + #end +#end + + + +
     action required
    +
    +
    + certificate will be generated internally +
    +
    + No Certificate Generated. Please import.
    +
    +
    + Certificate Generated Successfully +
    + + +#if ($item.getCert() == "...paste certificate here...") + Step 1: Copy the Certificate Request (CSR) to enroll at an external CA

    + Step 2: Import the PKCS #7 Certificate Chain (optional if the certificate already contains the chain)

    + Step 3: Paste in the Base64-encoded Certificate after enrollment at an external CA (NOTE: this text box does not accept PKCS #7 certificate chains)

    +#else + #if ($item.getCert() == "...certificate be generated internally...") +

    + #else + View Certificate Request (CSR)

    + View Certificate in Base64-Encoding

    + View Certificate Pretty Print

    + #end +#end + + +

    + +
    +
    X
    + + + + + + + +
    $item.getCert()
    +
    + +
    +
    X
    + + + + + + + +
    +
    + +
    +
    X
    + + + + + + + +
    +
    + + +#end + +

    + + +

    +
    +   +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/config_addhsm.vm b/base/tps/apache/docroot/tps/admin/console/config/config_addhsm.vm new file mode 100644 index 000000000..90d2f0ea9 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/config_addhsm.vm @@ -0,0 +1,95 @@ + + + + + + + Dogtag Certificate System + + + + + + + +
    + + + + + + +
    + + + + +
    +

    + Security Modules

    +Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. +

    +

    Registering a New Security Module

    +
    +

    +If the desired security module is not listed, it is possible that this security module's PKCS #11 library was not registered with the system. Please register a new security module here. + + + + + + + + +
    +Library Path: +
    +Module Name: +
    +

    + + + + +
    + +
    +

    +
    + +
    +
    + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/config_db.vm b/base/tps/apache/docroot/tps/admin/console/config/config_db.vm new file mode 100644 index 000000000..ba40c7cee --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/config_db.vm @@ -0,0 +1,125 @@ + + + + + + + Dogtag Certificate System + + + + + + + + + +
    +#include ( "admin/console/config/header.vm" ) + + + + + +
    + + + + +
    +

    + Internal Database

    + +
    + Internal Database Connection

    This option allows sharing an internal database to improve managability.

    +#if ($errorString != "") + $errorString +#end + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Host:
    Port:
    Base DN:
    Database:
    Bind DN:
    Bind Password:
    + +

    +
    +   +
    + + +

    + + + + +
    + +
    + +

    + +
    + +
    +
    + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/config_hsm.vm b/base/tps/apache/docroot/tps/admin/console/config/config_hsm.vm new file mode 100644 index 000000000..7ec82522c --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/config_hsm.vm @@ -0,0 +1,175 @@ + + + + + + + Dogtag Certificate System + + + + + + + +
    + + + + + + +
    + + + + +
    +

    + Security Modules

    + +
    + +Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. Please make sure that at least one security module is listed below. +

    +

    Supported Security Modules

    + + + + + + + +#foreach ($module in $sms) + + + + + + +#foreach ($token in $module.getTokens()) + + + + + + +#end +#end + +
    Module/TokenStatusDefaultOperations

    $module.getUserFriendlyName()
    + #if ($module.isFound()) + Found + #else + Not Found + #end +
    - $token.getNickName() + #if ($token.isLoggedIn()) + Logged In + #else + Not logged In + #end + + #if ($defTok == $token.getNickName()) + + #else + + #end +
    +

    Other Security Modules

    +

    The security modules listed below are modules found by the server but not recognized as one of the supported modules. If the user believes that any listed modules below should have been supported, please check the "CS.cfg" configuration file to see if there is a name mismatch and adjust this accordingly.

    + + + + + + + +#foreach ($module in $oms) + + + + + + +#foreach ($token in $module.getTokens()) + + + + + + +#end +#end + +
    Module/TokenStatusDefaultOperations
    $module.getUserFriendlyName() + #if ($module.isFound()) + Found + #else + Not Found + #end +
    - $token.getNickName() + #if ($token.isLoggedIn()) + Logged In + #else + Not logged In + #end + + #if ($defTok == $token.getNickName()) + + #else + + #end +
    + +
    +

    + + + + +
    + +
    + + + + + +

    +
    + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/config_hsmloginpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/config_hsmloginpanel.vm new file mode 100644 index 000000000..332f2f470 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/config_hsmloginpanel.vm @@ -0,0 +1,82 @@ + + +

    + Security Modules Login Panel

    +Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. +

    +

    Security Token Login

    +
    +

    +The user has chosen to login to the following security module: $SecToken +

    +#if ($status == "alreadyLoggedIn") + Token already logged in. +#else + #if ($status == "tokenPasswordNotInitialized") + Token password not initialized. + #else + #if ($status == "justLoggedIn") + Token logged in successfully. + #else + + + + + + + + +
    +Security Module Token Name: +
    +Security Module Token Password: +
    +

    + #end + #end +#end + + + + + +
    + +
    + + + + +

    + +

    +
    +   +
    + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/config_join.vm b/base/tps/apache/docroot/tps/admin/console/config/config_join.vm new file mode 100644 index 000000000..49e43fbc4 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/config_join.vm @@ -0,0 +1,124 @@ + + + + + + + Dogtag Certificate System + + + + + + + + + +
    + +#include ( "admin/console/config/header.vm" ) + + + + + +
    + + + + +
    +

    + Join the PKI Network

    + +To join this PKI network, the setup wizard needs to submit the certificate request to a Root or another subordinate CA for signing. +

    + + +Manually submit this request to a CA. +

    + + + + + + + + + + +
    Certificate Request to a CA:Certificate Chain From a CA:
    + + + +
    +

    +Automatically submit the request to a Dogtag Certificate Authority +
    + + + + + + + + + + + + + + +
    URL:
    UID:
    Password:
    +

    + +

    +
    +
    + + + +

    + + + + +
    + +
    +

    + +
    +
    + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/config_rootca.vm b/base/tps/apache/docroot/tps/admin/console/config/config_rootca.vm new file mode 100644 index 000000000..7e17fef35 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/config_rootca.vm @@ -0,0 +1,112 @@ + + + + + + + Dogtag Certificate System + + + + + + + + + +
    + +#include ( "admin/console/config/header.vm" ) + + + + + +
    + + + + +
    +

    + Root CA

    + +A Root CA provides a set of predefined signing capabilities. Please select the capabilities that this CA needs to provide. +

    + +

    + +

    CA Certificate Profile

    + +

    + + + + + + +
    Profile: +
    +

    + +

    +
    +   +
    + +
    + +

    + + + + +
    + +
    + + +

    + +
    +
    + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/createsubsystempanel.vm b/base/tps/apache/docroot/tps/admin/console/config/createsubsystempanel.vm new file mode 100644 index 000000000..1ddd7a90c --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/createsubsystempanel.vm @@ -0,0 +1,98 @@ + + +

    Subsystem Configuration

    +

    +#if ($systemType != "tps") +This instance can be configured as either a new $systemname subsystem or a clone of an existing $systemname. If the cloning option is chosen, please provide the URL to an existing $systemname instance. +#else +This instance can be configured as a new $systemname subsystem. +#end +
    +#if ($errorString != "") + $errorString +#end +
    + Configure this Instance as a New $systemname Subsystem +
    + + + + + + + + + + + + + + + + + +
    Subsystem Name: (e.g. - $fullsystemname)
    Subsystem HTTP URL (unsecure): http://$machineName:$http_port
    Subsystem HTTPS URL (clientauth): https://$machineName:$https_port
    Subsystem HTTPS URL (non-clientauth): https://$machineName:$non_clientauth_https_port
    +

    +#if ($disableClone) + Clone an Existing $systemname Subsystem +#else + Clone an Existing $systemname Subsystem +#end +
    + + + +#if ($disableClone) + +#else + +#end + + + +#if ($disableClone) + + +
    Subsystem Name: (e.g. - $fullsystemname + Clone 1) (e.g. - $fullsystemname + Clone 1)
    Subsystem URL: +
    +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/databasepanel.vm b/base/tps/apache/docroot/tps/admin/console/config/databasepanel.vm new file mode 100644 index 000000000..ce168fd2a --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/databasepanel.vm @@ -0,0 +1,93 @@ + + +Please provide information to an existing Fedora Directory Server that can be used as the internal database for this instance. [Details] + +

    +

    +Note: If the Fedora Directory Server is at a remote host, it is highly recommended that SSL should be used. +
    +#if ($errorString != "") + $errorString +#end +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Host:
    Port: +SSL +
    Base DN:
    Database:
    Bind DN:
    Bind Password:
    + + +#if ($firsttime == 'false') +Remove the existing data from the Base DN shown above.

    +#end + +

    +
    +   +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/displaycertchain2panel.vm b/base/tps/apache/docroot/tps/admin/console/config/displaycertchain2panel.vm new file mode 100644 index 000000000..3a13b7cd4 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/displaycertchain2panel.vm @@ -0,0 +1,40 @@ + + +

    +A certificate chain is a list of all certificates chained up to the root. +

    +If the entire certificate chain is displayed below, click the Next button to import it into this subsystem. This certificate chain will then be trusted for this instance. +

    +If no certificate chain is listed below, simply click the Next button to move on to the next panel. +

    +

    +$certchain
    +
    +#if ($errorString != "") + $errorString +#end diff --git a/base/tps/apache/docroot/tps/admin/console/config/displaycertchainpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/displaycertchainpanel.vm new file mode 100644 index 000000000..f7b9dee90 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/displaycertchainpanel.vm @@ -0,0 +1,40 @@ + + +
    +A certificate chain is a list of all certificates chained up to the root. +
    +If a certificate chain is displayed below, click the Next button to trust this certificate chain for this instance. +
    +If no certificate chain is listed below, simply click the Next button to move on to the next panel. +
    +
    +$certchain
    +
    +#if ($errorString != "") + $errorString +#end diff --git a/base/tps/apache/docroot/tps/admin/console/config/donepanel.vm b/base/tps/apache/docroot/tps/admin/console/config/donepanel.vm new file mode 100644 index 000000000..2aa76ff0c --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/donepanel.vm @@ -0,0 +1,54 @@ + + + + + +#if ($errorString != "") + $errorString +#end +#if ($systemType == "tks") +As 'root', restart the server on the command line by typing "$initCommand restart $instanceID". After performing this restart, the server should become operational. +#else +#if ($externalCA == "true" && $systemType == "kra") +As 'root', restart the server on the command line by typing "$initCommand restart $instanceID". Startup the administration console to add the peer CA to the Trusted Manager's Group. Make sure to add the transport certificate and connector information to the peer CA. After performing this restart, the server should become operational. +#else +As 'root', restart the server on the command line by typing "$initCommand + restart $instanceID". After performing this restart, the server should become operational. +
    +Please go to the services page to access all of the available interfaces. +
    +Each Enterprise Security Client (ESC) talks to a TPS config URL for token management functions located at http://$host:$unsecurePort/cgi-bin/home/index.cgi. +
    +#end +#end +
    +To create additional instances, type "/usr/bin/pkicreate" on the command line. +
    +#if ($systemType != "tps") +To start the administration console, type "/usr/bin/pkiconsole" on the command line. +#end diff --git a/base/tps/apache/docroot/tps/admin/console/config/drminfopanel.vm b/base/tps/apache/docroot/tps/admin/console/config/drminfopanel.vm new file mode 100644 index 000000000..8931bf1c9 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/drminfopanel.vm @@ -0,0 +1,55 @@ + + +A Data Recovery Manager (DRM) is responsible for server-side key generation, archival, and recovery. If server-side key generation is not needed, this step can be skipped. +

    +#if ($errorString != "") + $errorString +

    +#end + Connect this instance to the HTTPS Agent URL of a DRM to support server-side key generation. +

    +

    + + + + + +
    URL: +
    +

    +
    +
    +

    + Configure this instance to NOT support server-side key generation. +

    diff --git a/base/tps/apache/docroot/tps/admin/console/config/footer.vm b/base/tps/apache/docroot/tps/admin/console/config/footer.vm new file mode 100644 index 000000000..a596e45b1 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/footer.vm @@ -0,0 +1,19 @@ + +

    diff --git a/base/tps/apache/docroot/tps/admin/console/config/header.vm b/base/tps/apache/docroot/tps/admin/console/config/header.vm new file mode 100644 index 000000000..e0fe6a962 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/header.vm @@ -0,0 +1,25 @@ + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/hierarchypanel.vm b/base/tps/apache/docroot/tps/admin/console/config/hierarchypanel.vm new file mode 100644 index 000000000..0138188e9 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/hierarchypanel.vm @@ -0,0 +1,79 @@ + + +

    PKI Hierarchy

    +

    +This CA instance can be either a Self-Signed Root CA or a Subordinate CA. [Details] + + +

    + +

    + Make this a Self-Signed Root CA within this new PKI hierarchy. +

    + Make this a subordinate CA of another CA. + + + + + + +
    URL: +
    +

    diff --git a/base/tps/apache/docroot/tps/admin/console/config/importadmincertpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/importadmincertpanel.vm new file mode 100644 index 000000000..609b4bf4f --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/importadmincertpanel.vm @@ -0,0 +1,55 @@ + + +An administrator's certificate has been created and imported into this browser. This certificate is used to access the agent interface of this subsystem. +

    +#if ($errorString != "") + $errorString +#end +$info +

    +

    + + + +#if ($ca == 'true' && $import == 'true') + +#else +#if ($caType == 'ca' && $import == 'true') + +#else + +#end +#end + + + + +
    +

    +
    +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/login.vm b/base/tps/apache/docroot/tps/admin/console/config/login.vm new file mode 100644 index 000000000..73f53afa6 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/login.vm @@ -0,0 +1,109 @@ + + + + + + + Dogtag Certificate System + + + + + + +
    + +#include ( "tps/admin/console/config/header.vm" ) + + + + +
    + +
    +
    + +
    + - +
    + + +
    +
    + +
    + + +
    + + + + + +
    +

    + Login

    + +A one time random pin has been generated during setup to protect unauthorized access to this configuration wizard. This pin has been stored in the "CS.cfg" configuration file as the value of the 'preop.pin' parameter. Please enter this pin to continue. + +

    +#if ($errorString != "") + $errorString +#end +

    +

    + + + + + + +
    PIN:
    +
    +
    +
    +
    + +

    + + + + +
    + +
    + + +

    + +
    +
    + +#include ( "tps/admin/console/config/footer.vm" ) + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/modulepanel.vm b/base/tps/apache/docroot/tps/admin/console/config/modulepanel.vm new file mode 100644 index 000000000..812d7ca6c --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/modulepanel.vm @@ -0,0 +1,161 @@ + + +Two lists of security modules are provided below. The Supported Security Modules list consists of both software-based and hardware-based security modules that this PKI solution supports, while the Other Security Modules list consists of any other security modules found by this PKI subsystem that are not recognized as one of the supported security modules. [Details] + + +
    +

    Supported Security Modules

    + + + + + + + +#foreach ($module in $sms) + + + + + + +#foreach ($token in $module.getTokens()) + + + + + + +#end +#end + +
    Module/TokenStatusDefaultOperations

    $module.getUserFriendlyName()
    + #if ($module.isFound()) + Found + #else + Not Found + #end +
    - $token.getNickName() + #if ($token.isLoggedIn()) + Logged In + #else + Not logged In + #end + + #if ($token.isLoggedIn()) + #if ($defTok == $token.getNickName()) + + #else + + #end + #end + + #if (!$token.isLoggedIn()) +Login + #end +
    +

    Other Security Modules

    +

    The security modules listed below are modules found by the server but not recognized as one of the supported modules. If the user believes that any listed modules below should have been supported, please check the "CS.cfg" configuration file to see if there is a name mismatch and adjust this accordingly.

    + + + + + + + +#foreach ($module in $oms) + + + + + + +#foreach ($token in $module.getTokens()) + + + + + + +#end +#end + +
    Module/TokenStatusDefaultOperations
    $module.getUserFriendlyName() + #if ($module.isFound()) + Found + #else + Not Found + #end +
    - $token.getNickName() + #if ($token.isLoggedIn()) + Logged In + #else + Not logged In + #end + + #if ($defTok == $token.getNickName()) + + #else + + #end + + #if (!$token.isLoggedIn()) +Login + #end +
    + + +
    + +
    +
    +   +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/namepanel.vm b/base/tps/apache/docroot/tps/admin/console/config/namepanel.vm new file mode 100644 index 000000000..0ed2d1adb --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/namepanel.vm @@ -0,0 +1,90 @@ + + +Each certificate associated with this instance needs to have a unique name within the PKI hierarchy. The following information will be used to generate these unique names. Each certificate will be stored in the security module using a unique nickname.[Details] + + + + +

    +#if ($errorString != "") + $errorString +#end +
    +#foreach ($item in $certs) +

    $item.getUserFriendlyName()

    + + + + + + + + + + +
    DN:
    Nickname:
    +

    +#end +

    +


    +

    +Please select the CA to submit these system certificate requests: +

    + + + + + +
    URL: +
    + +

    +
    +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/securitydomainloginpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/securitydomainloginpanel.vm new file mode 100644 index 000000000..a8c0c8079 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/securitydomainloginpanel.vm @@ -0,0 +1,108 @@ + + + + + + + Dogtag Certificate System + + + + + + + +
    + + + + + + +
    + + + + +
    +

    + Security Domain ($name) Login

    + +
    +

    The Enterprise $subsystem Administrator will register this $subsystem Subsystem located at $host under this Security Domain located at $sdhost. The credential information will be provided to the Security Domain for authentication.

    +#if ($errorString != "") + $errorString +#end + + + + + + + + + + + + + + +
    Uid:
    Password:
    + +

    +
    +   +
    + + +

    + + + + +
    +
    + +
    +
    + +

    + +
    + +
    +
    + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/securitydomainpanel.vm b/base/tps/apache/docroot/tps/admin/console/config/securitydomainpanel.vm new file mode 100644 index 000000000..6f651f388 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/securitydomainpanel.vm @@ -0,0 +1,114 @@ + + +

    $panelname

    +
    +A security domain is a registry for all of the PKI services within an enterprise. Applications may use the security domain to locate other PKI services. [Details] + + + +#if ($errorString != "") + $errorString +#end +
    +#if ($cstype == "CA") + Create a New Security Domain +
    +If no security domain exists, a new one must be created for this CA. + + + + + + + + + + + + + + + + + + + + + +
    Security Domain Name: (e.g. - Dogtag Security Domain)
    Security Domain HTTP EE URL (unsecure): http://$machineName:$http_ee_port
    Security Domain HTTPS Agent URL (clientauth): https://$machineName:$https_agent_port
    Security Domain HTTPS EE URL (non-clientauth): https://$machineName:$https_ee_port
    Security Domain HTTPS Admin URL (non-clientauth): https://$machineName:$https_admin_port
    +
    + Join an Existing Security Domain +#else + Create a New Security Domain +
    +If no security domain exists, a new one must be created for this CA. + + + + + +
    Security Domain Name: (e.g. - Dogtag Security Domain)
    +
    + Join an Existing Security Domain +#end +
    +Enter the URL to an existing security domain. +
    + + + + + +
    Security Domain HTTPS Admin URL (non-clientauth): (e.g. - https://example.com:9445)
    +
    + + + + + +
    NOTE:   Since a Security Domain MUST be a CA (although all CAs are NOT necessarily Security Domains), an appropriate value for this URL may be obtained by logging into the machine which hosts the desired Security Domain CA as 'root' and running the command "$initCommand status $instanceID" from the command-line.
    +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/sidemenu.vm b/base/tps/apache/docroot/tps/admin/console/config/sidemenu.vm new file mode 100644 index 000000000..c3dbf1410 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/sidemenu.vm @@ -0,0 +1,29 @@ + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/sizepanel.vm b/base/tps/apache/docroot/tps/admin/console/config/sizepanel.vm new file mode 100644 index 000000000..cfcf15190 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/sizepanel.vm @@ -0,0 +1,303 @@ + + + + +Select the key pair type(s) and associated key pair size(s) from the pulldown menus. [Details] +

    +Note that only RSA is supported for the audit_signing certificate at this point +

    + +

    +#if ($errorString != "") + $errorString +#end +

    +

    +

    + + + + +
    [Advanced]
    +

    +

    Common Key Settings

    +

    + + + + + +
    Key Type:
    +

    + +

    + Use the default key size ($default_keysize bits for RSA; curve $default_ecc_curvename for ECC). +

    + Use the following custom key strength: + +

    + + + + + +
    Key Size or Curve (see Details above):
    +

    +

    + +
    +

    + + + + +
    [Simple]
    + +#foreach ($item in $certs) +

    Key for $item.getUserFriendlyName()

    +

    + + + +#if ($item.getCertTag() == "audit_signing") + +#else + +#end + +
    Key Type:
    +

    + Use the default key size ($default_keysize bits for RSA, curve $default_ecc_curvename for ECC). +

    + Use the following custom key strength: + +

    + + + + + +
    Key Size or Curve (see Details above):
    +#end +

    + +
    +
    +
    +#if ($firsttime == 'false') +New Keys

    +#end +

    +

    +
    +Note: After pressing Next, keys will be generated on the server, which will take some time to complete. Please wait for the next panel to appear. +   +
    diff --git a/base/tps/apache/docroot/tps/admin/console/config/tksinfopanel.vm b/base/tps/apache/docroot/tps/admin/console/config/tksinfopanel.vm new file mode 100644 index 000000000..1f6ee162f --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/tksinfopanel.vm @@ -0,0 +1,50 @@ + + +The Token Key Service (TKS) is responsible for managing master keys that are used for establishing secure channels. Select an HTTPS Agent URL of a TKS from the list below. +

    +#if ($errorString != "") + $errorString +#end +

    + + + + + +
    URL: +
    +

    +
    +
    +

    diff --git a/base/tps/apache/docroot/tps/admin/console/config/topmenu.vm b/base/tps/apache/docroot/tps/admin/console/config/topmenu.vm new file mode 100644 index 000000000..c76b2e8fa --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/topmenu.vm @@ -0,0 +1,20 @@ + +

    diff --git a/base/tps/apache/docroot/tps/admin/console/config/welcomepanel.vm b/base/tps/apache/docroot/tps/admin/console/config/welcomepanel.vm new file mode 100644 index 000000000..619560dd3 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/welcomepanel.vm @@ -0,0 +1,57 @@ + + +

    $wizardname

    +The $fullsystemname + configuration wizard will guide the administrator through the process of configuring a single instance of the $fullsystemname + ($systemname). [Details] + + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/wizard.vm b/base/tps/apache/docroot/tps/admin/console/config/wizard.vm new file mode 100644 index 000000000..31d395edf --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/wizard.vm @@ -0,0 +1,147 @@ + + + + + + + Dogtag Certificate System + + + + + + + + + + +
    + +#include ( "tps/admin/console/config/header.vm" ) + + + + +
    + +
    +
    + +
    +
    + + +
    +
    + +
    + + +
    + + + + + +
    +

    + $title

    + +
    + + +#parse ( $panel ) + + + +
    + + + + + + +
    + +#if ($showApplyButton == "true") + +#end + +#if ($lastpanel) +  +#else + +#end + +
    + +
    + +#include ( "tps/admin/console/config/footer.vm" ) + +
    +
    + + + diff --git a/base/tps/apache/docroot/tps/admin/console/config/xml.vm b/base/tps/apache/docroot/tps/admin/console/config/xml.vm new file mode 100644 index 000000000..31ff72aa2 --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/config/xml.vm @@ -0,0 +1,4 @@ + + + $xml + diff --git a/base/tps/apache/docroot/tps/admin/console/js/misc.js b/base/tps/apache/docroot/tps/admin/console/js/misc.js new file mode 100644 index 000000000..d4dc336ab --- /dev/null +++ b/base/tps/apache/docroot/tps/admin/console/js/misc.js @@ -0,0 +1,30 @@ +// --- 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 --- + +/** + * This function is to submit the form's parameters and to decide if the + * window should remain open. + * + * @param f The form + * @param fclose true if you want to close the window; otherwise false. + */ +function saveConfig(f, fclose) { + f.submit(); + if (fclose == true) + window.close(); +} diff --git a/base/tps/forms/esc/cgi-bin/demo/enroll.cgi b/base/tps/forms/esc/cgi-bin/demo/enroll.cgi deleted file mode 100755 index c0f4bcabf..000000000 --- a/base/tps/forms/esc/cgi-bin/demo/enroll.cgi +++ /dev/null @@ -1,183 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -use CGI; - -$gQuery = new CGI; - -$gQueryAction = "default"; -$gQueryOverrideAction = "default"; - -@gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - -$gQueryAction = $gQuery->param("action") if (defined $gQuery->param("action")); - -$gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - -if ($gQueryOverrideAction ne "default") -{ - $gQueryAction = $gQueryOverrideAction; -} - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - -if ($gQueryAction eq "default") -{ - GenerateEnrollmentPage(); - exit 0; -} - - - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GenerateEnrollmentPage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< Enroll.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - - close(ENROLL_FILE); -} diff --git a/base/tps/forms/esc/cgi-bin/demo/index.cgi b/base/tps/forms/esc/cgi-bin/demo/index.cgi deleted file mode 100755 index c9a1d21dd..000000000 --- a/base/tps/forms/esc/cgi-bin/demo/index.cgi +++ /dev/null @@ -1,47 +0,0 @@ -#!/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; -# version 2.1 of the License. -# -# 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 --- -# -# -# -# -print "Content-type: text/xml\n\n"; -print "<\?xml version=\"1.0\" encoding=\"UTF-8\"\?>"; -print ""; -print ""; -print "Fedora Project"; # Vendor -print "\n"; -print ""; -print ""; -print "http://[SERVER_NAME]:[PORT]/nk_service"; -print ""; -print ""; -print "http://[SERVER_NAME]:[PORT]/cgi-bin/demo/enroll.cgi"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print "userKey"; -print ""; -print ""; -print ""; diff --git a/base/tps/forms/esc/cgi-bin/home/cachain.cgi b/base/tps/forms/esc/cgi-bin/home/cachain.cgi deleted file mode 100755 index ddbf5e6ae..000000000 --- a/base/tps/forms/esc/cgi-bin/home/cachain.cgi +++ /dev/null @@ -1,52 +0,0 @@ -#!/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; -# version 2.1 of the License. -# -# 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 --- -# -# -# - -use LWP::UserAgent; - -my $cfg = "../../conf/CS.cfg"; -my $cahostport = `grep conn.ca1.hostport $cfg | cut -c19-`; - -chomp($cahostport); - -my $url = "https://$cahostport/ca/ee/ca/getCAChain?op=download&mimeType=application/x-x509-ca-cert"; - -my $agent = LWP::UserAgent->new; -$agent->timeout(30); - -my $request = HTTP::Request->new('GET', $url); -my $response = $agent->request($request); - -if ($response->is_success) { - print "Content-type: application/x-x509-ca-cert\n\n"; - print $response->content; - -} else { - print "Content-type: text/html\n\n"; - print ""; - print ""; - print "

    Error Importing CA Chain Information!

    "; - print "

    Please try again later.

    "; - print "" -} diff --git a/base/tps/forms/esc/cgi-bin/home/enroll.cgi b/base/tps/forms/esc/cgi-bin/home/enroll.cgi deleted file mode 100755 index c0f4bcabf..000000000 --- a/base/tps/forms/esc/cgi-bin/home/enroll.cgi +++ /dev/null @@ -1,183 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -use CGI; - -$gQuery = new CGI; - -$gQueryAction = "default"; -$gQueryOverrideAction = "default"; - -@gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - -$gQueryAction = $gQuery->param("action") if (defined $gQuery->param("action")); - -$gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - -if ($gQueryOverrideAction ne "default") -{ - $gQueryAction = $gQueryOverrideAction; -} - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - -if ($gQueryAction eq "default") -{ - GenerateEnrollmentPage(); - exit 0; -} - - - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GenerateEnrollmentPage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< Enroll.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - - close(ENROLL_FILE); -} diff --git a/base/tps/forms/esc/cgi-bin/home/index.cgi b/base/tps/forms/esc/cgi-bin/home/index.cgi deleted file mode 100755 index 1e54a8354..000000000 --- a/base/tps/forms/esc/cgi-bin/home/index.cgi +++ /dev/null @@ -1,51 +0,0 @@ -#!/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; -# version 2.1 of the License. -# -# 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 --- -# -# -# -# -print "Content-type: text/xml\n\n"; -print "<\?xml version=\"1.0\" encoding=\"UTF-8\"\?>"; -print ""; -print ""; -print "Fedora Project"; # Vendor -print "\n"; -print ""; -print ""; -print "http://[SERVER_NAME]:[PORT]/nk_service"; -print ""; -print ""; -print "http://[SERVER_NAME]:[PORT]/cgi-bin/home/enroll.cgi"; -print ""; -print ""; -print "http://www.fedora.redhat.com"; # Company URL -print ""; -print ""; -print ""; -print ""; -print "userKey"; -print ""; -#print ""; -#print "http://[SERVER_NAME]:[PORT]/cgi-bin/home/cachain.cgi"; -#print ""; -print ""; -print ""; diff --git a/base/tps/forms/esc/cgi-bin/so/enroll.cgi b/base/tps/forms/esc/cgi-bin/so/enroll.cgi deleted file mode 100755 index 148cd78c0..000000000 --- a/base/tps/forms/esc/cgi-bin/so/enroll.cgi +++ /dev/null @@ -1,193 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -[REQUIRE_CFG_PL] - -use CGI; - -my $port = get_port(); -my $host = get_host(); -my $secure_port = get_secure_port(); - -$gQuery = new CGI; - -$gQueryAction = "default"; -$gQueryOverrideAction = "default"; - -@gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - -$gQueryAction = $gQuery->param("action") if (defined $gQuery->param("action")); - -$gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - -if ($gQueryOverrideAction ne "default") -{ - $gQueryAction = $gQueryOverrideAction; -} - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - -if ($gQueryAction eq "default") -{ - GenerateEnrollmentPage(); - exit 0; -} - - - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GenerateEnrollmentPage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< Enroll.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - $l =~ s/\$host/$host/g; - $l =~ s/\$port/$port/g; - $l =~ s/\$secure_port/$secure_port/g; - - print $l; - } - } - - close(ENROLL_FILE); -} diff --git a/base/tps/forms/esc/cgi-bin/so/index.cgi b/base/tps/forms/esc/cgi-bin/so/index.cgi deleted file mode 100755 index 7b3f2c68d..000000000 --- a/base/tps/forms/esc/cgi-bin/so/index.cgi +++ /dev/null @@ -1,48 +0,0 @@ -#!/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; -# version 2.1 of the License. -# -# 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 --- -# -# -# -# -print "Content-type: text/xml\n\n"; -print "<\?xml version=\"1.0\" encoding=\"UTF-8\"\?>"; -print ""; -print ""; -print "Fedora Project"; # Vendor -print "\n"; -print ""; -print ""; -print "http://[SERVER_NAME]:[PORT]/nk_service"; -print ""; -print ""; -print "http://[SERVER_NAME]:[PORT]/cgi-bin/so/enroll.cgi"; -print ""; -print ""; -print ""; -print ""; -print "http://[SERVER_NAME]:[PORT]/cgi-bin/sow/welcome.cgi"; -print ""; -print ""; -print "soKey"; -print ""; -print ""; -print ""; diff --git a/base/tps/forms/esc/cgi-bin/sow/ajax-list.cgi b/base/tps/forms/esc/cgi-bin/sow/ajax-list.cgi deleted file mode 100755 index 0f4ac094f..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/ajax-list.cgi +++ /dev/null @@ -1,79 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; -use Mozilla::LDAP::Conn; -use PKI::TPS::Common; - -[REQUIRE_CFG_PL] - -sub main() -{ - - my $q = new CGI; - - my $host = get_ldap_host(); - my $port = get_ldap_port(); - my $secureconn = get_ldap_secure(); - my $basedn = get_base_dn(); - my $certdir = get_ldap_certdir(); - - my $letters = $q->param('letters'); - if ($letters eq "") { - # HACK: ajax.js posts parameters into POST URL - $letters = $ENV{'QUERY_STRING'}; - $letters =~ s/.*letters=//g; - $letters =~ s/\+/ /g; - } - - my $result = ""; - - print "Content-Type: text/html\n\n"; - - my $conn = PKI::TPS::Common::make_connection( - {host => $host, port => $port, cert => $certdir}, - $secureconn); - - return if (!$conn); - - my $entry = $conn->search ( { base =>$basedn, - scope => "sub", - filter => "cn=$letters*", - attrsonly => 0, - attrs => qw(cn uid), - sortattrs => qw(cn)} - ); - - while ($entry) { - my $cn = ($entry->getValues("cn"))[0] || ""; - my $uid = ($entry->getValues("uid"))[0] || ""; - $result .= $uid . "###" . $cn . "|"; - $entry $conn->nextEntry(); - } - - $conn->close(); - - print $result; -} - -&main(); diff --git a/base/tps/forms/esc/cgi-bin/sow/cfg.pl b/base/tps/forms/esc/cgi-bin/sow/cfg.pl deleted file mode 100755 index d616fa136..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/cfg.pl +++ /dev/null @@ -1,174 +0,0 @@ -#! /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. -# -# 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 --- -# - -use Mozilla::LDAP::Conn; -use PKI::TPS::Common; - -# -# 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/pki-tps/conf/CS.cfg"; - -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_ldap_secure() -{ - my $ldapsecure = `grep auth.instance.0.ssl $cfg | cut -c21-`; - chomp($ldapsecure); - return $ldapsecure; -} - -sub get_ldap_certdir() -{ - my $ldapcertdir = `grep service.instanceDir $cfg | cut -c21-`; - chomp($ldapcertdir); - return $ldapcertdir . "/alias"; -} - -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_secureconn = `grep -e "^tokendb.ssl" $cfg | cut -c13-`; - chomp($x_secureconn); - 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 $ldap = PKI::TPS::Common::make_connection( - {host => $x_host, port => $x_port, pswd => $x_bindpwd, bind => $x_binddn, cert => $x_certdir}, - $x_secureconn); - - return 0 if (! $ldap); - - my $entry = $ldap->search ( "cn=TUS Officers,ou=Groups,$x_basedn", - "sub", - "uid=$uid", - 0 - ); - - $ldap->close(); - - if ($entry) { - return 1; - } - return 0; -} - -sub is_user() -{ - my ($dn) = @_; - - my $uid = $dn; - # need to map a subject dn into user DN - $uid =~ /uid=([^,]*)/; # retrieve the uid - $uid = $1; - - my $x_host = get_ldap_host(); - my $x_port = get_ldap_port(); - my $x_secureconn = get_ldap_secure(); - my $x_basedn = get_base_dn(); - my $x_certdir = get_ldap_certdir(); - - my $ldap = PKI::TPS::Common::make_connection( - {host => $x_host, port => $x_port, cert => $x_certdir}, - $x_secureconn); - - return 0 if (! $ldap); - - my $entry = $ldap->search ( "ou=people,$x_basedn", - "sub", - "uid=$uid", - 0 - ); - - $ldap->close(); - - if ($entry) { - return 1; - } - return 0; -} - diff --git a/base/tps/forms/esc/cgi-bin/sow/enroll.cgi b/base/tps/forms/esc/cgi-bin/sow/enroll.cgi deleted file mode 100755 index 8a6431e52..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/enroll.cgi +++ /dev/null @@ -1,246 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -[REQUIRE_CFG_PL] - -use CGI; -use Mozilla::LDAP::Conn; -use PKI::TPS::Common; - -$gQuery = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - if (!&authorize()) { - print $gQuery->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - $gQueryAction = "default"; - $gQueryOverrideAction = "default"; - - @gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - - $gQueryAction = $gQuery->param("action") if - (defined $gQuery->param("action")); - - $gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - - if ($gQueryOverrideAction ne "default") - { - $gQueryAction = $gQueryOverrideAction; - } - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - - if ($gQueryAction eq "default") - { - GenerateEnrollmentPage(); - exit 0; - } -} - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GenerateEnrollmentPage -{ - my ($l); - my $ldap_host = get_ldap_host(); - my $ldap_port = get_ldap_port(); - my $secureconn = get_ldap_secure(); - my $basedn = get_base_dn(); - my $port = get_port(); - my $host = get_host(); - my $secure_port = get_secure_port(); - my $certdir = get_ldap_certdir(); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< enroll.html")); - - print $gQuery->header(); - - my $uid = $gQuery->param("uid"); - - my $conn = PKI::TPS::Common::make_connection( - {host => $ldap_host, port => $ldap_port, cert => $certdir}, - $secureconn); - - ExitError("Failed to connect to the database. $msg") if (!$conn); - - my $entry = $conn->search ( $basedn, - "sub", - "uid=$uid", - 0 - ); - - if (!$entry) { - $conn->close(); - ExitError("User $uid not found"); - } - - my $givenName = ($entry->getValues("givenName"))[0] || "-"; - my $cn = ($entry->getValues("cn"))[0] || "-"; - my $sn = ($entry->getValues("sn"))[0] ||"-"; - $uid = ($entry->getValues("uid"))[0] || "-"; - my $mail = ($entry->getValues("mail"))[0] || "-"; - my $phone = ($entry->getValues("telephoneNumber"))[0] || "-"; - my $departmentNumber = ($entry->getValues("departmentNumber"))[0] || ""; - my $employeeNumber = ($entry->getValues("employeeNumber"))[0] || ""; - - while ($l = ) - { - $l =~ s/\$mail/$mail/g; - $l =~ s/\$uid/$uid/g; - $l =~ s/\$givenName/$givenName/g; - $l =~ s/\$sn/$sn/g; - $l =~ s/\$cn/$cn/g; - $l =~ s/\$phone/$phone/g; - $l =~ s/\$departmentNumber/$departmentNumber/g; - $l =~ s/\$employeeNumber/$employeeNumber/g; - $l =~ s/\$host/$host/g; - $l =~ s/\$port/$port/g; - $l =~ s/\$secure_port/$secure_port/g; - print $l; - } - - close(ENROLL_FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/enroll_temp.cgi b/base/tps/forms/esc/cgi-bin/sow/enroll_temp.cgi deleted file mode 100755 index 5817039a2..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/enroll_temp.cgi +++ /dev/null @@ -1,246 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -[REQUIRE_CFG_PL] - -use CGI; -use Mozilla::LDAP::Conn; -use PKI::TPS::Common; - -$gQuery = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - if (!&authorize()) { - print $gQuery->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - $gQueryAction = "default"; - $gQueryOverrideAction = "default"; - - @gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - - $gQueryAction = $gQuery->param("action") if - (defined $gQuery->param("action")); - - $gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - - if ($gQueryOverrideAction ne "default") - { - $gQueryAction = $gQueryOverrideAction; - } - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - - if ($gQueryAction eq "default") - { - GenerateEnrollmentPage(); - exit 0; - } -} - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GenerateEnrollmentPage -{ - my ($l); - my $ldap_host = get_ldap_host(); - my $ldap_port = get_ldap_port(); - my $secureconn = get_ldap_secure(); - my $basedn = get_base_dn(); - my $port = get_port(); - my $host = get_host(); - my $secure_port = get_secure_port(); - my $certdir = get_ldap_certdir(); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< enroll_temp.html")); - - print $gQuery->header(); - - my $uid = $gQuery->param("uid"); - - my $conn = PKI::TPS::Common::make_connection( - {host => $ldap_host, port => $ldap_port, cert => $certdir}, - $secureconn); - - ExitError("Failed to connect to the database. $msg") if (!$conn); - - my $entry = $conn->search ( $basedn, - "sub", - "uid=$uid", - 0 - ); - - if (!$entry) { - $conn->close(); - ExitError("User $uid not found"); - } - - my $givenName = ($entry->getValues("givenName"))[0] || "-"; - my $cn = ($entry->getValues("cn"))[0] || "-"; - my $sn = ($entry->getValues("sn"))[0] ||"-"; - $uid = ($entry->getValues("uid"))[0] || "-"; - my $mail = ($entry->getValues("mail"))[0] || "-"; - my $phone = ($entry->getValues("telephoneNumber"))[0] || "-"; - my $departmentNumber = ($entry->getValues("departmentNumber"))[0] || ""; - my $employeeNumber = ($entry->getValues("employeeNumber"))[0] || ""; - - while ($l = ) - { - $l =~ s/\$mail/$mail/g; - $l =~ s/\$uid/$uid/g; - $l =~ s/\$givenName/$givenName/g; - $l =~ s/\$sn/$sn/g; - $l =~ s/\$cn/$cn/g; - $l =~ s/\$phone/$phone/g; - $l =~ s/\$departmentNumber/$departmentNumber/g; - $l =~ s/\$employeeNumber/$employeeNumber/g; - $l =~ s/\$host/$host/g; - $l =~ s/\$port/$port/g; - $l =~ s/\$secure_port/$secure_port/g; - print $l; - } - - close(ENROLL_FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/format.cgi b/base/tps/forms/esc/cgi-bin/sow/format.cgi deleted file mode 100755 index 9b310991d..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/format.cgi +++ /dev/null @@ -1,207 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -[REQUIRE_CFG_PL] - -use CGI; - -my $ldapHost = get_ldap_host(); -my $ldapPort = get_ldap_port(); -my $basedn = get_base_dn(); -my $host = get_host(); -my $port = get_port(); -my $secure_port = get_secure_port(); - -$gQuery = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - if (!&authorize()) { - print $gQuery->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - $gQueryAction = "default"; - $gQueryOverrideAction = "default"; - - @gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - - $gQueryAction = $gQuery->param("action") if - (defined $gQuery->param("action")); - - $gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - - if ($gQueryOverrideAction ne "default") - { - $gQueryAction = $gQueryOverrideAction; - } - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - - if ($gQueryAction eq "default") - { - GeneratePage(); - exit 0; - } -} - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GeneratePage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< format.html")); - - print $gQuery->header(); - - while ($l = ) - { - $l =~ s/\$host/$host/g; - $l =~ s/\$port/$port/g; - $l =~ s/\$secure_port/$secure_port/g; - print $l; - } - - close(ENROLL_FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/formatso.cgi b/base/tps/forms/esc/cgi-bin/sow/formatso.cgi deleted file mode 100755 index d53129139..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/formatso.cgi +++ /dev/null @@ -1,207 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -[REQUIRE_CFG_PL] - -use CGI; - -my $ldapHost = get_ldap_host(); -my $ldapPort = get_ldap_port(); -my $basedn = get_base_dn(); -my $host = get_host(); -my $port = get_port(); -my $secure_port = get_secure_port(); - -$gQuery = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - if (!&authorize()) { - print $gQuery->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - $gQueryAction = "default"; - $gQueryOverrideAction = "default"; - - @gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - - $gQueryAction = $gQuery->param("action") if - (defined $gQuery->param("action")); - - $gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - - if ($gQueryOverrideAction ne "default") - { - $gQueryAction = $gQueryOverrideAction; - } - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - - if ($gQueryAction eq "default") - { - GeneratePage(); - exit 0; - } -} - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GeneratePage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< formatso.html")); - - print $gQuery->header(); - - while ($l = ) - { - $l =~ s/\$host/$host/g; - $l =~ s/\$port/$port/g; - $l =~ s/\$secure_port/$secure_port/g; - print $l; - } - - close(ENROLL_FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/index.cgi b/base/tps/forms/esc/cgi-bin/sow/index.cgi deleted file mode 100755 index 7f7a98869..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/index.cgi +++ /dev/null @@ -1,42 +0,0 @@ -#!/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; -# version 2.1 of the License. -# -# 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 --- -# -# -# -# -print "Content-type: text/xml\n\n"; -print "<\?xml version=\"1.0\" encoding=\"UTF-8\"\?>"; -print ""; -print ""; -print "Fedora Project"; # Vendor -print "\n"; -print ""; -print ""; -print "https://[SERVER_NAME]:[SECURE_PORT]/nk_service"; -print ""; -print ""; -print "https://[SERVER_NAME]:[SECURE_PORT]/cgi-bin/sow/search.cgi"; -print ""; -print ""; -print ""; -print ""; -print ""; diff --git a/base/tps/forms/esc/cgi-bin/sow/is_agent.cgi b/base/tps/forms/esc/cgi-bin/sow/is_agent.cgi deleted file mode 100755 index c6b6a87f7..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/is_agent.cgi +++ /dev/null @@ -1,69 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; - -[REQUIRE_CFG_PL] - - -my $ldapHost = get_ldap_host(); -my $ldapPort = get_ldap_port(); -my $basedn = get_base_dn(); - -my $q = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoIsAgent -{ - - print "Content-type: text/xml\n\n"; - - if (!&authorize()) { - return; - } - - my $uid = $q->param('uid'); - - if(&is_agent("uid=$uid")) - { - print "yes\n"; - } - else - { - print "no\n"; - } - -} - -&DoIsAgent(); diff --git a/base/tps/forms/esc/cgi-bin/sow/is_user.cgi b/base/tps/forms/esc/cgi-bin/sow/is_user.cgi deleted file mode 100755 index d7a551421..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/is_user.cgi +++ /dev/null @@ -1,71 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; - -use CGI::Carp qw(fatalsToBrowser); - -[REQUIRE_CFG_PL] - - -my $ldapHost = get_ldap_host(); -my $ldapPort = get_ldap_port(); -my $basedn = get_base_dn(); - -my $q = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoIsUser -{ - - print "Content-type: text/xml\n\n"; - - if (!&authorize()) { - return; - } - - my $uid = $q->param('uid'); - - if(&is_user("uid=$uid")) - { - print "yes\n"; - } - else - { - print "no\n"; - } - -} - -&DoIsUser(); diff --git a/base/tps/forms/esc/cgi-bin/sow/main.cgi b/base/tps/forms/esc/cgi-bin/sow/main.cgi deleted file mode 100755 index c6f65e42e..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/main.cgi +++ /dev/null @@ -1,70 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; - -[REQUIRE_CFG_PL] - - -my $ldapHost = get_ldap_host(); -my $ldapPort = get_ldap_port(); -my $basedn = get_base_dn(); - -my $q = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - if (!&authorize()) { - print $q->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - my $error = $q->param('error'); - $error = "" if !defined $error; - - open(FILE, "< main.html"); - - print $q->header(); - - while ($l = ) - { - $l =~ s/\$error/$error/g; - print $l; - } - - close(FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/noaccess.cgi b/base/tps/forms/esc/cgi-bin/sow/noaccess.cgi deleted file mode 100755 index 17166bcb6..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/noaccess.cgi +++ /dev/null @@ -1,56 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; - -[REQUIRE_CFG_PL] - - -my $host = get_host(); -my $secure_port = get_secure_port(); -my $port = get_port(); - -my $q = new CGI; - -sub DoPage -{ - - my $error = $q->param('error'); - - open(FILE, "< noaccess.html"); - - print $q->header(); - - while ($l = ) - { - $l =~ s/\$error/$error/g; - $l =~ s/\$host/$host/g; - $l =~ s/\$secure_port/$secure_port/g; - $l =~ s/\$port/$port/g; - print $l; - } - - close(FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/read.cgi b/base/tps/forms/esc/cgi-bin/sow/read.cgi deleted file mode 100755 index 8a5793c2b..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/read.cgi +++ /dev/null @@ -1,128 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; -use Mozilla::LDAP::Conn; -use PKI::TPS::Common; - -[REQUIRE_CFG_PL] - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - my $q = new CGI; - my $host = get_ldap_host(); - my $port = get_ldap_port(); - my $secureconn = get_ldap_secure(); - my $basedn = get_base_dn(); - my $certdir = get_ldap_certdir(); - - if (!&authorize()) { - print $q->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - my $name = $q->param('name'); - my $uid = $q->param('name_ID'); - $name = "" if !defined $name; - - if ($name eq "") { - print $q->redirect("/cgi-bin/sow/search.cgi?error=Name cannot be empty"); - return; - } - - my $conn = PKI::TPS::Common::make_connection( - {host => $host, port => $port, cert => $certdir}, - $secureconn); - - if (!$conn) { - print $q->redirect("/cgi-bin/sow/search.cgi?error=Failed to connect to the database."); - return; - }; - - my $entry = $conn->search ( $basedn, - "sub", - "cn=$name", - 0 - ); - - if (!$entry) { - $conn->close(); - print $q->redirect("/cgi-bin/sow/search.cgi?error=User $name not found"); - return; - } - - my $givenName = ($entry->getValues("givenName"))[0] || "-"; - my $cn = ($entry->getValues("cn"))[0] || "-"; - my $sn = ($entry->getValues("sn"))[0] ||"-"; - $uid = ($entry->getValues("uid"))[0] || "-"; - my $mail = ($entry->getValues("mail"))[0] || "-"; - my $phone = ($entry->getValues("telephoneNumber"))[0] || "-"; - my $photoLarge = ($entry->getValues("photoLarge"))[0] || ""; # photo (full size) - my $photoSmall = ($entry->getValues("photoSmall"))[0] || ""; # photo (thumb) - my $height = ($entry->getValues("height"))[0] || ""; - my $weight = ($entry->getValues("weight"))[0] || ""; - my $eyecolor = ($entry->getValues("eyeColor"))[0] || ""; - - $conn->close(); - - if ($uid eq "-") { - print $q->redirect("/cgi-bin/sow/search.cgi?error=User $name not found"); - return; - } - - open(FILE, "< read.html"); - - print $q->header(); - - while ($l = ) - { - $l =~ s/\$mail/$mail/g; - $l =~ s/\$uid/$uid/g; - $l =~ s/\$givenName/$givenName/g; - $l =~ s/\$sn/$sn/g; - $l =~ s/\$cn/$cn/g; - $l =~ s/\$phone/$phone/g; - $l =~ s/\$photoLarge/$photoLarge/g; - $l =~ s/\$photoSmall/$photoSmall/g; - $l =~ s/\$height/$height/g; - $l =~ s/\$weight/$weight/g; - $l =~ s/\$eyecolor/$eyecolor/g; - print $l; - } - - close(FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/read_temp.cgi b/base/tps/forms/esc/cgi-bin/sow/read_temp.cgi deleted file mode 100755 index 31c6fd7e3..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/read_temp.cgi +++ /dev/null @@ -1,125 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; -use Mozilla::LDAP::Conn; -use PKI::TPS::Common; - -[REQUIRE_CFG_PL] - - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - my $q = new CGI; - my $host = get_ldap_host(); - my $port = get_ldap_port(); - my $secureconn = get_ldap_secure(); - my $basedn = get_base_dn(); - my $certdir = get_ldap_certdir(); - - if (!&authorize()) { - print $q->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - my $name = $q->param('name'); - my $uid = $q->param('name_ID'); - $name = "" if !defined $name; - - if ($name eq "") { - print $q->redirect("/cgi-bin/sow/search.cgi?error=Name cannot be empty"); - return; - } - - my $conn = PKI::TPS::Common::make_connection( - {host => $host, port => $port, cert => $certdir}, - $secureconn); - - - my $entry = $conn->search ( $basedn, - "sub", - "cn=$name", - 0 - ); - - if (!$entry) { - $conn->close(); - print $q->redirect("/cgi-bin/sow/search.cgi?error=User $name not found"); - return; - } - - my $givenName = ($entry->getValues("givenName"))[0] || "-"; - my $cn = ($entry->getValues("cn"))[0] || "-"; - my $sn = ($entry->getValues("sn"))[0] ||"-"; - $uid = ($entry->getValues("uid"))[0] || "-"; - my $mail = ($entry->getValues("mail"))[0] || "-"; - my $phone = ($entry->getValues("telephoneNumber"))[0] || "-"; - my $photoLarge = ($entry->getValues("photoLarge"))[0] || ""; # photo (full size) - my $photoSmall = ($entry->getValues("photoSmall"))[0] || ""; # photo (thumb) - my $height = ($entry->getValues("height"))[0] || ""; - my $weight = ($entry->getValues("weight"))[0] || ""; - my $eyecolor = ($entry->getValues("eyeColor"))[0] || ""; - - $conn->close(); - - if ($uid eq "-") { - print $q->redirect("/cgi-bin/sow/search.cgi?error=User $name not found"); - return; - } - - open(FILE, "< read_temp.html"); - - print $q->header(); - - while ($l = ) - { - $l =~ s/\$mail/$mail/g; - $l =~ s/\$uid/$uid/g; - $l =~ s/\$givenName/$givenName/g; - $l =~ s/\$sn/$sn/g; - $l =~ s/\$cn/$cn/g; - $l =~ s/\$phone/$phone/g; - $l =~ s/\$photoLarge/$photoLarge/g; - $l =~ s/\$photoSmall/$photoSmall/g; - $l =~ s/\$height/$height/g; - $l =~ s/\$weight/$weight/g; - $l =~ s/\$eyecolor/$eyecolor/g; - print $l; - } - - close(FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/search.cgi b/base/tps/forms/esc/cgi-bin/sow/search.cgi deleted file mode 100755 index e681ed100..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/search.cgi +++ /dev/null @@ -1,70 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; - -[REQUIRE_CFG_PL] - - -my $ldapHost = get_ldap_host(); -my $ldapPort = get_ldap_port(); -my $basedn = get_base_dn(); - -my $q = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - if (!&authorize()) { - print $q->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - my $error = $q->param('error'); - $error = "" if !defined $error; - - open(FILE, "< search.html"); - - print $q->header(); - - while ($l = ) - { - $l =~ s/\$error/$error/g; - print $l; - } - - close(FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/search_temp.cgi b/base/tps/forms/esc/cgi-bin/sow/search_temp.cgi deleted file mode 100755 index 5d752a49d..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/search_temp.cgi +++ /dev/null @@ -1,70 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; - -[REQUIRE_CFG_PL] - - -my $ldapHost = get_ldap_host(); -my $ldapPort = get_ldap_port(); -my $basedn = get_base_dn(); - -my $q = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - if (!&authorize()) { - print $q->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - my $error = $q->param('error'); - $error = "" if !defined $error; - - open(FILE, "< search_temp.html"); - - print $q->header(); - - while ($l = ) - { - $l =~ s/\$error/$error/g; - print $l; - } - - close(FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/seturl.cgi b/base/tps/forms/esc/cgi-bin/sow/seturl.cgi deleted file mode 100755 index dfac46d8f..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/seturl.cgi +++ /dev/null @@ -1,207 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -[REQUIRE_CFG_PL] - -use CGI; - -my $ldapHost = get_ldap_host(); -my $ldapPort = get_ldap_port(); -my $basedn = get_base_dn(); -my $host = get_host(); -my $port = get_port(); -my $secure_port = get_secure_port(); - -$gQuery = new CGI; - -sub authorize -{ - my $client_dn = $ENV{'SSL_CLIENT_S_DN'}; - $client_dn =~ tr/A-Z/a-z/; # all lower cases - $client_dn =~ s/\s+//g; # remove all spacing - - if (&is_agent($client_dn)) { - return 1; - } - return 0; -} - -sub DoPage -{ - if (!&authorize()) { - print $gQuery->redirect("/cgi-bin/sow/noaccess.cgi"); - return; - } - - $gQueryAction = "default"; - $gQueryOverrideAction = "default"; - - @gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - - $gQueryAction = $gQuery->param("action") if - (defined $gQuery->param("action")); - - $gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - - if ($gQueryOverrideAction ne "default") - { - $gQueryAction = $gQueryOverrideAction; - } - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - - if ($gQueryAction eq "default") - { - GeneratePage(); - exit 0; - } -} - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GeneratePage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< seturl.html")); - - print $gQuery->header(); - - while ($l = ) - { - $l =~ s/\$host/$host/g; - $l =~ s/\$port/$port/g; - $l =~ s/\$secure_port/$secure_port/g; - print $l; - } - - close(ENROLL_FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/cgi-bin/sow/welcome.cgi b/base/tps/forms/esc/cgi-bin/sow/welcome.cgi deleted file mode 100755 index bc76dd3fa..000000000 --- a/base/tps/forms/esc/cgi-bin/sow/welcome.cgi +++ /dev/null @@ -1,57 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# - -use CGI; - -[REQUIRE_CFG_PL] - - -my $host = get_host(); -my $secure_port = get_secure_port(); -my $port = get_port(); - -my $q = new CGI; - -sub DoPage -{ - - my $error = $q->param('error'); - $error = "" if !defined $error; - - open(FILE, "< welcome.html"); - - print $q->header(); - - while ($l = ) - { - $l =~ s/\$error/$error/g; - $l =~ s/\$host/$host/g; - $l =~ s/\$secure_port/$secure_port/g; - $l =~ s/\$port/$port/g; - print $l; - } - - close(FILE); -} - -&DoPage(); diff --git a/base/tps/forms/esc/esc.cgi b/base/tps/forms/esc/esc.cgi deleted file mode 100755 index 70a93c0a0..000000000 --- a/base/tps/forms/esc/esc.cgi +++ /dev/null @@ -1,1239 +0,0 @@ -#! /usr/bin/perl -w -# -# --- 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; -# version 2.1 of the License. -# -# 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 --- -# -######################################################################## -# -# Script: esc.cgi -# Author: Kin Blas () -# Date: 12/19/2003 -# -# CGI.pm Docs: -# -# http://stein.cshl.org/WWW/software/CGI/ -# -######################################################################## - -use CGI; - -$gQuery = new CGI; - -$gQueryAction = "default"; -$gQueryOverrideAction = "default"; - -@gCookieNames = ("ascScreenName", - "ascSubscriptionType", - "ascBindings"); - -$gQueryAction = $gQuery->param("action") if (defined $gQuery->param("action")); - -$gQueryOverrideAction = $gQuery->param("override_action") - if (defined $gQuery->param("override_action")); - -if ($gQueryOverrideAction ne "default") -{ - $gQueryAction = $gQueryOverrideAction; -} - -######################################################################## -# -# If no action was provided, we default to showing our -# admin page! -# -# http://www.foo.com/esc.cgi -# -######################################################################## - -if ($gQueryAction eq "default") -{ - GenerateAdminPage(); - exit 0; -} - -######################################################################## -# -# We aren't doing any admin functions, before proceeding -# on to user specific functions, make sure we have a screen name -# and that they are subscribed to a service. -# -######################################################################## - -#if (!HaveScreenName() || $gQueryAction eq "screennamepage") -#{ -# GenerateScreenNamePage($gQueryAction); -# exit 0; -#} - -LoadUserDatabase("default"); - -######################################################################## -# -# Subscribe? -# -# http://www.foo.com/esc.cgi?action=subscribe -# -######################################################################## - -#if ($gQueryAction eq "subscribe") -#{ -# SaveSubscription(); -# $nextAction = GetNextAction(); -# $redirectLocation = $gQuery->url(-path_info=>1)."?action=$nextAction&screenname=".GetScreenName(); -# print $gQuery->redirect(-uri=>$redirectLocation); -# exit 0; -#} - -#if (!IsSubscriber() || $gQueryAction eq "subscriptionpage") -#{ -# GenerateTOSPage($gQueryAction); -# exit 0; -#} - -######################################################################## -# -# Show our cookie management page? -# -# http://www.foo.com/esc.cgi?action=cookiepage -# -######################################################################## - -#if ($gQueryAction eq "cookiepage") -#{ -# GenerateCookiesPage(); -# exit 0; -#} - -######################################################################## -# -# Clear cookies? -# -# http://www.foo.com/esc.cgi?action=clearAllCookies -# -######################################################################## - -#if ($gQueryAction eq "removeCookies") -#{ -# @expCookies = (); -# foreach $cookie (@gCookieNames) -# { -# if (defined $gQuery->param($cookie)) -# { -# $expCookies[$cookieCnt++] = CreateExpiredCookie($cookie); -# } -# } -# $redirectLocation = $gQuery->url(-path_info=>1)."?action=cookiepage&screenname=".GetScreenName(); -# print $gQuery->redirect(-uri=>$redirectLocation, -# -cookie=>\@expCookies); -# exit 0; -#} - -######################################################################## -# -# Bind? -# -# -######################################################################## - -if ($gQueryAction eq "bind") -{ - UpdateBindingsForBind(); - $nextAction = GetNextAction(); - - $nextAction = "bindpage" if ($nextAction eq $gQueryAction); - - $redirectLocation = $gQuery->url(-path_info=>1)."?action=$nextAction&prevaction=bind&screenname=".GetScreenName()."&keytype=".GetKeyType()."&keyid=".GetKeyID()."&keylabel=".GetKeyLabelArg(); - print $gQuery->redirect(-uri=>$redirectLocation); - exit 0; -} - -######################################################################## -# -# Unbind? -# -# -######################################################################## - -if ($gQueryAction eq "unbind") -{ - UpdateBindingsForUnbind(); - - $nextAction = GetNextAction(); - - $nextAction = "bindpage" if ($nextAction eq $gQueryAction); - - $redirectLocation = $gQuery->url(-path_info=>1)."?action=$nextAction&prevaction=unbind&screenname=".GetScreenName()."&keytype=".GetKeyType()."&keyid=".GetKeyID()."&keylabel=".GetKeyLabelArg(); - print $gQuery->redirect(-uri=>$redirectLocation); - exit 0; -} - -######################################################################## -# -# Label? -# -# -######################################################################## - -if ($gQueryAction eq "label") -{ - UpdateBindingsForLabel(); - - $nextAction = GetNextAction(); - - $nextAction = "bindpage" if ($nextAction eq $gQueryAction); - - $redirectLocation = $gQuery->url(-path_info=>1)."?action=$nextAction&screenname=".GetScreenName(); - print $gQuery->redirect(-uri=>$redirectLocation); - exit 0; -} - -######################################################################## -# -# ScreenName? -# -# -######################################################################## - -#if ($gQueryAction eq "screenname") -#{ -# $nextAction = GetNextAction(); -# $redirectLocation = $gQuery->url(-path_info=>1)."?action=$nextAction&screenname=".GetScreenName(); -# print $gQuery->redirect(-uri=>$redirectLocation); -# exit 0; -#} - -######################################################################## -# -# Check if we are displaying the label page. -# -# -######################################################################## - -if ($gQueryAction eq "labelpage") -{ - my $nextAction = GetNextAction(); - $nextAction = "bindpage" if ($nextAction eq $gQueryAction); - - my $keyType = GetKeyType(); - my $keyId = GetKeyID(); - - GenerateLabelPage($keyType, $keyId, $nextAction); - exit 0; -} - -######################################################################## -# -# Show our enrollment page? -# -# http://www.foo.com/esc.cgi?action=enrollmentpage -# -######################################################################## - -if ($gQueryAction eq "enrollmentpage") -{ - GenerateEnrollmentPage(); - exit 0; -} - -if ($gQueryAction eq "advancepage") -{ - GenerateAdvancePage(); - exit 0; -} - -if ($gQueryAction eq "tokenmanagerpage") -{ - GenerateTokenManagerPage(); - exit 0; -} - -if($gQueryAction eq "authenticate") -{ - - GenerateAuthenticationPage(); - exit 0; -} - -if ($gQueryAction eq "autoenroll") -{ - GenerateAutoEnrollmentPage(); - exit 0; -} - -######################################################################## -# -# Show our ticket request page? -# -# -######################################################################## - -if ($gQueryAction eq "ticketreqpage") -{ - GenerateTicketRequestPage(); - exit 0; -} - -######################################################################## -# -# Show our load external url page? -# -# http://www.foo.com/esc.cgi?action=loadurlpage -# -######################################################################## - - -if ($gQueryAction eq "loadurl") -{ - $nextAction = GetNextAction(); - $redirectLocation = $gQuery->param('url'); - print $gQuery->redirect(-uri=>$redirectLocation); - exit 0; -} - -if ($gQueryAction eq "loadurlpage") -{ - GenerateLoadURLPage(); - exit 0; -} - -######################################################################## -# -# User is subscribed, check if we are displaying the -# settings page. -# -# -######################################################################## - -if ($gQueryAction eq "settingspage") -{ - GenerateSettingsPage(); - exit 0; -} - -######################################################################## -# -# Check if we are displaying the set label page. -# -# -######################################################################## - -if ($gQueryAction eq "setlabelpage") -{ - GenerateSetLabelPage(); - exit 0; -} - -######################################################################## -# -# Check if we are displaying the bind/unbind progress page! -# -# -######################################################################## - -if ($gQueryAction eq "bindprogresspage") -{ - GenerateBindProgressPage("bind"); - exit 0; -} - -if ($gQueryAction eq "unbindprogresspage") -{ - GenerateBindProgressPage("unbind"); - exit 0; -} - -######################################################################## -# -# Check if we are displaying the bind/unbind success page! -# -# -######################################################################## - -if ($gQueryAction eq "bindsuccesspage") -{ - GenerateBindSuccessPage("bind"); - exit 0; -} - -if ($gQueryAction eq "unbindsuccesspage") -{ - GenerateBindSuccessPage("unbind"); - exit 0; -} - -######################################################################## -# -# XXX: Lose this code! -# User is subscribed, check if we are displaying the -# binding page. -# -# -######################################################################## - -if ($gQueryAction eq "bindpage") -{ - GenerateBindingConfigPage(); - exit 0; -} - -print "

    Unknown Query Action "; -print $qQueryAction; -print "

    "; -exit 0; - -######################################################################## -# -# -######################################################################## - - -sub ExitError -{ - my($str) = @_; - print $gQuery->header(), $gQuery->start_html(), $str, $gQuery->end_html(); - exit 0; -} - -sub GetScreenName -{ - my $sn = ""; - - if (defined $gQuery->param("screenname")) - { - $sn = $gQuery->param("screenname"); - } else { - $sn = "default"; - } - - return $sn; -} - -sub GetKeyType -{ - my $keyType = 0; - - if (defined $gQuery->param("keytype")) - { - $keyType = $gQuery->param("keytype"); - } - - return $keyType; -} - -sub GetKeyID -{ - my $keyID = ""; - - if (defined $gQuery->param("keyid")) - { - $keyID = $gQuery->param("keyid"); - } - - return $keyID; -} - -sub GetKeyLabelArg -{ - my $keyLabel = ""; - - if (defined $gQuery->param("keylabel")) - { - $keyLabel = $gQuery->param("keylabel"); - } - - return $keyLabel; -} - -sub HaveScreenName -{ - return 1 if (GetScreenName() ne ""); - return 0; -} - -sub IsSubscriber -{ - my $subType = $gUserObj{'SUBSCRIPTION'}; - return 1 if ($subType eq "HouseKey" || $subType eq "NetKey"); - - return 0; -} - -sub GetNextAction -{ - my($nextActn) = "default"; - - if (defined $gQuery->param('nextaction')) - { - $nextActn = $gQuery->param('nextaction'); - } - elsif (defined $gQuery->param('action')) - { - $nextActn = $gQuery->param('action'); - } - - return $nextActn; -} - -sub GenerateAdminPage() -{ - my ($l); - - ExitError("Failed to load Admin Page") if (!open(ADMIN_FILE, "< ./AdminEsc.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - } - print $l; - } - close(ADMIN_FILE); -} - -sub GenerateCookiesPage() -{ - my ($nextPage) = @_; - - my ($l); - - ExitError("Failed to load TOS Page") if (!open(COOKIE_FILE, "< Cookies.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ /SECURECOOL_COOKIE_LIST/) - { - my @cookies = $gQuery->cookie(); - if (@cookies < 1) - { - print "No ASC Cookies currently defined!
    \n"; - } - else - { - my $cookieName; - foreach $cookieName (@cookies) - { - # - # Display only ASC related cookies! - # - - if ($cookieName =~ /^asc/) - { - print "$cookieName", $gQuery->cookie($cookieName), "\n"; - } - } - print "
    \n"; - } - } - elsif ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - close(COOKIE_FILE); -} - -sub GenerateScreenNamePage -{ - my ($nextPage) = @_; - - my ($l); - - ExitError("Failed to load ScreenName Page") if (!open(SN_FILE, "< ScreenName.html")); - - print $gQuery->header(); - - my $sn = GetScreenName(); - - while ($l = ) - { - if ($l =~ /SECURECOOL_NEXTACTION_INPUT_TAG/) - { - if ($nextPage) - { - print "\n"; - print "\n"; - } - - if ($sn) - { - print "\n"; - } - } - elsif ($l =~ //) - { - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - close(SN_FILE); -} - -sub GenerateTOSPage -{ - my ($nextPage) = @_; - - my ($l); - - ExitError("Failed to load TOS Page") if (!open(TOS_FILE, "< Subscribe.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ /SECURECOOL_NEXTACTION_INPUT_TAG/) - { - if ($nextPage) - { - print "\n"; - print "\n"; - } - } - elsif ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - close(TOS_FILE); -} - -sub GenerateSettingsPage -{ - my ($l); - - ExitError("Failed to load settings page!") if (!open(SETTINGS_FILE, "< SettingsEsc.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ /SECURECOOL_BINDINGS_ARRAY/) - { - my(@curBindings) = GetBindings(); - my $arrSize = scalar(@curBindings); - my($i); - - for ($i = 0; $i < $arrSize; $i++) - { - my($keyType, $keyId, $keyLabel) = split(/&/, $curBindings[$i]); - print " [ $keyType, \"$keyId\", \"$keyLabel\" ]"; - print "," if ($arrSize > 1 && $i != $arrSize - 1); - print "\n"; - } - } - elsif ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - close(SETTINGS_FILE); -} - -sub GenerateSetLabelPage -{ - my ($l); - - ExitError("Failed to open label page!") if (!open(LABEL_PAGE, "< Label.html")); - - my $sn = GetScreenName(); - ExitError("Failed to get a valid screen name!") if (! $sn); - - my $keyType = GetKeyType(); - my $keyID = GetKeyID(); - ExitError("Failed to get a valid keyID!") if (! $keyID); - - $defLabel = $keyID; - $defLabel =~ s/^[0-9a-fA-F]{12}//; - $defLabel = "$sn-$defLabel"; - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - $l =~ s//$sn/g; - } - if ($l =~ //) - { - $l =~ s//$keyType/g; - } - if ($l =~ //) - { - $l =~ s//$keyID/g; - } - if ($l =~ //) - { - $l =~ s//$defLabel/g; - } - print $l; - } - close(LABEL_FILE); -} - -sub GenerateBindProgressPage -{ - my ($action) = @_; - my ($l); - - ExitError("Failed to open progress page!") if (!open(PROG_PAGE, "< Progress.html")); - - my $sn = GetScreenName(); - ExitError("Failed to get a valid screen name!") if (! $sn); - - my $keyType = GetKeyType(); - my $keyID = GetKeyID(); - ExitError("Failed to get a valid keyID!") if (! $keyID); - - my $keyLabel = ""; - - if ($action eq "bind") - { - $keyLabel = GetKeyLabelArg(); - ExitError("Failed to get a valid keyLabel!") if (! $keyLabel); - } - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - $l =~ s//$sn/g; - } - if ($l =~ //) - { - $l =~ s//$keyType/g; - } - if ($l =~ //) - { - $l =~ s//$keyID/g; - } - if ($l =~ //) - { - $l =~ s//$keyLabel/g; - } - if ($l =~ //) - { - $l =~ s//$action/g; - } - if ($l =~ //) - { - $challengeData = ""; - $challengeData = "QVNDIHJvY2tzIHRoZSBwYXJ0eSE=" if ($action eq "bind"); - - $l =~ s//$challengeData/g; - } - print $l; - } - close(PROG_PAGE); -} - -sub GenerateBindSuccessPage -{ - my ($action) = @_; - my ($l); - - ExitError("Failed to open progress page!") if (!open(SUCCESS_PAGE, "< BindSuccess.html")); - - my $sn = GetScreenName(); - ExitError("Failed to get a valid screen name!") if (! $sn); - - my $keyType = GetKeyType(); - my $keyID = GetKeyID(); - ExitError("Failed to get a valid keyID!") if (! $keyID); - - my $keyLabel = ""; - - if ($action eq "bind") - { - $keyLabel = GetKeyLabelArg(); - ExitError("Failed to get a valid keyLabel!") if (! $keyLabel); - } - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - $l =~ s//$sn/g; - } - if ($l =~ //) - { - $l =~ s//$keyType/g; - } - if ($l =~ //) - { - $l =~ s//$keyID/g; - } - if ($l =~ //) - { - $l =~ s//$keyLabel/g; - } - if ($l =~ //) - { - $l =~ s//$action/g; - } - print $l; - } - close(SUCCESS_PAGE); -} - -sub GenerateBindingConfigPage -{ - my ($l); - - ExitError("Failed to load binding page!") if (!open(BINDING_FILE, "< Bindings.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ /SECURECOOL_BINDINGS_ARRAY/) - { - my(@curBindings) = GetBindings(); - my $arrSize = scalar(@curBindings); - my($i); - - for ($i = 0; $i < $arrSize; $i++) - { - my($keyType, $keyId, $keyLabel) = split(/&/, $curBindings[$i]); - print " [ $keyType, \"$keyId\", \"$keyLabel\" ]"; - print "," if ($arrSize > 1 && $i != $arrSize - 1); - print "\n"; - } - } - elsif ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - close(BINDING_FILE); -} - -sub GetKeyLabel -{ - my($keyType, $keyId) = @_; - - my(@curBindings) = GetBindings(); - my($numBindings) = scalar(@curBindings); - - while($numBindings > 0) - { - --$numBindings; - if ($curBindings[$numBindings] =~ /^$keyType&$keyId&/) - { - my($ktype, $id, $lbl) = split(/&/, $curBindings[$numBindings]); - return $lbl; - } - } - - return ""; -} - -sub GenerateLabelPage -{ - my($keyType, $keyId, $nextAction) = @_; - my($keyLabel) = GetKeyLabel($keyType, $keyId); - - return if ($keyLabel eq ""); - - my ($l); - - ExitError("Failed to load label page!") if (!open(EDIT_LABEL_FILE, "< EditLabel.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ /SECURECOOL_NEXTACTION_INPUT_TAG/) - { - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - } - elsif ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - close(EDIT_LABEL_FILE); -} - -sub GenerateAutoEnrollmentPage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< EnrollPopup.html")); - - print $gQuery->header(); - - while ($l = ) - { - print $l; - } - - close(ENROLL_FILE); -} -sub GenerateAuthenticationPage -{ - my ($l); - ExitError("Failed to load enrollment page!") if (!open(AUTH_FILE, "< GenericAuth.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - - close(AUTH_FILE); -} - -sub GenerateEnrollmentPage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< EnrollPopup.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - - close(ENROLL_FILE); -} - -sub GenerateAdvancePage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< AdvancePopup.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - - close(ENROLL_FILE); -} - -sub GenerateTokenManagerPage -{ - my ($l); - - ExitError("Failed to load enrollment page!") if (!open(ENROLL_FILE, "< TokenManager.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - - close(ENROLL_FILE); -} - -sub GenerateTicketRequestPage -{ - my ($l); - - ExitError("Failed to load ticket request page!") if (!open(TICKETREQ_FILE, "< Ticket.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - - close(TICKETREQ_FILE); -} - -sub GenerateLoadURLPage -{ - my ($l); - - ExitError("Failed to load url request page!") if (!open(LOADURL_FILE, "< LoadURL.html")); - - print $gQuery->header(); - - while ($l = ) - { - if ($l =~ //) - { - my $sn = GetScreenName(); - $l =~ s//$sn/g; - print $l; - } - else - { - print $l; - } - } - - close(LOADURL_FILE); -} - -sub CreateExpiredCookie -{ - my($cookieName) = @_; - my $cookie = $gQuery->cookie(-name=>$cookieName, - -value=>'', - -expires=>'-2d', - -path=>$gQuery->url(-absolute=>1), - -domain=>$gQuery->server_name()); - return $cookie; - -} - -sub SaveSubscription -{ - - $gUserObj{'SUBSCRIPTION'} = $gQuery->param("subscriptiontype"); - SaveUserDatabase(GetScreenName()); -} - -sub GetBindings -{ - my $bindings = $gUserObj{'BINDINGS'}; - return @$bindings; -} - -sub BindingsArrayToString -{ - my(@bindings) = @_; - my $i; - my $str = ""; - - for ($i = 0; $i < @bindings; $i++) - { - if ($bindings[$i] ne "") - { - $str .= "&" if ($str ne ""); - $str .= ASCUrlEncode($bindings[$i]); - } - } - - return $str; -} - -sub AddItemToBindings -{ - my($keyType, $keyId, $keyLabel) = @_; - - my(@curBindings) = GetBindings(); - my($pos) = scalar(@curBindings); - - # First check to see if the key already exists in - # the cookie! If it does, we'll just overwrite it. - - my($i) = $pos; - while($i > 0) - { - --$i; - if ($curBindings[$i] =~ /^$keyType&$keyId&/) - { - $pos = $i; - last; - } - } - - $curBindings[$pos] = "$keyType&$keyId&$keyLabel"; - - $gUserObj{'BINDINGS'} = \@curBindings; - #SaveUserDatabase(GetScreenName()); -} - -sub RemoveItemFromBindings -{ - my($keyType, $keyId) = @_; - - my(@curBindings) = GetBindings(); - my($numBindings) = scalar(@curBindings); - my @newBindings; - - while($numBindings > 0) - { - --$numBindings; - next if ($curBindings[$numBindings] =~ /^$keyType&$keyId&/); - push @newBindings, $curBindings[$numBindings]; - } - - $gUserObj{'BINDINGS'} = \@newBindings; - #SaveUserDatabase(GetScreenName()); -} - -sub UpdateBindingsForBind -{ - return if (! defined $gQuery->param("keytype")); - my($keyType) = $gQuery->param("keytype"); - - return if (! defined $gQuery->param("keyid")); - my($keyId) = $gQuery->param("keyid"); - - return if (! defined $gQuery->param("keylabel")); - my($keyLabel) = $gQuery->param("keylabel"); - - return AddItemToBindings($keyType, $keyId, $keyLabel); -} - -sub UpdateBindingsForUnbind -{ - return if (! defined $gQuery->param("keytype")); - my($keyType) = $gQuery->param("keytype"); - - return if (! defined $gQuery->param("keyid")); - my($keyId) = $gQuery->param("keyid"); - - return RemoveItemFromBindings($keyType, $keyId,); -} - -sub UpdateBindingsForLabel -{ - return UpdateBindingsForBind(); -} - -sub ASCUrlDecode -{ - my($qstr) = @_; - $qstr =~ s/\+/ /g; - $qstr =~ s/%([0-9A-F]{2})/pack("C", hex($1))/eig; - return $qstr; -} - -sub ASCUrlEncode -{ - my($qstr) = @_; - $qstr =~ s/([^a-zA-Z0-9_ ])/sprintf("%%%.2X", unpack("C", $1))/eig; - $qstr =~ s/ /+/g; - return $qstr; -} - -sub LoadUserDatabase -{ - my($sn) = @_; - - $gUserObj{'SUBSCRIPTION'} = ""; - - $gUserObj{'BINDINGS'} = ""; - return; - -} - -sub SaveUserDatabase -{ - my($sn) = @_; - my($snfile) = "UserDatabase/$sn"; - - return; - -} diff --git a/base/tps/forms/esc/home.cgi b/base/tps/forms/esc/home.cgi deleted file mode 100755 index 5fdf5ecf8..000000000 --- a/base/tps/forms/esc/home.cgi +++ /dev/null @@ -1,40 +0,0 @@ -#!/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; -# version 2.1 of the License. -# -# 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 --- -# -# -# -# -print "Content-type: text/xml\n\n"; -print "<\?xml version=\"1.0\" encoding=\"UTF-8\"\?>"; -print ""; -print ""; -print "Fedora Project"; # Vendor -print "\n"; -print ""; -print ""; -print "http://machine.fedora.redhat.com:7888/nk_service"; -print ""; -print ""; -print "http://machine.fedora.redhat.com:7888/cgi-bin/esc.cgi"; -print ""; -print ""; -print ""; diff --git a/base/tps/forms/index.cgi b/base/tps/forms/index.cgi deleted file mode 100755 index 0e643166b..000000000 --- a/base/tps/forms/index.cgi +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -# -# --- 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 --- -# -# -# -# - -package op; - -use lib $ENV{DOCUMENT_ROOT} . "/../lib/perl"; - -use CGI; -use PKI::Service::Op; -use Template::Velocity; -use PKI::Base::Conf; -use PKI::Base::Registry; - -use vars qw (@ISA); -use PKI::Service::Op; -@ISA = qw(PKI::Service::Op); - -sub new { - my $self = {}; - bless ($self); - return $self; -} - -sub process() -{ - my $self = shift; - - my $q = CGI->new(); - - my $docroot = PKI::Base::Registry->get_docroot(); - my $parser = PKI::Base::Registry->get_parser(); - my $cfg = PKI::Base::Registry->get_config(); - - $self->debug_params($cfg, $q); - - $::symbol{machineName} = $cfg->get("service.machineName"); - $::symbol{non_clientauth_securePort} = $cfg->get("service.non_clientauth_securePort"); - $::symbol{securePort} = $cfg->get("service.securePort"); - $::symbol{unsecurePort} = $cfg->get("service.unsecurePort"); - - my $result = $parser->execute_file("index.vm"); - - my $xml = $q->param('xml'); - if ($xml eq "true") { - print "Content-Type: text/xml\n\n"; - print $self->xml_output(\%::symbol); - } else { - print "Content-Type: text/html\n\n"; - print "$result"; - } -} - - -my $op = op->new(); -$op->execute(); diff --git a/base/tps/forms/index.html b/base/tps/forms/index.html deleted file mode 100644 index b225251a1..000000000 --- a/base/tps/forms/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - diff --git a/dogtag/tps-ui/shared/cgi-bin/demo/Enroll.html b/dogtag/tps-ui/shared/cgi-bin/demo/Enroll.html deleted file mode 100755 index df00dbee4..000000000 --- a/dogtag/tps-ui/shared/cgi-bin/demo/Enroll.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - -Enrollment - - - - -
    - diff --git a/dogtag/tps-ui/shared/cgi-bin/sow/enroll_temp.html b/dogtag/tps-ui/shared/cgi-bin/sow/enroll_temp.html deleted file mode 100755 index 3f2b31ce6..000000000 --- a/dogtag/tps-ui/shared/cgi-bin/sow/enroll_temp.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - -Enrollment - - - - - - - - - -
    - // - - - var objBody = document.getElementsByTagName("body").item(0); - - var objOverlay = document.createElement("div"); - objOverlay.setAttribute('id','overlay'); - objOverlay.style.display = 'none'; - objOverlay.onclick = function() { myLightbox.end(); return false; } - objBody.appendChild(objOverlay); - - var objLightbox = document.createElement("div"); - objLightbox.setAttribute('id','lightbox'); - objLightbox.style.display = 'none'; - objBody.appendChild(objLightbox); - - var objOuterImageContainer = document.createElement("div"); - objOuterImageContainer.setAttribute('id','outerImageContainer'); - objLightbox.appendChild(objOuterImageContainer); - - var objImageContainer = document.createElement("div"); - objImageContainer.setAttribute('id','imageContainer'); - objOuterImageContainer.appendChild(objImageContainer); - - var objLightboxImage = document.createElement("img"); - objLightboxImage.setAttribute('id','lightboxImage'); - objImageContainer.appendChild(objLightboxImage); - - var objHoverNav = document.createElement("div"); - objHoverNav.setAttribute('id','hoverNav'); - objImageContainer.appendChild(objHoverNav); - - var objPrevLink = document.createElement("a"); - objPrevLink.setAttribute('id','prevLink'); - objPrevLink.setAttribute('href','#'); - objHoverNav.appendChild(objPrevLink); - - var objNextLink = document.createElement("a"); - objNextLink.setAttribute('id','nextLink'); - objNextLink.setAttribute('href','#'); - objHoverNav.appendChild(objNextLink); - - var objLoading = document.createElement("div"); - objLoading.setAttribute('id','loading'); - objImageContainer.appendChild(objLoading); - - var objLoadingLink = document.createElement("a"); - objLoadingLink.setAttribute('id','loadingLink'); - objLoadingLink.setAttribute('href','#'); - objLoadingLink.onclick = function() { myLightbox.end(); return false; } - objLoading.appendChild(objLoadingLink); - - var objLoadingImage = document.createElement("img"); - objLoadingImage.setAttribute('src', fileLoadingImage); - objLoadingLink.appendChild(objLoadingImage); - - var objImageDataContainer = document.createElement("div"); - objImageDataContainer.setAttribute('id','imageDataContainer'); - objImageDataContainer.className = 'clearfix'; - objLightbox.appendChild(objImageDataContainer); - - var objImageData = document.createElement("div"); - objImageData.setAttribute('id','imageData'); - objImageDataContainer.appendChild(objImageData); - - var objImageDetails = document.createElement("div"); - objImageDetails.setAttribute('id','imageDetails'); - objImageData.appendChild(objImageDetails); - - var objCaption = document.createElement("span"); - objCaption.setAttribute('id','caption'); - objImageDetails.appendChild(objCaption); - - var objNumberDisplay = document.createElement("span"); - objNumberDisplay.setAttribute('id','numberDisplay'); - objImageDetails.appendChild(objNumberDisplay); - - var objBottomNav = document.createElement("div"); - objBottomNav.setAttribute('id','bottomNav'); - objImageData.appendChild(objBottomNav); - - var objBottomNavCloseLink = document.createElement("a"); - objBottomNavCloseLink.setAttribute('id','bottomNavClose'); - objBottomNavCloseLink.setAttribute('href','#'); - objBottomNavCloseLink.onclick = function() { myLightbox.end(); return false; } - objBottomNav.appendChild(objBottomNavCloseLink); - - var objBottomNavCloseImage = document.createElement("img"); - objBottomNavCloseImage.setAttribute('src', fileBottomNavCloseImage); - objBottomNavCloseLink.appendChild(objBottomNavCloseImage); - }, - - // - // start() - // Display overlay and lightbox. If image is part of a set, add siblings to imageArray. - // - start: function(imageLink) { - - hideSelectBoxes(); - - // stretch overlay to fill page and fade in - var arrayPageSize = getPageSize(); - Element.setHeight('overlay', arrayPageSize[1]); - new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.8 }); - - imageArray = []; - imageNum = 0; - - if (!document.getElementsByTagName){ return; } - var anchors = document.getElementsByTagName('a'); - - // if image is NOT part of a set.. - if((imageLink.getAttribute('rel') == 'lightbox')){ - // add single image to imageArray - imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title'))); - } else { - // if image is part of a set.. - - // loop through anchors, find other images in set, and add them to imageArray - for (var i=0; i 1){ - Element.show('numberDisplay'); - Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length); - } - - new Effect.Parallel( - [ new Effect.SlideDown( 'imageDataContainer', { sync: true, duration: resizeDuration + 0.25, from: 0.0, to: 1.0 }), - new Effect.Appear('imageDataContainer', { sync: true, duration: 1.0 }) ], - { duration: 0.65, afterFinish: function() { myLightbox.updateNav();} } - ); - }, - - // - // updateNav() - // Display appropriate previous and next hover navigation. - // - updateNav: function() { - - Element.show('hoverNav'); - - // if not first image in set, display prev image button - if(activeImage != 0){ - Element.show('prevLink'); - document.getElementById('prevLink').onclick = function() { - myLightbox.changeImage(activeImage - 1); return false; - } - } - - // if not last image in set, display next image button - if(activeImage != (imageArray.length - 1)){ - Element.show('nextLink'); - document.getElementById('nextLink').onclick = function() { - myLightbox.changeImage(activeImage + 1); return false; - } - } - - this.enableKeyboardNav(); - }, - - // - // enableKeyboardNav() - // - enableKeyboardNav: function() { - document.onkeydown = this.keyboardAction; - }, - - // - // disableKeyboardNav() - // - disableKeyboardNav: function() { - document.onkeydown = ''; - }, - - // - // keyboardAction() - // - keyboardAction: function(e) { - if (e == null) { // ie - keycode = event.keyCode; - } else { // mozilla - keycode = e.which; - } - - key = String.fromCharCode(keycode).toLowerCase(); - - if((key == 'x') || (key == 'o') || (key == 'c')){ // close lightbox - myLightbox.end(); - } else if(key == 'p'){ // display previous image - if(activeImage != 0){ - myLightbox.disableKeyboardNav(); - myLightbox.changeImage(activeImage - 1); - } - } else if(key == 'n'){ // display next image - if(activeImage != (imageArray.length - 1)){ - myLightbox.disableKeyboardNav(); - myLightbox.changeImage(activeImage + 1); - } - } - - - }, - - // - // preloadNeighborImages() - // Preload previous and next images. - // - preloadNeighborImages: function(){ - - if((imageArray.length - 1) > activeImage){ - preloadNextImage = new Image(); - preloadNextImage.src = imageArray[activeImage + 1][0]; - } - if(activeImage > 0){ - preloadPrevImage = new Image(); - preloadPrevImage.src = imageArray[activeImage - 1][0]; - } - - }, - - // - // end() - // - end: function() { - this.disableKeyboardNav(); - Element.hide('lightbox'); - new Effect.Fade('overlay', { duration: 0.2}); - showSelectBoxes(); - } -} - -// ----------------------------------------------------------------------------------- - -// -// getPageScroll() -// Returns array with x,y page scroll values. -// Core code from - quirksmode.org -// -function getPageScroll(){ - - var yScroll; - - if (self.pageYOffset) { - yScroll = self.pageYOffset; - } else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict - yScroll = document.documentElement.scrollTop; - } else if (document.body) {// all other Explorers - yScroll = document.body.scrollTop; - } - - arrayPageScroll = new Array('',yScroll) - return arrayPageScroll; -} - -// ----------------------------------------------------------------------------------- - -// -// getPageSize() -// Returns array with page width, height and window width, height -// Core code from - quirksmode.org -// Edit for Firefox by pHaez -// -function getPageSize(){ - - var xScroll, yScroll; - - if (window.innerHeight && window.scrollMaxY) { - xScroll = document.body.scrollWidth; - yScroll = window.innerHeight + window.scrollMaxY; - } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac - xScroll = document.body.scrollWidth; - yScroll = document.body.scrollHeight; - } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari - xScroll = document.body.offsetWidth; - yScroll = document.body.offsetHeight; - } - - var windowWidth, windowHeight; - if (self.innerHeight) { // all except Explorer - windowWidth = self.innerWidth; - windowHeight = self.innerHeight; - } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode - windowWidth = document.documentElement.clientWidth; - windowHeight = document.documentElement.clientHeight; - } else if (document.body) { // other Explorers - windowWidth = document.body.clientWidth; - windowHeight = document.body.clientHeight; - } - - // for small pages with total height less then height of the viewport - if(yScroll < windowHeight){ - pageHeight = windowHeight; - } else { - pageHeight = yScroll; - } - - // for small pages with total width less then width of the viewport - if(xScroll < windowWidth){ - pageWidth = windowWidth; - } else { - pageWidth = xScroll; - } - - - arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) - return arrayPageSize; -} - -// ----------------------------------------------------------------------------------- - -// -// getKey(key) -// Gets keycode. If 'x' is pressed then it hides the lightbox. -// -function getKey(e){ - if (e == null) { // ie - keycode = event.keyCode; - } else { // mozilla - keycode = e.which; - } - key = String.fromCharCode(keycode).toLowerCase(); - - if(key == 'x'){ - } -} - -// ----------------------------------------------------------------------------------- - -// -// listenKey() -// -function listenKey () { document.onkeypress = getKey; } - -// --------------------------------------------------- - -function showSelectBoxes(){ - selects = document.getElementsByTagName("select"); - for (i = 0; i != selects.length; i++) { - selects[i].style.visibility = "visible"; - } -} - -// --------------------------------------------------- - -function hideSelectBoxes(){ - selects = document.getElementsByTagName("select"); - for (i = 0; i != selects.length; i++) { - selects[i].style.visibility = "hidden"; - } -} - -// --------------------------------------------------- - -// -// pause(numberMillis) -// Pauses code execution for specified time. Uses busy code, not good. -// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602 -// -function pause(numberMillis) { - var now = new Date(); - var exitTime = now.getTime() + numberMillis; - while (true) { - now = new Date(); - if (now.getTime() > exitTime) - return; - } -} - -// --------------------------------------------------- - - - -function initLightbox() { myLightbox = new Lightbox(); } -Event.observe(window, 'load', initLightbox, false); diff --git a/dogtag/tps-ui/shared/docroot/esc/sow/js/prototype.js b/dogtag/tps-ui/shared/docroot/esc/sow/js/prototype.js deleted file mode 100755 index e9ccd3c88..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/sow/js/prototype.js +++ /dev/null @@ -1,1785 +0,0 @@ -/* Prototype JavaScript framework, version 1.4.0 - * (c) 2005 Sam Stephenson - * - * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff - * against the source tree, available from the Prototype darcs repository. - * - * Prototype is freely distributable under the terms of an MIT-style license. - * - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.4.0', - ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', - - emptyFunction: function() {}, - K: function(x) {return x} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Object.inspect = function(object) { - try { - if (object == undefined) return 'undefined'; - if (object == null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } -} - -Function.prototype.bind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -} - -Object.extend(Number.prototype, { - toColorPart: function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - } -}); - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} -Object.extend(String.prototype, { - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(eval); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; - }, - - toQueryParams: function() { - var pairs = this.match(/^\??(.*)$/)[1].split('&'); - return pairs.inject({}, function(params, pairString) { - var pair = pairString.split('='); - params[pair[0]] = pair[1]; - return params; - }); - }, - - toArray: function() { - return this.split(''); - }, - - camelize: function() { - var oStringList = this.split('-'); - if (oStringList.length == 1) return oStringList[0]; - - var camelizedString = this.indexOf('-') == 0 - ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) - : oStringList[0]; - - for (var i = 1, len = oStringList.length; i < len; i++) { - var s = oStringList[i]; - camelizedString += s.charAt(0).toUpperCase() + s.substring(1); - } - - return camelizedString; - }, - - inspect: function() { - return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'"; - } -}); - -String.prototype.parseQuery = String.prototype.toQueryParams; - -var $break = new Object(); -var $continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != $continue) throw e; - } - }); - } catch (e) { - if (e != $break) throw e; - } - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - result = result && !!(iterator || Prototype.K)(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator) { - var result = true; - this.each(function(value, index) { - if (result = !!(iterator || Prototype.K)(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function (iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.collect(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.collect(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.collect(Prototype.K); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; - }); - }, - - inspect: function() { - return '#'; - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); -var $A = Array.from = function(iterable) { - if (!iterable) return []; - if (iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0; i < iterable.length; i++) - results.push(iterable[i]); - return results; - } -} - -Object.extend(Array.prototype, Enumerable); - -Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0; i < this.length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != undefined || value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(value.constructor == Array ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - indexOf: function(object) { - for (var i = 0; i < this.length; i++) - if (this[i] == object) return i; - return -1; - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - shift: function() { - var result = this[0]; - for (var i = 0; i < this.length - 1; i++) - this[i] = this[i + 1]; - this.length--; - return result; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - } -}); -var Hash = { - _each: function(iterator) { - for (key in this) { - var value = this[key]; - if (typeof value == 'function') continue; - - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - merge: function(hash) { - return $H(hash).inject($H(this), function(mergedHash, pair) { - mergedHash[pair.key] = pair.value; - return mergedHash; - }); - }, - - toQueryString: function() { - return this.map(function(pair) { - return pair.map(encodeURIComponent).join('='); - }).join('&'); - }, - - inspect: function() { - return '#'; - } -} - -function $H(object) { - var hash = Object.extend({}, object || {}); - Object.extend(hash, Enumerable); - Object.extend(hash, Hash); - return hash; -} -ObjectRange = Class.create(); -Object.extend(ObjectRange.prototype, Enumerable); -Object.extend(ObjectRange.prototype, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - do { - iterator(value); - value = value.succ(); - } while (this.include(value)); - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -} - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - }, - - activeRequestCount: 0 -} - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responderToAdd) { - if (!this.include(responderToAdd)) - this.responders.push(responderToAdd); - }, - - unregister: function(responderToRemove) { - this.responders = this.responders.without(responderToRemove); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (responder[callback] && typeof responder[callback] == 'function') { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) {} - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { - Ajax.activeRequestCount++; - }, - - onComplete: function() { - Ajax.activeRequestCount--; - } -}); - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - Object.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - this.url = url; - if (this.options.method == 'get' && parameters.length > 0) - this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; - - Ajax.Responders.dispatch('onCreate', this, this.transport); - - this.transport.open(this.options.method, this.url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - this.dispatchException(e); - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - header: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) {} - }, - - evalJSON: function() { - try { - return eval(this.header('X-JSON')); - } catch (e) {} - }, - - evalResponse: function() { - try { - return eval(this.transport.responseText); - } catch (e) { - this.dispatchException(e); - } - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - var transport = this.transport, json = this.evalJSON(); - - if (event == 'Complete') { - try { - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(transport, json); - } catch (e) { - this.dispatchException(e); - } - - if ((this.header('Content-type') || '').match(/^text\/javascript/i)) - this.evalResponse(); - } - - try { - (this.options['on' + event] || Prototype.emptyFunction)(transport, json); - Ajax.Responders.dispatch('on' + event, this, transport, json); - } catch (e) { - this.dispatchException(e); - } - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = Prototype.emptyFunction; - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Updater = Class.create(); - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function(transport, object) { - this.updateContent(); - onComplete(transport, object); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - var response = this.transport.responseText; - - if (!this.options.evalScripts) - response = response.stripScripts(); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - Element.update(receiver, response); - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout(this.onComplete.bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -document.getElementsByClassName = function(className, parentElement) { - var children = ($(parentElement) || document.body).getElementsByTagName('*'); - return $A(children).inject([], function(elements, child) { - if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) - elements.push(child); - return elements; - }); -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - Element[Element.visible(element) ? 'hide' : 'show'](element); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - update: function(element, html) { - $(element).innerHTML = html.stripScripts(); - setTimeout(function() {html.evalScripts()}, 10); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).include(className); - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).add(className); - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).remove(className); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - }, - - empty: function(element) { - return $(element).innerHTML.match(/^\s*$/); - }, - - scrollTo: function(element) { - element = $(element); - var x = element.x ? element.x : element.offsetLeft, - y = element.y ? element.y : element.offsetTop; - window.scrollTo(x, y); - }, - - getStyle: function(element, style) { - element = $(element); - var value = element.style[style.camelize()]; - if (!value) { - if (document.defaultView && document.defaultView.getComputedStyle) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css.getPropertyValue(style) : null; - } else if (element.currentStyle) { - value = element.currentStyle[style.camelize()]; - } - } - - if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) - if (Element.getStyle(element, 'position') == 'static') value = 'auto'; - - return value == 'auto' ? null : value; - }, - - setStyle: function(element, style) { - element = $(element); - for (name in style) - element.style[name.camelize()] = style[name]; - }, - - getDimensions: function(element) { - element = $(element); - if (Element.getStyle(element, 'display') != 'none') - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = ''; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = 'none'; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return; - element._overflow = element.style.overflow; - if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') - element.style.overflow = 'hidden'; - }, - - undoClipping: function(element) { - element = $(element); - if (element._overflow) return; - element.style.overflow = element._overflow; - element._overflow = undefined; - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content.stripScripts(); - - if (this.adjacency && this.element.insertAdjacentHTML) { - try { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } catch (e) { - if (this.element.tagName.toLowerCase() == 'tbody') { - this.insertContent(this.contentFromAnonymousTable()); - } else { - throw e; - } - } - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.insertContent([this.range.createContextualFragment(this.content)]); - } - - setTimeout(function() {content.evalScripts()}, 10); - }, - - contentFromAnonymousTable: function() { - var div = document.createElement('div'); - div.innerHTML = '' + this.content + '
    '; - return $A(div.childNodes[0].childNodes[0].childNodes); - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, this.element); - }).bind(this)); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function(fragments) { - fragments.reverse(false).each((function(fragment) { - this.element.insertBefore(fragment, this.element.firstChild); - }).bind(this)); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.appendChild(fragment); - }).bind(this)); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, - this.element.nextSibling); - }).bind(this)); - } -}); - -/*--------------------------------------------------------------------------*/ - -Element.ClassNames = Class.create(); -Element.ClassNames.prototype = { - initialize: function(element) { - this.element = $(element); - }, - - _each: function(iterator) { - this.element.className.split(/\s+/).select(function(name) { - return name.length > 0; - })._each(iterator); - }, - - set: function(className) { - this.element.className = className; - }, - - add: function(classNameToAdd) { - if (this.include(classNameToAdd)) return; - this.set(this.toArray().concat(classNameToAdd).join(' ')); - }, - - remove: function(classNameToRemove) { - if (!this.include(classNameToRemove)) return; - this.set(this.select(function(className) { - return className != classNameToRemove; - }).join(' ')); - }, - - toString: function() { - return this.toArray().join(' '); - } -} - -Object.extend(Element.ClassNames.prototype, Enumerable); -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - element = $(element); - element.focus(); - if (element.select) - element.select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - findFirstElement: function(form) { - return Form.getElements(form).find(function(element) { - return element.type != 'hidden' && !element.disabled && - ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - Field.activate(Form.findFirstElement(form)); - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) { - var key = encodeURIComponent(parameter[0]); - if (key.length == 0) return; - - if (parameter[1].constructor != Array) - parameter[1] = [parameter[1]]; - - return parameter[1].map(function(value) { - return key + '=' + encodeURIComponent(value); - }).join('&'); - } - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - return Form.Element.Serializers[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - }, - - selectOne: function(element) { - var value = '', opt, index = element.selectedIndex; - if (index >= 0) { - opt = element.options[index]; - value = opt.value; - if (!value && !('value' in opt)) - value = opt.text; - } - return [element.name, value]; - }, - - selectMany: function(element) { - var value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) { - var optValue = opt.value; - if (!optValue && !('value' in opt)) - optValue = opt.text; - value.push(optValue); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - event.cancelBubble = true; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.attachEvent)) - name = 'keydown'; - - this._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } -}); - -/* prevent memory leaks in IE */ -Event.observe(window, 'unload', Event.unloadCache, false); -var Position = { - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - p = Element.getStyle(element, 'position'); - if (p == 'relative' || p == 'absolute') break; - } - } while (element); - return [valueL, valueT]; - }, - - offsetParent: function(element) { - if (element.offsetParent) return element.offsetParent; - if (element == document.body) return element; - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return element; - - return document.body; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - }, - - page: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent==document.body) - if (Element.getStyle(element,'position')=='absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } while (element = element.parentNode); - - return [valueL, valueT]; - }, - - clone: function(source, target) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || {}) - - // find page position of source - source = $(source); - var p = Position.page(source); - - // find coordinate system to use - target = $(target); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(target,'position') == 'absolute') { - parent = Position.offsetParent(target); - delta = Position.page(parent); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if(options.setWidth) target.style.width = source.offsetWidth + 'px'; - if(options.setHeight) target.style.height = source.offsetHeight + 'px'; - }, - - absolutize: function(element) { - element = $(element); - if (element.style.position == 'absolute') return; - Position.prepare(); - - var offsets = Position.positionedOffset(element); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px';; - element.style.left = left + 'px';; - element.style.width = width + 'px';; - element.style.height = height + 'px';; - }, - - relativize: function(element) { - element = $(element); - if (element.style.position == 'relative') return; - Position.prepare(); - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - } -} - -// Safari returns margins on body which is incorrect if the child is absolutely -// positioned. For performance reasons, redefine Position.cumulativeOffset for -// KHTML/WebKit only. -if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { - Position.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return [valueL, valueT]; - } -} \ No newline at end of file diff --git a/dogtag/tps-ui/shared/docroot/esc/sow/js/scriptaculous.js b/dogtag/tps-ui/shared/docroot/esc/sow/js/scriptaculous.js deleted file mode 100755 index dac1228fb..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/sow/js/scriptaculous.js +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Scriptaculous = { - Version: '1.5.1', - require: function(libraryName) { - // inserting via DOM fails in Safari 2.0, so brute force approach - document.write(''); - }, - load: function() { - if((typeof Prototype=='undefined') || - parseFloat(Prototype.Version.split(".")[0] + "." + - Prototype.Version.split(".")[1]) < 1.4) - throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0"); - - $A(document.getElementsByTagName("script")).findAll( function(s) { - return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) - }).each( function(s) { - var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,''); - var includes = s.src.match(/\?.*load=([a-z,]*)/); - (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider').split(',').each( - function(include) { Scriptaculous.require(path+include+'.js') }); - }); - } -} - -Scriptaculous.load(); \ No newline at end of file diff --git a/dogtag/tps-ui/shared/docroot/esc/sow/util.js b/dogtag/tps-ui/shared/docroot/esc/sow/util.js deleted file mode 100755 index 967e6e5ed..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/sow/util.js +++ /dev/null @@ -1,1769 +0,0 @@ -// --- 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 --- - -// -// initialize netkey globals -var netkey; - - -var keyUITable = new Array(); -var keyTypeTable = new Array(); -var curChildWindow = null; - -var gWindow = null; - -const ErrorText = "For additional assistance contact your Technical Support"; - - -function getUIForKey(aKeyID) -{ - return keyUITable[aKeyID]; - -} - -function getTypeForKey(aKeyID) -{ - return keyTypeTable[aKeyID]; -} - - -// -// Notify callback for GECKO -// -function jsNotify() {} - -jsNotify.prototype = { - - rhNotifyKeyStateChange: function(aKeyType,aKeyID,aKeyState,aData,strData) - { - OnCOOLKeyStateChange(aKeyType, aKeyID, aKeyState, aData,strData); - }, - - QueryInterface: function(iid) - { - - if(!iid.equals(Components.interfaces.rhIKeyNotify) && - !iid.equals(Components.interfaces.nsISupports)) - { - MyAlert("Can't find jsNotify interface"); - throw Components.results.NS_ERROR_NO_INTERFACE; - } - return this; - } -}; - -// -// Attach to the object. -// - // GECKO ONLY initialization - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - netkey = Components.classes["@redhat.com/rhCoolKey"].getService(); - netkey = netkey.QueryInterface(Components.interfaces.rhICoolKey); - gNotify = new jsNotify; - netkey.rhCoolKeySetNotifyCallback(gNotify); - } catch(e) { - MyAlert("Can't get UniversalXPConnect: " + e); - } - -// -// unregister our notify event -// -function cleanup() -{ - - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - netkey.rhCoolKeyUnSetNotifyCallback(gNotify); - } catch(e) { - MyAlert("Can't get UniversalXPConnect: " + e); - } -} - -var gScreenName = ""; -var gKeyEnrollmentType = "userKey"; - -var gCurrentSelectedRow = null; - - -var gCurKeyType = null; -var gCurKeyID = null; - -//////////////////////////////////////////////////////////////// -// -// Utility functions specific to this page. -// -//////////////////////////////////////////////////////////////// - - -// List of Error Messages to be printed out - -var Status_Messages = new Array( - - "Operation Completed Successfully.", - "Smartcard Server error.", - "Problem communicating with the smartcard.", - "Problem communicating with the smartcard.", - "Problem resetting smartcard's pin.", - "Internal Smartcard Server error.", - "Internal Smartcard Server error.", - "Smartcard enrollment error.", - "Can not communicate with the smartcard.", - "Internal Smartcard Server error.", - "Problem communicating with the Certificattion Authority.", - "Internal Smartcard Server error.", - "Error resetting the smartcard's password.", - "Internal Smartcard Server error.", - "Smartcard Server authentication failure.", - "Internal Smartcard Server error.", - "Your Smartcard is listed as disabled.", - "Problem communicating with the smartcard.", - "Internal Smartcard Server error.", - "Cannot upgrade smartcard software.", - "Internal Smartcard Server error.", - "Problem communicating with the smartcard.", - "Invalid smartcard type.", - "Invalid smartcard type.", - "Cannot publish smartcard information.", - "Cannot communicate with smartcard database.", - "Smartcard is disabled.", - "Cannot reset password value for the smartcard.", - "Connection to Smartcard Server lost.", - "Cannot create entry for smartcard in smartcard database.", - "Smartcard found to be in an inconsistent state.", - "Invalid reason for lost smartcard submitted.", - "Smartcard found to be unusable due to compromise.", - "No such inactive smartcard found.", - "Cannot process more than one active smartcard.", - "Internal Smartcard Server error.", - "Smartcard key recovery has been processed.", - "Smartcard key recovery failed.", - "Cannot process this smartcard, which has been reported lost.", - "Smartcard key archival error.", - "Problem connecting to the Smartcard TKS Server.", - "Failed to update smartcard database.", - "Internal certificate revocation error discovered.", - "User does not own this smartcard.", - "Smart Card Manager has been misconfigured.", - "Smart Card Manager can not talk to smart card reader.", - "Smart Card Manager can not establish a session with the smart card.", - "Smart Card Manager can not talk to Smart Card Server.", - "Smart Card Manager can not talk to smart card reader." - ); - -function GetAuthDataFromPopUp(aKeyType,aKeyID,aUiData) -{ - - keyUITable[aKeyID] = aUiData; - keyTypeTable[aKeyID] = aKeyType; - - //alert("GetAuthDataFromPopUp data " + aUiData); - var child = window.open("/GenericAuth.html",aKeyID,"height=400,width=400"); - - //alert("Attempted to create child window " + child); - - curChildWindow = child; - -} - -function COOLKeySetDataValue(aKeyType,aKeyID,name,value) -{ - //alert("In COOLKeySetDataValue aKeyType " + aKeyType + " aKeyID " + aKeyID + " name " + name + " value " + value); - if(netkey) - { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - netkey.SetCoolKeyDataValue(aKeyType,aKeyID,name,value); - - - } catch(e) { - MyAlert("Error Setting data values: " + e); - } - } - -} - -function COOLKeySetTokenPin(pin) -{ - if(netkey) - { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"TokenPin",pin); - - - } catch(e) { - MyAlert("Error Setting data values: " + e); - } - } -} - -function COOLKeySetUidPassword(uid,pwd) -{ - - if(netkey) - { - - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - - netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"UserId",uid); - - netkey.SetCoolKeyDataValue(gCurKeyType,gCurKeyID,"Password",pwd); - - } catch(e) { - MyAlert("Error Setting data values: " + e); - } - - } - -} - - -function MyGetErrorMessage(status_code) -{ - - var result = "Internal Server Error"; - - if(status_code < 0 && status_code >= Status_Messages.length) - { - return result; - - } - - return Status_Messages[status_code]; - -} - -function KeyToRowID(keyType, keyID) -{ - return keyType + "--" + keyID; -} - -function RowIDToKeyInfo(rowID) -{ - return rowID.split("--"); -} - -function GetRowForKey(keyType, keyID) -{ - return document.getElementById(KeyToRowID(keyType, keyID)); -} - -function ReportException(msg, e) -{ - MyAlert(msg + " " + e.description + "(" + e.number + ")"); -} - -function GetCOOLKeyStatus(keyType, keyID) -{ - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - return netkey.GetCoolKeyStatus(keyType, keyID); - } catch (e) { - ReportException("netkey.GetCOOLKeyStatus() failed!", e); - return 0; - } -} - -function GetCOOLKeyPolicy(keyType, keyID) -{ - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - return netkey.GetCoolKeyPolicy(keyType, keyID); - } catch (e) { - // ReportException("netkey.GetCOOLKeyPolicy() failed!", e); - return ""; - } -} - -function GetCOOLKeyRequiresAuth(keyType, keyID) -{ - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - return netkey.GetCoolKeyRequiresAuthentication(keyType, keyID); - } catch(e) { - ReportException("netkey.GetCoolKeyRequiresAuthentication() failed!", e); - return false; - } -} - -function GetCOOLKeyIsAuthed(keyType, keyID) -{ - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - return netkey.GetCoolKeyIsAuthenticated(keyType, keyID); - } catch(e) { - ReportException("netkey.GetCoolKeyIsAuthenticated() failed!", e); - return false; - } -} - -function GetAvailableCOOLKeys() -{ - try { - var keyArr; - - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - var inArray = netkey.GetAvailableCoolKeys( {} ); - keyArr = new Array(inArray.length); - var i; - - for (i=0; i < keyArr.length; i++) { - keyArr[i] = new Array( "1", inArray[i]); - } - return keyArr; - } catch(e) { - ReportException("netkey.GetAvailableCoolKeys() failed!", e); - return []; - } -} - -function EnrollCOOLKey(keyType, keyID, enrollmentType, screenname, pin,screennamepwd,tokencode) -{ - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - netkey.EnrollCoolKey(keyType, keyID, enrollmentType, screenname, pin,screennamepwd,tokencode); - } catch(e) { - ReportException("netkey.EnrollCoolKey() failed!", e); - return false; - } - - return true; -} - -function GetCOOLKeyIsEnrolled(keyType, keyID) -{ - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - return netkey.GetCoolKeyIsEnrolled(keyType, keyID); - } catch(e) { - ReportException("netkey.GetCoolKeyIsEnrolled() failed!", e); - return false; - } -} - -function CancelCOOLKeyOperation(keyType, keyID) -{ - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - netkey.CancelCoolKeyOperation(keyType, keyID); - } catch(e) { - ReportException("netkey.CancelCoolKeyOperation() failed!", e); - return false; - } - return true; -} - -function MyAlert(message) -{ - if(message) - DoMyAlert(message,"Smart Card Manager"); - -} -function DoMyAlert(message,title) -{ - - if(!message || !title) - return; - - try { - - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - - var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); - - - prompts.alert(window,title,message); - - } catch(e) { - - - alert("Problem with nsIPromptService " + e); - } - -} - -// -// MSHTML/GECKO compatibility functions. -// -function RemoveRow(table, row) -{ - table.deleteRow(row.rowIndex); -} - -function GetCell(row, index) -{ - var cell; - - cell = row.cells[index]; - return cell; -} - -function GetNode(parent, index) -{ - var node; - node = parent.childNodes[index]; - return node; -} - -function InsertRow(table) -{ - var row; - - row = table.insertRow(table.rows.length); - return row; -} - -function InsertCell(row) -{ - var cell; - - cell = row.insertCell(row.cells.length); - return cell; -} - -function RemoveAllChildNodes(parent) -{ - var numChildren = parent.childNodes.length; - var i; - - i = numChildren; - while (numChildren) - { - parent.removeChild(GetNode(parent,0)); - numChildren--; - } - -} - - -function UpdateInfoForKeyID(keyType, keyID, keyStatus, reqAuth, isAuthed) -{ - var row = GetRowForKey(keyType, keyID); - - if (!row) - return; - - var cell = GetCell(row,1) - RemoveAllChildNodes(cell); - cell.appendChild(document.createTextNode(keyStatus)); - -// cell = GetCell(row,2); - // RemoveAllChildNodes(cell); - // cell.appendChild(document.createTextNode(reqAuth)); - - // cell = GetCell(row,3); - // RemoveAllChildNodes(cell); - // cell.appendChild(document.createTextNode(isAuthed)); -} - -function GetStatusForKeyID(keyType, keyID) -{ - var keyStatus = "BLANK"; - - var status; - - try { - status = GetCOOLKeyStatus(keyType, keyID); - } catch(e) { - status = 0; - } - - switch (status) { - case 0: // Unavailable - keyStatus = "UNAVAILABLE"; - break; - case 1: // AppletNotFound - keyStatus = "NO APPLET"; - break; - case 2: // Uninitialized - keyStatus = "UNINITIALIZED"; - break; - case 3: // Unknown - keyStatus = "UNKNOWN"; - break; - case 4: // Available - case 6: // UnblockInProgress - case 7: // PINResetInProgress - case 8: // RenewInProgress - keyStatus = PolicyToKeyType(GetCOOLKeyPolicy(keyType, keyID)); - break; - case 5: // EnrollmentInProgress - keyStatus = "BUSY"; - break; - break; - case 9: // FormatInProgress - keyStatus = "BUSY"; - break; - } - - return keyStatus; -} - -function InsertCOOLKeyIntoBindingTable(keyType, keyID) -{ - var row = GetRowForKey(keyType, keyID); - - gWindow = window; - if (!row) - { - var table = document.getElementById("BindingTable"); - if (table) - { - var keyStatus = GetStatusForKeyID(keyType, keyID); - var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); - var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); - - row = CreateTableRow(table, keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); - } - - if (!row) - return null; - } - - return row; -} - -function ConvertVariantArrayToJScriptArray(varr) -{ - // C++ native methods, like netkey.GetAvailableCOOLKeys(), can only - // return variant SafeArrays, so to access the data inside, you must - // first convert it to a VBArray, and then call toArray() to convert - // it to a JScript array. Lame, but that's what it takes to - // use an array returned from an ActiveX component. - - return new VBArray(varr).toArray(); -} - -function UpdateBindingTableAvailability() -{ - var arr = GetAvailableCOOLKeys(); - - if (!arr || arr.length < 1) - return; - - var i; - - for (i=0; i < arr.length; i++) - { - InsertCOOLKeyIntoBindingTable(arr[i][0], arr[i][1]); - - if (!gCurrentSelectedRow) - SelectRowByKeyID(arr[i][0], arr[i][1]); - } -} - -function InitializeBindingTable() -{ - UpdateBindingTableAvailability(); - UpdateButtonStates(); - if (UserOnDoneInitializeBindingTable) { - UserOnDoneInitializeBindingTable(); - } -} - -function KeyIsPresent(keyType, keyID) -{ - row = document.all.item(keyType, keyID); - - if (!row) - return false; - - return true; -} - -function SetStatusMessage(str) -{ - var cell = document.getElementById("statusMsg"); - - if (!cell) - return; - RemoveAllChildNodes(cell); - cell.appendChild(document.createTextNode(str)); -} - -function UpdateButtonStates() -{ - if (gCurrentSelectedRow) - { - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - var keyStatus = GetStatusForKeyID(keyType, keyID); - - document.getElementById("enrollbtn").disabled = false; - } - else - { - document.getElementById("enrollbtn").disabled = true; - } - - refresh(); -} - -function GetCurrentKeyID() -{ - if (gCurrentSelectedRow) - { - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - return keyID; - } else { - return "No Key Found!"; - } -} - -function SetEnrollmentType(type) -{ - gKeyEnrollmentType = type; - UpdateButtonStates(); -} - -function FindRow(node) -{ - while (node && node.tagName != "TR") - { - node = node.parentNode; - } - - return node; -} - -function SelectRow(row) -{ - if (!row || gCurrentSelectedRow == row) - return; - - if (gCurrentSelectedRow) - gCurrentSelectedRow.removeAttribute("style"); - - gCurrentSelectedRow = row; - gCurrentSelectedRow.style.backgroundColor="rgb(200,200,200)"; - UpdateButtonStates(); -} - -function SelectRowByKeyID(keyType, keyID) -{ - var row = GetRowForKey(keyType, keyID); - SelectRow(row); -} - -function DoSelectRow(event) -{ - var row; - - row = FindRow(event.parentNode); - SelectRow(row); -} - -function KeyToUIString(keyType, keyID) -{ - // If it's an COOLKey, format the keyID string. - - if (keyType == 1 && keyID.length == 20) - { - var re = /([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})/i; - keyID = keyID.replace(re, "$1-$2-$3-$4-$5").toLowerCase(); - } - - return keyID; -} - - - -function CreateTableRow(table, keyType, keyID, keyStatus, reqAuth, isAuthed) -{ - var row = InsertRow(table); - if (!row) - return null; - - row.setAttribute("id", KeyToRowID(keyType, keyID)); - - row.onclick = DoSelectRow; - - // Create the key ID cell. - //cell = InsertCell(row); - //cell.appendChild(document.createTextNode(KeyToUIString(keyType, keyID))); - - //cell.setAttribute("onClick", "DoSelectRow(this);"); - - // Create the keyStatus cell. - //cell = InsertCell(row); - //cell.appendChild(document.createTextNode(keyStatus)); - - // Create the requires auth cell. - // cell = InsertCell(row); - // cell.appendChild(document.createTextNode(reqAuth)); - - cell = InsertCell(row); - cell.appendChild(document.createTextNode("Enrollment Progress")); - - // Create the status bar cell - - cell = InsertCell(row); - - var progressMeter = document.createElement("div"); - progressMeter.setAttribute("id", KeyToProgressBarID(keyType, keyID)); - progressMeter.className = "ProgressMeter"; - progressMeter.style.width = "100px"; - progressMeter.style.height = "1.5em"; -// progressMeter.style.visibility = "hidden"; - progressMeter.setAttribute("value", 0); - - var progressBar = document.createElement("div"); - progressBar.className = "ProgressBar"; - progressBar.style.width = "0px"; - progressBar.style.height = "100%"; -// progressBar.style.visibility = "hidden"; - - var progressBarStatus = document.createElement("div"); - progressBarStatus.className = "ProgressBarStatus"; - progressBarStatus.appendChild(document.createTextNode("")); - - progressMeter.appendChild(progressBar); - progressMeter.appendChild(progressBarStatus); - cell.appendChild(progressMeter); - - //row.style.display ="none"; - - return row; -} - -gAnimationMSecs = 1000/30; - -function SetCylonTimer(cylonID, cylonEyeID) -{ - setTimeout("AnimateCylonStatusBar(\"" + cylonID + - "\", \"" + cylonEyeID + "\");", gAnimationMSecs); -} - -function AnimateCylonStatusBar(cylonID, cylonEyeID) -{ - var cylon = document.getElementById(cylonID); - - if (!cylon) - return; - - var active = cylon.getAttribute("cylonactive"); - - if (!active) - return; - - var eye = document.getElementById(cylonEyeID); - - if (!eye) - return; - - var dir = eye.getAttribute("direction"); - var wid = parseInt(eye.style.width); - var cywid = parseInt(cylon.style.width); - var left = parseInt(eye.style.left); - - var dx = 10; - - if (!dir || dir >= 0) - { - left += dx; - - if (left + wid > cywid) - { - left = cywid - wid; - eye.setAttribute("direction", "-1"); - } - } - else - { - left -= dx; - - if (left < 0) - { - left = 0; - eye.setAttribute("direction", "1"); - } - } - - eye.style.left = left + "px"; - - SetCylonTimer(cylonID, cylonEyeID); -} - -function StartCylonAnimation(cylonID, cylonEyeID) -{ - var cylon = document.getElementById(cylonID) - - if (!cylon) - return; - - var active = cylon.getAttribute("cylonactive"); - - if (!active) - { - cylon.setAttribute("cylonactive", "true"); - - var eye = document.getElementById(cylonEyeID); - if (eye) - { - eye.style.left = "0px"; - eye.style.visibility = "visible"; - } - - SetCylonTimer(cylonID, cylonEyeID); - } -} - -function StopCylonAnimation(cylonID, cylonEyeID) -{ - var cylon = document.getElementById(cylonID) - - if (cylon) - cylon.removeAttribute("cylonactive"); - - var eye = document.getElementById(cylonEyeID); - - if (eye) - eye.style.visibility = "hidden"; -} - -function GetProgressMeterValue(progMeterID) -{ - var progMeter = document.getElementById(progMeterID); - - if (!progMeter) - return -1; - - return parseInt(progMeter.getAttribute("value")); -} - -function SetProgressMeterValue(progMeterID, value) -{ - var progMeter = document.getElementById(progMeterID); - - if (!progMeter || value < 0) - return; - - if (value > 100) - value = 100; - - var progBar = progMeter.firstChild; - - if (value == 0) - { - progBar.style.width = "0px"; - progBar.style.visibility = "hidden"; - progMeter.setAttribute("value", 0); - return; - } - - progBar.style.visibility = "visible"; - - var newWidth = parseInt(progMeter.style.width) * value / 100 - 2; - - progBar.style.width = newWidth + "px"; - progMeter.setAttribute("value", value); -} - -function SetProgressMeterStatus(progMeterID, statusMsg) -{ - var progMeter = document.getElementById(progMeterID); - - if (!progMeter) - return; - - var progBar = progMeter.firstChild; - - // If it exists, the meter status should be - // div that is the next sibling of the progressMeter. - - var meterStatus = progBar.nextSibling; - - // Just replace the data in the text node, it's much faster, - // and reduces flashing! - - meterStatus.firstChild.replaceData(0, meterStatus.firstChild.length, statusMsg); -} - -function ClearProgressBar(progMeterID) -{ - SetProgressMeterValue(progMeterID, 0); - SetProgressMeterStatus(progMeterID, ""); -} - -function KeyToProgressBarID(keyType, keyID) -{ - return "PM" + keyType + "-" + keyID; -} - -//////////////////////////////////////////////////////////////// -// -// Functions that contact the server or talk directly to -// ESC native code. -// -// ESC Native Functions: -// -// netkey.GetAvailableCOOLKeys() -// -// - Returns an ActiveX Variant SafeArray containing the ID for each key -// that is currentlly plugged into the computer. Before accessing any -// data in this array you must convert it to a JScript Array with a -// call to ConvertVariantArrayToJScriptArray(). -// -// netkey.GetCOOLKeyIsEnrolled(keyType, keyID) -// -// - Returns true if a key has been initialized, false if it hasn't. -// Initialized means the card has been formatted with certificates -// for either an COOL HouseKey or NetKey. -// -// netkey.EnrollCOOLKey(keyType, keyID, enrollmentType, screenName, pin) -// -// - Initiates an async connection to the RA to initialize a specific -// key. If you want the key to be initialized as a HouseKey, you should -// pass "houseKey" as the enrollmentType, and null values for both -// screenName and pin. For a NetKey, use "netKey" as the enrollmentType, -// and pass a valid screenName and pin. -// -// -//////////////////////////////////////////////////////////////// - -function GetScreenNameValue() -{ - var sname = document.getElementById("snametf").value; - - if (! sname) - { - MyAlert("You must provide a valid LDAP User ID!"); - if (UserOnCOOLKeyStateError) { - UserOnCOOLKeyStateError(); // call user-level - } - return null; - } - - return sname; -} - -function GetPINValue() -{ - var pinVal = document.getElementById("pintf").value; - var rpinVal = document.getElementById("reenterpintf").value; - - if (! pinVal) - { - MyAlert("You must provide a valid Key Password!"); - if (UserOnCOOLKeyStateError) { - UserOnCOOLKeyStateError(); // call user-level - } - return null; - } - - if ( pinVal != rpinVal) - { - MyAlert("The Key Password values you entered do not match!"); - if (UserOnCOOLKeyStateError) { - UserOnCOOLKeyStateError(); // call user-level - } - return null; - } - - return pinVal; -} - -function GetScreenNamePwd() -{ - - var pwd = document.getElementById("snamepwd").value; - - if(!pwd) - { - MyAlert("You must provide a valid LDAP User ID !"); - if (UserOnCOOLKeyStateError) { - UserOnCOOLKeyStateError(); // call user-level - } - return null; - } - return pwd; -} - -function GetTokenCode() -{ - - return null; -} -function DoEnrollTempCOOLKey() -{ - - if (!gCurrentSelectedRow) - { - MyAlert("Please select a key."); - return; - } - - if(!Validate()) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - var type = gKeyEnrollmentType; - var screenname = null; - var pin = null; - - var screennamepwd = null; - var tokencode = null; - - screenname = GetScreenNameValue(); - - pin = GetPINValue(); - - - screennamepwd = GetScreenNamePwd(); - - tokencode = GetTokenCode(); - - //SetStatusMessage("Enrolling UserKey \"" + KeyToUIString(keyType, keyID) + "\"..."); - - StartCylonAnimation("cylon1", "eye1"); - - var doShow = true; - - ShowProgressBar(keyType,keyID,doShow ); - - if (!EnrollCOOLKey(keyType, keyID, 'userKeyTemporary', screenname, pin,screennamepwd,tokencode)) - { - SetStatusMessage(""); - StopCylonAnimation("cylon1", "eye1"); - var doShow = false; - ShowProgressBar(aKeyType,aKeyID,doShow ); - } -} -function DoEnrollCOOLKey() -{ - - if (!gCurrentSelectedRow) - { - MyAlert("Please select a key."); - return; - } - - if(!Validate()) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - var type = gKeyEnrollmentType; - var screenname = null; - var pin = null; - - var screennamepwd = null; - var tokencode = null; - - if (type == "userKey") - { - screenname = GetScreenNameValue(); - - pin = GetPINValue(); - - - screennamepwd = GetScreenNamePwd(); - - tokencode = GetTokenCode(); - - //SetStatusMessage("Enrolling UserKey \"" + KeyToUIString(keyType, keyID) + "\"..."); - } - - StartCylonAnimation("cylon1", "eye1"); - - var doShow = true; - - ShowProgressBar(keyType,keyID,doShow ); - - if (!EnrollCOOLKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)) - { - SetStatusMessage(""); - StopCylonAnimation("cylon1", "eye1"); - var doShow = false; - ShowProgressBar(aKeyType,aKeyID,doShow ); - } -} - -function DoResetSelectedCOOLKeyPIN() -{ - if (!gCurrentSelectedRow) - return; - - if(!Validate()) - return; - - //alert("In DoResetSelectedCOOLKeyPIN!"); - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - var screenname = null; - var pin = null; - var screennamepwd = null; - - if (GetCOOLKeyIsEnrolled(keyType, keyID)) - { - - SetStatusMessage("Resetting PIN for \"" + keyID + "\"..."); - StartCylonAnimation("cylon1", "eye1"); - - if (!ResetCOOLKeyPIN(keyType, keyID, screenname, pin,screennamepwd)) - { - SetStatusMessage(""); - StopCylonAnimation("cylon1", "eye1"); - } - } -} - -function DoSetURLCOOLKey() -{ - if (!gCurrentSelectedRow) - return; - - if(!Validate1()) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - var type = 'soUserKey'; - var screenname = null; - var pin = null; - - var screennamepwd = null; - var tokencode = null; - - SetStatusMessage("Formatting \"" + KeyToUIString(keyType, keyID) + "\" ..."); - StartCylonAnimation("cylon1", "eye1"); - - if (!FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)) - { - SetStatusMessage(""); - StopCylonAnimation("cylon1", "eye1"); - } -} - -function DoFormatSoCOOLKey() -{ - if (!gCurrentSelectedRow) - return; - - if(!Validate1()) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - var type = 'soCleanSOToken'; - var screenname = null; - var pin = null; - - var screennamepwd = null; - var tokencode = null; - - SetStatusMessage("Formatting \"" + KeyToUIString(keyType, keyID) + "\" ..."); - StartCylonAnimation("cylon1", "eye1"); - - if (!FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)) - { - SetStatusMessage(""); - StopCylonAnimation("cylon1", "eye1"); - } -} - -function DoFormatCOOLKey() -{ - if (!gCurrentSelectedRow) - return; - - if(!Validate1()) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - var type = 'soCleanUserToken'; - var screenname = null; - var pin = null; - - var screennamepwd = null; - var tokencode = null; - - SetStatusMessage("Formatting \"" + KeyToUIString(keyType, keyID) + "\" ..."); - StartCylonAnimation("cylon1", "eye1"); - - if (!FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode)) - { - SetStatusMessage(""); - StopCylonAnimation("cylon1", "eye1"); - } -} - -function FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode) -{ - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - netkey.FormatCoolKey(keyType, keyID, type, screenname, pin,screennamepwd,tokencode); - } catch(e) { - ReportException(getBundleString("errorFormatCoolKey"), e); - return false; - } - return true; -} - -function DoCancelOperation() -{ - - if (!gCurrentSelectedRow) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - SetStatusMessage("Cancel operation for \"" + KeyToUIString(keyType, keyID) + "\" ..."); - StartCylonAnimation("cylon1", "eye1"); - - CancelCOOLKeyOperation(keyType, keyID); - - SetStatusMessage(""); - StopCylonAnimation("cylon1", "eye1"); -} - -function DoChallengeSelectedKey() -{ - if (!gCurrentSelectedRow) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - if (!keyID) - return; - - SetStatusMessage("Generating Challenge ..."); - - var challengeArray = ChallengeCOOLKey(keyType, keyID, document.forms[0].challengedata.value); - - if (challengeArray.length != 4) - { - MyAlert("Challenge for key \"" + KeyToUIString(keyType, keyID) + "\" failed!"); - SetStatusMessage(""); - return; - } - - MyAlert("ChallengeCOOLKey(\""+ KeyToUIString(keyType, keyID) + "\") returned:\n\n" + - "challenge[0]: " + challengeArray[0] + "\n" + - "challenge[1]: " + challengeArray[1] + "\n" + - "challenge[2]: " + challengeArray[2] + "\n" + - "challenge[3]: " + challengeArray[3] + "\n"); - - SetStatusMessage(""); -} - -function DoBlinkCOOLKey() -{ - if (!gCurrentSelectedRow) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - if (!keyID) - return; - - SetStatusMessage("Blinking \"" + KeyToUIString(keyType, keyID) + "\" ..."); - StartCylonAnimation("cylon1", "eye1"); - - BlinkCOOLKey(keyType, keyID, 400, 5000); - - StopCylonAnimation("cylon1", "eye1"); - SetStatusMessage(""); -} - -function OnCOOLKeyBlinkComplete(keyType,keyID) -{ - //StopCylonAnimation("cylon1", "eye1"); - //SetStatusMessage(" "); -} - -function DoHelp() -{ - if (!gCurrentSelectedRow) - return; - - var keyInfo = RowIDToKeyInfo(gCurrentSelectedRow.getAttribute("id")); - var keyType = keyInfo[0]; - var keyID = keyInfo[1]; - - if (!keyID) - return; - - var policy = GetCOOLKeyPolicy(keyType, keyID); - var type = PolicyToKeyType(policy); - MyAlert("Policy: " + policy + "\n" + "Type: " + type); -} - -//////////////////////////////////////////////////////////////// -// -// Functions called directly from ASC native code. -// -//////////////////////////////////////////////////////////////// - -function OnCOOLKeyInserted(keyType, keyID) -{ - var row = InsertCOOLKeyIntoBindingTable(keyType, keyID); - - if (!gCurrentSelectedRow) - SelectRowByKeyID(keyType, keyID); - if (UserOnCOOLKeyInserted) { - UserOnCOOLKeyInserted(keyType, keyID); - } -} - - -function OnCOOLKeyRemoved(keyType, keyID) -{ - var row = GetRowForKey(keyType, keyID); - var table = document.getElementById("BindingTable"); - - if (row && table) - { - RemoveRow(table,row); - - if (row == gCurrentSelectedRow) - gCurrentSelectedRow = null; - } - - UpdateButtonStates(); - if (UserOnCOOLKeyRemoved) { - UserOnCOOLKeyRemoved(keyType, keyID); - } -} - -var gKnownPolicies = [ - - // OID Value, precedence, name value - - [ "OID.1.3.6.1.4.1.1066.1.1000.1.0.1.1", 1, "HOUSEKEY" ], // Bronze - HouseKey - [ "OID.1.3.6.1.4.1.1066.1.1000.1.0.1.2", 2, "NETKEY" ], // Silver - Member - [ "OID.1.3.6.1.4.1.1066.1.1000.1.0.1.3", 3, "NETKEY" ], // Gold - Associate - [ "OID.1.3.6.1.4.1.1066.1.1000.1.0.1.4", 4, "NETKEY" ], // Platinum - MyDoctor - - // XXX: Remove the Old OIDs below, after the RA starts generating - // certificates with the OIDs listed above! - [ "OID.1.3.6.1.4.1.1066.1.1000.2.1", 1, "HOUSEKEY" ], // Bronze - HouseKey - [ "OID.1.3.6.1.4.1.1066.1.1000.2.2", 2, "NETKEY" ], // Silver - Member - [ "OID.1.3.6.1.4.1.1066.1.1000.2.3", 3, "NETKEY" ], // Gold - Associate - [ "OID.1.3.6.1.4.1.1066.1.1000.2.4", 4, "NETKEY" ] // Platinum - MyDoctor -]; - -function PolicyToKeyType(policy) -{ - return "ENROLLED"; -} - -function OldPolicyToKeyType(policy) -{ - var i, j; - - var knownPoliciesIndex = -1; - - - var policies; - - - if (policy.indexOf(",")== -1) - { - policies = new Array(1); - policies[0] = policy; - } - else - { - policies = policy.split(","); - } - - for (j = 0; j < policies.length; j++) - { - for (i = 0; i < gKnownPolicies.length; i++) - { - if (gKnownPolicies[i][0] == policies[j]) - { - if (knownPoliciesIndex < gKnownPolicies[i][1]) - knownPoliciesIndex = i; - } - } - } - - if (knownPoliciesIndex == -1) - return "INITIALIZED"; - - return gKnownPolicies[knownPoliciesIndex][2]; -} - -function BoolToYesNoStr(b) -{ - if (b) - return "YES"; - return "NO"; -} - -function OnCOOLKeyEnrollmentComplete(keyType, keyID) -{ - var keyStatus = PolicyToKeyType(GetCOOLKeyPolicy(keyType, keyID)); - var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); - var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); - - //UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); - UpdateButtonStates(); - - StopCylonAnimation("cylon1", "eye1"); - var doShow = false; - ShowProgressBar(keyType,keyID, doShow); - SetStatusMessage(""); - MyAlert("Enrollment of smartcard complete!"); - ClearProgressBar(KeyToProgressBarID(keyType, keyID)); - - window.setTimeout("loadSuccessPage()",4); -} - -function OnCOOLKeyPINResetComplete(keyType, keyID) -{ - var keyStatus = PolicyToKeyType(GetCOOLKeyPolicy(keyType, keyID)); - var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); - var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); - - UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); - UpdateButtonStates(); - - StopCylonAnimation("cylon1", "eye1"); - SetStatusMessage(""); - MyAlert("Password Reset was successful!"); - ClearProgressBar(KeyToProgressBarID(keyType, keyID)); -} - -function OnCOOLKeyFormatComplete(keyType, keyID) -{ - var keyStatus = GetStatusForKeyID(keyType, keyID); - var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); - var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); - - UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); - - StopCylonAnimation("cylon1", "eye1"); - SetStatusMessage(""); - MyAlert("Format of \"" + KeyToUIString(keyType, keyID)+ "\" was successful!"); - ClearProgressBar(KeyToProgressBarID(keyType, keyID)); - if (UserOnCOOLKeyFormatComplete) { - UserOnCOOLKeyFormatComplete(); // call user-level - } -} - -function OnCOOLKeyStateError(keyType, keyID, keyState, errorCode) -{ - var keyStatus = GetStatusForKeyID(keyType, keyID); - var keyReqAuth = BoolToYesNoStr(GetCOOLKeyRequiresAuth(keyType, keyID)); - var keyIsAuthed = BoolToYesNoStr(GetCOOLKeyIsAuthed(keyType, keyID)); - - if(curChildWindow) - { - curChildWindow.close(); - curChildWindow = null; - - } - - var doShow = false; - ShowProgressBar(keyType,keyID, doShow); - - //UpdateInfoForKeyID(keyType, keyID, keyStatus, keyReqAuth, keyIsAuthed); - - StopCylonAnimation("cylon1", "eye1"); - SetStatusMessage(""); - - var typeStr = "Error(" + errorCode + ")"; - - var messageStr = " \n\n Error Response: " + MyGetErrorMessage(errorCode) ; - - var keyIDStr = KeyToUIString(keyType, keyID); - - if (keyState == 1004) - typeStr = "Enrollment of key failed. " + typeStr + messageStr ; - else if (keyState == 1016) - typeStr = "Formatting of key failed. " + typeStr + messageStr; - else if (keyState == 1010) - typeStr = "PIN Reset for key failed. " + typeStr + messageStr; - else if (keyState == 1020) - typeStr = "Operation for key canceled."; - - typeStr += " \n " + ErrorText; - MyAlert(typeStr); - ClearProgressBar(KeyToProgressBarID(keyType, keyID)); - if (UserOnCOOLKeyStateError) { - UserOnCOOLKeyStateError(); // call user-level - } -} - -function OnCOOLKeyStatusUpdate(progMeterID, statusUpdate) -{ - SetProgressMeterValue(progMeterID, statusUpdate); - SetProgressMeterStatus(progMeterID, statusUpdate + "%"); -} - -function Validate1() -{ - - var type = gKeyEnrollmentType; - var screenname = null; - var pin = null; - - var screennamepwd = null; - var tokencode = null; - - screenname = ''; - screennamepwd = 'netscape'; - pin = 'netscape' - - return 1; -} -function Validate() -{ - - var type = gKeyEnrollmentType; - var screenname = null; - var pin = null; - - var screennamepwd = null; - var tokencode = null; - - if (type == "userKey") - { - screenname = GetScreenNameValue(); - if (! screenname) - return 0; - - screennamepwd = GetScreenNamePwd(); - - if(! screennamepwd) - return 0; - - pin = GetPINValue(); - - if (! pin) - return 0; - - } - - return 1; -} - -function OnCOOLKeyStateChange(keyType, keyID, keyState, data,strData) -{ - // alert("KeyID: " + keyID + "\n" + - // "KeyState: " + keyState + "\n" + - // "Data: " + data); - //alert("State Change ="+keyState); - - switch(keyState) - { - case 1000: // KeyInserted - OnCOOLKeyInserted(keyType, keyID); - break; - case 1001: // KeyRemoved - OnCOOLKeyRemoved(keyType, keyID); - break; - case 1002: // EnrollmentStart - // OnCOOLKeyEnrollmentStart(keyType, keyID); - break; - case 1003: // EnrollmentComplete - OnCOOLKeyEnrollmentComplete(keyType, keyID); - break; - case 1004: // EnrollmentError - OnCOOLKeyStateError(keyType, keyID, keyState, data); - break; - case 1008: // PINResetStart - // OnCOOLKeyPINResetStart(keyType, keyID); - break; - case 1009: // PINResetComplete - OnCOOLKeyPINResetComplete(keyType, keyID); - break; - case 1010: // PINResetError - OnCOOLKeyStateError(keyType, keyID, keyState, data); - break; - case 1014: // FormatStart - // OnCOOLKeyFormatStart(keyType, keyID); - break; - case 1015: // FormatComplete - OnCOOLKeyFormatComplete(keyType, keyID); - break; - case 1016: // FormatError - OnCOOLKeyStateError(keyType, keyID, keyState, data); - break; - case 1017: // BlinkStatus Update? - //OnCOOLKeyStateError(keyType, keyID, keyState, data); - break; - case 1018: - OnCOOLKeyBlinkComplete(keyType, keyID); - break; - case 1020: // OperationCancelled - OnCOOLKeyStateError(keyType, keyID, keyState, data); - break; - case 1021: // OperationStatusUpdate - OnCOOLKeyStatusUpdate(KeyToProgressBarID(keyType, keyID), data); - if(UserOnCOOLKeyStatusUpdate) - UserOnCOOLKeyStatusUpdate(data); - break; - - case 1022: //Need Auth - - - gCurKeyID = keyID; - gCurKeyType = keyType; - - GetAuthDataFromPopUp(keyType,keyID,strData); - - break; - - } -} - -function refresh() -{ - window.resizeBy(0,1); - window.resizeBy(0,-1); - -} - -function loadSuccessPage() -{ - window.location="/esc/sow/EnrollSuccess.html"; -} - -function ShowProgressBar(aKeyType,aKeyID, doShow) -{ - if(!gCurrentSelectedRow) - return; - - if(doShow) - gCurrentSelectedRow.style.display="table-row"; - else - { - gCurrentSelectedRow.style.display="none"; - } -} -function DoCoolKeySetConfigValue(configValue,newValue) -{ - if(!configValue || !newValue) - return null; - - var result = null; - - if(netkey) - { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - - result = netkey.SetCoolKeyConfigValue(configValue,newValue); - - } catch(e) { - MyAlert(getBundleString("errorConfigValue") + " " + e); - } - - } - - return result; -} - -//Is the user "uid" an "agent" or "user" -// Input "type" either "agent" or "user" - -function IsAgentOrUser(uid,type) -{ - var url = window.location.href; - var lastSlash = 0; - - var result = false; - - if(!uid || !type) - return false; - - var isAgent = 0; - - if(type == "agent") - isAgent = 1; - - //Accept either uid=name or name - - if(uid.lastIndexOf("uid=") < 0) - { - uid = "uid=" + uid; - } - - if(url) - { - lastSlash = url.lastIndexOf("/"); - } - if(lastSlash > 0) - { - url = url.substring(0,lastSlash); - } - - if(isAgent) - url = url + "/is_agent.cgi?" + uid; - else - url = url + "/is_user.cgi?" + uid; - - var req = new XMLHttpRequest(); - req.open('GET',url,false); - req.send(null); - if(req.status == 200) - { - //alert(req.responseText); - if(req.responseText.lastIndexOf("yes") >= 0) - { - result = true; - } - } - return result; -} - -function GetCoolKeyIssuedTo(keyType,keyID) -{ - var keyStatus = GetStatusForKeyID(keyType,keyID); - - var issuedTo = null; - - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - issuedTo = netkey.GetCoolKeyUID(keyType,keyID); - - } catch (e) - { - } - return issuedTo; -} - diff --git a/dogtag/tps-ui/shared/docroot/footer.vm b/dogtag/tps-ui/shared/docroot/footer.vm deleted file mode 100755 index a596e45b1..000000000 --- a/dogtag/tps-ui/shared/docroot/footer.vm +++ /dev/null @@ -1,19 +0,0 @@ - - diff --git a/dogtag/tps-ui/shared/docroot/header.vm b/dogtag/tps-ui/shared/docroot/header.vm deleted file mode 100755 index 3824b87f3..000000000 --- a/dogtag/tps-ui/shared/docroot/header.vm +++ /dev/null @@ -1,26 +0,0 @@ - - diff --git a/dogtag/tps-ui/shared/docroot/index.vm b/dogtag/tps-ui/shared/docroot/index.vm deleted file mode 100755 index 438d014ef..000000000 --- a/dogtag/tps-ui/shared/docroot/index.vm +++ /dev/null @@ -1,89 +0,0 @@ - - - - -TPS Services - - - - - - - -#include ( "header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - - -Certificate System TPS Services Page -
    -

    - -

    -

    - - - - - - - - - - -
    - -
  • Operator Services
  • -
    -
    - -
  • Agent Services
  • -
    -
    - -
  • Administrator Services
  • -
    -
    -
    -#include ( "footer.vm" ) - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/addConfig.template b/dogtag/tps-ui/shared/docroot/tokendb/addConfig.template deleted file mode 100644 index ce0177c1a..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/addConfig.template +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
                  Red Hat® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/addResults.template b/dogtag/tps-ui/shared/docroot/tokendb/addResults.template deleted file mode 100644 index eca814f8b..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/addResults.template +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/agentSelectConfig.template b/dogtag/tps-ui/shared/docroot/tokendb/agentSelectConfig.template deleted file mode 100644 index af782c190..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/agentSelectConfig.template +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
                  Red Hat® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/agentViewConfig.template b/dogtag/tps-ui/shared/docroot/tokendb/agentViewConfig.template deleted file mode 100644 index 9abce847a..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/agentViewConfig.template +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
                  Red Hat® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/auditAdmin.template b/dogtag/tps-ui/shared/docroot/tokendb/auditAdmin.template deleted file mode 100644 index ff299530c..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/auditAdmin.template +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/confirmConfigChanges.template b/dogtag/tps-ui/shared/docroot/tokendb/confirmConfigChanges.template deleted file mode 100644 index ef541d732..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/confirmConfigChanges.template +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
                  Red Hat® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/confirmDeleteConfig.template b/dogtag/tps-ui/shared/docroot/tokendb/confirmDeleteConfig.template deleted file mode 100644 index 3b1ab8b47..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/confirmDeleteConfig.template +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
                  Red Hat® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/delete.template b/dogtag/tps-ui/shared/docroot/tokendb/delete.template deleted file mode 100644 index 4d3243db1..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/delete.template +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template b/dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template deleted file mode 100644 index 606e11bb0..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/deleteResults.template +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/doToken.template b/dogtag/tps-ui/shared/docroot/tokendb/doToken.template deleted file mode 100644 index 419a9a240..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/doToken.template +++ /dev/null @@ -1,360 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template b/dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template deleted file mode 100644 index 16bd2a191..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/doTokenConfirm.template +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/edit.template b/dogtag/tps-ui/shared/docroot/tokendb/edit.template deleted file mode 100644 index 163ae3bd1..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/edit.template +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/editConfig.template b/dogtag/tps-ui/shared/docroot/tokendb/editConfig.template deleted file mode 100644 index a4091870a..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/editConfig.template +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
                  Red Hat® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/editResults.template b/dogtag/tps-ui/shared/docroot/tokendb/editResults.template deleted file mode 100644 index 783b065c3..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/editResults.template +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/editUser.template b/dogtag/tps-ui/shared/docroot/tokendb/editUser.template deleted file mode 100644 index 55b587cbe..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/editUser.template +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/error.template b/dogtag/tps-ui/shared/docroot/tokendb/error.template deleted file mode 100644 index 8f629ff72..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/error.template +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - -TPS Error! - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/index.template b/dogtag/tps-ui/shared/docroot/tokendb/index.template deleted file mode 100644 index 4aa9f0cdd..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/index.template +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - -TPS Agent - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - - - -
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Tokens
    • List/Search Tokens
     
    Certificates
    • List/Search Certificates
     
    Activities
    • List/Search Activities
     
    Advanced Configuration
    -


    -
    - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template b/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template deleted file mode 100644 index 97086257b..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/indexAdmin.template +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - -TPS Admin - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - - - -
     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Tokens
    • List/Search Tokens
    • Add New Token
     
    Users
    • Add User
    • List Users
    • Search Users
     
    Activities
    • List/Search Activities
     
    Self Tests
    • Run Self Tests
     
    Auditing
    • Configure Signed Audit
     
    Advanced Configuration
    • General
    -


    -
    - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/indexOperator.template b/dogtag/tps-ui/shared/docroot/tokendb/indexOperator.template deleted file mode 100644 index 1b1902843..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/indexOperator.template +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - -TPS Operator - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - - - -
     
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Tokens
    • List/Search Tokens
     
    Certificates
    • List/Search Certificates
     
    Activities
    • List/Search Activities
    -


    -
    - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/new.template b/dogtag/tps-ui/shared/docroot/tokendb/new.template deleted file mode 100644 index f4bf1475d..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/new.template +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - - -
    - - Token ID: - - - -
    -
    -
    - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/newUser.template b/dogtag/tps-ui/shared/docroot/tokendb/newUser.template deleted file mode 100644 index f1e7e6e35..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/newUser.template +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - - - - - - - - - - - - - - - - - - - -
    - - User ID: - - - -
    - - User First Name: - - - -
    - - User Last Name: - - - -
    - - Role: - - Operator - -     Agent - -     Admin - -
    - - Certificate: - - - -
    -
    -
    - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/revoke.template b/dogtag/tps-ui/shared/docroot/tokendb/revoke.template deleted file mode 100644 index 6a62ea116..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/revoke.template +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/search.template b/dogtag/tps-ui/shared/docroot/tokendb/search.template deleted file mode 100644 index 305c9cd74..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/search.template +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - - - - - - - - - - -
    - - Token ID: - - - -
    - - User ID: - - - -
    - - Max Count: - - - -
    -
    -
    - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template b/dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template deleted file mode 100644 index e831a2872..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchActivity.template +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - - - - - - - - - - -
    - - Token ID: - - - -
    - - User ID: - - - -
    - - Max Count: - - - -
    -
    -
    - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdmin.template b/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdmin.template deleted file mode 100644 index da201d97f..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdmin.template +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - - - - - - - - - - -
    - - Token ID: - - - -
    - - User ID: - - - -
    - - Max Count: - - - -
    -
    -
    - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdminResults.template b/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdminResults.template deleted file mode 100644 index d8f6587aa..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchActivityAdminResults.template +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template b/dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template deleted file mode 100644 index 1f97860a0..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchActivityResults.template +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchAdmin.template b/dogtag/tps-ui/shared/docroot/tokendb/searchAdmin.template deleted file mode 100644 index b0960f571..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchAdmin.template +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - - - - - - - - - - -
    - - Token ID: - - - -
    - - User ID: - - - -
    - - Max Count: - - - -
    -
    -
    - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchAdminResults.template b/dogtag/tps-ui/shared/docroot/tokendb/searchAdminResults.template deleted file mode 100644 index ab0a471c2..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchAdminResults.template +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template b/dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template deleted file mode 100644 index 788491fbf..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchCertificate.template +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - - - - - - - - - - -
    - - Token ID: - - - -
    - - User ID: - - - -
    - - Max Count: - - - -
    -
    -
    - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template b/dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template deleted file mode 100644 index bb6dcabf3..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchCertificateResults.template +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchResults.template b/dogtag/tps-ui/shared/docroot/tokendb/searchResults.template deleted file mode 100644 index f4644b355..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchResults.template +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchUser.template b/dogtag/tps-ui/shared/docroot/tokendb/searchUser.template deleted file mode 100644 index 57e3a5507..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchUser.template +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - - - - - - - - - - - - - - -
    - - User ID: - - - -
    - - First Name: - - - -
    - - Last Name: - - - -
    - - Max Count: - - - -
    -
    -
    - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/searchUserResults.template b/dogtag/tps-ui/shared/docroot/tokendb/searchUserResults.template deleted file mode 100644 index bbb885f31..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/searchUserResults.template +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/selectConfig.template b/dogtag/tps-ui/shared/docroot/tokendb/selectConfig.template deleted file mode 100644 index 33f560461..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/selectConfig.template +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
                  Red Hat® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/selfTest.template b/dogtag/tps-ui/shared/docroot/tokendb/selfTest.template deleted file mode 100644 index 163437d17..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/selfTest.template +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - -

    - - - - -
    - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/selfTestResults.template b/dogtag/tps-ui/shared/docroot/tokendb/selfTestResults.template deleted file mode 100644 index aeb49d711..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/selfTestResults.template +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/show.template b/dogtag/tps-ui/shared/docroot/tokendb/show.template deleted file mode 100644 index a9dd39334..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/show.template +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template b/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template deleted file mode 100644 index fe3292011..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/showAdmin.template +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/showCert.template b/dogtag/tps-ui/shared/docroot/tokendb/showCert.template deleted file mode 100644 index 964035887..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/showCert.template +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tokendb/userDelete.template b/dogtag/tps-ui/shared/docroot/tokendb/userDelete.template deleted file mode 100755 index db4b226cd..000000000 --- a/dogtag/tps-ui/shared/docroot/tokendb/userDelete.template +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - -TPS - - - - - - -
    - - - - - - -
         Dogtag® TPS Services
    -
    -

    - - - - - - - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/adminauthenticatepanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/adminauthenticatepanel.vm deleted file mode 100644 index cfa53c628..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/adminauthenticatepanel.vm +++ /dev/null @@ -1,51 +0,0 @@ - - -

    Authentication

    -

    -The uid and password are used to authenticate to the master subsystem. These are the administrator's credential information for the master subsystem. -#if ($systemType != "tps") -
    -If authentication is successful, a cloned subsystem will retrieve the configuration information from the master one. -#end -
    -#if ($errorString != "") - $errorString -#end - - - - - - - - - - - -
    Uid:
    Password:
    -

    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/adminpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/adminpanel.vm deleted file mode 100644 index 46d3e25a2..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/adminpanel.vm +++ /dev/null @@ -1,246 +0,0 @@ - - - - - -The administrator is a privileged user who manages this subsystem. Please enter the following relevant information, and a certificate request will be automatically generated and submitted. An administrator's entry will be created in the internal database and an administrator's certificate will be imported into this browser automatically in the next panel. -
    -#if ($errorString != "") - $errorString -#end -
    -
    - - - - -#if ($clone != 'clone') - -#else - -#end - - - -#if ($clone != 'clone') - -#else - -#end - - - -#if ($clone != 'clone') - -#else - -#end - - - -#if ($clone != 'clone') - -#else - -#end - - - - -#if ($clone != 'clone') - -#else - -#end - - - - - - - - - - - - - - -
    UID:
    Name:
    Email:
    Password:
    Password (Again):
    Key Type:
    -

    -
    -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/agentauthenticatepanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/agentauthenticatepanel.vm deleted file mode 100644 index 738efe5b3..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/agentauthenticatepanel.vm +++ /dev/null @@ -1,47 +0,0 @@ - - -

    Authentication

    -
    -The uid and password are used to authenticate to the CA from which this subsystem's certificates are issued. Enter the uid and password of the Certificate Manager Agent who will approve the certificate requests. -
    -#if ($errorString != "") - $errorString -#end - - - - - - - - - - - -
    Uid:
    Password:
    -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/authdbpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/authdbpanel.vm deleted file mode 100644 index 3ebb96853..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/authdbpanel.vm +++ /dev/null @@ -1,67 +0,0 @@ - - - Please provide information about the LDAP server that will be used to authenticate the identity of end users. [Details] - - -

    -#if ($errorString != "") - $errorString -#end -

    - - - - - - - - - - - - - - - - - -
    Host:
    Port: - SSL
    Base DN:
    - -

    -
    -   -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/cainfopanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/cainfopanel.vm deleted file mode 100644 index 8d2e54251..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/cainfopanel.vm +++ /dev/null @@ -1,54 +0,0 @@ - - -A Certificate Authority (CA) is responsible for issuing different kinds of certificates. Each Enterprise Security Client (ESC) interfaces with a TPS subsystem to request end user certificates. Consequently, to obtain these certificates, an HTTPS EE URL to a CA that has been registered in the security domain must also be selected. -

    -#if ($errorString != "") - $errorString -#end -

    - - - - - -
    URL: -
    - - -

    -
    -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certchainpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certchainpanel.vm deleted file mode 100644 index d6b7b3fe4..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certchainpanel.vm +++ /dev/null @@ -1,48 +0,0 @@ - - -Pretty Print of Certificates on this subsystem. -

    -#foreach ($item in $ppcerts) -

    $item.getDN()

    - - - - - - - - -
    Certificate: $item.getNickname()
    -#end - -
    - -
    -
    -   -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certprettyprintpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certprettyprintpanel.vm deleted file mode 100644 index 0e5f05af6..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certprettyprintpanel.vm +++ /dev/null @@ -1,48 +0,0 @@ - - -The following certificates were installed on this instance. -

    -#foreach ($item in $ppcerts) -

    $item.getDN()

    - - - - - - - - -
    Certificate: $item.getNickname()
    -#end - -
    - -
    -
    -   -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certrequestpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certrequestpanel.vm deleted file mode 100644 index 632b27c34..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/certrequestpanel.vm +++ /dev/null @@ -1,224 +0,0 @@ - - - -A certificate signing request (CSR) contains a public key and is an unsigned copy of the certificate. -

    -If a given CSR has been successfully signed by a CA, then the certificate will be designated below by a certificate icon labeled Certificate Generated Successfully. -

    -However, if a given CSR contains an action required label under its certificate icon, then those requests must be manually submitted to a CA for certificate generation. -

    -Press the [Apply] button after certificates and chains are pasted in. -

    -Press the [Next] button once all certificates have been generated successfully. -

    -#foreach ($item in $reqscerts) -

    $item.getDN()

    - - - - - - - - - -#if ($item.getCert() == "...paste certificate here...") - -#else - #if ($item.getCert() == "...certificate be generated internally...") - - #else - #if ($item.getCert() == "") - - #else - - #end - #end -#end - - - -
     action required
    -
    -
    - certificate will be generated internally -
    -
    - No Certificate Generated. Please import.
    -
    -
    - Certificate Generated Successfully -
    - - -#if ($item.getCert() == "...paste certificate here...") - Step 1: Copy the Certificate Request (CSR) to enroll at an external CA

    - Step 2: Import the PKCS #7 Certificate Chain (optional if the certificate already contains the chain)

    - Step 3: Paste in the Base64-encoded Certificate after enrollment at an external CA (NOTE: this text box does not accept PKCS #7 certificate chains)

    -#else - #if ($item.getCert() == "...certificate be generated internally...") -

    - #else - View Certificate Request (CSR)

    - View Certificate in Base64-Encoding

    - View Certificate Pretty Print

    - #end -#end - - -

    - -
    -
    X
    - - - - - - - -
    $item.getCert()
    -
    - -
    -
    X
    - - - - - - - -
    -
    - -
    -
    X
    - - - - - - - -
    -
    - - -#end - -

    - - -

    -
    -   -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_addhsm.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_addhsm.vm deleted file mode 100644 index 90d2f0ea9..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_addhsm.vm +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - Dogtag Certificate System - - - - - - - -
    - - - - - - -
    - - - - -
    -

    - Security Modules

    -Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. -

    -

    Registering a New Security Module

    -
    -

    -If the desired security module is not listed, it is possible that this security module's PKCS #11 library was not registered with the system. Please register a new security module here. - - - - - - - - -
    -Library Path: -
    -Module Name: -
    -

    - - - - -
    - -
    -

    -
    - -
    -
    - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_db.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_db.vm deleted file mode 100644 index ba40c7cee..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_db.vm +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - Dogtag Certificate System - - - - - - - - - -
    -#include ( "admin/console/config/header.vm" ) - - - - - -
    - - - - -
    -

    - Internal Database

    - -
    - Internal Database Connection

    This option allows sharing an internal database to improve managability.

    -#if ($errorString != "") - $errorString -#end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Host:
    Port:
    Base DN:
    Database:
    Bind DN:
    Bind Password:
    - -

    -
    -   -
    - - -

    - - - - -
    - -
    - -

    - -
    - -
    -
    - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_hsm.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_hsm.vm deleted file mode 100644 index 7ec82522c..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_hsm.vm +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - Dogtag Certificate System - - - - - - - -
    - - - - - - -
    - - - - -
    -

    - Security Modules

    - -
    - -Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. Please make sure that at least one security module is listed below. -

    -

    Supported Security Modules

    - - - - - - - -#foreach ($module in $sms) - - - - - - -#foreach ($token in $module.getTokens()) - - - - - - -#end -#end - -
    Module/TokenStatusDefaultOperations

    $module.getUserFriendlyName()
    - #if ($module.isFound()) - Found - #else - Not Found - #end -
    - $token.getNickName() - #if ($token.isLoggedIn()) - Logged In - #else - Not logged In - #end - - #if ($defTok == $token.getNickName()) - - #else - - #end -
    -

    Other Security Modules

    -

    The security modules listed below are modules found by the server but not recognized as one of the supported modules. If the user believes that any listed modules below should have been supported, please check the "CS.cfg" configuration file to see if there is a name mismatch and adjust this accordingly.

    - - - - - - - -#foreach ($module in $oms) - - - - - - -#foreach ($token in $module.getTokens()) - - - - - - -#end -#end - -
    Module/TokenStatusDefaultOperations
    $module.getUserFriendlyName() - #if ($module.isFound()) - Found - #else - Not Found - #end -
    - $token.getNickName() - #if ($token.isLoggedIn()) - Logged In - #else - Not logged In - #end - - #if ($defTok == $token.getNickName()) - - #else - - #end -
    - -
    -

    - - - - -
    - -
    - - - - - -

    -
    - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_hsmloginpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_hsmloginpanel.vm deleted file mode 100644 index 332f2f470..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_hsmloginpanel.vm +++ /dev/null @@ -1,82 +0,0 @@ - - -

    - Security Modules Login Panel

    -Keys will be generated and stored on security modules. A security module can be hardware-based or software-based. Hardware-based security modules are more secure. -

    -

    Security Token Login

    -
    -

    -The user has chosen to login to the following security module: $SecToken -

    -#if ($status == "alreadyLoggedIn") - Token already logged in. -#else - #if ($status == "tokenPasswordNotInitialized") - Token password not initialized. - #else - #if ($status == "justLoggedIn") - Token logged in successfully. - #else - - - - - - - - -
    -Security Module Token Name: -
    -Security Module Token Password: -
    -

    - #end - #end -#end - - - - - -
    - -
    - - - - -

    - -

    -
    -   -
    - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_join.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_join.vm deleted file mode 100644 index 49e43fbc4..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_join.vm +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - Dogtag Certificate System - - - - - - - - - -
    - -#include ( "admin/console/config/header.vm" ) - - - - - -
    - - - - -
    -

    - Join the PKI Network

    - -To join this PKI network, the setup wizard needs to submit the certificate request to a Root or another subordinate CA for signing. -

    - - -Manually submit this request to a CA. -

    - - - - - - - - - - -
    Certificate Request to a CA:Certificate Chain From a CA:
    - - - -
    -

    -Automatically submit the request to a Dogtag Certificate Authority -
    - - - - - - - - - - - - - - -
    URL:
    UID:
    Password:
    -

    - -

    -
    -
    - - - -

    - - - - -
    - -
    -

    - -
    -
    - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_rootca.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_rootca.vm deleted file mode 100644 index 7e17fef35..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/config_rootca.vm +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - Dogtag Certificate System - - - - - - - - - -
    - -#include ( "admin/console/config/header.vm" ) - - - - - -
    - - - - -
    -

    - Root CA

    - -A Root CA provides a set of predefined signing capabilities. Please select the capabilities that this CA needs to provide. -

    - -

    - -

    CA Certificate Profile

    - -

    - - - - - - -
    Profile: -
    -

    - -

    -
    -   -
    - -
    - -

    - - - - -
    - -
    - - -

    - -
    -
    - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/createsubsystempanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/createsubsystempanel.vm deleted file mode 100644 index 1ddd7a90c..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/createsubsystempanel.vm +++ /dev/null @@ -1,98 +0,0 @@ - - -

    Subsystem Configuration

    -

    -#if ($systemType != "tps") -This instance can be configured as either a new $systemname subsystem or a clone of an existing $systemname. If the cloning option is chosen, please provide the URL to an existing $systemname instance. -#else -This instance can be configured as a new $systemname subsystem. -#end -
    -#if ($errorString != "") - $errorString -#end -
    - Configure this Instance as a New $systemname Subsystem -
    - - - - - - - - - - - - - - - - - -
    Subsystem Name: (e.g. - $fullsystemname)
    Subsystem HTTP URL (unsecure): http://$machineName:$http_port
    Subsystem HTTPS URL (clientauth): https://$machineName:$https_port
    Subsystem HTTPS URL (non-clientauth): https://$machineName:$non_clientauth_https_port
    -

    -#if ($disableClone) - Clone an Existing $systemname Subsystem -#else - Clone an Existing $systemname Subsystem -#end -
    - - - -#if ($disableClone) - -#else - -#end - - - -#if ($disableClone) - - -
    Subsystem Name: (e.g. - $fullsystemname - Clone 1) (e.g. - $fullsystemname - Clone 1)
    Subsystem URL: -
    -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/databasepanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/databasepanel.vm deleted file mode 100644 index ce168fd2a..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/databasepanel.vm +++ /dev/null @@ -1,93 +0,0 @@ - - -Please provide information to an existing Fedora Directory Server that can be used as the internal database for this instance. [Details] - -

    -

    -Note: If the Fedora Directory Server is at a remote host, it is highly recommended that SSL should be used. -
    -#if ($errorString != "") - $errorString -#end -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Host:
    Port: -SSL -
    Base DN:
    Database:
    Bind DN:
    Bind Password:
    - - -#if ($firsttime == 'false') -Remove the existing data from the Base DN shown above.

    -#end - -

    -
    -   -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/displaycertchain2panel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/displaycertchain2panel.vm deleted file mode 100644 index 3a13b7cd4..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/displaycertchain2panel.vm +++ /dev/null @@ -1,40 +0,0 @@ - - -

    -A certificate chain is a list of all certificates chained up to the root. -

    -If the entire certificate chain is displayed below, click the Next button to import it into this subsystem. This certificate chain will then be trusted for this instance. -

    -If no certificate chain is listed below, simply click the Next button to move on to the next panel. -

    -

    -$certchain
    -
    -#if ($errorString != "") - $errorString -#end diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/displaycertchainpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/displaycertchainpanel.vm deleted file mode 100644 index f7b9dee90..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/displaycertchainpanel.vm +++ /dev/null @@ -1,40 +0,0 @@ - - -
    -A certificate chain is a list of all certificates chained up to the root. -
    -If a certificate chain is displayed below, click the Next button to trust this certificate chain for this instance. -
    -If no certificate chain is listed below, simply click the Next button to move on to the next panel. -
    -
    -$certchain
    -
    -#if ($errorString != "") - $errorString -#end diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm deleted file mode 100644 index 2aa76ff0c..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/donepanel.vm +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -#if ($errorString != "") - $errorString -#end -#if ($systemType == "tks") -As 'root', restart the server on the command line by typing "$initCommand restart $instanceID". After performing this restart, the server should become operational. -#else -#if ($externalCA == "true" && $systemType == "kra") -As 'root', restart the server on the command line by typing "$initCommand restart $instanceID". Startup the administration console to add the peer CA to the Trusted Manager's Group. Make sure to add the transport certificate and connector information to the peer CA. After performing this restart, the server should become operational. -#else -As 'root', restart the server on the command line by typing "$initCommand - restart $instanceID". After performing this restart, the server should become operational. -
    -Please go to the services page to access all of the available interfaces. -
    -Each Enterprise Security Client (ESC) talks to a TPS config URL for token management functions located at http://$host:$unsecurePort/cgi-bin/home/index.cgi. -
    -#end -#end -
    -To create additional instances, type "/usr/bin/pkicreate" on the command line. -
    -#if ($systemType != "tps") -To start the administration console, type "/usr/bin/pkiconsole" on the command line. -#end diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/drminfopanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/drminfopanel.vm deleted file mode 100644 index 8931bf1c9..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/drminfopanel.vm +++ /dev/null @@ -1,55 +0,0 @@ - - -A Data Recovery Manager (DRM) is responsible for server-side key generation, archival, and recovery. If server-side key generation is not needed, this step can be skipped. -

    -#if ($errorString != "") - $errorString -

    -#end - Connect this instance to the HTTPS Agent URL of a DRM to support server-side key generation. -

    -

    - - - - - -
    URL: -
    -

    -
    -
    -

    - Configure this instance to NOT support server-side key generation. -

    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/footer.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/footer.vm deleted file mode 100644 index a596e45b1..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/footer.vm +++ /dev/null @@ -1,19 +0,0 @@ - -

    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/header.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/header.vm deleted file mode 100644 index e0fe6a962..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/header.vm +++ /dev/null @@ -1,25 +0,0 @@ - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/hierarchypanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/hierarchypanel.vm deleted file mode 100644 index 0138188e9..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/hierarchypanel.vm +++ /dev/null @@ -1,79 +0,0 @@ - - -

    PKI Hierarchy

    -

    -This CA instance can be either a Self-Signed Root CA or a Subordinate CA. [Details] - - -

    - -

    - Make this a Self-Signed Root CA within this new PKI hierarchy. -

    - Make this a subordinate CA of another CA. - - - - - - -
    URL: -
    -

    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/importadmincertpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/importadmincertpanel.vm deleted file mode 100644 index 609b4bf4f..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/importadmincertpanel.vm +++ /dev/null @@ -1,55 +0,0 @@ - - -An administrator's certificate has been created and imported into this browser. This certificate is used to access the agent interface of this subsystem. -

    -#if ($errorString != "") - $errorString -#end -$info -

    -

    - - - -#if ($ca == 'true' && $import == 'true') - -#else -#if ($caType == 'ca' && $import == 'true') - -#else - -#end -#end - - - - -
    -

    -
    -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/login.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/login.vm deleted file mode 100644 index 73f53afa6..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/login.vm +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - Dogtag Certificate System - - - - - - -
    - -#include ( "tps/admin/console/config/header.vm" ) - - - - -
    - -
    -
    - -
    - - -
    - - -
    -
    - -
    - - -
    - - - - - -
    -

    - Login

    - -A one time random pin has been generated during setup to protect unauthorized access to this configuration wizard. This pin has been stored in the "CS.cfg" configuration file as the value of the 'preop.pin' parameter. Please enter this pin to continue. - -

    -#if ($errorString != "") - $errorString -#end -

    -

    - - - - - - -
    PIN:
    -
    -
    -
    -
    - -

    - - - - -
    - -
    - - -

    - -
    -
    - -#include ( "tps/admin/console/config/footer.vm" ) - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/modulepanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/modulepanel.vm deleted file mode 100644 index 812d7ca6c..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/modulepanel.vm +++ /dev/null @@ -1,161 +0,0 @@ - - -Two lists of security modules are provided below. The Supported Security Modules list consists of both software-based and hardware-based security modules that this PKI solution supports, while the Other Security Modules list consists of any other security modules found by this PKI subsystem that are not recognized as one of the supported security modules. [Details] - - -
    -

    Supported Security Modules

    - - - - - - - -#foreach ($module in $sms) - - - - - - -#foreach ($token in $module.getTokens()) - - - - - - -#end -#end - -
    Module/TokenStatusDefaultOperations

    $module.getUserFriendlyName()
    - #if ($module.isFound()) - Found - #else - Not Found - #end -
    - $token.getNickName() - #if ($token.isLoggedIn()) - Logged In - #else - Not logged In - #end - - #if ($token.isLoggedIn()) - #if ($defTok == $token.getNickName()) - - #else - - #end - #end - - #if (!$token.isLoggedIn()) -Login - #end -
    -

    Other Security Modules

    -

    The security modules listed below are modules found by the server but not recognized as one of the supported modules. If the user believes that any listed modules below should have been supported, please check the "CS.cfg" configuration file to see if there is a name mismatch and adjust this accordingly.

    - - - - - - - -#foreach ($module in $oms) - - - - - - -#foreach ($token in $module.getTokens()) - - - - - - -#end -#end - -
    Module/TokenStatusDefaultOperations
    $module.getUserFriendlyName() - #if ($module.isFound()) - Found - #else - Not Found - #end -
    - $token.getNickName() - #if ($token.isLoggedIn()) - Logged In - #else - Not logged In - #end - - #if ($defTok == $token.getNickName()) - - #else - - #end - - #if (!$token.isLoggedIn()) -Login - #end -
    - - -
    - -
    -
    -   -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/namepanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/namepanel.vm deleted file mode 100644 index 0ed2d1adb..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/namepanel.vm +++ /dev/null @@ -1,90 +0,0 @@ - - -Each certificate associated with this instance needs to have a unique name within the PKI hierarchy. The following information will be used to generate these unique names. Each certificate will be stored in the security module using a unique nickname.[Details] - - - - -

    -#if ($errorString != "") - $errorString -#end -
    -#foreach ($item in $certs) -

    $item.getUserFriendlyName()

    - - - - - - - - - - -
    DN:
    Nickname:
    -

    -#end -

    -


    -

    -Please select the CA to submit these system certificate requests: -

    - - - - - -
    URL: -
    - -

    -
    -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/securitydomainloginpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/securitydomainloginpanel.vm deleted file mode 100644 index a8c0c8079..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/securitydomainloginpanel.vm +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - Dogtag Certificate System - - - - - - - -
    - - - - - - -
    - - - - -
    -

    - Security Domain ($name) Login

    - -
    -

    The Enterprise $subsystem Administrator will register this $subsystem Subsystem located at $host under this Security Domain located at $sdhost. The credential information will be provided to the Security Domain for authentication.

    -#if ($errorString != "") - $errorString -#end - - - - - - - - - - - - - - -
    Uid:
    Password:
    - -

    -
    -   -
    - - -

    - - - - -
    -
    - -
    -
    - -

    - -
    - -
    -
    - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/securitydomainpanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/securitydomainpanel.vm deleted file mode 100644 index 6f651f388..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/securitydomainpanel.vm +++ /dev/null @@ -1,114 +0,0 @@ - - -

    $panelname

    -
    -A security domain is a registry for all of the PKI services within an enterprise. Applications may use the security domain to locate other PKI services. [Details] - - - -#if ($errorString != "") - $errorString -#end -
    -#if ($cstype == "CA") - Create a New Security Domain -
    -If no security domain exists, a new one must be created for this CA. - - - - - - - - - - - - - - - - - - - - - -
    Security Domain Name: (e.g. - Dogtag Security Domain)
    Security Domain HTTP EE URL (unsecure): http://$machineName:$http_ee_port
    Security Domain HTTPS Agent URL (clientauth): https://$machineName:$https_agent_port
    Security Domain HTTPS EE URL (non-clientauth): https://$machineName:$https_ee_port
    Security Domain HTTPS Admin URL (non-clientauth): https://$machineName:$https_admin_port
    -
    - Join an Existing Security Domain -#else - Create a New Security Domain -
    -If no security domain exists, a new one must be created for this CA. - - - - - -
    Security Domain Name: (e.g. - Dogtag Security Domain)
    -
    - Join an Existing Security Domain -#end -
    -Enter the URL to an existing security domain. -
    - - - - - -
    Security Domain HTTPS Admin URL (non-clientauth): (e.g. - https://example.com:9445)
    -
    - - - - - -
    NOTE:   Since a Security Domain MUST be a CA (although all CAs are NOT necessarily Security Domains), an appropriate value for this URL may be obtained by logging into the machine which hosts the desired Security Domain CA as 'root' and running the command "$initCommand status $instanceID" from the command-line.
    -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/sidemenu.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/sidemenu.vm deleted file mode 100644 index c3dbf1410..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/sidemenu.vm +++ /dev/null @@ -1,29 +0,0 @@ - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/sizepanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/sizepanel.vm deleted file mode 100644 index cfcf15190..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/sizepanel.vm +++ /dev/null @@ -1,303 +0,0 @@ - - - - -Select the key pair type(s) and associated key pair size(s) from the pulldown menus. [Details] -

    -Note that only RSA is supported for the audit_signing certificate at this point -

    - -

    -#if ($errorString != "") - $errorString -#end -

    -

    -

    - - - - -
    [Advanced]
    -

    -

    Common Key Settings

    -

    - - - - - -
    Key Type:
    -

    - -

    - Use the default key size ($default_keysize bits for RSA; curve $default_ecc_curvename for ECC). -

    - Use the following custom key strength: - -

    - - - - - -
    Key Size or Curve (see Details above):
    -

    -

    - -
    -

    - - - - -
    [Simple]
    - -#foreach ($item in $certs) -

    Key for $item.getUserFriendlyName()

    -

    - - - -#if ($item.getCertTag() == "audit_signing") - -#else - -#end - -
    Key Type:
    -

    - Use the default key size ($default_keysize bits for RSA, curve $default_ecc_curvename for ECC). -

    - Use the following custom key strength: - -

    - - - - - -
    Key Size or Curve (see Details above):
    -#end -

    - -
    -
    -
    -#if ($firsttime == 'false') -New Keys

    -#end -

    -

    -
    -Note: After pressing Next, keys will be generated on the server, which will take some time to complete. Please wait for the next panel to appear. -   -
    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/tksinfopanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/tksinfopanel.vm deleted file mode 100644 index 1f6ee162f..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/tksinfopanel.vm +++ /dev/null @@ -1,50 +0,0 @@ - - -The Token Key Service (TKS) is responsible for managing master keys that are used for establishing secure channels. Select an HTTPS Agent URL of a TKS from the list below. -

    -#if ($errorString != "") - $errorString -#end -

    - - - - - -
    URL: -
    -

    -
    -
    -

    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/topmenu.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/topmenu.vm deleted file mode 100644 index c76b2e8fa..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/topmenu.vm +++ /dev/null @@ -1,20 +0,0 @@ - -

    diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/welcomepanel.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/welcomepanel.vm deleted file mode 100644 index 619560dd3..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/welcomepanel.vm +++ /dev/null @@ -1,57 +0,0 @@ - - -

    $wizardname

    -The $fullsystemname - configuration wizard will guide the administrator through the process of configuring a single instance of the $fullsystemname - ($systemname). [Details] - - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/wizard.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/wizard.vm deleted file mode 100644 index 31d395edf..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/wizard.vm +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - Dogtag Certificate System - - - - - - - - - - -
    - -#include ( "tps/admin/console/config/header.vm" ) - - - - -
    - -
    -
    - -
    -
    - - -
    -
    - -
    - - -
    - - - - - -
    -

    - $title

    - -
    - - -#parse ( $panel ) - - - -
    - - - - - - -
    - -#if ($showApplyButton == "true") - -#end - -#if ($lastpanel) -  -#else - -#end - -
    - -
    - -#include ( "tps/admin/console/config/footer.vm" ) - -
    -
    - - - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/xml.vm b/dogtag/tps-ui/shared/docroot/tps/admin/console/config/xml.vm deleted file mode 100644 index 31ff72aa2..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/config/xml.vm +++ /dev/null @@ -1,4 +0,0 @@ - - - $xml - diff --git a/dogtag/tps-ui/shared/docroot/tps/admin/console/js/misc.js b/dogtag/tps-ui/shared/docroot/tps/admin/console/js/misc.js deleted file mode 100644 index d4dc336ab..000000000 --- a/dogtag/tps-ui/shared/docroot/tps/admin/console/js/misc.js +++ /dev/null @@ -1,30 +0,0 @@ -// --- 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 --- - -/** - * This function is to submit the form's parameters and to decide if the - * window should remain open. - * - * @param f The form - * @param fclose true if you want to close the window; otherwise false. - */ -function saveConfig(f, fclose) { - f.submit(); - if (fclose == true) - window.close(); -} -- cgit From 8f0b8c546f854b23239dc7c1c81953249c65349c Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Thu, 22 Nov 2012 03:02:39 -0500 Subject: Reorganized TPS CSS files. --- dogtag/common-ui/shared/esc/demo/style.css | 213 ++++++++++++++++ dogtag/common-ui/shared/esc/home/style.css | 213 ++++++++++++++++ dogtag/common-ui/shared/esc/so/style.css | 213 ++++++++++++++++ dogtag/common-ui/shared/esc/sow/css/style.css | 277 +++++++++++++++++++++ dogtag/common-ui/shared/esc/sow/style.css | 213 ++++++++++++++++ dogtag/common-ui/shared/style.css | 196 +++++++++++++++ dogtag/tps-ui/shared/docroot/esc/demo/style.css | 213 ---------------- dogtag/tps-ui/shared/docroot/esc/home/style.css | 213 ---------------- dogtag/tps-ui/shared/docroot/esc/so/style.css | 213 ---------------- dogtag/tps-ui/shared/docroot/esc/sow/css/style.css | 277 --------------------- dogtag/tps-ui/shared/docroot/esc/sow/style.css | 213 ---------------- dogtag/tps-ui/shared/docroot/esc/style.css | 196 --------------- 12 files changed, 1325 insertions(+), 1325 deletions(-) create mode 100755 dogtag/common-ui/shared/esc/demo/style.css create mode 100755 dogtag/common-ui/shared/esc/home/style.css create mode 100755 dogtag/common-ui/shared/esc/so/style.css create mode 100644 dogtag/common-ui/shared/esc/sow/css/style.css create mode 100755 dogtag/common-ui/shared/esc/sow/style.css create mode 100755 dogtag/common-ui/shared/style.css delete mode 100755 dogtag/tps-ui/shared/docroot/esc/demo/style.css delete mode 100755 dogtag/tps-ui/shared/docroot/esc/home/style.css delete mode 100755 dogtag/tps-ui/shared/docroot/esc/so/style.css delete mode 100644 dogtag/tps-ui/shared/docroot/esc/sow/css/style.css delete mode 100755 dogtag/tps-ui/shared/docroot/esc/sow/style.css delete mode 100755 dogtag/tps-ui/shared/docroot/esc/style.css diff --git a/dogtag/common-ui/shared/esc/demo/style.css b/dogtag/common-ui/shared/esc/demo/style.css new file mode 100755 index 000000000..bcd289bdb --- /dev/null +++ b/dogtag/common-ui/shared/esc/demo/style.css @@ -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 --- + */ + +body { +background-color: grey; + font-family: arial; + font-size: 7p + +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + +h2 { + font-size: 12pt; +} + +.logobar { + + background-color:black; + font-family: "Arial"; + font-size: 7p; + +} + +.headerText { + font-family: "Arial"; + font-size: 14pt; + font-weight: bold; + color: white; +} + +.titleText { + font-family: "Arial"; + font-size: 10pt; +} + +.bodyText { + font-family: "Arial"; + font-size: 10pt; + color: white; +} + +.formText { + font-family: "Arial"; + font-size: 9pt; + color: black; + +} + +.linkText { + font-family: "Arial"; + font-size: 8pt; +} + +#BindingTable { + background-color: #ffffff ; + font-size: 7pt; +} + +#BindingTable th { + color: rgb(0, 0, 0); + background-color: #fffffe; + font-size: 7pt; +} + +#BindingTable tr { + background-color: #fffffe; + font-size: 7pt; +} + +tr [COOLKeyPresent="yes"]{ + background-color: rgb(255, 0, 0); +} + +.cylon { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; +} + +.cylonEye { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); +} + +#statusMsg { + font-weight: bold; +} + +.ProgressMeter { + position: relative; + padding: 0px; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; + text-align: center; +} + +.ProgressBar { + position: absolute; + z-index: 0; + top: 0px; + left: 0px; + border-right: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); + margin: 0px; +} + +.ProgressBarStatus { + position: relative; + z-index: 10; + margin: 0px; + padding: 0px; + +} + +.KeyTableHeader { + color: rgb(0,0, 0); + background-color: #ffffff; + text-align: left; +} + +#KeyTable td { + background-color: #ffffff; + padding-left: 3px; + padding-right: 3px; +}; + +.TableDescriptionPanel { + background-color: #ffffff); + margin-right: 5px; + margin-left: 5px; + margin-bottom: 0px; + margin-bottom: 5px; + padding: 5px; +} + +.PurchasePanel { + width: 100%; + text-align: center; + padding-top: 5px; + padding-bottom: 5px; +} + +.NeedQuestionText { + font-size: 16pt; + font-weight: bold; +} + +.COOLHeaderText { + font-family: "Arial"; + font-size: 20pt; + font-weight: bold; +} + +.ContentTable { + background-color: #ffffff; + margin: 0px; +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + + +table { + font-family: "Arial"; + font-size: 8pt; +} + +.TableTitle { + font-size: 12pt; + font-weight: bold; +} + +.PageHeader { + width: 100%; + border-bottom: solid black 1px; + vertical-align: center; + background-color: #ffffff; +} diff --git a/dogtag/common-ui/shared/esc/home/style.css b/dogtag/common-ui/shared/esc/home/style.css new file mode 100755 index 000000000..bcd289bdb --- /dev/null +++ b/dogtag/common-ui/shared/esc/home/style.css @@ -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 --- + */ + +body { +background-color: grey; + font-family: arial; + font-size: 7p + +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + +h2 { + font-size: 12pt; +} + +.logobar { + + background-color:black; + font-family: "Arial"; + font-size: 7p; + +} + +.headerText { + font-family: "Arial"; + font-size: 14pt; + font-weight: bold; + color: white; +} + +.titleText { + font-family: "Arial"; + font-size: 10pt; +} + +.bodyText { + font-family: "Arial"; + font-size: 10pt; + color: white; +} + +.formText { + font-family: "Arial"; + font-size: 9pt; + color: black; + +} + +.linkText { + font-family: "Arial"; + font-size: 8pt; +} + +#BindingTable { + background-color: #ffffff ; + font-size: 7pt; +} + +#BindingTable th { + color: rgb(0, 0, 0); + background-color: #fffffe; + font-size: 7pt; +} + +#BindingTable tr { + background-color: #fffffe; + font-size: 7pt; +} + +tr [COOLKeyPresent="yes"]{ + background-color: rgb(255, 0, 0); +} + +.cylon { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; +} + +.cylonEye { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); +} + +#statusMsg { + font-weight: bold; +} + +.ProgressMeter { + position: relative; + padding: 0px; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; + text-align: center; +} + +.ProgressBar { + position: absolute; + z-index: 0; + top: 0px; + left: 0px; + border-right: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); + margin: 0px; +} + +.ProgressBarStatus { + position: relative; + z-index: 10; + margin: 0px; + padding: 0px; + +} + +.KeyTableHeader { + color: rgb(0,0, 0); + background-color: #ffffff; + text-align: left; +} + +#KeyTable td { + background-color: #ffffff; + padding-left: 3px; + padding-right: 3px; +}; + +.TableDescriptionPanel { + background-color: #ffffff); + margin-right: 5px; + margin-left: 5px; + margin-bottom: 0px; + margin-bottom: 5px; + padding: 5px; +} + +.PurchasePanel { + width: 100%; + text-align: center; + padding-top: 5px; + padding-bottom: 5px; +} + +.NeedQuestionText { + font-size: 16pt; + font-weight: bold; +} + +.COOLHeaderText { + font-family: "Arial"; + font-size: 20pt; + font-weight: bold; +} + +.ContentTable { + background-color: #ffffff; + margin: 0px; +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + + +table { + font-family: "Arial"; + font-size: 8pt; +} + +.TableTitle { + font-size: 12pt; + font-weight: bold; +} + +.PageHeader { + width: 100%; + border-bottom: solid black 1px; + vertical-align: center; + background-color: #ffffff; +} diff --git a/dogtag/common-ui/shared/esc/so/style.css b/dogtag/common-ui/shared/esc/so/style.css new file mode 100755 index 000000000..bcd289bdb --- /dev/null +++ b/dogtag/common-ui/shared/esc/so/style.css @@ -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 --- + */ + +body { +background-color: grey; + font-family: arial; + font-size: 7p + +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + +h2 { + font-size: 12pt; +} + +.logobar { + + background-color:black; + font-family: "Arial"; + font-size: 7p; + +} + +.headerText { + font-family: "Arial"; + font-size: 14pt; + font-weight: bold; + color: white; +} + +.titleText { + font-family: "Arial"; + font-size: 10pt; +} + +.bodyText { + font-family: "Arial"; + font-size: 10pt; + color: white; +} + +.formText { + font-family: "Arial"; + font-size: 9pt; + color: black; + +} + +.linkText { + font-family: "Arial"; + font-size: 8pt; +} + +#BindingTable { + background-color: #ffffff ; + font-size: 7pt; +} + +#BindingTable th { + color: rgb(0, 0, 0); + background-color: #fffffe; + font-size: 7pt; +} + +#BindingTable tr { + background-color: #fffffe; + font-size: 7pt; +} + +tr [COOLKeyPresent="yes"]{ + background-color: rgb(255, 0, 0); +} + +.cylon { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; +} + +.cylonEye { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); +} + +#statusMsg { + font-weight: bold; +} + +.ProgressMeter { + position: relative; + padding: 0px; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; + text-align: center; +} + +.ProgressBar { + position: absolute; + z-index: 0; + top: 0px; + left: 0px; + border-right: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); + margin: 0px; +} + +.ProgressBarStatus { + position: relative; + z-index: 10; + margin: 0px; + padding: 0px; + +} + +.KeyTableHeader { + color: rgb(0,0, 0); + background-color: #ffffff; + text-align: left; +} + +#KeyTable td { + background-color: #ffffff; + padding-left: 3px; + padding-right: 3px; +}; + +.TableDescriptionPanel { + background-color: #ffffff); + margin-right: 5px; + margin-left: 5px; + margin-bottom: 0px; + margin-bottom: 5px; + padding: 5px; +} + +.PurchasePanel { + width: 100%; + text-align: center; + padding-top: 5px; + padding-bottom: 5px; +} + +.NeedQuestionText { + font-size: 16pt; + font-weight: bold; +} + +.COOLHeaderText { + font-family: "Arial"; + font-size: 20pt; + font-weight: bold; +} + +.ContentTable { + background-color: #ffffff; + margin: 0px; +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + + +table { + font-family: "Arial"; + font-size: 8pt; +} + +.TableTitle { + font-size: 12pt; + font-weight: bold; +} + +.PageHeader { + width: 100%; + border-bottom: solid black 1px; + vertical-align: center; + background-color: #ffffff; +} diff --git a/dogtag/common-ui/shared/esc/sow/css/style.css b/dogtag/common-ui/shared/esc/sow/css/style.css new file mode 100644 index 000000000..c60e713d2 --- /dev/null +++ b/dogtag/common-ui/shared/esc/sow/css/style.css @@ -0,0 +1,277 @@ +html, body { + margin: 0; padding: 0; + text-align: center; + background-color: #A1B3C9; +} + +h1,h3,h3 { + margin: 0; padding: 0; +} + +#content { + width: 450px; +/* + width: 760px; +*/ + text-align: center; + margin: auto; +} + +#header{ + +/* + width: 760px; + height: 50px; +*/ + width: 300px; + height: 30px; + text-align: left; + margin: auto; + } + +#logo{ + float: left; + height: auto; +/* + width: 250px; +*/ + width: 450px; + margin: 5px; + padding-top: 10px; + padding-right: 0px; + padding-bottom: 0px; + font-size:1.5em; +/* + padding-left: 10px; +*/ + padding-left: 5px; +} + +#topmenu{ + width: 450px; + top: 5px; +/* + width: 400px; + margin-left: 310px; +*/ + margin-left: 0px; + padding-top: 5px; + padding-right: 0px; + font-size:1.5em; +/* + padding-left: 30px; +*/ + padding-left: 0px; + font-family:"Lucida Grande","Lucida Sans Unicode",arial,sans-serif; + font-size:1.0em; + color:#DBDFEE; + +} + +#topmenu a{ + text-decoration:none; + color:#DBDFEE; + +} + +#topmenu a:hover{ + color:#ffffff; + background-color:#939FB2; + +} + + +#content { +/* + margin-top: 40px; +*/ + margin-top: 10px; + padding-bottom: 40px; +} + + +#maintext { + width: 450px; +/* + width: 520px; + margin-left: 20px; +*/ + margin-left: 5px; + text-align:justify; +} + +#maintext a{ + text-decoration:none; + color:#ffffff; + border-bottom:1px dotted #ffffff; +} + +#maintext a:hover{ + color:#ffffff; + background-color:#939FB2; + +} + +#rightcol { +/* + width: 168px; +*/ + width: 0px; + position: absolute; + top: 140px; + margin-left: 575px; + background: url(/esc/sow/images/right_bg.gif) no-repeat; +} + + +#introduction{ + float:right; + width:150px; + padding: 8px 8px 8px 8px; + margin:auto; + + text-align:center; + line-height:1.5em; + color:#ffffff; + font-size:0.8em; + font-family:"Lucida Grande","Lucida Sans Unicode",arial,sans-serif; + letter-spacing:0px; +} + +#introduction ul, #introduction li { + text-align:center; + list-style: none; + margin: 0; + padding: 0; +} + + +#introduction a{ + text-decoration:none; + color:#ffffff; + border-bottom: none; +} + +#introduction a:hover{ + color:#ffffff; + background-color:#939FB2; + +} + +#introduction h3{ + text-align: center; + position:static; +} + + +html, body { + font: .85em/1.6em Arial, Helvetica, sans-serif; +/* + font: .95em/1.6em Arial, Helvetica, sans-serif; + color: #FFFFFF; +*/ +} + + +p { + margin-bottom: 1em; +} + +#footer +{ + width: 100%; + height: 60px; + clear: both; + padding-top: 8px; + text-align: center; + border-top: 1px solid #C6D4E6; + color: #000000; + font-size: .75em; + background-color: #414243; + background-image: url(/esc/sow/images/footer.gif); +} + +#footer a { + color: #888888; + text-decoration:none; + +} + +#footer p {color: #888888;} + +html, body { + background: #A1B3C9 url(/esc/sow/images/bg_grad.gif) repeat-x; +} + +#content {background: url(/esc/sow/images/main_grad.gif) repeat-x;} + +html>body #content { + margin-top: 40px; +} + +h1{ + font-family:"Trebuchet MS",arial,sans-serif; + font-size:2.6em; + font-weight:normal; + background:#fff url(/esc/sow/images/booksmall.gif) no-repeat bottom left; + padding:0 0 10px 50px; + margin:20px 5px 5px 5px; +} + +h2{ + font-family:"Lucida Grande","Lucida Sans Unicode",arial,sans-serif; + font-size:1.2em; + margin:auto; + text-transform:capitalize; + padding:0 2px; +} + +h3{ + color: #ffffff; + font-family:geneva,arial,sans-serif; + font-weight:normal; + text-transform:uppercase; + word-spacing:4px; + letter-spacing:3px; + font-size:0.9em; + font-weight:bold; + padding:0 2px; + margin:0; +} + +.heading{ + color: #ffffff; + font-family:geneva,arial,sans-serif; + font-weight:normal; + text-transform:uppercase; + word-spacing:4px; + letter-spacing:3px; + font-size:0.9em; + font-weight:bold; + padding:0 2px; + margin:0; +} + +blockquote +{ + border-left: 4px #c7d2ea solid; + padding: 0 0 0 10px; +/* + margin: 10px 20px 10px 20px; +*/ + margin: 5px 20px 10px 20px; + letter-spacing: 0px; + white-space:inherit; + font-size:1.3em; +} + +h4 +{ + font-weight: bold; + font-size: 25px; + text-transform: capitalize; + color: #DBDFEE; + margin: 0; + padding: 0; + letter-spacing: 3px; +} diff --git a/dogtag/common-ui/shared/esc/sow/style.css b/dogtag/common-ui/shared/esc/sow/style.css new file mode 100755 index 000000000..bcd289bdb --- /dev/null +++ b/dogtag/common-ui/shared/esc/sow/style.css @@ -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 --- + */ + +body { +background-color: grey; + font-family: arial; + font-size: 7p + +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + +h2 { + font-size: 12pt; +} + +.logobar { + + background-color:black; + font-family: "Arial"; + font-size: 7p; + +} + +.headerText { + font-family: "Arial"; + font-size: 14pt; + font-weight: bold; + color: white; +} + +.titleText { + font-family: "Arial"; + font-size: 10pt; +} + +.bodyText { + font-family: "Arial"; + font-size: 10pt; + color: white; +} + +.formText { + font-family: "Arial"; + font-size: 9pt; + color: black; + +} + +.linkText { + font-family: "Arial"; + font-size: 8pt; +} + +#BindingTable { + background-color: #ffffff ; + font-size: 7pt; +} + +#BindingTable th { + color: rgb(0, 0, 0); + background-color: #fffffe; + font-size: 7pt; +} + +#BindingTable tr { + background-color: #fffffe; + font-size: 7pt; +} + +tr [COOLKeyPresent="yes"]{ + background-color: rgb(255, 0, 0); +} + +.cylon { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; +} + +.cylonEye { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); +} + +#statusMsg { + font-weight: bold; +} + +.ProgressMeter { + position: relative; + padding: 0px; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; + text-align: center; +} + +.ProgressBar { + position: absolute; + z-index: 0; + top: 0px; + left: 0px; + border-right: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); + margin: 0px; +} + +.ProgressBarStatus { + position: relative; + z-index: 10; + margin: 0px; + padding: 0px; + +} + +.KeyTableHeader { + color: rgb(0,0, 0); + background-color: #ffffff; + text-align: left; +} + +#KeyTable td { + background-color: #ffffff; + padding-left: 3px; + padding-right: 3px; +}; + +.TableDescriptionPanel { + background-color: #ffffff); + margin-right: 5px; + margin-left: 5px; + margin-bottom: 0px; + margin-bottom: 5px; + padding: 5px; +} + +.PurchasePanel { + width: 100%; + text-align: center; + padding-top: 5px; + padding-bottom: 5px; +} + +.NeedQuestionText { + font-size: 16pt; + font-weight: bold; +} + +.COOLHeaderText { + font-family: "Arial"; + font-size: 20pt; + font-weight: bold; +} + +.ContentTable { + background-color: #ffffff; + margin: 0px; +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + + +table { + font-family: "Arial"; + font-size: 8pt; +} + +.TableTitle { + font-size: 12pt; + font-weight: bold; +} + +.PageHeader { + width: 100%; + border-bottom: solid black 1px; + vertical-align: center; + background-color: #ffffff; +} diff --git a/dogtag/common-ui/shared/style.css b/dogtag/common-ui/shared/style.css new file mode 100755 index 000000000..90a1358df --- /dev/null +++ b/dogtag/common-ui/shared/style.css @@ -0,0 +1,196 @@ +/* --- 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 --- + */ + +body { +background: #ffffff url(/pki/esc/images/bg.jpg) repeat-x; + font-family: arial; + font-size: 7p + +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + +h2 { + font-size: 12pt; +} + +.headerText { + font-family: "Arial"; + font-size: 12pt; + font-weight: bold; +} + +.titleText { + font-family: "Arial"; + font-size: 10pt; +} + +.bodyText { + font-family: "Arial"; + font-size: 8pt; +} + +.linkText { + font-family: "Arial"; + font-size: 8pt; +} + +#BindingTable { + background-color: #ffffff ; + font-size: 7pt; +} + +#BindingTable th { + color: rgb(0, 0, 0); + background-color: #fffffe; + font-size: 7pt; +} + +#BindingTable tr { + background-color: #fffffe; + font-size: 7pt; +} + +tr [COOLKeyPresent="yes"]{ + background-color: rgb(255, 0, 0); +} + +.cylon { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; +} + +.cylonEye { + font-size: 4pt; + position: relative; + border: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); +} + +#statusMsg { + font-weight: bold; +} + +.ProgressMeter { + position: relative; + padding: 0px; + border: 1px solid rgb(60, 60, 60); + background-color: #ffffff; + text-align: center; +} + +.ProgressBar { + position: absolute; + z-index: 0; + top: 0px; + left: 0px; + border-right: 1px solid rgb(60, 60, 60); + background-color: rgb(0, 128, 192); + margin: 0px; +} + +.ProgressBarStatus { + position: relative; + z-index: 10; + margin: 0px; + padding: 0px; + +} + +.KeyTableHeader { + color: rgb(0,0, 0); + background-color: #ffffff; + text-align: left; +} + +#KeyTable td { + background-color: #ffffff; + padding-left: 3px; + padding-right: 3px; +}; + +.TableDescriptionPanel { + background-color: #ffffff); + margin-right: 5px; + margin-left: 5px; + margin-bottom: 0px; + margin-bottom: 5px; + padding: 5px; +} + +.PurchasePanel { + width: 100%; + text-align: center; + padding-top: 5px; + padding-bottom: 5px; +} + +.NeedQuestionText { + font-size: 16pt; + font-weight: bold; +} + +.COOLHeaderText { + font-family: "Arial"; + font-size: 20pt; + font-weight: bold; +} + +.ContentTable { + background-color: #ffffff; + margin: 0px; +} + +form { + margin: 0px; + padding: 0px; +}; + +* { + font-family: "Arial"; + font-size: 8pt; +} + + +table { + font-family: "Arial"; + font-size: 8pt; +} + +.TableTitle { + font-size: 12pt; + font-weight: bold; +} + +.PageHeader { + width: 100%; + border-bottom: solid black 1px; + vertical-align: center; + background-color: #ffffff; +} diff --git a/dogtag/tps-ui/shared/docroot/esc/demo/style.css b/dogtag/tps-ui/shared/docroot/esc/demo/style.css deleted file mode 100755 index bcd289bdb..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/demo/style.css +++ /dev/null @@ -1,213 +0,0 @@ -/* --- 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 --- - */ - -body { -background-color: grey; - font-family: arial; - font-size: 7p - -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - -h2 { - font-size: 12pt; -} - -.logobar { - - background-color:black; - font-family: "Arial"; - font-size: 7p; - -} - -.headerText { - font-family: "Arial"; - font-size: 14pt; - font-weight: bold; - color: white; -} - -.titleText { - font-family: "Arial"; - font-size: 10pt; -} - -.bodyText { - font-family: "Arial"; - font-size: 10pt; - color: white; -} - -.formText { - font-family: "Arial"; - font-size: 9pt; - color: black; - -} - -.linkText { - font-family: "Arial"; - font-size: 8pt; -} - -#BindingTable { - background-color: #ffffff ; - font-size: 7pt; -} - -#BindingTable th { - color: rgb(0, 0, 0); - background-color: #fffffe; - font-size: 7pt; -} - -#BindingTable tr { - background-color: #fffffe; - font-size: 7pt; -} - -tr [COOLKeyPresent="yes"]{ - background-color: rgb(255, 0, 0); -} - -.cylon { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; -} - -.cylonEye { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); -} - -#statusMsg { - font-weight: bold; -} - -.ProgressMeter { - position: relative; - padding: 0px; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; - text-align: center; -} - -.ProgressBar { - position: absolute; - z-index: 0; - top: 0px; - left: 0px; - border-right: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); - margin: 0px; -} - -.ProgressBarStatus { - position: relative; - z-index: 10; - margin: 0px; - padding: 0px; - -} - -.KeyTableHeader { - color: rgb(0,0, 0); - background-color: #ffffff; - text-align: left; -} - -#KeyTable td { - background-color: #ffffff; - padding-left: 3px; - padding-right: 3px; -}; - -.TableDescriptionPanel { - background-color: #ffffff); - margin-right: 5px; - margin-left: 5px; - margin-bottom: 0px; - margin-bottom: 5px; - padding: 5px; -} - -.PurchasePanel { - width: 100%; - text-align: center; - padding-top: 5px; - padding-bottom: 5px; -} - -.NeedQuestionText { - font-size: 16pt; - font-weight: bold; -} - -.COOLHeaderText { - font-family: "Arial"; - font-size: 20pt; - font-weight: bold; -} - -.ContentTable { - background-color: #ffffff; - margin: 0px; -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - - -table { - font-family: "Arial"; - font-size: 8pt; -} - -.TableTitle { - font-size: 12pt; - font-weight: bold; -} - -.PageHeader { - width: 100%; - border-bottom: solid black 1px; - vertical-align: center; - background-color: #ffffff; -} diff --git a/dogtag/tps-ui/shared/docroot/esc/home/style.css b/dogtag/tps-ui/shared/docroot/esc/home/style.css deleted file mode 100755 index bcd289bdb..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/home/style.css +++ /dev/null @@ -1,213 +0,0 @@ -/* --- 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 --- - */ - -body { -background-color: grey; - font-family: arial; - font-size: 7p - -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - -h2 { - font-size: 12pt; -} - -.logobar { - - background-color:black; - font-family: "Arial"; - font-size: 7p; - -} - -.headerText { - font-family: "Arial"; - font-size: 14pt; - font-weight: bold; - color: white; -} - -.titleText { - font-family: "Arial"; - font-size: 10pt; -} - -.bodyText { - font-family: "Arial"; - font-size: 10pt; - color: white; -} - -.formText { - font-family: "Arial"; - font-size: 9pt; - color: black; - -} - -.linkText { - font-family: "Arial"; - font-size: 8pt; -} - -#BindingTable { - background-color: #ffffff ; - font-size: 7pt; -} - -#BindingTable th { - color: rgb(0, 0, 0); - background-color: #fffffe; - font-size: 7pt; -} - -#BindingTable tr { - background-color: #fffffe; - font-size: 7pt; -} - -tr [COOLKeyPresent="yes"]{ - background-color: rgb(255, 0, 0); -} - -.cylon { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; -} - -.cylonEye { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); -} - -#statusMsg { - font-weight: bold; -} - -.ProgressMeter { - position: relative; - padding: 0px; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; - text-align: center; -} - -.ProgressBar { - position: absolute; - z-index: 0; - top: 0px; - left: 0px; - border-right: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); - margin: 0px; -} - -.ProgressBarStatus { - position: relative; - z-index: 10; - margin: 0px; - padding: 0px; - -} - -.KeyTableHeader { - color: rgb(0,0, 0); - background-color: #ffffff; - text-align: left; -} - -#KeyTable td { - background-color: #ffffff; - padding-left: 3px; - padding-right: 3px; -}; - -.TableDescriptionPanel { - background-color: #ffffff); - margin-right: 5px; - margin-left: 5px; - margin-bottom: 0px; - margin-bottom: 5px; - padding: 5px; -} - -.PurchasePanel { - width: 100%; - text-align: center; - padding-top: 5px; - padding-bottom: 5px; -} - -.NeedQuestionText { - font-size: 16pt; - font-weight: bold; -} - -.COOLHeaderText { - font-family: "Arial"; - font-size: 20pt; - font-weight: bold; -} - -.ContentTable { - background-color: #ffffff; - margin: 0px; -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - - -table { - font-family: "Arial"; - font-size: 8pt; -} - -.TableTitle { - font-size: 12pt; - font-weight: bold; -} - -.PageHeader { - width: 100%; - border-bottom: solid black 1px; - vertical-align: center; - background-color: #ffffff; -} diff --git a/dogtag/tps-ui/shared/docroot/esc/so/style.css b/dogtag/tps-ui/shared/docroot/esc/so/style.css deleted file mode 100755 index bcd289bdb..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/so/style.css +++ /dev/null @@ -1,213 +0,0 @@ -/* --- 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 --- - */ - -body { -background-color: grey; - font-family: arial; - font-size: 7p - -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - -h2 { - font-size: 12pt; -} - -.logobar { - - background-color:black; - font-family: "Arial"; - font-size: 7p; - -} - -.headerText { - font-family: "Arial"; - font-size: 14pt; - font-weight: bold; - color: white; -} - -.titleText { - font-family: "Arial"; - font-size: 10pt; -} - -.bodyText { - font-family: "Arial"; - font-size: 10pt; - color: white; -} - -.formText { - font-family: "Arial"; - font-size: 9pt; - color: black; - -} - -.linkText { - font-family: "Arial"; - font-size: 8pt; -} - -#BindingTable { - background-color: #ffffff ; - font-size: 7pt; -} - -#BindingTable th { - color: rgb(0, 0, 0); - background-color: #fffffe; - font-size: 7pt; -} - -#BindingTable tr { - background-color: #fffffe; - font-size: 7pt; -} - -tr [COOLKeyPresent="yes"]{ - background-color: rgb(255, 0, 0); -} - -.cylon { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; -} - -.cylonEye { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); -} - -#statusMsg { - font-weight: bold; -} - -.ProgressMeter { - position: relative; - padding: 0px; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; - text-align: center; -} - -.ProgressBar { - position: absolute; - z-index: 0; - top: 0px; - left: 0px; - border-right: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); - margin: 0px; -} - -.ProgressBarStatus { - position: relative; - z-index: 10; - margin: 0px; - padding: 0px; - -} - -.KeyTableHeader { - color: rgb(0,0, 0); - background-color: #ffffff; - text-align: left; -} - -#KeyTable td { - background-color: #ffffff; - padding-left: 3px; - padding-right: 3px; -}; - -.TableDescriptionPanel { - background-color: #ffffff); - margin-right: 5px; - margin-left: 5px; - margin-bottom: 0px; - margin-bottom: 5px; - padding: 5px; -} - -.PurchasePanel { - width: 100%; - text-align: center; - padding-top: 5px; - padding-bottom: 5px; -} - -.NeedQuestionText { - font-size: 16pt; - font-weight: bold; -} - -.COOLHeaderText { - font-family: "Arial"; - font-size: 20pt; - font-weight: bold; -} - -.ContentTable { - background-color: #ffffff; - margin: 0px; -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - - -table { - font-family: "Arial"; - font-size: 8pt; -} - -.TableTitle { - font-size: 12pt; - font-weight: bold; -} - -.PageHeader { - width: 100%; - border-bottom: solid black 1px; - vertical-align: center; - background-color: #ffffff; -} diff --git a/dogtag/tps-ui/shared/docroot/esc/sow/css/style.css b/dogtag/tps-ui/shared/docroot/esc/sow/css/style.css deleted file mode 100644 index c60e713d2..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/sow/css/style.css +++ /dev/null @@ -1,277 +0,0 @@ -html, body { - margin: 0; padding: 0; - text-align: center; - background-color: #A1B3C9; -} - -h1,h3,h3 { - margin: 0; padding: 0; -} - -#content { - width: 450px; -/* - width: 760px; -*/ - text-align: center; - margin: auto; -} - -#header{ - -/* - width: 760px; - height: 50px; -*/ - width: 300px; - height: 30px; - text-align: left; - margin: auto; - } - -#logo{ - float: left; - height: auto; -/* - width: 250px; -*/ - width: 450px; - margin: 5px; - padding-top: 10px; - padding-right: 0px; - padding-bottom: 0px; - font-size:1.5em; -/* - padding-left: 10px; -*/ - padding-left: 5px; -} - -#topmenu{ - width: 450px; - top: 5px; -/* - width: 400px; - margin-left: 310px; -*/ - margin-left: 0px; - padding-top: 5px; - padding-right: 0px; - font-size:1.5em; -/* - padding-left: 30px; -*/ - padding-left: 0px; - font-family:"Lucida Grande","Lucida Sans Unicode",arial,sans-serif; - font-size:1.0em; - color:#DBDFEE; - -} - -#topmenu a{ - text-decoration:none; - color:#DBDFEE; - -} - -#topmenu a:hover{ - color:#ffffff; - background-color:#939FB2; - -} - - -#content { -/* - margin-top: 40px; -*/ - margin-top: 10px; - padding-bottom: 40px; -} - - -#maintext { - width: 450px; -/* - width: 520px; - margin-left: 20px; -*/ - margin-left: 5px; - text-align:justify; -} - -#maintext a{ - text-decoration:none; - color:#ffffff; - border-bottom:1px dotted #ffffff; -} - -#maintext a:hover{ - color:#ffffff; - background-color:#939FB2; - -} - -#rightcol { -/* - width: 168px; -*/ - width: 0px; - position: absolute; - top: 140px; - margin-left: 575px; - background: url(/esc/sow/images/right_bg.gif) no-repeat; -} - - -#introduction{ - float:right; - width:150px; - padding: 8px 8px 8px 8px; - margin:auto; - - text-align:center; - line-height:1.5em; - color:#ffffff; - font-size:0.8em; - font-family:"Lucida Grande","Lucida Sans Unicode",arial,sans-serif; - letter-spacing:0px; -} - -#introduction ul, #introduction li { - text-align:center; - list-style: none; - margin: 0; - padding: 0; -} - - -#introduction a{ - text-decoration:none; - color:#ffffff; - border-bottom: none; -} - -#introduction a:hover{ - color:#ffffff; - background-color:#939FB2; - -} - -#introduction h3{ - text-align: center; - position:static; -} - - -html, body { - font: .85em/1.6em Arial, Helvetica, sans-serif; -/* - font: .95em/1.6em Arial, Helvetica, sans-serif; - color: #FFFFFF; -*/ -} - - -p { - margin-bottom: 1em; -} - -#footer -{ - width: 100%; - height: 60px; - clear: both; - padding-top: 8px; - text-align: center; - border-top: 1px solid #C6D4E6; - color: #000000; - font-size: .75em; - background-color: #414243; - background-image: url(/esc/sow/images/footer.gif); -} - -#footer a { - color: #888888; - text-decoration:none; - -} - -#footer p {color: #888888;} - -html, body { - background: #A1B3C9 url(/esc/sow/images/bg_grad.gif) repeat-x; -} - -#content {background: url(/esc/sow/images/main_grad.gif) repeat-x;} - -html>body #content { - margin-top: 40px; -} - -h1{ - font-family:"Trebuchet MS",arial,sans-serif; - font-size:2.6em; - font-weight:normal; - background:#fff url(/esc/sow/images/booksmall.gif) no-repeat bottom left; - padding:0 0 10px 50px; - margin:20px 5px 5px 5px; -} - -h2{ - font-family:"Lucida Grande","Lucida Sans Unicode",arial,sans-serif; - font-size:1.2em; - margin:auto; - text-transform:capitalize; - padding:0 2px; -} - -h3{ - color: #ffffff; - font-family:geneva,arial,sans-serif; - font-weight:normal; - text-transform:uppercase; - word-spacing:4px; - letter-spacing:3px; - font-size:0.9em; - font-weight:bold; - padding:0 2px; - margin:0; -} - -.heading{ - color: #ffffff; - font-family:geneva,arial,sans-serif; - font-weight:normal; - text-transform:uppercase; - word-spacing:4px; - letter-spacing:3px; - font-size:0.9em; - font-weight:bold; - padding:0 2px; - margin:0; -} - -blockquote -{ - border-left: 4px #c7d2ea solid; - padding: 0 0 0 10px; -/* - margin: 10px 20px 10px 20px; -*/ - margin: 5px 20px 10px 20px; - letter-spacing: 0px; - white-space:inherit; - font-size:1.3em; -} - -h4 -{ - font-weight: bold; - font-size: 25px; - text-transform: capitalize; - color: #DBDFEE; - margin: 0; - padding: 0; - letter-spacing: 3px; -} diff --git a/dogtag/tps-ui/shared/docroot/esc/sow/style.css b/dogtag/tps-ui/shared/docroot/esc/sow/style.css deleted file mode 100755 index bcd289bdb..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/sow/style.css +++ /dev/null @@ -1,213 +0,0 @@ -/* --- 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 --- - */ - -body { -background-color: grey; - font-family: arial; - font-size: 7p - -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - -h2 { - font-size: 12pt; -} - -.logobar { - - background-color:black; - font-family: "Arial"; - font-size: 7p; - -} - -.headerText { - font-family: "Arial"; - font-size: 14pt; - font-weight: bold; - color: white; -} - -.titleText { - font-family: "Arial"; - font-size: 10pt; -} - -.bodyText { - font-family: "Arial"; - font-size: 10pt; - color: white; -} - -.formText { - font-family: "Arial"; - font-size: 9pt; - color: black; - -} - -.linkText { - font-family: "Arial"; - font-size: 8pt; -} - -#BindingTable { - background-color: #ffffff ; - font-size: 7pt; -} - -#BindingTable th { - color: rgb(0, 0, 0); - background-color: #fffffe; - font-size: 7pt; -} - -#BindingTable tr { - background-color: #fffffe; - font-size: 7pt; -} - -tr [COOLKeyPresent="yes"]{ - background-color: rgb(255, 0, 0); -} - -.cylon { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; -} - -.cylonEye { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); -} - -#statusMsg { - font-weight: bold; -} - -.ProgressMeter { - position: relative; - padding: 0px; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; - text-align: center; -} - -.ProgressBar { - position: absolute; - z-index: 0; - top: 0px; - left: 0px; - border-right: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); - margin: 0px; -} - -.ProgressBarStatus { - position: relative; - z-index: 10; - margin: 0px; - padding: 0px; - -} - -.KeyTableHeader { - color: rgb(0,0, 0); - background-color: #ffffff; - text-align: left; -} - -#KeyTable td { - background-color: #ffffff; - padding-left: 3px; - padding-right: 3px; -}; - -.TableDescriptionPanel { - background-color: #ffffff); - margin-right: 5px; - margin-left: 5px; - margin-bottom: 0px; - margin-bottom: 5px; - padding: 5px; -} - -.PurchasePanel { - width: 100%; - text-align: center; - padding-top: 5px; - padding-bottom: 5px; -} - -.NeedQuestionText { - font-size: 16pt; - font-weight: bold; -} - -.COOLHeaderText { - font-family: "Arial"; - font-size: 20pt; - font-weight: bold; -} - -.ContentTable { - background-color: #ffffff; - margin: 0px; -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - - -table { - font-family: "Arial"; - font-size: 8pt; -} - -.TableTitle { - font-size: 12pt; - font-weight: bold; -} - -.PageHeader { - width: 100%; - border-bottom: solid black 1px; - vertical-align: center; - background-color: #ffffff; -} diff --git a/dogtag/tps-ui/shared/docroot/esc/style.css b/dogtag/tps-ui/shared/docroot/esc/style.css deleted file mode 100755 index 90a1358df..000000000 --- a/dogtag/tps-ui/shared/docroot/esc/style.css +++ /dev/null @@ -1,196 +0,0 @@ -/* --- 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 --- - */ - -body { -background: #ffffff url(/pki/esc/images/bg.jpg) repeat-x; - font-family: arial; - font-size: 7p - -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - -h2 { - font-size: 12pt; -} - -.headerText { - font-family: "Arial"; - font-size: 12pt; - font-weight: bold; -} - -.titleText { - font-family: "Arial"; - font-size: 10pt; -} - -.bodyText { - font-family: "Arial"; - font-size: 8pt; -} - -.linkText { - font-family: "Arial"; - font-size: 8pt; -} - -#BindingTable { - background-color: #ffffff ; - font-size: 7pt; -} - -#BindingTable th { - color: rgb(0, 0, 0); - background-color: #fffffe; - font-size: 7pt; -} - -#BindingTable tr { - background-color: #fffffe; - font-size: 7pt; -} - -tr [COOLKeyPresent="yes"]{ - background-color: rgb(255, 0, 0); -} - -.cylon { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; -} - -.cylonEye { - font-size: 4pt; - position: relative; - border: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); -} - -#statusMsg { - font-weight: bold; -} - -.ProgressMeter { - position: relative; - padding: 0px; - border: 1px solid rgb(60, 60, 60); - background-color: #ffffff; - text-align: center; -} - -.ProgressBar { - position: absolute; - z-index: 0; - top: 0px; - left: 0px; - border-right: 1px solid rgb(60, 60, 60); - background-color: rgb(0, 128, 192); - margin: 0px; -} - -.ProgressBarStatus { - position: relative; - z-index: 10; - margin: 0px; - padding: 0px; - -} - -.KeyTableHeader { - color: rgb(0,0, 0); - background-color: #ffffff; - text-align: left; -} - -#KeyTable td { - background-color: #ffffff; - padding-left: 3px; - padding-right: 3px; -}; - -.TableDescriptionPanel { - background-color: #ffffff); - margin-right: 5px; - margin-left: 5px; - margin-bottom: 0px; - margin-bottom: 5px; - padding: 5px; -} - -.PurchasePanel { - width: 100%; - text-align: center; - padding-top: 5px; - padding-bottom: 5px; -} - -.NeedQuestionText { - font-size: 16pt; - font-weight: bold; -} - -.COOLHeaderText { - font-family: "Arial"; - font-size: 20pt; - font-weight: bold; -} - -.ContentTable { - background-color: #ffffff; - margin: 0px; -} - -form { - margin: 0px; - padding: 0px; -}; - -* { - font-family: "Arial"; - font-size: 8pt; -} - - -table { - font-family: "Arial"; - font-size: 8pt; -} - -.TableTitle { - font-size: 12pt; - font-weight: bold; -} - -.PageHeader { - width: 100%; - border-bottom: solid black 1px; - vertical-align: center; - background-color: #ffffff; -} -- cgit From c05a605a5109346119dbdd6458cc1c7d9ef336f5 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Thu, 22 Nov 2012 02:23:24 -0500 Subject: Fixed build and deployment scripts. The build and deployment scripts have been modified to use the new file locations. Ticket #407 --- base/ra/CMakeLists.txt | 8 ++--- base/tps/CMakeLists.txt | 28 +++++++-------- dogtag/CMakeLists.txt | 2 -- specs/dogtag-pki-theme.spec | 83 ++++++++++----------------------------------- 4 files changed, 35 insertions(+), 86 deletions(-) diff --git a/base/ra/CMakeLists.txt b/base/ra/CMakeLists.txt index 79152e291..5fa62eab6 100644 --- a/base/ra/CMakeLists.txt +++ b/base/ra/CMakeLists.txt @@ -37,16 +37,16 @@ install( install( DIRECTORY - emails/ + apache/docroot/ DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/conf + ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot ) install( DIRECTORY - forms/ + emails/ DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot + ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/conf ) install( diff --git a/base/tps/CMakeLists.txt b/base/tps/CMakeLists.txt index 10c4d8efd..301e8357c 100644 --- a/base/tps/CMakeLists.txt +++ b/base/tps/CMakeLists.txt @@ -79,7 +79,7 @@ install( install( DIRECTORY - forms/esc/cgi-bin + apache/cgi-bin DESTINATION ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} ) @@ -92,22 +92,22 @@ install( ) install( - FILES - forms/index.html + DIRECTORY + apache/docroot DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot + ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME} ) -install( - FILES - forms/index.cgi - DESTINATION - ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot - PERMISSIONS - OWNER_EXECUTE OWNER_WRITE OWNER_READ - GROUP_EXECUTE GROUP_READ - WORLD_EXECUTE WORLD_READ -) +# install( +# FILES +# apache/docroot/index.cgi +# DESTINATION +# ${SHARE_INSTALL_PREFIX}/${APPLICATION_NAME}/${PROJECT_NAME}/docroot +# PERMISSIONS +# OWNER_EXECUTE OWNER_WRITE OWNER_READ +# GROUP_EXECUTE GROUP_READ +# WORLD_EXECUTE WORLD_READ +# ) install( DIRECTORY diff --git a/dogtag/CMakeLists.txt b/dogtag/CMakeLists.txt index aa4f2fc83..2561495e1 100644 --- a/dogtag/CMakeLists.txt +++ b/dogtag/CMakeLists.txt @@ -5,7 +5,5 @@ if (APPLICATION_FLAVOR_IPA_PKI_THEME) endif (APPLICATION_FLAVOR_IPA_PKI_THEME) if (APPLICATION_FLAVOR_DOGTAG_PKI_THEME) add_subdirectory(common-ui) - add_subdirectory(ra-ui) - add_subdirectory(tps-ui) add_subdirectory(console-ui) endif (APPLICATION_FLAVOR_DOGTAG_PKI_THEME) diff --git a/specs/dogtag-pki-theme.spec b/specs/dogtag-pki-theme.spec index 5e10a200e..934dc423d 100644 --- a/specs/dogtag-pki-theme.spec +++ b/specs/dogtag-pki-theme.spec @@ -7,7 +7,7 @@ Name: dogtag-pki-theme Version: 10.0.0 -Release: %{?relprefix}8%{?prerel}%{?dist} +Release: %{?relprefix}9%{?prerel}%{?dist} Summary: Certificate System - Dogtag PKI Theme Components URL: http://pki.fedoraproject.org/ License: GPLv2 @@ -75,6 +75,10 @@ Conflicts: redhat-pki-ocsp-theme Conflicts: redhat-pki-ocsp-ui Conflicts: redhat-pki-tks-theme Conflicts: redhat-pki-tks-ui +Conflicts: redhat-pki-ra-theme +Conflicts: redhat-pki-ra-ui +Conflicts: redhat-pki-tps-theme +Conflicts: redhat-pki-tps-ui # EPEL version of Dogtag "theme" ALWAYS replaces ALL versions of IPA "theme" Obsoletes: ipa-pki-server-theme <= 9999 @@ -98,6 +102,10 @@ Obsoletes: dogtag-pki-ocsp-theme <= %{version}-%{release} Obsoletes: dogtag-pki-ocsp-ui Obsoletes: dogtag-pki-tks-theme <= %{version}-%{release} Obsoletes: dogtag-pki-tks-ui +Obsoletes: dogtag-pki-ra-theme <= %{version}-%{release} +Obsoletes: dogtag-pki-ra-ui +Obsoletes: dogtag-pki-tps-theme <= %{version}-%{release} +Obsoletes: dogtag-pki-tps-ui Provides: dogtag-pki-common-theme = %{version}-%{release} Provides: pki-server-theme = %{version}-%{release} @@ -120,61 +128,17 @@ Provides: dogtag-pki-tks-theme = %{version}-%{release} Provides: pki-tks-theme = %{version}-%{release} Provides: pki-tks-ui = %{version}-%{release} -%description -n dogtag-pki-server-theme -This PKI Server Framework User Interface contains -the Dogtag textual and graphical user interface for the PKI Server Framework. - -This package is used by the Dogtag Certificate System. - -%{overview} - - -%package -n dogtag-pki-ra-theme -Summary: Certificate System - Registration Authority User Interface -Group: System Environment/Base - -Requires: dogtag-pki-server-theme = %{version}-%{release} - -%if 0%{?rhel} -# EPEL version of Dogtag "theme" conflicts with all versions of Red Hat "theme" -Conflicts: redhat-pki-ra-theme -Conflicts: redhat-pki-ra-ui -%endif - -Obsoletes: dogtag-pki-ra-ui <= 9 - +Provides: dogtag-pki-ra-theme = %{version}-%{release} Provides: pki-ra-theme = %{version}-%{release} Provides: pki-ra-ui = %{version}-%{release} -%description -n dogtag-pki-ra-theme -This Registration Authority (RA) User Interface contains -the Dogtag textual and graphical user interface for the RA. - -This package is used by the Dogtag Certificate System. - -%{overview} - - -%package -n dogtag-pki-tps-theme -Summary: Certificate System - Token Processing System User Interface -Group: System Environment/Base - -Requires: dogtag-pki-server-theme = %{version}-%{release} - -%if 0%{?rhel} -# EPEL version of Dogtag "theme" conflicts with all versions of Red Hat "theme" -Conflicts: redhat-pki-tps-theme -Conflicts: redhat-pki-tps-ui -%endif - -Obsoletes: dogtag-pki-tps-ui <= 9 - +Provides: dogtag-pki-tps-theme = %{version}-%{release} Provides: pki-tps-theme = %{version}-%{release} Provides: pki-tps-ui = %{version}-%{release} -%description -n dogtag-pki-tps-theme -This Token Processing System (TPS) User Interface contains -the Dogtag textual and graphical user interface for the TPS. +%description -n dogtag-pki-server-theme +This PKI Server Framework User Interface contains +the Dogtag textual and graphical user interface for the PKI Server Framework. This package is used by the Dogtag Certificate System. @@ -233,8 +197,6 @@ cd build cd build %{__make} install DESTDIR=%{buildroot} INSTALL="install -p" -chmod 755 %{buildroot}%{_datadir}/pki/tps-ui/cgi-bin/sow/cfg.pl - # NOTE: Several "theme" packages require ownership of the "/usr/share/pki" # directory because the PKI subsystems (CA, DRM, OCSP, TKS, RA, TPS) @@ -255,20 +217,6 @@ chmod 755 %{buildroot}%{_datadir}/pki/tps-ui/cgi-bin/sow/cfg.pl %{_datadir}/pki/common-ui/ -%files -n dogtag-pki-ra-theme -%defattr(-,root,root,-) -%doc dogtag/ra-ui/LICENSE -%dir %{_datadir}/pki -%{_datadir}/pki/ra-ui/ - - -%files -n dogtag-pki-tps-theme -%defattr(-,root,root,-) -%doc dogtag/tps-ui/LICENSE -%dir %{_datadir}/pki -%{_datadir}/pki/tps-ui/ - - %files -n dogtag-pki-console-theme %defattr(-,root,root,-) %doc dogtag/console-ui/LICENSE @@ -276,6 +224,9 @@ chmod 755 %{buildroot}%{_datadir}/pki/tps-ui/cgi-bin/sow/cfg.pl %changelog +* Wed Nov 21 2012 Endi S. Dewata 10.0.0-0.9.b3 +- Removed Dogtag RA and TPS packages. + * Tue Nov 13 2012 Ade Lee 10.0.0-0.8.b3 - Added needed Requires for dogtag-pki-common-theme -- cgit