Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename sockets directory according to the product #1090

Merged
merged 1 commit into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/wazuh_testing/wazuh_testing/tools/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def delete_sockets(path=None):
"""
try:
if path is None:
path = os.path.join(WAZUH_PATH, 'queue', 'ossec')
path = os.path.join(WAZUH_PATH, 'queue', 'sockets')
for file in os.listdir(path):
os.remove(os.path.join(path, file))
if os.path.exists(os.path.join(WAZUH_PATH, 'queue', 'db', 'wdb')):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

pytestmark = [pytest.mark.linux, pytest.mark.tier(level=0), pytest.mark.server]

ANALYSISD_SOCKET = os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue')
ANALYSISD_SOCKET = os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue')

SERVER_ADDRESS = 'localhost'
SERVER_NAME = 'vm-test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

log_monitor_paths = [LOG_FILE_PATH]
wdb_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'db', 'wdb'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

log_monitor_paths = [LOG_FILE_PATH]
wdb_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'db', 'wdb'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Variables

log_monitor_paths = [LOG_FILE_PATH, ALERT_FILE_PATH]
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Variables

log_monitor_paths = [LOG_FILE_PATH, ALERT_FILE_PATH]
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Variables

log_monitor_paths = [LOG_FILE_PATH, ALERT_FILE_PATH]
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Variables

log_monitor_paths = [LOG_FILE_PATH, ALERT_FILE_PATH]
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from wazuh_testing.tools.services import control_service, check_daemon_status, delete_sockets

alerts_json = os.path.join(WAZUH_LOGS_PATH, 'alerts', 'alerts.json')
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

# Syscheck variables
n_directories = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from wazuh_testing.tools.services import control_service, check_daemon_status, delete_sockets

alerts_json = os.path.join(WAZUH_LOGS_PATH, 'alerts', 'alerts.json')
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

# Syscheck variables
n_directories = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Variables

log_monitor_paths = [LOG_FILE_PATH]
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

log_monitor_paths = [LOG_FILE_PATH, ALERT_FILE_PATH]
wdb_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'db', 'wdb'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

log_monitor_paths = [LOG_FILE_PATH]
wdb_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'db', 'wdb'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

log_monitor_paths = [LOG_FILE_PATH]
wdb_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'db', 'wdb'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'queue'))
analysis_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'queue'))

receiver_sockets_params = [(analysis_path, 'AF_UNIX', 'UDP')]

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_authd/test_authd_agents_ctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def load_tests(path):
# Variables
log_monitor_paths = []

ls_sock_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'auth'))
ls_sock_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'auth'))
receiver_sockets_params = [(("localhost", 1515), 'AF_INET', 'SSL_TLSv1_2'), (ls_sock_path, 'AF_UNIX', 'TCP')]

monitored_sockets_params = [('wazuh-modulesd', None, True), ('wazuh-db', None, True), ('wazuh-authd', None, True)]
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_authd/test_authd_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def load_tests(path):

# Variables
log_monitor_paths = []
ls_sock_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'auth'))
ls_sock_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'auth'))
receiver_sockets_params = [(ls_sock_path, 'AF_UNIX', 'TCP')]

# TODO Replace or delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Variables

log_monitor_paths = [CLUSTER_LOGS_PATH]
modulesd_socket_path = os.path.join(WAZUH_PATH, 'queue', 'ossec', 'krequest')
modulesd_socket_path = os.path.join(WAZUH_PATH, 'queue', 'sockets', 'krequest')
cluster_socket_address = ('localhost', 1516)

receiver_sockets_params = [(cluster_socket_address, 'AF_INET', 'TCP')] # SocketController items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_configuration(request):
# tests

def get_remote_configuration(component_name, config):
socket_path = os.path.join(WAZUH_PATH, 'queue', 'ossec')
socket_path = os.path.join(WAZUH_PATH, 'queue', 'sockets')
dest_socket = os.path.join(socket_path, component_name)
command = f"getconfig {config}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
configurations = load_wazuh_configurations(configurations_path, __name__)

# Variables
logtest_sock = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'analysis'))
logtest_sock = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'analysis'))
receiver_sockets_params = [(logtest_sock, 'AF_UNIX', 'TCP')]
receiver_sockets = None
msg_get_config = "getconfig rule_test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# Variables

logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'logtest'))
logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'logtest'))
receiver_sockets_params = [(logtest_path, 'AF_UNIX', 'TCP')]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# Variables

logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'logtest'))
logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'logtest'))
receiver_sockets_params = [(logtest_path, 'AF_UNIX', 'TCP')]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
test_cases = yaml.safe_load(f)

# Variables
logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'logtest'))
logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'logtest'))
receiver_sockets_params = [(logtest_path, 'AF_UNIX', 'TCP')]
receiver_sockets = None # Set in the fixtures

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Variables

logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'logtest'))
logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'logtest'))


# Functions used on the test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Variables
wazuh_log_monitor = FileMonitor(LOG_FILE_PATH)

logtest_sock = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'logtest'))
logtest_sock = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'logtest'))
receiver_sockets_params = [(logtest_sock, 'AF_UNIX', 'TCP')]
receiver_sockets = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# Variables
wazuh_log_monitor = FileMonitor(LOG_FILE_PATH)
logtest_sock = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'logtest'))
logtest_sock = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'logtest'))

msg_create_session = """{"version":1, "command":"log_processing", "parameters":{
"event": "Oct 15 21:07:56 linux-agent sshd[29205]: Invalid user blimey from 18.18.18.18 port 48928",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
test_cases = yaml.safe_load(f)

# Variables
logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'logtest'))
logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'logtest'))
receiver_sockets_params = [(logtest_path, 'AF_UNIX', 'TCP')]
receiver_sockets = None # Set in the fixtures

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Variables

logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'ossec', 'logtest'))
logtest_path = os.path.join(os.path.join(WAZUH_PATH, 'queue', 'sockets', 'logtest'))


# Functions used on the test
Expand Down