]> WPIA git - gigi.git/commitdiff
add: policy page
authorINOPIAE <m.maengel@inopiae.de>
Thu, 14 May 2020 02:03:41 +0000 (04:03 +0200)
committerINOPIAE <m.maengel@inopiae.de>
Mon, 27 Jul 2020 03:14:27 +0000 (05:14 +0200)
A new page with information about important policies and the time
restrictions related to the policies

Change-Id: I3a278a043f893e180f341656cf4e163dc0bb02dd

links.txt
src/club/wpia/gigi/Gigi.java
src/club/wpia/gigi/pages/PolicyPage.java [new file with mode: 0644]
src/club/wpia/gigi/pages/PolicyPage.templ [new file with mode: 0644]

index 728e1ed64eb6174886aa4300a34a7b096f8f4106..86b20858ce959ed55e7c8976c7a796f90fd55adb 100644 (file)
--- a/links.txt
+++ b/links.txt
@@ -3,6 +3,10 @@
 /policy/ToS
 /policy/CPS
 /policy/verification
 /policy/ToS
 /policy/CPS
 /policy/verification
+/policy/raagent
+/policy/organisation
+/policy/ttp
+/policy/nucleus
 /kb/acceptableDocuments
 /kb/agentQualifyingChallenge
 /kb/gigi
 /kb/acceptableDocuments
 /kb/agentQualifyingChallenge
 /kb/gigi
index aa892a5d653bc657ac791445a80a6abcdb94db0e..6ddb54684e92f02c163c22fdb7d3b287f7a14d47 100644 (file)
@@ -51,6 +51,7 @@ import club.wpia.gigi.pages.MainPage;
 import club.wpia.gigi.pages.OneFormPage;
 import club.wpia.gigi.pages.Page;
 import club.wpia.gigi.pages.PasswordResetPage;
 import club.wpia.gigi.pages.OneFormPage;
 import club.wpia.gigi.pages.Page;
 import club.wpia.gigi.pages.PasswordResetPage;
+import club.wpia.gigi.pages.PolicyPage;
 import club.wpia.gigi.pages.RootCertPage;
 import club.wpia.gigi.pages.StaticPage;
 import club.wpia.gigi.pages.Verify;
 import club.wpia.gigi.pages.RootCertPage;
 import club.wpia.gigi.pages.StaticPage;
 import club.wpia.gigi.pages.Verify;
@@ -154,6 +155,7 @@ public final class Gigi extends HttpServlet {
             putPage("/roots", new RootCertPage(truststore), mainMenu);
             putPage(StatisticsRoles.PATH, new StatisticsRoles(), mainMenu);
             putPage("/about", new AboutPage(), mainMenu);
             putPage("/roots", new RootCertPage(truststore), mainMenu);
             putPage(StatisticsRoles.PATH, new StatisticsRoles(), mainMenu);
             putPage("/about", new AboutPage(), mainMenu);
+            putPage("/policy", new PolicyPage(), mainMenu);
             putPage(RegisterPage.PATH, new RegisterPage(), mainMenu);
             putPage(CertStatusRequestPage.PATH, new CertStatusRequestPage(), mainMenu);
             putPage(KeyCompromisePage.PATH, new KeyCompromisePage(), mainMenu);
             putPage(RegisterPage.PATH, new RegisterPage(), mainMenu);
             putPage(CertStatusRequestPage.PATH, new CertStatusRequestPage(), mainMenu);
             putPage(KeyCompromisePage.PATH, new KeyCompromisePage(), mainMenu);
diff --git a/src/club/wpia/gigi/pages/PolicyPage.java b/src/club/wpia/gigi/pages/PolicyPage.java
new file mode 100644 (file)
index 0000000..9ca1024
--- /dev/null
@@ -0,0 +1,36 @@
+package club.wpia.gigi.pages;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import club.wpia.gigi.util.AuthorizationContext;
+import club.wpia.gigi.util.ServerConstants;
+import club.wpia.gigi.util.TimeConditions;
+
+public class PolicyPage extends Page {
+
+    public PolicyPage() {
+        super("Policies");
+    }
+
+    @Override
+    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
+        Map<String, Object> vars = Page.getDefaultVars(req);
+        vars.put("appName", ServerConstants.getAppName());
+        vars.put("testValidMonths", TimeConditions.getInstance().getTestMonths());
+        vars.put("reverificationDays", TimeConditions.getInstance().getVerificationLimitDays());
+        vars.put("verificationFreshMonths", TimeConditions.getInstance().getVerificationMonths());
+        vars.put("verificationMaxAgeMonths", TimeConditions.getInstance().getVerificationMaxAgeMonths());
+        vars.put("emailPingMonths", TimeConditions.getInstance().getEmailPingMonths());
+        getDefaultTemplate().output(resp.getWriter(), getLanguage(req), vars);
+    }
+
+    @Override
+    public boolean isPermitted(AuthorizationContext ac) {
+        return true;
+    }
+
+}
diff --git a/src/club/wpia/gigi/pages/PolicyPage.templ b/src/club/wpia/gigi/pages/PolicyPage.templ
new file mode 100644 (file)
index 0000000..c55513e
--- /dev/null
@@ -0,0 +1,65 @@
+<p><?=_This page gives information on the most important policies for issuing and using certificates from ${appName} and the time restrictions defined in these policies.?></p>
+
+<table class="table">
+<tr><th>
+Policies
+</th></tr>
+<tr><td>
+<?=_!(/policy/CPS)CP!'</a>'?>
+</td></tr>
+<tr><td>
+<?=_!(/policy/verification)Verification Policy!'</a>' and the related sub policies?>
+</td></tr>
+<tr><td>
+<?=_!(/policy/raagent)Policy On Verification By RA Agent!'</a>'?>
+</td></tr>
+<tr><td>
+<?=_!(/policy/organisation)Organisation Verification Policy!'</a>'?>
+</td></tr>
+<tr><td>
+<?=_!(/policy/ttp)TTP Policy!'</a>'?>
+</td></tr>
+<tr><td>
+<?=_!(/policy/nucleus)Nucleus Policy!'</a>'?>
+</td></tr>
+<tr><td>
+<?=_All other policies can be viewed !(/policy)here!'</a>'?>
+</td></tr>
+</table>
+
+
+<table class="table">
+<tr><th colspan="2">
+Time settings on this server
+</th></tr>
+
+<tr><td>
+Time for valid knowledge challenge
+</td><td>
+<?=$testValidMonths?> months
+</td></tr>
+
+<tr><td>
+Minimum time between two verifications done by the same RA Agent for the same fellow
+</td><td>
+<?=$reverificationDays?> days
+</td></tr>
+
+<tr><td>
+Time that a verification is considered recent
+</td><td>
+<?=$verificationFreshMonths?> months
+</td></tr>
+
+<tr><td>
+Maximum time that a verification is accepted
+</td><td>
+<?=$verificationMaxAgeMonths?> months
+</td></tr>
+
+<tr><td>
+Maximum time before reping of email address needed
+</td><td>
+<?=$emailPingMonths?> months
+</td></tr>
+</table>
\ No newline at end of file