aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-01-24 16:40:18 +0100
committerS�bastien Determe <sebastien.determe@intl.att.com>2021-02-08 14:41:24 +0000
commit9d04a9cc8c6f4b12ae60cc0d4d42f71085f72328 (patch)
treea6767d8304537ea649b75e4bf90987369ae2de6d /src/main/java
parentd2178bc9f7d6c06f60a3a8afecd83e428d84cd78 (diff)
Add new Camel route
Add the new rest endpoint in camel + add new permission type + add robot test for that route + small refactoring of trst files Issue-ID: POLICY-2924 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I623cc8ec1724513cdb92eeea000adca5c2433bae
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/policy/clamp/clds/ClampServlet.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java b/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java
index 801f59c31..5149dd3b7 100644
--- a/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java
+++ b/src/main/java/org/onap/policy/clamp/clds/ClampServlet.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP CLAMP
* ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights
+ * Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
* Modifications Copyright (c) 2019 Samsung
@@ -62,6 +62,7 @@ public class ClampServlet extends CamelHttpTransportServlet {
private static final String PERM_VF = "clamp.config.security.permission.type.filter.vf";
private static final String PERM_MANAGE = "clamp.config.security.permission.type.cl.manage";
private static final String PERM_TOSCA = "clamp.config.security.permission.type.tosca";
+ private static final String PERM_POLICIES = "clamp.config.security.permission.type.policies";
private static final String AUTHENTICATION_CLASS = "clamp.config.security.authentication.class";
private static final String READ = "read";
private static final String UPDATE = "update";
@@ -95,8 +96,14 @@ public class ClampServlet extends CamelHttpTransportServlet {
permissionList.add(SecureServicePermission
.create(applicationContext.getEnvironment().getProperty(PERM_TOSCA), cldsPermissionInstance, READ));
permissionList.add(SecureServicePermission
- .create(applicationContext.getEnvironment().getProperty(PERM_TOSCA),
- cldsPermissionInstance, UPDATE));
+ .create(applicationContext.getEnvironment().getProperty(PERM_TOSCA), cldsPermissionInstance,
+ UPDATE));
+ permissionList.add(SecureServicePermission
+ .create(applicationContext.getEnvironment().getProperty(PERM_POLICIES), cldsPermissionInstance,
+ READ));
+ permissionList.add(SecureServicePermission
+ .create(applicationContext.getEnvironment().getProperty(PERM_POLICIES), cldsPermissionInstance,
+ UPDATE));
}
return permissionList;
}