Skip to content

Commit

Permalink
precommit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorwalton committed May 10, 2024
1 parent 93900f1 commit beacff0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
5 changes: 2 additions & 3 deletions backend/app/integrations/crowdstrike/services/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
)
Expand Down Expand Up @@ -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,
Expand Down
15 changes: 9 additions & 6 deletions backend/app/integrations/markdown/crowdstrike.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion backend/data/SOCFORTRESS/cs.falconhoseclient.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default {
integration_name: integrationName
})
},
crowdstrikeProvision(customerCode: string, integrationName: string) {
crowdstrikeProvision(customerCode: string, integrationName: string) {
return HttpClient.post<FlaskBaseResponse>(`/crowdstrike/provision`, {
customer_code: customerCode,
integration_name: integrationName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Deploy
</n-button>

<n-button
<n-button
v-if="isCrowdstrike && !integration.deployed"
:loading="loadingCrowdstrikeProvision"
@click="crowdstrikeProvision()"
Expand Down Expand Up @@ -83,7 +83,13 @@ const loadingOffice365Provision = ref(false)
const loadingMimecastProvision = ref(false)
const loadingCrowdstrikeProvision = ref(false)
const loadingDelete = ref(false)
const loading = computed(() => 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)
Expand Down

0 comments on commit beacff0

Please sign in to comment.