-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update devel branch in preparation for v4 release. --------- Co-authored-by: Evan Stoner <[email protected]>
- Loading branch information
1 parent
4d67c73
commit d9336bd
Showing
14 changed files
with
287 additions
and
56 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
minor_changes: | ||
- sensor_policy_info - adds ``sensor_policy_info`` module to retrieve sensor policy information from the CrowdStrike Falcon API (https://github.com/CrowdStrike/ansible_collection_falcon/pull/251) | ||
- auth - adds ``auth`` module to manage authentication with the Falcon API (https://github.com/CrowdStrike/ansible_collection_falcon/pull/384) | ||
- cid_info - adds ``cid_info`` module to help retrieve CID with checksum (https://github.com/CrowdStrike/ansible_collection_falcon/pull/395) | ||
- sensor_download_info - adds ``sensor_download_info`` module to retrieve sensor installers to download (https://github.com/CrowdStrike/ansible_collection_falcon/pull/396) | ||
- sensor_download - adds ``sensor_download`` module to download sensor from the Falcon API (https://github.com/CrowdStrike/ansible_collection_falcon/pull/396) | ||
- falcon_install - replaces existing API functionality with new modules (https://github.com/CrowdStrike/ansible_collection_falcon/pull/396) | ||
- host_hide - adds ``host_hide`` module to hide/unhide hosts from the Falcon console (https://github.com/CrowdStrike/ansible_collection_falcon/pull/399) | ||
- falcon_discover - adds a new dynamic inventory for the Discover service collection (https://github.com/CrowdStrike/ansible_collection_falcon/pull/400) | ||
|
||
bugfixes: | ||
- falcon_configure - add missing when clause for mac task (https://github.com/CrowdStrike/ansible_collection_falcon/pull/399) | ||
- cid_info - return the first element of the array (https://github.com/CrowdStrike/ansible_collection_falcon/pull/396) | ||
|
||
breaking_changes: | ||
- falconpy - new collection requirements for authenticating with the CrowdStrike Falcon API now require the falconpy sdk. All | ||
existing roles within the collection have been ported over and should use the ``./requirements.txt`` file to get started. | ||
(https://github.com/CrowdStrike/ansible_collection_falcon/pull/384) |
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,78 @@ | ||
# Authentication Guide | ||
|
||
The Falcon Ansible collection requires authenticating against the Falcon API. To do so you will | ||
need client credentials. For more information see [Falcon API clients documentation](https://falcon.crowdstrike.com/documentation/page/a2a7fc0e/crowdstrike-oauth2-based-apis#mf8226da). | ||
|
||
## Passing in credentials | ||
|
||
You can pass in your Falcon API client credentials using either environment variables or | ||
module arguments. Available environment variables: | ||
|
||
- `FALCON_CLIENT_ID` - required | ||
- `FALCON_CLIENT_SECRET` - required | ||
- `FALCON_CLOUD` - optional (discovered automatically) | ||
- `FALCON_MEMBER_CID` - optional (only for Flight Control users) | ||
|
||
Available module arguments: | ||
|
||
```yaml | ||
- crowdstrike.falcon.example_module: | ||
client_id: abcd1234 # required | ||
client_secret: abcd5678 # required | ||
cloud: us-2 # optional (discovered automatically) | ||
member_cid: abcd2468 # optional (only for Flight Control users) | ||
``` | ||
You can use either of these methods for both authentication methods listed below. | ||
## Authenticating with the Falcon API | ||
### Recommended: token-based authentication | ||
Token-based authentication allows you to authenticate once against the Falcon API, then use a | ||
returned temporary token for many subsequent API interactions. This is more efficient | ||
and also mitigates the risk of rate limiting, especially when automating multiple hosts. | ||
(For more information: [Falcon API rate limit documentation](https://falcon.crowdstrike.com/documentation/page/a2a7fc0e/crowdstrike-oauth2-based-apis#af41971e).) | ||
To use token-based authentication, first use the `crowdstrike.falcon.auth` module to get a new token: | ||
|
||
```yaml | ||
- name: Generate Authentication Object | ||
crowdstrike.falcon.auth: | ||
# If not using ENV variables, use module args here | ||
register: falcon | ||
``` | ||
|
||
After obtaining the auth object, you can pass it to other modules to use the same authentication details: | ||
|
||
```yaml | ||
- name: Individually hide hosts with a list from the Falcon console | ||
crowdstrike.falcon.host_hide: | ||
auth: "{{ falcon.auth }}" | ||
hosts: "{{ item }}" | ||
loop: "{{ host_ids }}" | ||
``` | ||
|
||
For more details on token-based authentication, see documentation for the `crowdstrike.falcon.auth` module. | ||
|
||
### Alternative: per-task authentication | ||
|
||
If you are only running a small number of tasks against the Falcon API, you can authenticate directly in the task: | ||
|
||
```yaml | ||
- crowdstrike.falcon.cid_info: | ||
client_id: "API CLIENT ID" | ||
client_secret: "API CLIENT SECRET" | ||
# Optional | ||
member_cid: "MEMBER CID" | ||
cloud: "eu-1" | ||
register: cid_info | ||
``` | ||
|
||
Per-task authentication also supports environment variables: | ||
|
||
```yaml | ||
# assumes FALCON_CLIENT_ID and FALCON_CLIENT_SECRET have been set | ||
- crowdstrike.falcon.cid_info: | ||
register: cid_info | ||
``` |
Oops, something went wrong.