From fa585168de384d59fd79c87199ca6b6cbc2eae2d Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Thu, 21 Dec 2023 15:10:23 +0000 Subject: [PATCH] update marl config with service patch bugfix --- .../example_config_2_rl_agents.yaml | 230 +++++++++--------- 1 file changed, 116 insertions(+), 114 deletions(-) diff --git a/src/primaite/config/_package_data/example_config_2_rl_agents.yaml b/src/primaite/config/_package_data/example_config_2_rl_agents.yaml index 9c2acaae..c1e2ea81 100644 --- a/src/primaite/config/_package_data/example_config_2_rl_agents.yaml +++ b/src/primaite/config/_package_data/example_config_2_rl_agents.yaml @@ -165,6 +165,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE + - type: NODE_SERVICE_PATCH - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -195,111 +196,110 @@ agents: 1: action: NODE_SERVICE_SCAN options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 # stop webapp service 2: action: NODE_SERVICE_STOP options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 # start webapp service 3: action: "NODE_SERVICE_START" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 4: action: "NODE_SERVICE_PAUSE" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 5: action: "NODE_SERVICE_RESUME" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 6: action: "NODE_SERVICE_RESTART" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 7: action: "NODE_SERVICE_DISABLE" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 8: action: "NODE_SERVICE_ENABLE" options: - node_id: 2 - service_id: 1 - 9: + node_id: 1 + service_id: 0 + 9: # check database.db file action: "NODE_FILE_SCAN" options: - node_id: 3 + node_id: 2 folder_id: 1 - file_id: 1 + file_id: 0 10: action: "NODE_FILE_CHECKHASH" options: - node_id: 3 + node_id: 2 folder_id: 1 - file_id: 1 + file_id: 0 11: action: "NODE_FILE_DELETE" options: - node_id: 3 + node_id: 2 folder_id: 1 - file_id: 1 + file_id: 0 12: action: "NODE_FILE_REPAIR" options: - node_id: 3 + node_id: 2 folder_id: 1 - file_id: 1 + file_id: 0 13: - action: "NODE_FILE_RESTORE" + action: "NODE_SERVICE_PATCH" options: - node_id: 3 - folder_id: 1 - file_id: 1 + node_id: 2 + service_id: 0 14: action: "NODE_FOLDER_SCAN" options: - node_id: 3 + node_id: 2 folder_id: 1 15: action: "NODE_FOLDER_CHECKHASH" options: - node_id: 3 + node_id: 2 folder_id: 1 16: action: "NODE_FOLDER_REPAIR" options: - node_id: 3 + node_id: 2 folder_id: 1 17: action: "NODE_FOLDER_RESTORE" options: - node_id: 3 + node_id: 2 folder_id: 1 18: action: "NODE_OS_SCAN" options: - node_id: 3 - 19: + node_id: 2 + 19: # shutdown client 1 action: "NODE_SHUTDOWN" options: - node_id: 6 + node_id: 5 20: action: "NODE_STARTUP" options: - node_id: 6 + node_id: 5 21: action: "NODE_RESET" options: - node_id: 6 + node_id: 5 22: action: "NETWORK_ACL_ADDRULE" options: @@ -403,93 +403,94 @@ agents: 38: action: "NETWORK_NIC_DISABLE" options: - node_id: 1 + node_id: 0 nic_id: 1 39: action: "NETWORK_NIC_ENABLE" options: - node_id: 1 + node_id: 0 nic_id: 1 40: action: "NETWORK_NIC_DISABLE" options: - node_id: 2 + node_id: 1 nic_id: 1 41: action: "NETWORK_NIC_ENABLE" options: - node_id: 2 + node_id: 1 nic_id: 1 42: action: "NETWORK_NIC_DISABLE" options: - node_id: 3 + node_id: 2 nic_id: 1 43: action: "NETWORK_NIC_ENABLE" options: - node_id: 3 + node_id: 2 nic_id: 1 44: action: "NETWORK_NIC_DISABLE" options: - node_id: 4 + node_id: 3 nic_id: 1 45: action: "NETWORK_NIC_ENABLE" options: - node_id: 4 + node_id: 3 nic_id: 1 46: action: "NETWORK_NIC_DISABLE" options: - node_id: 5 + node_id: 4 nic_id: 1 47: action: "NETWORK_NIC_ENABLE" options: - node_id: 5 + node_id: 4 nic_id: 1 48: action: "NETWORK_NIC_DISABLE" options: - node_id: 5 + node_id: 4 nic_id: 2 49: action: "NETWORK_NIC_ENABLE" options: - node_id: 5 + node_id: 4 nic_id: 2 50: action: "NETWORK_NIC_DISABLE" options: - node_id: 6 + node_id: 5 nic_id: 1 51: action: "NETWORK_NIC_ENABLE" options: - node_id: 6 + node_id: 5 nic_id: 1 52: action: "NETWORK_NIC_DISABLE" options: - node_id: 7 + node_id: 6 nic_id: 1 53: action: "NETWORK_NIC_ENABLE" options: - node_id: 7 + node_id: 6 nic_id: 1 options: nodes: - - node_ref: router_1 - - node_ref: switch_1 - - node_ref: switch_2 - node_ref: domain_controller - node_ref: web_server + services: + - service_ref: web_server_web_service - node_ref: database_server + services: + - service_ref: database_service - node_ref: backup_server - node_ref: security_suite - node_ref: client_1 @@ -597,6 +598,7 @@ agents: - type: NODE_SERVICE_RESTART - type: NODE_SERVICE_DISABLE - type: NODE_SERVICE_ENABLE + - type: NODE_SERVICE_PATCH - type: NODE_FILE_SCAN - type: NODE_FILE_CHECKHASH - type: NODE_FILE_DELETE @@ -627,111 +629,110 @@ agents: 1: action: NODE_SERVICE_SCAN options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 # stop webapp service 2: action: NODE_SERVICE_STOP options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 # start webapp service 3: action: "NODE_SERVICE_START" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 4: action: "NODE_SERVICE_PAUSE" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 5: action: "NODE_SERVICE_RESUME" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 6: action: "NODE_SERVICE_RESTART" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 7: action: "NODE_SERVICE_DISABLE" options: - node_id: 2 - service_id: 1 + node_id: 1 + service_id: 0 8: action: "NODE_SERVICE_ENABLE" options: - node_id: 2 - service_id: 1 - 9: + node_id: 1 + service_id: 0 + 9: # check database.db file action: "NODE_FILE_SCAN" options: - node_id: 3 + node_id: 2 folder_id: 1 - file_id: 1 + file_id: 0 10: action: "NODE_FILE_CHECKHASH" options: - node_id: 3 + node_id: 2 folder_id: 1 - file_id: 1 + file_id: 0 11: action: "NODE_FILE_DELETE" options: - node_id: 3 + node_id: 2 folder_id: 1 - file_id: 1 + file_id: 0 12: action: "NODE_FILE_REPAIR" options: - node_id: 3 + node_id: 2 folder_id: 1 - file_id: 1 + file_id: 0 13: - action: "NODE_FILE_RESTORE" + action: "NODE_SERVICE_PATCH" options: - node_id: 3 - folder_id: 1 - file_id: 1 + node_id: 2 + service_id: 0 14: action: "NODE_FOLDER_SCAN" options: - node_id: 3 + node_id: 2 folder_id: 1 15: action: "NODE_FOLDER_CHECKHASH" options: - node_id: 3 + node_id: 2 folder_id: 1 16: action: "NODE_FOLDER_REPAIR" options: - node_id: 3 + node_id: 2 folder_id: 1 17: action: "NODE_FOLDER_RESTORE" options: - node_id: 3 + node_id: 2 folder_id: 1 18: action: "NODE_OS_SCAN" options: - node_id: 3 - 19: + node_id: 2 + 19: # shutdown client 1 action: "NODE_SHUTDOWN" options: - node_id: 6 + node_id: 5 20: action: "NODE_STARTUP" options: - node_id: 6 + node_id: 5 21: action: "NODE_RESET" options: - node_id: 6 + node_id: 5 22: action: "NETWORK_ACL_ADDRULE" options: @@ -835,93 +836,94 @@ agents: 38: action: "NETWORK_NIC_DISABLE" options: - node_id: 1 + node_id: 0 nic_id: 1 39: action: "NETWORK_NIC_ENABLE" options: - node_id: 1 + node_id: 0 nic_id: 1 40: action: "NETWORK_NIC_DISABLE" options: - node_id: 2 + node_id: 1 nic_id: 1 41: action: "NETWORK_NIC_ENABLE" options: - node_id: 2 + node_id: 1 nic_id: 1 42: action: "NETWORK_NIC_DISABLE" options: - node_id: 3 + node_id: 2 nic_id: 1 43: action: "NETWORK_NIC_ENABLE" options: - node_id: 3 + node_id: 2 nic_id: 1 44: action: "NETWORK_NIC_DISABLE" options: - node_id: 4 + node_id: 3 nic_id: 1 45: action: "NETWORK_NIC_ENABLE" options: - node_id: 4 + node_id: 3 nic_id: 1 46: action: "NETWORK_NIC_DISABLE" options: - node_id: 5 + node_id: 4 nic_id: 1 47: action: "NETWORK_NIC_ENABLE" options: - node_id: 5 + node_id: 4 nic_id: 1 48: action: "NETWORK_NIC_DISABLE" options: - node_id: 5 + node_id: 4 nic_id: 2 49: action: "NETWORK_NIC_ENABLE" options: - node_id: 5 + node_id: 4 nic_id: 2 50: action: "NETWORK_NIC_DISABLE" options: - node_id: 6 + node_id: 5 nic_id: 1 51: action: "NETWORK_NIC_ENABLE" options: - node_id: 6 + node_id: 5 nic_id: 1 52: action: "NETWORK_NIC_DISABLE" options: - node_id: 7 + node_id: 6 nic_id: 1 53: action: "NETWORK_NIC_ENABLE" options: - node_id: 7 + node_id: 6 nic_id: 1 options: nodes: - - node_ref: router_1 - - node_ref: switch_1 - - node_ref: switch_2 - node_ref: domain_controller - node_ref: web_server + services: + - service_ref: web_server_web_service - node_ref: database_server + services: + - service_ref: database_service - node_ref: backup_server - node_ref: security_suite - node_ref: client_1