From 538dee3554b0a84497afa78770706a5ad4a8ff52 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 moved 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