aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment10
-rw-r--r--controlloop/packages/basex/src/files/config/controlloop.properties.environment1
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl7
3 files changed, 16 insertions, 2 deletions
diff --git a/controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment b/controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment
index ec5023b2e..cfe957b4c 100644
--- a/controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment
+++ b/controlloop/common/feature-controlloop-utils/src/main/feature/config/simulators.properties.environment
@@ -21,7 +21,17 @@
# Environment file (.environment) for the simulator for control loop applications
aai.url=http://localhost:6666
+aai.username=policy
+aai.password=policy
+
so.url=http://localhost:6667
+so.username=policy
+so.password=policy
+
vfc.url=http://localhost:6668
+vfc.username=policy
+vfc.password=policy
+
guard.url=http://localhost:6669/pdp/api/getDecision
+guard.disabled=true
diff --git a/controlloop/packages/basex/src/files/config/controlloop.properties.environment b/controlloop/packages/basex/src/files/config/controlloop.properties.environment
index 70f298c47..bc4989b85 100644
--- a/controlloop/packages/basex/src/files/config/controlloop.properties.environment
+++ b/controlloop/packages/basex/src/files/config/controlloop.properties.environment
@@ -46,3 +46,4 @@ pdpx.client.password={{PDP_CLIENT_PASSWORD}}
guard.url=http://${{PDP_HOST}}:8081/pdp/api/getDecision
guard.jdbc.url=mariadb://${{SQL_HOST}}:3306/operationshistory10
+guard.disabled=true
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){