diff options
author | xg353y <xg353y@intl.att.com> | 2019-03-11 13:47:22 +0100 |
---|---|---|
committer | xg353y <xg353y@intl.att.com> | 2019-03-11 14:25:19 +0100 |
commit | a9be95f91ea469681517c697fae2fd2a5bcd9ff5 (patch) | |
tree | 7487bdd874dd9e2e5f21e9eea64b4a16eacc6ec4 /src/main/resources/clds/camel | |
parent | 2f56e98490cd3f7f3a688685e38ee6178c19648c (diff) |
Rework authorization controller
Rework the authorization controller, put the authorization code into a
camel box, so that it could be put and remove from other methods easily
and not tightly connected with other logic; Remove unused
CldsTemplateService.js
Issue-ID: CLAMP-305
Change-Id: I5e01f1fa4534e78e0996b4b8acaf33f1875e95f0
Signed-off-by: xg353y <xg353y@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml index 0a72a0c1..0fd1250d 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -3,31 +3,39 @@ <get uri="/v2/loop/getAllNames" outType="java.lang.String[]" produces="application/json"> - <to - uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" /> + <route> + <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> + <to uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" /> + </route> </get> <get uri="/v2/loop/{loopName}" outType="org.onap.clamp.loop.Loop" produces="application/json"> - <to - uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> + <route> + <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" /> + <to uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" /> + </route> </get> <post uri="/v2/loop/updateOperationalPolicies/{loopName}" type="com.google.gson.JsonArray" consumes="application/json" outType="org.onap.clamp.loop.Loop" produces="application/json"> - <to - uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${body})" /> + <route> + <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> + <to uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${body})" /> + </route> </post> <post uri="/v2/loop/updateMicroservicePolicies/{loopName}" type="com.google.gson.JsonArray" consumes="application/json" outType="org.onap.clamp.loop.Loop" produces="application/json"> - <to - uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicies(${header.loopName},${body})" /> + <route> + <to uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" /> + <to uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicies(${header.loopName},${body})" /> + </route> </post> </rest> </rests> |