Merge "[OOM-CERT-SERVICE] Add Certificate Update Admin role"
authorBogumil Zebek <bogumil.zebek@nokia.com>
Fri, 2 Jul 2021 08:58:55 +0000 (08:58 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 2 Jul 2021 08:58:55 +0000 (08:58 +0000)
compose-resources/ejbca-configuration.sh

index 42e3f6b..f7cd428 100755 (executable)
@@ -33,6 +33,13 @@ configureEjbca() {
     ejbca.sh config cmp updatealias --alias cmp --key extractusernamecomponent --value CN
     ejbca.sh config cmp dumpalias --alias cmp
     ejbca.sh ca getcacert --caname ManagementCA -f /dev/stdout > cacert.pem
+    #Add "Certificate Update Admin" role to allow performing KUR/CR for certs within specific organization (e.g. Linux-Foundation)
+    ejbca.sh roles addrole "Certificate Update Admin"
+    ejbca.sh roles changerule "Certificate Update Admin" /ca/ManagementCA/ ACCEPT
+    ejbca.sh roles changerule "Certificate Update Admin" /ca_functionality/create_certificate/ ACCEPT
+    ejbca.sh roles changerule "Certificate Update Admin" /endentityprofilesrules/Custom_EndEntity/ ACCEPT
+    ejbca.sh roles changerule "Certificate Update Admin" /ra_functionality/edit_end_entity/ ACCEPT
+    ejbca.sh roles addrolemember "Certificate Update Admin" ManagementCA WITH_ORGANIZATION --value "Linux-Foundation"
 }
 
 configureEjbca