diff options
author | 2017-09-19 11:13:34 -0700 | |
---|---|---|
committer | 2017-09-21 14:59:48 +0000 | |
commit | fa9ed5f98a4eed3d82a440b719dd1db184260e94 (patch) | |
tree | 1a1af474d20f08a1798b66eecb0cf5aad65fcf15 /controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources | |
parent | 2313dd4767975e7d814e52613afab8054b84208c (diff) |
Implement restful call to xacml pdp guard
Removed the embedded guard decision and replace with restful call to
xacml pdp to restore guard functionality. Set guard URL with PolicyEngine env properties. Modified templates accordingly.
Issue-Id: POLICY-260
Change-Id: Ic1558a6ebdd5f6d1b74a748f69433f6213dbf984
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
Diffstat (limited to 'controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources')
-rw-r--r-- | controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index 5e90f052d..a2939a0bf 100644 --- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -627,7 +627,6 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED" if(guardEnabled){ Thread t = new Thread(new org.onap.policy.guard.CallGuardTask( - null, PolicyEngine.manager.getEnvironmentProperty("guard.url"), drools.getWorkingMemory(), $event.closedLoopControlName, @@ -667,7 +666,7 @@ rule "${policyName}.GUARD.RESPONSE" //we will permit the operation if there was no Guard for it - if($guardResponse.result == "Indeterminate"){ + if("Indeterminate".equals($guardResponse.result)){ $guardResponse.result = "Permit"; } @@ -685,7 +684,7 @@ rule "${policyName}.GUARD.RESPONSE" PolicyEngine.manager.deliver("POLICY-CL-MGT", notification); - if($guardResponse.result == "Permit"){ + if("Permit".equals($guardResponse.result)){ modify($operation){setGuardApprovalStatus($guardResponse.result)}; } |