summaryrefslogtreecommitdiffstats
path: root/base/ocsp
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-11-25 12:36:05 -0500
committerEndi S. Dewata <edewata@redhat.com>2013-12-05 15:24:01 -0500
commit7944522cac99d91ac05c743661af68a2ed43df9b (patch)
treedb738116a98b18025ab42b008a9b132779e63009 /base/ocsp
parent00bb577863e057dc29697c73b03b2e3948808a54 (diff)
downloadpki-7944522cac99d91ac05c743661af68a2ed43df9b.tar.gz
pki-7944522cac99d91ac05c743661af68a2ed43df9b.tar.xz
pki-7944522cac99d91ac05c743661af68a2ed43df9b.zip
Added ACL for selftests.
New ACL has been added to allow only the administrators in each subsystem to access the selftests. Ticket #652
Diffstat (limited to 'base/ocsp')
-rw-r--r--base/ocsp/shared/conf/acl.ldif1
-rw-r--r--base/ocsp/shared/conf/acl.properties2
-rw-r--r--base/ocsp/shared/conf/auth-method.properties1
-rw-r--r--base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml13
4 files changed, 17 insertions, 0 deletions
diff --git a/base/ocsp/shared/conf/acl.ldif b/base/ocsp/shared/conf/acl.ldif
index 14221f8bb..b66478b07 100644
--- a/base/ocsp/shared/conf/acl.ldif
+++ b/base/ocsp/shared/conf/acl.ldif
@@ -30,4 +30,5 @@ resourceACLS: certServer.ocsp.group:read,modify:allow (modify,read) group="Admin
resourceACLS: certServer.clone.configuration:read,modify:allow (modify,read) group="Enterprise CA Administrators" || group="Enterprise KRA Administrators" || group="Enterprise OCSP Administrators" || group="Enterprise TKS Administrators":Only Enterprise Administrators are allowed to clone the configuration.
resourceACLS: certServer.ocsp.account:login,logout:allow (login,logout) user="anybody":Anybody can login and logout
resourceACLS: certServer.ocsp.groups:execute:allow (execute) group="Administrators":Admins may execute group operations
+resourceACLS: certServer.ocsp.selftests:read,execute:allow (read,execute) group="Administrators":Only admins can access selftests.
resourceACLS: certServer.ocsp.users:execute:allow (execute) group="Administrators":Admins may execute user operations
diff --git a/base/ocsp/shared/conf/acl.properties b/base/ocsp/shared/conf/acl.properties
index 67c68b37f..9528f11fa 100644
--- a/base/ocsp/shared/conf/acl.properties
+++ b/base/ocsp/shared/conf/acl.properties
@@ -8,4 +8,6 @@
account.login = certServer.ocsp.account,login
account.logout = certServer.ocsp.account,logout
groups = certServer.ocsp.groups,execute
+selftests.read = certServer.ocsp.selftests,read
+selftests.execute = certServer.ocsp.selftests,execute
users = certServer.ocsp.users,execute
diff --git a/base/ocsp/shared/conf/auth-method.properties b/base/ocsp/shared/conf/auth-method.properties
index 5718fc6da..9f5a7a1d3 100644
--- a/base/ocsp/shared/conf/auth-method.properties
+++ b/base/ocsp/shared/conf/auth-method.properties
@@ -9,4 +9,5 @@
default = *
account = certUserDBAuthMgr,passwdUserDBAuthMgr
groups = certUserDBAuthMgr
+selftests = certUserDBAuthMgr
users = certUserDBAuthMgr
diff --git a/base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml b/base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml
index 9c86fa1f1..8002f749b 100644
--- a/base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml
+++ b/base/ocsp/shared/webapps/ocsp/WEB-INF/web.xml
@@ -780,6 +780,19 @@
</security-constraint>
[PKI_CLOSE_STANDALONE_COMMENT]
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Self Tests</web-resource-name>
+ <url-pattern>/rest/selftests/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>CONFIDENTIAL</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+
<login-config>
<realm-name>Online Certificate Status Protocol Manager</realm-name>
</login-config>