-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from redhatrises/enable_windows
feat: enable sensor install on windows
- Loading branch information
Showing
9 changed files
with
149 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
name: falcon-linux-sensor | ||
name: falcon-sensor | ||
|
||
blobstore: | ||
provider: local | ||
options: | ||
blobstore_path: final_blobs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: falcon-windows-sensor | ||
|
||
templates: | ||
bin/pre-start.ps1.erb: bin/pre-start.ps1 | ||
|
||
packages: | ||
- falcon-windows-sensor | ||
|
||
properties: | ||
oauth.client_id: | ||
description: Falcon OAuth Client ID | ||
oauth.client_secret: | ||
description: Falcon OAuth Client Secret | ||
oauth.cloud: | ||
description: Falcon Cloud Region | ||
falcon.cid: | ||
description: Falcon Customer ID (CID) with Checksum (Optional) | ||
falcon.apd: | ||
description: Configures if the proxy should be enabled or disabled, By default, the proxy is enabled. | ||
falcon.aph: | ||
description: The proxy host for the sensor to use when communicating with CrowdStrike | ||
falcon.app: | ||
description: The proxy port for the sensor to use when communicating with CrowdStrike | ||
falcon.provisioning_token: | ||
description: The provisioning token to use for installing the sensor | ||
falcon.provisioning_wait_time: | ||
description: The time in milliseconds to wait for the sensor to be provisioned | ||
falcon.tags: | ||
description: "Sensor grouping tags are optional, user-defined identifiers that can used to group and filter hosts. Allowed characters: all alphanumerics, '/', '-', and '_'." | ||
falcon.sensor_update_policy: | ||
description: Name of the sensor update policy. | ||
version: | ||
description: Bosh release version |
38 changes: 38 additions & 0 deletions
38
jobs/falcon-windows-sensor/templates/bin/pre-start.ps1.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
$FALCON_ARGS="" | ||
<% if p("falcon.cid", nil) -%> | ||
$FALCON_ARGS += " --cid=<%= p('falcon.cid') %>" | ||
<% end -%> | ||
<% if p("falcon.apd", nil) -%> | ||
$FALCON_ARGS += " --apd=<%= p('falcon.apd') %>" | ||
<% end -%> | ||
<% if p("falcon.app", nil) -%> | ||
$FALCON_ARGS += " --app=<%= p('falcon.app') %>" | ||
<% end -%> | ||
<% if p("falcon.aph", nil) -%> | ||
$FALCON_ARGS += " --aph=<%= p('falcon.aph') %>" | ||
<% end -%> | ||
<% if p("falcon.provisioning_token", nil) -%> | ||
$FALCON_ARGS += " --provisioning_token=<%= p('falcon.provisioning_token') %>" | ||
<% end -%> | ||
<% if p("falcon.provisioning_wait_time", nil) -%> | ||
$FALCON_ARGS += " --provisioning_wait_time=<%= p('falcon.provisioning_wait_time') %>" | ||
<% end -%> | ||
<% if p("falcon.tags", nil) -%> | ||
$FALCON_ARGS += " --tags=<%= p('falcon.tags') %>" | ||
<% end -%> | ||
|
||
if (-Not (Get-Service | Where-Object { $_.Name -eq 'CSFalconService' })) { | ||
$FALCON_ARGS += " --client-id=<%= p('oauth.client_id') %>" | ||
$FALCON_ARGS += " --client-secret=<%= p('oauth.client_secret') %>" | ||
<% if p("oauth.cloud", nil) -%> | ||
$FALCON_ARGS += " --cloud=<%= p('oauth.cloud') %>" | ||
<% end -%> | ||
<% if p("falcon.sensor_update_policy", nil) -%> | ||
$FALCON_ARGS += " --sensor-update-policy=<%= p('falcon.sensor_update_policy') %>" | ||
<% end -%> | ||
|
||
$FALCON_ARGS += " --user-agent=falcon-boshrelease/<%= p('version') %> --verbose --enable-logging --tmpdir C:\var\vcap\sys\log\falcon-windows-sensor" | ||
|
||
$process = (Start-Process -FilePath "C:\var\vcap\packages\falcon-windows-sensor\falcon-installer.exe" -ArgumentList $FALCON_ARGS -PassThru -NoNewWindow) | ||
Wait-Process -Id $process.Id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$BOSH_INSTALL_TARGET = Resolve-Path "${env:BOSH_INSTALL_TARGET}" | ||
New-Item -ItemType "directory" -Force "${BOSH_INSTALL_TARGET}" | ||
copy "falcon-installer.exe" "${BOSH_INSTALL_TARGET}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: falcon-windows-sensor | ||
|
||
dependencies: [] | ||
|
||
files: | ||
- falcon-installer.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters