crowdstrike.falcon.ngsiem_data_connection module – Manage NG-SIEM data connections
Note
This module is part of the crowdstrike.falcon collection (version 4.13.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install crowdstrike.falcon.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: crowdstrike.falcon.ngsiem_data_connection.
New in crowdstrike.falcon 4.13.0
Synopsis
Create, update, delete, and pause/resume NG-SIEM data connections in the CrowdStrike Falcon platform.
Data connections feed third-party log sources into Next-Gen SIEM. They come in two shapes - PULL connections (e.g. AWS S3, Azure Event Hubs) where Falcon pulls from your source using credentials in a
configblock, and PUSH connections (e.g. HEC / HTTP Event Connector) where you push logs to aningest_urlusing an ingest token.Supports idempotent operations that only make changes when necessary.
Use crowdstrike.falcon.ngsiem_data_connector_info to discover valid connector_id and parser values.
Requirements
The below requirements are needed on the host that executes this module.
CrowdStrike FalconPy >= 1.5.0
NGSIEM Data Connections [READ, WRITE] API scope
crowdstrike-falconpy >= 1.5.0
python >= 3.8
Parameters
Parameter |
Comments |
|---|---|
The registered result of the crowdstrike.falcon.auth module, or a dictionary containing the access_token and cloud keys. If provided, the client_id, client_secret, member_cid, and cloud options are ignored. Useful when needing to make multiple API calls to avoid rate limiting issues. |
|
The OAuth2 access token to use for authentication. |
|
The CrowdStrike cloud region to use. This can differ from the module’s cloud argument due to autodiscovery. |
|
The CrowdStrike API client ID to use. See the Falcon documentation for more information about API clients. The |
|
The CrowdStrike API secret that corresponds to the client ID. See the Falcon documentation for more information about API clients. The |
|
The CrowdStrike cloud region to use. All clouds are automatically discovered if not specified, except for the The Choices:
|
|
A free-form configuration dict for the connection. Used by PULL connectors to supply authentication and parameters (e.g. Note: This field is write-only. It is applied on create but is never returned by the API, so changes to it alone cannot be detected for idempotency. |
|
The ID of a saved connector config to associate with the connection. |
|
The ID of an existing data connection. Preferred for identifying existing connections during update, delete, or pause/resume operations. Either connection_id or name is required. |
|
The ID of the connector this connection is based on. Required when creating a new connection. Use crowdstrike.falcon.ngsiem_data_connector_info to discover available connectors. |
|
The type of the connector. |
|
A description for the data connection. Note: This field is write-only. It is applied on create but is never returned by the API, so changes to it alone cannot be detected for idempotency. |
|
Whether to enable host enrichment for the connection. Note: This field is write-only. It is applied on create but is never returned by the API, so changes to it alone cannot be detected for idempotency. Choices:
|
|
Whether to enable user enrichment for the connection. Note: This field is write-only. It is applied on create but is never returned by the API, so changes to it alone cannot be detected for idempotency. Choices:
|
|
Whether the connection should be running (resumed) or paused.
Only applied when the connection already exists. Pausing is only valid when the connection is in an Choices:
|
|
Extended headers that are prepended to the default headers dictionary. |
|
A list of log sources for the connection. |
|
The CrowdStrike member CID for MSSP authentication. See the Falcon documentation for more information about API clients. The |
|
The name of the data connection. Required when creating a new connection and connection_id is not provided. Used to look up an existing connection when connection_id is not specified. |
|
The parser to apply to the connection’s data. Required when creating a new connection. The value must be valid for the chosen connector (e.g. |
|
The desired state of the data connection.
Choices:
|
|
Custom User-Agent string to use for requests to the API. The user agent string is prepended to the default user agent string ( See RFC 7231 for more information. The |
|
The vendor name associated with the connection. |
|
The vendor product name associated with the connection. |
|
Whether to wait for the ingest token to become available when creating a PUSH connection. The token is minted on the first successful request, but immediately after create the connection is still provisioning and the token endpoint returns “not ready”. When The token is a one-time secret - it can only be retrieved once, so enabling this is the only reliable way to capture it during creation. Only applies to the create of a PUSH connection. Choices:
|
|
Maximum number of seconds to wait for the ingest token when wait_for_ingest_token is If the token is still not available after this timeout, the connection is left created and the module returns without the token (with a warning) rather than failing. Default: |
Notes
Note
Idempotency: This module is idempotent and will only make changes when the current state differs from the desired state.
Drift detection: Idempotency is determined by comparing name and parser against the existing connection. Vendor fields are not compared because some connectors (e.g. the built-in HEC connector) override vendor_product_name with their own value on create. Changes to description, config, or the enrichment flags cannot be detected either (the API never returns them); they are only applied on create.
Connection Lookup: When connection_id is not provided, the module searches by name. Prefer connection_id for precise targeting.
Ingest token: For PUSH connections, an ingest token is minted and returned once on create as the
ingest_tokenvalue alongsideingest_url. The token cannot be retrieved again, so it is a sensitive value - handle and store it securely. Because the connection is still provisioning immediately after create, the module waits for the token by default (see wait_for_ingest_token and wait_timeout). Token rotation is not supported in this module.State Management: For state=absent, if the connection is not found, the module exits successfully without making any changes (idempotent).
Examples
- name: Create a PUSH (HEC) data connection
crowdstrike.falcon.ngsiem_data_connection:
name: "Edge browser logs"
connector_id: "a1bfd0c4380f436790cb41afc2b95f38"
parser: "microsoft-edge"
vendor_name: "Microsoft"
vendor_product_name: "Edge"
register: hec_connection
- name: Show the ingest URL (the token is sensitive and only returned once on create)
ansible.builtin.debug:
var: hec_connection.data_connection.ingest_url
- name: Create a PULL (S3) data connection with auth config
crowdstrike.falcon.ngsiem_data_connection:
name: "AWS S3 CloudTrail"
connector_id: "0123456789abcdef0123456789abcdef"
parser: "aws-cloudtrail"
vendor_name: "AWS"
vendor_product_name: "CloudTrail"
config:
auth:
access_key_id: "{{ aws_access_key_id }}"
secret_access_key: "{{ aws_secret_access_key }}"
params:
bucket: "my-cloudtrail-bucket"
region: "us-east-1"
- name: Update a connection's name by ID
crowdstrike.falcon.ngsiem_data_connection:
connection_id: "abcdef1234567890abcdef1234567890"
name: "Edge browser logs (renamed)"
- name: Pause a connection
crowdstrike.falcon.ngsiem_data_connection:
connection_id: "abcdef1234567890abcdef1234567890"
enabled: false
- name: Resume a connection
crowdstrike.falcon.ngsiem_data_connection:
connection_id: "abcdef1234567890abcdef1234567890"
enabled: true
- name: Delete a connection by name
crowdstrike.falcon.ngsiem_data_connection:
name: "Edge browser logs"
state: absent
- name: Delete a connection by ID
crowdstrike.falcon.ngsiem_data_connection:
connection_id: "abcdef1234567890abcdef1234567890"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Information about the data connection that was created or updated. Only fields returned by the API are included. Returned: when state=present |
|
The unique identifier of the data connection. Returned: success Sample: |
|
The URL to push logs to (PUSH connections only, after provisioning). Returned: when available Sample: |
|
The volume ingested in the last day. Returned: success |
|
The name of the data connection. Returned: success Sample: |
|
The parser applied to the connection’s data. Returned: success Sample: |
|
The source type of the connection. Returned: success |
|
The current status of the connection. Returned: success Sample: |
|
The vendor name associated with the connection. Returned: success Sample: |
|
The vendor product name associated with the connection. Returned: success Sample: |
|
The ingest token for a PUSH connection. Minted and returned only once, on create of a PUSH connection. It cannot be retrieved again. This is a sensitive value; handle and store it securely. Returned: on create of a PUSH connection |