From 1f651c480d4dd3922e1c05461f7d901c47293c4a Mon Sep 17 00:00:00 2001 From: Temoc Rodriguez Date: Tue, 26 Sep 2017 16:03:34 -0700 Subject: Add missing auth headers to guard request Added guard authentication, client authentication, and environment http headers to the pdp-x guard restful request. Properties are set to PolicyEngine.manager. Property getter, setter, and properties in guard/.../Util.java. Test properties defined in junits themselves. Added code from GuardContext.java to grab the properties and make restful request. PolicyGuardXacmlHelper now closely resembles GuardContext in order to mimic functionality. Guard url no longer is passed into CallGuardTask, it is now a property. Issue-ID: POLICY-260 Change-Id: I5b144764828b6da0e7b738a578e4f6596a0f4f36 Signed-off-by: Temoc Rodriguez --- .../src/main/resources/__closedLoopControlName__.drl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'controlloop/templates/archetype-cl-amsterdam/src/main') 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 343221f0d..3dc984dd2 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 @@ -620,12 +620,11 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_NOT_YET_QUERIED" // to the CallGuardTask() and set the first argument to null // (instead of XacmlPdpEngine). // - boolean guardEnabled = true; + boolean guardEnabled = false; if(guardEnabled){ Thread t = new Thread(new org.onap.policy.guard.CallGuardTask( - PolicyEngine.manager.getEnvironmentProperty("guard.url"), drools.getWorkingMemory(), $event.closedLoopControlName, $operation.policy.getActor().toString(), -- cgit 1.2.3-korg