fleet/ee
Victor Lyuboslavsky a23d24bf96
Allow configuring webhook policy automations for "No team" (#32129)
Fixes #32060 

This PR adds:
- new default_team_config_json table
- caching of config from that table, including deep copy methods -- all
of this is not absolutely needed for this change since we are only using
`webhook_settings.failing_policies_webhook` here but added for
completeness/future
- teams/0 API updates
- GitOps updates
- generate gitops updates

Future PRs will add:
- ticket automation
- primo mode migration
- frontend changes
- documentation

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

## Database migrations

- [x] Checked table schema to confirm autoupdate

## New Fleet configuration settings

- [x] Verified that the setting is exported via `fleetctl
generate-gitops`
- [x] Verified that the setting is cleared on the server if it is not
supplied in a YAML file (or that it is documented as being optional)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- New Features
- Configure failing-policy webhooks for “No team” via GitOps
(no-team.yml) and API, including enable/disable, destination URL, policy
IDs, and batch size; settings clear when omitted.
- GitOps and CLI now read/apply the real “No team” settings with dry-run
support.
- Policy automation evaluates hosts without a team and triggers “No
team” webhooks when applicable.
  - GET/PATCH team 0 returns/accepts a minimal, webhook-focused config.

- Chores
- Added persistence and caching for the default “No team” configuration.
  - Introduced a database table to store the default configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-28 16:38:27 -05:00
..
bulk-operations-dashboard Bump form-data from 4.0.1 to 4.0.4 in /ee/bulk-operations-dashboard (#31706) 2025-08-07 13:19:28 -05:00
cis Updating CIS policies for macOS 15, 14, and 13 (#31553) 2025-08-07 08:24:01 +02:00
fleetctl Orbit for Windows ARM64 (#27882) 2025-04-11 10:18:28 -04:00
fleetd-chrome update fleetd-chrome to set expected HTTP headers (#31768) 2025-08-15 13:14:08 -05:00
maintained-apps Update Fleet-maintained apps (#32433) 2025-08-28 17:30:13 -04:00
orbit/pkg Host identity cert renewal: added IANA number and jitter (#31579) 2025-08-07 08:24:47 +02:00
server Allow configuring webhook policy automations for "No team" (#32129) 2025-08-28 16:38:27 -05:00
tools Allow certain licenses to disable telemetry (#29093) 2025-05-22 14:27:07 -04:00
vulnerability-dashboard Update vulnerability dashboard to deploy from a parentless commit (#31887) 2025-08-14 09:58:25 -05:00
LICENSE Introduce ee directory and license (#460) 2021-03-12 15:20:50 -08:00
README.md Add note about ee license in ee directory (#11252) 2023-04-21 14:55:38 -07:00

Welcome to the "source available" section of the Fleet codebase. Please note files and functionality under this directory are covered by the Fleet EE License, and require a valid Fleet subscription for production use. See the full license for details.