diff options
author | 2017-09-28 16:17:04 -0500 | |
---|---|---|
committer | 2017-09-28 16:23:15 -0500 | |
commit | bd5ac5c4499918a95908fec4979525bb1090c1fe (patch) | |
tree | 6535b8a7978eecdf63baf614eabbb0428acc6aed /controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources | |
parent | e12c6cc9f74fce2b6dcf8ea2c2b573fa7f5ed96c (diff) |
Make Guard Configurable
This allows the user to disable or enable guard
through the .properties.environment file. Verified
and tested in a pdp. Properties were added to the
simulators properties file for the simulators to
work out of the box.
Issue-ID: POLICY-259
Change-Id: I0027a5d28f1b30e81bdbe42fa17621b36a61c850
Signed-off-by: Daniel Cruz <dc443y@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 | 7 |
1 files changed, 5 insertions, 2 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 c3bd446c7..b56d22033 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 @@ -132,11 +132,12 @@ rule "${policyName}.SETUP" String guardUsername = PolicyEngine.manager.getEnvironmentProperty("guard.username"); String guardPassword = PolicyEngine.manager.getEnvironmentProperty("guard.password"); String guardJdbcUrl = PolicyEngine.manager.getEnvironmentProperty("guard.jdbc.url"); + String guardDisabled = PolicyEngine.manager.getEnvironmentProperty("guard.disabled"); logger.info("{}: {} : AAI=[{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), aaiUrl, aaiUsername); logger.info("{}: {} : SO=[{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), soUrl, soUsername); logger.info("{}: {} : VFC=[{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), vfcUrl, vfcUsername); - logger.info("{}: {} : GUARD=[{}:{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), guardUrl, guardUsername, guardJdbcUrl); + logger.info("{}: {} : GUARD=[{}:{}:{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), guardUrl, guardUsername, guardJdbcUrl, guardDisabled); logger.info("{}: {} : DB=[{}:{}]", params.getClosedLoopControlName(), drools.getRule().getName(), sqlDbUsername, sqlDbPassword); end @@ -615,7 +616,9 @@ 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 = false; + + // NOTE: The environment properties uses "guard.disabled" but the boolean is guardEnabled + boolean guardEnabled = "false".equalsIgnoreCase(PolicyEngine.manager.getEnvironmentProperty("guard.disabled")); if(guardEnabled){ |