From ba78e372e2789faef60e81ce91c3f3f42ca0dc84 Mon Sep 17 00:00:00 2001 From: pyth0n1c <87383215+pyth0n1c@users.noreply.github.com> Date: Fri, 17 Sep 2021 18:12:02 -0700 Subject: [PATCH] Changed a port back to the original since it's run inside the docker container as part of a playbook --- .../ansible/roles/attack_replay/tasks/main.yml | 2 +- .../ci/detection_testing_batch/modules/testing_service.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/automated_detection_testing/ci/detection_testing_batch/ansible/roles/attack_replay/tasks/main.yml b/automated_detection_testing/ci/detection_testing_batch/ansible/roles/attack_replay/tasks/main.yml index 1f1ccfe8e9..5265bd86ff 100644 --- a/automated_detection_testing/ci/detection_testing_batch/ansible/roles/attack_replay/tasks/main.yml +++ b/automated_detection_testing/ci/detection_testing_batch/ansible/roles/attack_replay/tasks/main.yml @@ -8,7 +8,7 @@ - name: Call oneshot import uri: - url: https://localhost:{{ splunk_management_port }}/services/data/inputs/oneshot + url: https://localhost:8089/services/data/inputs/oneshot validate_certs: no method: POST user: admin diff --git a/automated_detection_testing/ci/detection_testing_batch/modules/testing_service.py b/automated_detection_testing/ci/detection_testing_batch/modules/testing_service.py index e785833828..3a0f8cbbd0 100644 --- a/automated_detection_testing/ci/detection_testing_batch/modules/testing_service.py +++ b/automated_detection_testing/ci/detection_testing_batch/modules/testing_service.py @@ -71,7 +71,7 @@ def test_detection(splunk_ip, splunk_port, container_name, splunk_password, test data_manipulation = DataManipulation() data_manipulation.manipulate_timestamp(folder_name + '/' + attack_data['file_name'], attack_data['sourcetype'], attack_data['source']) - replay_attack_dataset(container_name, splunk_port, splunk_password, folder_name, 'test' + str(test_index), attack_data['sourcetype'], attack_data['source'], attack_data['file_name']) + replay_attack_dataset(container_name, splunk_password, folder_name, 'test' + str(test_index), attack_data['sourcetype'], attack_data['source'], attack_data['file_name']) time.sleep(200) @@ -141,7 +141,7 @@ def update_ESCU_app(container_name, splunk_password): print("Successfully updated the ESCU App!") -def replay_attack_dataset(container_name, splunk_port, splunk_password, folder_name, index, sourcetype, source, out): +def replay_attack_dataset(container_name, splunk_password, folder_name, index, sourcetype, source, out): ansible_vars = {} ansible_vars['folder_name'] = folder_name ansible_vars['ansible_user'] = 'ansible' @@ -150,7 +150,6 @@ def replay_attack_dataset(container_name, splunk_port, splunk_password, folder_n ansible_vars['sourcetype'] = sourcetype ansible_vars['source'] = source ansible_vars['index'] = index - ansible_vars['splunk_management_port'] = splunk_port cmdline = "--connection docker -i %s, -u %s" % (container_name, ansible_vars['ansible_user']) runner = ansible_runner.run(private_data_dir=os.path.join(os.path.dirname(__file__), '../'),