@cryptotaxi247 / CoPilot / commits / 4e81874f

Update connector URLs to use 1.1.1.1

Taylor committed Jan 30, 2024 at 15:13 UTC 4e81874f296245975472aebf66ec1e63e42d84de
2 files changed +14 -15
.env.example
+12 -12
@@ -13,31 +13,31 @@ VITE_HEALTHCHECKS_INTERVAL=120
13
14 # Connector Credentials
15 # ! SETTING UP YOUR CONNECTORS DEMOs https://www.youtube.com/@taylorwalton_socfortress/videos! #
16 -WAZUH_INDEXER_URL=https://example.com:9200
16 +WAZUH_INDEXER_URL=https://1.1.1.1:9200
17 WAZUH_INDEXER_USERNAME=admin
18 WAZUH_INDEXER_PASSWORD=admin
19
20 -WAZUH_MANAGER_URL=https://example.com
20 +WAZUH_MANAGER_URL=https://1.1.1.1
21 WAZUH_MANAGER_USERNAME=dummy
22 WAZUH_MANAGER_PASSWORD=dummy
23
24 -GRAYLOG_URL=http://example.com
24 +GRAYLOG_URL=http://1.1.1.1
25 GRAYLOG_USERNAME=dummy
26 GRAYLOG_PASSWORD=dummy
27
28 -SHUFFLE_URL=https://example.com
28 +SHUFFLE_URL=https://1.1.1.1
29 SHUFFLER_API_KEY=dummy
30
31 -DFIR_IRIS_URL=https://example.com
31 +DFIR_IRIS_URL=https://1.1.1.1
32 DFIR_IRIS_API_KEY=dummy
33
34 -VELOCIRAPTOR_URL=https://example.com
34 +VELOCIRAPTOR_URL=https://1.1.1.1
35 VELOCIRAPTOR_API_KEY_PATH=dummy
36
37 -SUBLIME_URL=http://example.com
37 +SUBLIME_URL=http://1.1.1.1
38 SUBLIME_API_KEY=dummy
39
40 -INFLUXDB_URL=http://example.com
40 +INFLUXDB_URL=http://1.1.1.1
41 INFLUXDB_API_KEY=dummy
42 INFLUXDB_ORG_AND_BUCKET=dummy,dummy
43
@@ -47,16 +47,16 @@ ASKSOCFORTRESS_API_KEY=dummy
47 SOCFORTRESSTHREATINTEL_URL=https://intel.socfortress.co/search
48 SOCFORTRESSTHREATINTEL_API_KEY=dummy
49
50 -CORTEX_URL=http://example.com
50 +CORTEX_URL=http://1.1.1.1
51 CORTEX_API_KEY=dummy
52
53 -GRAFANA_URL=http://example.com
53 +GRAFANA_URL=http://1.1.1.1
54 GRAFANA_USERNAME=dummy
55 GRAFANA_PASSWORD=dummy
56
57 -WAZUH_WORKER_PROVISIONING_URL=http://example.com
57 +WAZUH_WORKER_PROVISIONING_URL=http://1.1.1.1
58
59 EVENT_SHIPPER_URL=graylog_host
60 GELF_INPUT_PORT=gelf_port
61
62 -ALERT_CREATION_PROVISIONING_URL=http://example.com
62 +ALERT_CREATION_PROVISIONING_URL=http://1.1.1.1
backend/app/connectors/wazuh_indexer/utils/universal.py
+2 -3
@@ -23,9 +23,6 @@ async def verify_wazuh_indexer_credentials(attributes: Dict[str, Any]) -> Dict[s
23 dict: A dictionary containing 'connectionSuccessful' status and 'authToken' if the connection is successful.
24 """
25 logger.info(f"Verifying the wazuh-indexer connection to {attributes['connector_url']}")
26 - if attributes["connector_url"] == "https://example.com:9200":
27 - logger.error("Wazuh Indexer connector not configured")
28 - raise HTTPException(status_code=500, detail="Wazuh Indexer connector not configured")
26 try:
27 es = Elasticsearch(
28 [attributes["connector_url"]],
@@ -71,6 +68,8 @@ async def create_wazuh_indexer_client(connector_name: str) -> Elasticsearch:
68 attributes = await get_connector_info_from_db(connector_name, session)
69 if attributes is None:
70 raise HTTPException(status_code=500, detail=f"No {connector_name} connector found in the database")
71 + if attributes["connector_url"] == "https://1.1.1.1:9200":
72 + raise HTTPException(status_code=500, detail=f"Please update the {connector_name} connector URL")
73 try:
74 return Elasticsearch(
75 [attributes["connector_url"]],