901 - fixed test_observation_space.py, added test fixture for test_seeding_and_deterministic_session.py and increased default max number of acls
This commit is contained in:
@@ -91,6 +91,13 @@ session_type: TRAIN_EVAL
|
||||
# The high value for the observation space
|
||||
observation_space_high_value: 1000000000
|
||||
|
||||
# Choice whether to have an ALLOW or DENY implicit rule or not (TRUE or FALSE)
|
||||
apply_implicit_rule: False
|
||||
# Implicit ACL firewall rule at end of lists to be default action or no rule can be selected (ALLOW or DENY)
|
||||
implicit_acl_rule: DENY
|
||||
# Total number of ACL rules allowed in the environment
|
||||
max_number_acl_rules: 30
|
||||
|
||||
# The Stable Baselines3 learn/eval output verbosity level:
|
||||
# Options are:
|
||||
# "NONE" (No Output)
|
||||
|
||||
@@ -106,7 +106,7 @@ class TrainingConfig:
|
||||
implicit_acl_rule: RulePermissionType = RulePermissionType.DENY
|
||||
"ALLOW or DENY implicit firewall rule to go at the end of list of ACL list."
|
||||
|
||||
max_number_acl_rules: int = 10
|
||||
max_number_acl_rules: int = 30
|
||||
"Sets a limit for number of acl rules allowed in the list and environment."
|
||||
|
||||
# Reward values
|
||||
|
||||
@@ -448,8 +448,8 @@ class AccessControlList(AbstractObservationComponent):
|
||||
len(RulePermissionType),
|
||||
len(env.nodes) + 2,
|
||||
len(env.nodes) + 2,
|
||||
len(env.services_list) + 1,
|
||||
len(env.ports_list) + 1,
|
||||
len(env.services_list) + 2,
|
||||
len(env.ports_list) + 2,
|
||||
env.max_number_acl_rules + 1,
|
||||
]
|
||||
shape = acl_shape * self.env.max_number_acl_rules
|
||||
@@ -523,6 +523,7 @@ class AccessControlList(AbstractObservationComponent):
|
||||
|
||||
# Either do the multiply on the obs space
|
||||
# Change the obs to
|
||||
print("current obs", port_int)
|
||||
obs.extend(
|
||||
[
|
||||
permission_int,
|
||||
|
||||
Reference in New Issue
Block a user