From beacff05d74544202c36e3402b4f5a6721e09cfd Mon Sep 17 00:00:00 2001 From: Taylor Date: Fri, 10 May 2024 10:27:52 -0500 Subject: [PATCH] precommit fixes --- .../crowdstrike/services/provision.py | 5 ++--- backend/app/integrations/markdown/crowdstrike.md | 15 +++++++++------ backend/data/SOCFORTRESS/cs.falconhoseclient.cfg | 2 +- frontend/src/api/integrations.ts | 2 +- .../integrations/CustomerIntegrationActions.vue | 10 ++++++++-- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/backend/app/integrations/crowdstrike/services/provision.py b/backend/app/integrations/crowdstrike/services/provision.py index 090f92aa..3e814b2c 100644 --- a/backend/app/integrations/crowdstrike/services/provision.py +++ b/backend/app/integrations/crowdstrike/services/provision.py @@ -4,10 +4,9 @@ import aiofiles from fastapi import HTTPException +from loguru import logger from sqlalchemy import and_ from sqlalchemy import update -from app.integrations.schema import CustomerIntegrations -from loguru import logger from sqlalchemy.ext.asyncio import AsyncSession from app.connectors.grafana.schema.dashboards import CrowdstrikeDashboard @@ -38,6 +37,7 @@ from app.integrations.crowdstrike.schema.provision import CrowdstrikeCustomerDetails from app.integrations.crowdstrike.schema.provision import ProvisionCrowdstrikeAuthKeys from app.integrations.crowdstrike.schema.provision import ProvisionCrowdstrikeResponse +from app.integrations.schema import CustomerIntegrations from app.network_connectors.models.network_connectors import ( CustomerNetworkConnectorsMeta, ) @@ -523,7 +523,6 @@ async def load_and_replace_falconhose_cfg( return os.path.join(customer_upload_folder, "cs.falconhoseclient.cfg") - async def update_customer_integration_table( customer_code: str, session: AsyncSession, diff --git a/backend/app/integrations/markdown/crowdstrike.md b/backend/app/integrations/markdown/crowdstrike.md index 6d052936..b16ec095 100644 --- a/backend/app/integrations/markdown/crowdstrike.md +++ b/backend/app/integrations/markdown/crowdstrike.md @@ -83,19 +83,22 @@ protocol = tcp ``` ## Provisioning + 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: -* Graylog CEF Input -* Graylog Stream -* Graylog Index -* Grafana Datasource -* Grafana Dashboards -* Crowdstrike Docker-Compose File +- Graylog CEF Input +- Graylog Stream +- Graylog Index +- Grafana Datasource +- Grafana Dashboards +- Crowdstrike Docker-Compose File ## Deployment of Crowdstrike Container + 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. Start the container with the below command: + ```bash docker compose -f /opt/CoPilot/data/data/CUSTOMER_NAME/CUSTOMER_NAME_docker-compose.yml up -d ``` diff --git a/backend/data/SOCFORTRESS/cs.falconhoseclient.cfg b/backend/data/SOCFORTRESS/cs.falconhoseclient.cfg index 69f71d08..7164d8a7 100644 --- a/backend/data/SOCFORTRESS/cs.falconhoseclient.cfg +++ b/backend/data/SOCFORTRESS/cs.falconhoseclient.cfg @@ -8,7 +8,7 @@ enable_correlation_id = false format_floats_as_scientific = true # API Client ID -client_id = 59b2a0df58364db2a5772b1d6f3dd60b +client_id = 59b2a0df58364db2a5772b1d6f3dd60b # API Client Secret client_secret = fVR354s9rhb8a2UDdCmpGO0ikEBnxvSLcT176Ylj diff --git a/frontend/src/api/integrations.ts b/frontend/src/api/integrations.ts index 19ac966a..6d2ceb43 100644 --- a/frontend/src/api/integrations.ts +++ b/frontend/src/api/integrations.ts @@ -54,7 +54,7 @@ export default { integration_name: integrationName }) }, - crowdstrikeProvision(customerCode: string, integrationName: string) { + crowdstrikeProvision(customerCode: string, integrationName: string) { return HttpClient.post(`/crowdstrike/provision`, { customer_code: customerCode, integration_name: integrationName diff --git a/frontend/src/components/customers/integrations/CustomerIntegrationActions.vue b/frontend/src/components/customers/integrations/CustomerIntegrationActions.vue index 3ae6adfc..400fe289 100644 --- a/frontend/src/components/customers/integrations/CustomerIntegrationActions.vue +++ b/frontend/src/components/customers/integrations/CustomerIntegrationActions.vue @@ -24,7 +24,7 @@ Deploy - loadingMimecastProvision.value || loadingCrowdstrikeProvision.value || loadingOffice365Provision.value || loadingDelete.value) +const loading = computed( + () => + loadingMimecastProvision.value || + loadingCrowdstrikeProvision.value || + loadingOffice365Provision.value || + loadingDelete.value +) const serviceName = computed(() => integration.integration_service_name) const customerCode = computed(() => integration.customer_code)