@cryptotaxi247 / CoPilot / commits / beacff05

precommit fixes

Taylor committed May 10, 2024 at 10:27 UTC beacff05d74544202c36e3402b4f5a6721e09cfd
5 files changed +21 -13
backend/app/integrations/crowdstrike/services/provision.py
+2 -3
@@ -4,10 +4,9 @@ from datetime import datetime
4
5 import aiofiles
6 from fastapi import HTTPException
7 +from loguru import logger
8 from sqlalchemy import and_
9 from sqlalchemy import update
9 -from app.integrations.schema import CustomerIntegrations
10 -from loguru import logger
10 from sqlalchemy.ext.asyncio import AsyncSession
11
12 from app.connectors.grafana.schema.dashboards import CrowdstrikeDashboard
@@ -38,6 +37,7 @@ from app.customers.routes.customers import get_customer_meta
37 from app.integrations.crowdstrike.schema.provision import CrowdstrikeCustomerDetails
38 from app.integrations.crowdstrike.schema.provision import ProvisionCrowdstrikeAuthKeys
39 from app.integrations.crowdstrike.schema.provision import ProvisionCrowdstrikeResponse
40 +from app.integrations.schema import CustomerIntegrations
41 from app.network_connectors.models.network_connectors import (
42 CustomerNetworkConnectorsMeta,
43 )
@@ -523,7 +523,6 @@ async def load_and_replace_falconhose_cfg(
523 return os.path.join(customer_upload_folder, "cs.falconhoseclient.cfg")
524
525
526 -
526 async def update_customer_integration_table(
527 customer_code: str,
528 session: AsyncSession,
backend/app/integrations/markdown/crowdstrike.md
+9 -6
@@ -83,19 +83,22 @@ protocol = tcp
83 ```
84
85 ## Provisioning
86 +
87 Once you have saved the Crowdstrike configuration for the customer, you are ready to deploy the integration. Navigate to the `Customers` tab and select the appropriate customer. The provisiong creates the necessary:
88
88 -* Graylog CEF Input
89 -* Graylog Stream
90 -* Graylog Index
91 -* Grafana Datasource
92 -* Grafana Dashboards
93 -* Crowdstrike Docker-Compose File
89 +- Graylog CEF Input
90 +- Graylog Stream
91 +- Graylog Index
92 +- Grafana Datasource
93 +- Grafana Dashboards
94 +- Crowdstrike Docker-Compose File
95
96 ## Deployment of Crowdstrike Container
97 +
98 The Crowdstrike integration runs via a docker container. During provisioning, the following directory is created `/opt/CoPilot/data/data/CUSTOMER_NAME`. Within this directory will reside the `CUSTOMER_NAME_docker-compose.yml` and the `cs.falconhoseclient.cfg` files. These can be modified if desired but should already contain the details needed to collect logs for their Crowdstrike environment.
99
100 Start the container with the below command:
101 +
102 ```bash
103 docker compose -f /opt/CoPilot/data/data/CUSTOMER_NAME/CUSTOMER_NAME_docker-compose.yml up -d
104 ```
backend/data/SOCFORTRESS/cs.falconhoseclient.cfg
+1 -1
@@ -8,7 +8,7 @@ enable_correlation_id = false
8 format_floats_as_scientific = true
9
10 # API Client ID
11 -client_id = 59b2a0df58364db2a5772b1d6f3dd60b
11 +client_id = 59b2a0df58364db2a5772b1d6f3dd60b
12 # API Client Secret
13 client_secret = fVR354s9rhb8a2UDdCmpGO0ikEBnxvSLcT176Ylj
14
frontend/src/api/integrations.ts
+1 -1
@@ -54,7 +54,7 @@ export default {
54 integration_name: integrationName
55 })
56 },
57 - crowdstrikeProvision(customerCode: string, integrationName: string) {
57 + crowdstrikeProvision(customerCode: string, integrationName: string) {
58 return HttpClient.post<FlaskBaseResponse>(`/crowdstrike/provision`, {
59 customer_code: customerCode,
60 integration_name: integrationName
frontend/src/components/customers/integrations/CustomerIntegrationActions.vue
+8 -2
@@ -24,7 +24,7 @@
24 Deploy
25 </n-button>
26
27 - <n-button
27 + <n-button
28 v-if="isCrowdstrike && !integration.deployed"
29 :loading="loadingCrowdstrikeProvision"
30 @click="crowdstrikeProvision()"
@@ -83,7 +83,13 @@ const loadingOffice365Provision = ref(false)
83 const loadingMimecastProvision = ref(false)
84 const loadingCrowdstrikeProvision = ref(false)
85 const loadingDelete = ref(false)
86 -const loading = computed(() => loadingMimecastProvision.value || loadingCrowdstrikeProvision.value || loadingOffice365Provision.value || loadingDelete.value)
86 +const loading = computed(
87 + () =>
88 + loadingMimecastProvision.value ||
89 + loadingCrowdstrikeProvision.value ||
90 + loadingOffice365Provision.value ||
91 + loadingDelete.value
92 +)
93
94 const serviceName = computed(() => integration.integration_service_name)
95 const customerCode = computed(() => integration.customer_code)