Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'crowdstrike-falcon', '0.11.0'
Learn more about managing modules with a PuppetfileDocumentation
falcon
Table of Contents
- Description
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
api
vslocal
install methods- Development - Guide for contributing to the module
- License
Description
The falcon
module installs, configures, and manages the falcon
service across multiple operating systems and distributions.
Note:
puppet-falcon
is an open source project, not a CrowdStrike product. As such, it carries no formal support, expressed or implied.
Usage
All parameters for the falcon module are contained within the main falcon
class. There are many options that will modify what the module does. Refer to REFERENCE.md for more details.
Below are some of the common use cases.
Note:
falcon
packages are not public so this module has two options for installing the falcon sensor. Using theinstall_method
parameter you can chooseapi
orlocal
.api
is the default. More information is outlined in API vs Local install methods.
Basic Install, Configure, and Manage the service
# using the `api` method
class {'falcon':
client_id => Sensitive('12346'),
client_secret => Sensitive('12345'),
cid => 'AJKQUI123JFKSDFJK`
}
# using the `local` method
$package_options = {
'ensure' => 'present',
'source' => '/tmp/sensor.rpm'
# any other attributes that are valid for the package resource
}
class {'falcon':
install_method => 'local',
package_options => $package_options,
cid => 'AJKQUI123JFKSDFJK`
}
Using the api
install method
The api
install methods uses the API to download the sensor package. The version of the package that is downloaded are determined by the parameters passed to the module.
There are three parameters that alter the behavior of the api
install method. Only one of these parameters can be used at a time, and they are evaluated in the order they are listed below.
version
- Will download the sensor package matching the version you specify.update_policy
- Will download the version specified by the update policy.version_decrement
- Will download then
th version before the current version.
The drawbacks to using the api
install method are outlined in API vs Local install methods.
Examples for each are below.
Using the version
parameter
This takes precedence over update_policy
and version_decrement
.
class { 'falcon':
client_id => Sensitive('12346'),
client_secret => Sensitive('12345'),
version => '1.0.0',
cid => 'AJKQUI123JFKSDFJK`
}
Using the update_policy
parameter
This takes precedence over the version_decrement
parameter.
class { 'falcon':
client_id => Sensitive('12346'),
client_secret => Sensitive('12345'),
update_policy => 'platform_default',
cid => 'AJKQUI123JFKSDFJK`
}
Using the version_decrement
parameter
Use version_decrement
to download the n-x
version.
A value of 0
will download the latest version, and a value of 2
will download the n-2
version (2
releases behind latest).
class { 'falcon':
client_id => Sensitive('12346'),
client_secret => Sensitive('12345'),
version_decrement => 2,
cid => 'AJKQUI123JFKSDFJK`
}
Using the local
install method
The local
install method gives you full control on how the sensor is installed.
Some reasons you may use this method are:
- You want to install the sensor from a local file
- You have your own package management system
You can learn more about the local
install method in API vs Local install methods.
When you use the local
install method, package_options
is required. Parameters in package_options
are passed to the the package
resource. You must provide any required parameters for the package
resource except the name
parameter. The module will pick the appropriate name based on the operating system. You can still override the name by specifying the name
property in the package_options
hash.
# Using a local file
file {'/tmp/sensor.rpm':
ensure => 'present',
source => 'https://company-filer-server.com/sensor.rpm'
}
class {'falcon':
install_method => 'local',
package_options => {
'ensure' => 'present',
'source' => '/tmp/sensor.rpm'
},
require => File['/tmp/sensor.rpm']
}
# Using a http source
class {'falcon':
install_method => 'local',
package_options => {
'ensure' => 'present',
'source' => 'http://example.com/sensor.rpm'
}
}
# Overriding the name parameter
class {'falcon':
install_method => 'local',
package_options => {
'ensure' => 'present',
'source' => '/tmp/sensor.rpm',
'name' => 'falcon-sensor'
}
}
Removing the Installer file
When install_method
is api
you can use the cleanup_installer
parameter to remove the installer file after installation.
class { 'falcon':
client_id => Sensitive('12346'),
client_secret => Sensitive('12345'),
cleanup_installer => true,
cid => 'AJKQUI123JFKSDFJK`
}
Overriding the default Package parameters
You can override any parameter that is passed to the package
resource using the package_options
parameter. Valid Package Parameters
This works the same in both api
and local
install methods.
$package_options = {
'provider' => 'rpm',
'install_options' => '--force',
}
class { 'falcon':
package_options => $package_options
}
Opt out of the module installing the package
class {'falcon':
package_manage => false
# ... other required params
}
Opt out of the module configuring the agent - Linux Only
Note The windows agent can only be configured at install time. The Linux agent ships with
falconctl
that allows puppet to configure the agent after install. For example: updating thecid
property in your resource will update thecid
on the linux agent on the next run, but not the windows.
class {'falcon':
config_manage => false
# ... other required params
}
Opt out of the module controlling the service
class {'falcon':
service_manage => false
# ... other required params
}
Registering a cid
class {'falcon':
cid => 'AJKQUI123JFKSDFJK`
# ... other required params
}
Registering a cid
with a provisioning token
If your company requires a provisioning token to register a agent, you can use the provisioning_token
parameter.
class {'falcon':
cid => 'AJKQUI123JFKSDFJK`,
provisioning_token => '1234567890'
# ... other required params
}
Setting proxy settings
You can use the proxy_host
, proxy_port
, and proxy_enabled
parameters to configure proxy settings for your agent.
Note Mac installs have no proxy settings specific to the agent. Instead it uses the OS's proxy settings. Passing values to these parameters won't configure any proxy settings for Mac.
class {'falcon': cid => 'AJKQUI123JFKSDFJK`, provisioning_token => '1234567890,' proxy_host => 'neptune.example.com', proxy_port => '8080', proxy_enabled => true
... other required params
}
Pinning the agent version
If you want to pin the agent version to a specific version using the api
install method then you can set version_manage
to true.
In our example below we use version_decrement
, but it works the same for all. Puppet will consult the API to determine what version version_decrement => 2
resolves to. It then will download that version and ensure it is installed.
Each subsequent run it will check the api to see if the version returned is the one installed. If for example, a new version is released it would cause the version returned from the check to change causing the agent to be upgraded to the new n-2
version.
warning: This causes the module to consult the API every run to ensure the version the API returns is the version that is installed. This could cause rate limit issues for large deployments. If you want to have automated upgrades/downgrades and use the
api
install method it is generally suggested to setversion_manage
tofalse
and allow the CrowdStrike Update Policy to do the upgrades/downgrades instead of Puppet.
class {'falcon':
version_manage => true
client_id => Sensitive('12346'),
client_secret => Sensitive('12345'),
update_policy => 'platform_default'
cid => 'AJKQUI123JFKSDFJK`
# ... other required params
}
Using the install_method
of local
class {'falcon':
install_method => 'local',
package_options => {
'ensure' => '32.4.3',
'source' => '/tmp/sensor-32.4.3.rpm'
}
}
api
vs local
install methods
Generally the api
method will be fine for most use cases if version_manage
is set to false
. If version_manage
is set to true
you may run into api rate limits.
You can use local
install method if you want full control and don't want to leverage the API.
Why are there two install methods?
Generally Puppet modules that manage a package control the full lifecycle of that package from installation to removal. The fact CrowdStrike agent packages are not public makes this hard.
We still wanted to give a hands off way of quickly getting a package installed so we created the api
install method. This method will require you to provide api credentials, and then we will download the correct package version from the CrowdStrike API. There are parameters that let you control the behavior like setting update_policy
. This will cause the module to download the correct version based on what the update policy suggests. Examples of each here.
However, this method might not be suitable for everyone so the local
install method was created that gives you full control on how the sensor is installed.
How the api
install method works
The api install method will use the falcon api to download the correct package version. The correct package version depends on what parameters you provide. You can see Examples of each here.
The first run will cause Puppet to call the appropriate CrowdStrike apis to get the information needed to download the sensor package. It will then download the sensor package. After that, normal puppet resources take over.
If you set version_manage
to true
every run will cause the module to consult the CrowdStrike API to get the appropriate package version. Then it will determine if the installed version is the same as the returned version. If they are not the same, then it will download the correct package version and do the appropriate install/update/downgrade actions.
If you set version_manage
to false
then api calls will only happen when the CrowdStrike sensor is not installed.
API rate limits
The main limitation of the api
install method is api rate limits. We haven't hit them ourselves, but it may be possible for large installations to hit a rate limit when using the api
install method with version_manage
set to true
.
Each time Puppet compiles a catalog for a node it uses the API to determine what version of the agent should be installed. If the agent is already on the correct version then no further apis calls are made.
Setting version_manage
to false
will prevent any api calls unless the agent is not installed.
Reducing API calls
The best way to reduce API calls is to set version_manage
to false
. This will ensure the only time the API is called is when the agent is not installed. This should prevent API rate limit issues.
Installing on MacOS
Apple platforms require a Mobile Device Management (MDM) profile to install kernel extensions without user prompting. Because of this limitation, this module will only download and install the Falcon Sensor. The Mac deployment guide in the CrowdStrike documentation outlines the steps required to configure the Mac sensor to start reporting to a CID
.
Development
If you want to develop new content or improve on this collection, please open an issue or create a pull request. All contributions are welcome!
License
See the LICENSE for more information.
Reference
Table of Contents
Classes
Public Classes
falcon
: configures and installs CrowdStrike Falcon Sensor
Private Classes
falcon::config
: This class handles the configuration of the falcon server.falcon::install
: This class handles falcon sensor package.falcon::params
: This class contains the defaults for the falcon module.falcon::service
: This class handles falcon sensor service.
Resource types
falconctl
: Configure the Falcon Sensorsensor_download
: Download the Falcon Sensor
Functions
Private Functions
falcon::sensor_download_info
: Get sensor info like install package SHA and versionfalcon::win_install_options
: Helper function to generate install options for falcon on windows machines
Classes
falcon
configures and installs CrowdStrike Falcon Sensor
Examples
Basic usage
class { 'falcon':
cid => '12345',
client_id => '<client_id>',
client_secret => '<client_secret>',
update_policy => 'platform_default'
install_method => 'api'
}
Parameters
The following parameters are available in the falcon
class:
package_manage
config_manage
service_manage
cid
install_method
client_id
client_secret
version_manage
falcon_cloud
update_policy
sensor_tmp_dir
version
version_decrement
cleanup_installer
provisioning_token
package_name
package_options
service_enable
service_name
service_ensure
proxy_host
proxy_port
proxy_enabled
sensor_dl_proxy_host
sensor_dl_proxy_port
tags
tag_membership
package_manage
Data type: Optional[Boolean]
Whether to install and manage the falcon sensor
. Defaults to true
.
Default value: $falcon::params::package_manage
config_manage
Data type: Optional[Boolean]
Whether to manage the falcon sensor
configuration. Defaults to true
.
Default value: $falcon::params::config_manage
service_manage
Data type: Optional[Boolean]
Whether to manage the service. Defaults to true
.
NOTE: The falcon service requires the agent to be registered with the Customer CID in order to start.
Default value: $falcon::params::service_manage
cid
Data type: Optional[Variant[Sensitive[String], String]]
The Customer CID to register the agent with. If not provided, the agent will not be registered. The falcon service can not be started
if cid is not configured. Defaults to undef
.
Ignored if config_manage
is set to false
.
Default value: $falcon::params::cid
install_method
Data type: Optional[Enum['api', 'local']]
The method used to install the falcon sensor
. Defaults to api
.
Valid values:
api
local
When api
is selected, the falcon api will be used to download the correct version of the falcon sensor.
When local
is selected, a package resource is created with the values passed in the package_options
parameter.
Default value: $falcon::params::install_method
client_id
Data type: Optional[Sensitive]
The client id used to authenticate with the Falcon API. Defaults to undef
.
Required if install_method
is set to api
and ignored if install_method
is set to local
.
Default value: $falcon::params::client_id
client_secret
Data type: Optional[Sensitive]
The client secret used to authenticate with the Falcon API. Defaults to undef
.
Required if install_method
is set to api
and ignored if install_method
is set to local
.
Default value: $falcon::params::client_secret
version_manage
Data type: Optional[Boolean]
Rather or not puppet should enforce a specific version and do upgrades/downgrades. Defaults to false
.
Ignored if install_method
is set to local
.
NOTE: If you use update policies to manage the version, you should set this to
false
to prevent puppet and the falcon platform from conflicting.
Default value: $falcon::params::version_manage
falcon_cloud
Data type: String
The name of the cloud to use for the Falcon API. Defaults to api.crowdstrike.com
Ignored if install_method
is set to local
.
Default value: $falcon::params::falcon_cloud
update_policy
Data type: Optional[String]
The update policy to use to determine the package version to download and install. Defaults to undef
.
update_policy
takes precedence over version_decrement
.
Ignored if install_method
is set to local
.
Default value: $falcon::params::update_policy
sensor_tmp_dir
Data type: Optional[String]
The directory to use to stage the sensor package. Defaults to /tmp
(or %TEMP%
on Windows).
Ignored if install_method
is set to local
.
Default value: $falcon::params::sensor_tmp_dir
version
Data type: Optional[String]
The version of the sensor to install. When provided update_policy
and version_decrement
will be ignored. Defaults to undef
.
Ignored if install_method
is set to local
.
Default value: $falcon::params::version
version_decrement
Data type: Optional[Numeric]
The number of versions to decrement from the latest version. When version
, update_policy
are not provided
this will be used to determine the version to download and install. Defaults to 0
.
Ignored if install_method
is set to local
.
Default value: $falcon::params::version_decrement
cleanup_installer
Data type: Optional[Boolean]
Rather or not to remove the sensor install package after use. Defaults to true
.
Ignored if install_method
is set to local
.
Default value: $falcon::params::cleanup_installer
provisioning_token
Data type: Optional[String]
The provisioning token to use to register the sensor with the Falcon API. Defaults to undef
.
Default value: $falcon::params::provisioning_token
package_name
Data type: Optional[String]
The name of the package to install. Defaults to the valid service name for the OS.
package_options
will override if you pass in a package name.
Ignored if install_method
is set to local
.
Default value: $falcon::params::package_name
package_options
Data type: Hash[String, Any]
Allows you to override any package attribute. Defaults to {}
.
Default value: $falcon::params::package_options
service_enable
Data type: Optional[Boolean]
Whether to enable the service. Defaults to true
.
Ignored if service_manage
is set to false
.
Default value: $falcon::params::service_enable
service_name
Data type: Optional[String]
The name of the service to manage. Defaults to the valid service name for the OS.
Ignored if service_manage
is set to false
.
Default value: $falcon::params::service_name
service_ensure
Data type: Optional[String]
The desired service state. Defaults to running
.
Ignored if service_manage
is set to false
.
Default value: $falcon::params::service_ensure
proxy_host
Data type: Optional[String]
The proxy host for the falcon agent to use. Defaults to undef
.
Default value: $falcon::params::proxy_host
proxy_port
Data type: Optional[Numeric]
The proxy port for the falcon agent to use. Defaults to undef
.
Default value: $falcon::params::proxy_port
proxy_enabled
Data type: Optional[Boolean]
Whether proxy is enabled. Defaults to undef
.
Default value: $falcon::params::proxy_enabled
sensor_dl_proxy_host
Data type: Optional[String]
The proxy host to use when downloading the falcon sensor. Defaults to undef
.
Default value: $falcon::params::sensor_dl_proxy_host
sensor_dl_proxy_port
Data type: Optional[Numeric]
The proxy port to use when downloading the falcon sensor. Defaults to undef
.
Default value: $falcon::params::sensor_dl_proxy_port
tags
Data type: Optional[Array[String]]
List of tags to apply to the sensor. Defaults to undef
.
Default value: $falcon::params::tags
tag_membership
Data type: Optional[Enum['inclusive', 'minimum']]
Rather specified tags should be treated as a complete list inclusive
or as a list of tags to add to the existing list minimum
.
inclusive
will ensure the sensor has only the tags specified in tags
removing any tags that are not specified. minimum
will
ensure the sensor has the tags specified in tags
but will not remove any existing tags. Defaults to minimum
.
Default value: $falcon::params::tag_membership
Resource types
falconctl
Configure the Falcon Sensor
Properties
The following properties are available in the falconctl
type.
cid
The cid to set for the Falcon Sensor
proxy_enabled
Valid values: true
, false
Enable or disable the proxy for the Falcon Sensor
proxy_host
The proxy host to set for the Falcon Sensor
proxy_port
The proxy port to set for the Falcon Sensor
tags
List of tags to set for the Falcon Sensor
Parameters
The following parameters are available in the falconctl
type.
name
namevar
The name of the resource
provider
The specific backend to use for this falconctl
resource. You will seldom need to specify this --- Puppet will usually
discover the appropriate provider for your platform.
provisioning_token
The provisioning token used to register the sensor
Default value: undef
tag_membership
Valid values: inclusive
, minimum
Rather specified tags should be treated as a complete list inclusive
or as a list of tags to add to the existing list
minimum
.
Default value: minimum
sensor_download
Download the Falcon Sensor
Properties
The following properties are available in the sensor_download
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Parameters
The following parameters are available in the sensor_download
type.
bearer_token
The bearer token used to authenticate with the Falcon API
falcon_cloud
The falcon cloud URI to use
file_path
The full path to the file.
provider
The specific backend to use for this sensor_download
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
proxy_host
The proxy host to use for downloading the sensor package
proxy_port
The proxy port to use for downloading the sensor package
sha256
namevar
The sha256 of the package to download
version
The falcon sensor version that should be installed.
version_manage
If true download the required sensor package if current sensor version does not match desired version. False only download sensor package when no sensor is installed
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v0.11.0 - 2024-08-15
Other
v0.10.0 - 2024-04-16
Added
v0.9.0 - 2023-11-02
Added
v0.8.0 - 2023-08-30
Added
v0.7.1 - 2023-05-15
Fixed
v0.7.0 - 2023-03-30
Added
Fixed
- Fix issue with s390x support on sensor API #66 (carlosmmatos)
v0.6.1 - 2022-10-31
Fixed
v0.6.0 - 2022-10-24
Added
v0.5.1 - 2022-10-12
Fixed
v0.5.0 - 2022-10-07
Added
v0.4.0 - 2022-09-22
Added
v0.3.1 - 2022-09-01
Fixed
v0.3.0 - 2022-08-23
Added
Fixed
v0.2.1 - 2022-07-09
Fixed
v0.2.0 - 2022-07-07
Added
v0.1.0 - 2022-04-19
MIT License Copyright (c) 2022 CrowdStrike, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.