fleet/docs/Contributing/Configuration-for-contributors.md
Noah Talerman 0170326853
Move packs API and YAML file to contributor docs (#7885)
- Move docs for packs API routes to "API for contributors" page
- Clean up "Overview" section in the "REST API" page
- Organize anchor link list in the "API for contributors" page
- Move docs for `pack` YAML file to the "Configuration for contributors" doc page
- Add instructions for using teams to schedule queries for groups of hosts
2022-09-22 17:41:57 -04:00

402 lines
9.9 KiB
Markdown

# Configuration for contributors
- [Packs](#packs)
- [Integrations](#integrations)
- [SMTP-settings](#smtp-settings)
This document includes configuration files and settings that are helpful when developing or contributing to Fleet.
Unlike the [configuration files documentation](../Using-Fleet/configuration-files/README.md), the files and settings in this document are not recommended for production use. Each setting includes the best practice for being successful in production.
## Packs
Scheduling queries in Fleet is the best practice for collecting data from hosts. To learn how to schedule queries, [check out the docs here](../Using-Fleet/Fleet-UI.md#schedule-a-query).
The `packs` YAML file is supported for backwards compatibility.
```yaml
apiVersion: v1
kind: pack
spec:
name: osquery_monitoring
disabled: false
targets:
labels:
- All Hosts
queries:
- query: osquery_version
name: osquery_version_differential
interval: 7200
- query: osquery_version
name: osquery_version_snapshot
interval: 7200
snapshot: true
- query: osquery_schedule
interval: 7200
removed: false
- query: osquery_events
interval: 86400
removed: false
- query: osquery_info
interval: 600
removed: false
```
---
## Integrations
Integration settings in Fleet can be configured using the `integrations` section of the `config` YAML file. To see all settings in this file, check out the [configuration files documentation](../Using-Fleet/configuration-files/README.md#organization-settings).
> **Warning:** Be careful not to store your integration credentials in source control. The best practice is to configure integrations [via the Fleet UI](../Using-Fleet/Automations.md).
### Jira
Jira integrations are configured under the `integrations.jira` field, which is an array of dictionaries.
#### integrations.jira[].url
This is the URL of the Jira server to use, including the scheme (e.g. "https://").
- Required setting (string)
- Default value: none
- Config file format:
```
integrations:
jira:
- url: "https://example.atlassian.net"
username: "user1"
api_token: "secret"
project_key: "PJ1"
```
#### integrations.jira[].username
Use this username to authenticate API requests with the Jira server.
- Required setting (string)
- Default value: none
- Config file format:
```
integrations:
jira:
- url: "https://example.atlassian.net"
username: "user1"
api_token: "secret"
project_key: "PJ1"
```
#### integrations.jira[].api_token
Use this API token to authenticate API requests with the Jira server.
- Required setting (string)
- Default value: none
- Config file format:
```
integrations:
jira:
- url: "https://example.atlassian.net"
username: "user1"
api_token: "secret"
project_key: "PJ1"
```
#### integrations.jira[].project_key
Use this Jira project key to create tickets.
- Required setting (string)
- Default value: none
- Config file format:
```
integrations:
jira:
- url: "https://example.atlassian.net"
username: "user1"
api_token: "secret"
project_key: "PJ1"
```
#### integrations.jira[].enable_failing_policies
Whether the integration is configured to create Jira tickets for failing policies.
- Optional setting (boolean)
- Default value: `false`
- Config file format:
```
integrations:
jira:
- url: "https://example.atlassian.net"
username: "user1"
api_token: "secret"
project_key: "PJ1"
enable_failing_policies: true
```
#### integrations.jira[].enable_software_vulnerabilities
Whether the integration is configured to create Jira tickets for recent software vulnerabilities.
- Optional setting (boolean)
- Default value: `false`
- Config file format:
```
integrations:
jira:
- url: "https://example.atlassian.net"
username: "user1"
api_token: "secret"
project_key: "PJ1"
enable_software_vulnerabilities: true
```
### Zendesk
Zendesk integrations are configured under the `integrations.zendesk` field, which is an array of dictionaries.
#### integrations.zendesk[].url
This is the URL of the Zendesk server to use, including the scheme (e.g. "https://").
- Required setting (string)
- Default value: none
- Config file format:
```
integrations:
zendesk:
- url: "https://example.zendesk.com"
email: "user1@example.com"
api_token: "secret"
group_id: 1234
```
#### integrations.zendesk[].email
Use this email address to authenticate API requests with the Zendesk server.
- Required setting (string)
- Default value: none
- Config file format:
```
integrations:
zendesk:
- url: "https://example.zendesk.com"
email: "user1@example.com"
api_token: "secret"
group_id: 1234
```
#### integrations.zendesk[].api_token
Use this API token to authenticate API requests with the Zendesk server.
- Required setting (string)
- Default value: none
- Config file format:
```
integrations:
zendesk:
- url: "https://example.zendesk.com"
email: "user1@example.com"
api_token: "secret"
group_id: 1234
```
#### integrations.zendesk[].group_id
Use this group ID to create tickets.
- Required setting (integer)
- Default value: none
- Config file format:
```
integrations:
zendesk:
- url: "https://example.zendesk.com"
email: "user1@example.com"
api_token: "secret"
group_id: 1234
```
#### integrations.zendesk[].enable_failing_policies
Whether the integration is configured to create Zendesk tickets for failing policies.
- Optional setting (boolean)
- Default value: `false`
- Config file format:
```
integrations:
zendesk:
- url: "https://example.zendesk.com"
email: "user1@example.com"
api_token: "secret"
group_id: 1234
enable_failing_policies: true
```
#### integrations.zendesk[].enable_software_vulnerabilities
Whether the integration is configured to create Zendesk tickets for recent software vulnerabilities.
- Optional setting (boolean)
- Default value: `false`
- Config file format:
```
integrations:
zendesk:
- url: "https://example.zendesk.com"
email: "user1@example.com"
api_token: "secret"
group_id: 1234
enable_software_vulnerabilities: true
```
## SMTP settings
SMTP settings in Fleet can be configured using the `smtp_settings` section of the `config` YAML file. To see all settings in this file, check out the [configuration files documentation](../Using-Fleet/configuration-files/README.md#organization-settings).
> **Warning:** Be careful not to store your SMTP credentials in source control. The best practice is to configure SMTP [via the Fleet UI](../Deploying/Configuration.md#configuring-single-sign-on-sso).
### smtp_settings.authentication_method
Use this authentication method when the authentication type is `authtype_username_password`.
- Optional setting (string)
- Default value: `authmethod_plain`
- Possible values:
- `authmethod_cram_md5`
- `authmethod_login`
- `authmethod_plain`
- Config file format:
```
smtp_settings:
authentication_method: authmethod_cram_md5
```
### smtp_settings.authentication_type
This is the type of authentication for the configured SMTP server.
- Optional setting (string)
- Default value: `authtype_username_password`
- Possible values:
- `authtype_none` - use this if your SMTP server is open
- `authtype_username_password` - use this if your SMTP server requires authentication with a username and password
- Config file format:
```
smtp_settings:
authentication_type: authtype_none
```
### smtp_settings.enable_smtp
Whether SMTP support is enabled or not to send emails from Fleet.
- Optional setting (boolean)
- Default value: `false`
- Config file format:
```
smtp_settings:
enable_smtp: true
```
### smtp_settings.enable_ssl_tls
Whether to enable SSL/TLS for the SMTP connection.
- Optional setting (boolean)
- Default value: `true`
- Config file format:
```
smtp_settings:
enable_ssl_tls: false
```
### smtp_settings.enable_start_tls
Whether to detect if TLS is used by the SMTP server and start using it if so.
- Optional setting (boolean)
- Default value: `true`
- Config file format:
```
smtp_settings:
enable_start_tls: false
```
### smtp_settings.password
Use this password for SMTP authentication when the `authentication_type` is set to `authtype_username_password`.
- Optional setting (string)
- Default value: ""
- Config file format:
```
smtp_settings:
password: supersekretsmtppass
```
### smtp_settings.port
Use this port to connect to the SMTP server.
- Optional setting (integer)
- Default value: `587` (the standard SMTP port)
- Config file format:
```
smtp_settings:
port: 5870
```
### smtp_settings.sender_address
Use this email address as the sender for emails sent by Fleet.
- Optional setting (string)
- Default value: ""
- Config file format:
```
smtp_settings:
sender_address: fleet@example.org
```
### smtp_settings.server
This is the server hostname for SMTP.
- Optional setting, required to properly configue SMTP (string)
- Default value: ""
- Config file format:
```
smtp_settings:
server: mail.example.org
```
### smtp_settings.user_name
Use this username for SMTP authentication when the `authentication_type` is set to `authtype_username_password`.
- Optional setting (string)
- Default value: ""
- Config file format:
```
smtp_settings:
user_name: test_user
```
### smtp_settings.verify_ssl_certs
Whether the SMTP server's SSL certificates should be verified. This can be turned off if self-signed certificates are used by the SMTP server.
- Optional setting (boolean)
- Default value: `true`
- Config file format:
```
smtp_settings:
verify_ssl_certs: false
```
<meta name="pageOrderInSection" value="1100">