fleet/server/service
Konstantin Sykulev ee1be26878
certificate gitops fixes (#36708)
**Related issue:** Resolves #36649

Cleaned up some gitops messaging

Changed the team parameter to accept a name rather than an id. 
the certificate_template is still using an id. This matches what other
entities in gitops.
Here is a sample post to the spec endpoint for a certificate_template
```
{
  specs: [
    {
       "name": "certificate template",
       "team": "workstations",
       "certificate_authority_id": 1,
       "subject_name": "CN:hello"
    }
  ]
}
```

# Checklist for submitter

- [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] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)
- [x] QA'd all new/changed functionality manually
2025-12-08 10:11:15 -06:00
..
async OpenTelemetry minor improvements (#32324) 2025-08-28 19:32:46 -05:00
calendar Update Google Calendar event bodies and relevant previews in the Fleet UI (#28715) 2025-05-01 13:12:53 -07:00
conditional_access_microsoft_proxy Microsoft Compliance Partner backend changes (#29540) 2025-06-11 14:22:46 -03:00
contract Add missing platform_like during orbit enrollment (#32671) 2025-09-05 16:05:19 -03:00
externalsvc
integrationtest Android app self service: backend support (#34711) 2025-11-13 18:10:24 -05:00
middleware Removing dependencies from endpoint_utils (#36672) 2025-12-08 09:05:02 -06:00
mock Add missing platform_like during orbit enrollment (#32671) 2025-09-05 16:05:19 -03:00
modules/activities Android app self service: backend support (#34711) 2025-11-13 18:10:24 -05:00
osquery_utils Make last_restarted_at more consistent (#36243) 2025-11-25 16:15:58 -06:00
redis_key_value Make software batch endpoint asynchronous (#22258) 2024-09-20 11:55:47 -03:00
redis_lock Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
redis_policy_set Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
schedule Added OTEL span for worker jobs. (#36057) 2025-11-21 11:28:47 -06:00
testdata DUSW: Allow user-scoped SCEP profiles on Windows (#35672) 2025-11-14 12:44:14 -03:00
activities.go feat activity audit fancy search activities (#35825) 2025-12-01 16:48:43 +00:00
activities_test.go Android app self service: backend support (#34711) 2025-11-13 18:10:24 -05:00
appconfig.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
appconfig_test.go gitops, basic apis, and table for android certificate templates (#35788) 2025-11-24 15:44:06 -06:00
apple_mdm.go move where we are creating the mdm enrollment activity into the turn on apple lifecycle (#35685) 2025-11-25 11:19:05 -03:00
apple_mdm_ddm_test.go Updated SQL modes in tests to match production. (#31445) 2025-08-03 08:18:13 +02:00
apple_mdm_test.go Fix failing test due to merge inaccuracies (#36273) 2025-11-25 12:54:58 -03:00
base_client.go End-user authentication for Window/Linux setup experience: agent (#34847) 2025-11-03 16:41:57 -06:00
base_client_errors.go End-user authentication for Window/Linux setup experience: agent (#34847) 2025-11-03 16:41:57 -06:00
base_client_errors_test.go Improved orbit debug logs when response contains a large HTML page. (#33195) 2025-09-19 17:00:19 -05:00
base_client_test.go TPM osquery-perf support (#30994) 2025-07-18 10:19:05 -03:00
build_tags_test.go Return 405 when receiving POST request on the route path (#16750) 2024-02-14 12:40:43 -03:00
calendar.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
campaigns.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
campaigns_test.go Improved label(s) validation when running queries (#23834) 2024-11-21 16:13:30 -06:00
carves.go Fix GCS for remaining features that use S3 (#32743) 2025-09-09 11:22:04 -03:00
carves_test.go Update carve request block id mismatch error code from 500 –> 400 (#17974) 2024-04-04 09:38:10 -07:00
certificate_authorities.go HCA: fix generate GitOps missing todo comment and include secrets parsing (#32640) 2025-09-05 16:35:21 +03:00
certificate_authorities_test.go Add backend support for Smallstep CA (#32872) 2025-09-25 10:03:36 -05:00
certificate_templates.go Android certificate crud: validate variable replacement (#36648) 2025-12-05 12:14:14 -06:00
certificate_templates_test.go Validate CA existence and type when creating cert templates (#36617) 2025-12-04 11:06:34 -06:00
certificates.go certificate gitops fixes (#36708) 2025-12-08 10:11:15 -06:00
client.go certificate gitops fixes (#36708) 2025-12-08 10:11:15 -06:00
client_android_certificates.go Support generate-gitops for android certificates (#36457) 2025-12-02 10:25:13 -06:00
client_appconfig.go fleetctl gitops --dry-run now errors on duplicate (or conflicting) global/team enroll secrets. (#19344) 2024-05-31 07:01:13 -05:00
client_carves.go
client_certificate_authorities.go gitops, basic apis, and table for android certificate templates (#35788) 2025-11-24 15:44:06 -06:00
client_debug.go Merge conflicts 2024-04-16 10:20:59 -05:00
client_hosts.go 17257 validate bulk ops request filters (#17514) 2024-03-11 10:02:51 -06:00
client_labels.go Improved label(s) validation when running queries (#23834) 2024-11-21 16:13:30 -06:00
client_live_query.go fleetctl, API, copy updates around host identifiers (#20220) 2024-07-09 10:25:01 -07:00
client_live_query_test.go fleetctl, API, copy updates around host identifiers (#20220) 2024-07-09 10:25:01 -07:00
client_mdm.go Preview of v4.77.0 doc changes (#35924) 2025-12-02 17:24:15 -06:00
client_mdm_test.go fix fleetctl to set different CmdUID for Windows (#14895) 2023-11-02 15:06:37 -03:00
client_packs.go
client_policies.go Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
client_profiles.go Fix macos_setup not always being exported correctly by generate-gitops (#30504) 2025-07-02 09:07:58 -03:00
client_queries.go Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
client_scripts.go Remove PUT endpoint, update to always use POST for setup experience scripts (#35818) 2025-11-17 11:29:23 -05:00
client_secret_variables.go Add backend APIs for adding, deleting and listing secret variables (#31936) 2025-08-14 19:33:47 -03:00
client_sessions.go Added scim/details endpoint (#28007) 2025-04-10 14:08:45 -05:00
client_setup.go
client_software.go GitOps bug: Icon was ignored when using software URL (#33799) 2025-10-03 14:12:53 -05:00
client_targets.go
client_teams.go Allow setting software icons via GitOps (#32886) 2025-09-26 15:59:48 -05:00
client_test.go Allow setting software icons via GitOps (#32886) 2025-09-26 15:59:48 -05:00
client_trigger.go
client_users.go Return token when creating API-only users (#19525) 2024-06-13 19:10:27 -03:00
conditional_access_idp.go Okta IdP Apple profile endpoint + fixes (#35526) 2025-11-14 13:49:08 -06:00
conditional_access_idp_test.go Okta IdP Apple profile endpoint + fixes (#35526) 2025-11-14 13:49:08 -06:00
conditional_access_microsoft.go Add easy to understand errors when setting up Entra conditional access (#33453) 2025-09-25 22:52:28 -03:00
cron_schedules.go
cron_schedules_test.go
debug_handler.go Refactoring service layer. Part 1 (#25945) 2025-02-03 11:23:26 -06:00
debug_handler_test.go
device_client.go TPM osquery-perf support (#30994) 2025-07-18 10:19:05 -03:00
device_client_test.go
devices.go Elide some more fields (#36802) 2025-12-05 17:01:44 -06:00
devices_endpoint_test.go Elide some more fields (#36802) 2025-12-05 17:01:44 -06:00
devices_test.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
devices_url_auth_test.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
endpoint_campaigns.go Refactoring service layer. Part 1 (#25945) 2025-02-03 11:23:26 -06:00
endpoint_middleware.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
endpoint_middleware_test.go Fleet server verifies HTTP signature (#30825) 2025-07-16 20:08:27 +02:00
endpoint_setup.go Apply starter library during for fleetctl preview server (#30519) 2025-07-16 08:12:32 -06:00
endpoint_setup_test.go Apply starter library during for fleetctl preview server (#30519) 2025-07-16 08:12:32 -06:00
endpoint_utils.go Removing dependencies from endpoint_utils (#36672) 2025-12-08 09:05:02 -06:00
endpoint_utils_test.go Added GET enterprise API endpoint. (#26555) 2025-02-26 10:47:05 -06:00
frontend.go End-user authentication for Window/Linux setup experience: backend (#34835) 2025-10-31 11:16:42 -05:00
frontend_test.go IdP Authentication before BYOD (#32017) 2025-08-18 18:31:53 +02:00
full_test.go Return 405 when receiving POST request on the route path (#16750) 2024-02-14 12:40:43 -03:00
global_policies.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
global_policies_test.go Add GitOps for policy labels (#27781) 2025-04-04 09:46:51 -05:00
global_schedule.go Microsoft Compliance Partner backend changes (#29540) 2025-06-11 14:22:46 -03:00
global_schedule_test.go 21855 – Paginate and filter Queries on the server, update platform filtering from compatible to targeted platforms (#24446) 2024-12-11 10:50:28 -08:00
handler.go Use auth header for android end-points (#36594) 2025-12-03 15:42:03 -04:00
handler_test.go New rate limit algorithm for Fleet Desktop endpoints (#33344) 2025-09-26 15:03:50 -03:00
hosts.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
hosts_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
http_auth_test.go Added scim/details endpoint (#28007) 2025-04-10 14:08:45 -05:00
integration_android_software_test.go 34376 android sw gitops (#36595) 2025-12-05 20:01:57 -05:00
integration_certificate_authorities_test.go Expand integration tests for SCEP proxy retries; add missing changes file (#35473) 2025-11-12 15:05:49 -06:00
integration_core_test.go certificate gitops fixes (#36708) 2025-12-08 10:11:15 -06:00
integration_desktop_test.go New rate limit algorithm for Fleet Desktop endpoints (#33344) 2025-09-26 15:03:50 -03:00
integration_ds_only_test.go Moving Go integration tests to integration test job (#21126) 2024-08-07 14:00:25 +02:00
integration_enterprise_test.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
integration_enterprise_vulns_test.go os_versions endpoint performance improvements (#34897) 2025-11-03 13:07:44 -06:00
integration_install_test.go 30311: Fix race condition in test (#30903) 2025-07-17 10:20:49 -04:00
integration_live_queries_test.go Updated SQL modes in tests to match production. (#31445) 2025-08-03 08:18:13 +02:00
integration_logger_test.go Bugfix: Downgrade soap fault logging to info with soap_fault field (#33101) 2025-09-22 11:50:45 -04:00
integration_mdm_commands_test.go LM: fix missing error for manually enrolled ios and ipados when locking (#34216) 2025-10-15 17:24:49 -03:00
integration_mdm_ddm_test.go Feature branch for Android config profiles (#32976) 2025-09-22 11:29:57 -04:00
integration_mdm_dep_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
integration_mdm_lifecycle_test.go Delete FileVault on Apple MDM turn on (#35625) 2025-11-12 16:59:00 -03:00
integration_mdm_profiles_test.go Reduce API Android usage (#36209) 2025-11-25 09:39:06 -03:00
integration_mdm_release_worker_test.go Wait for expected profiles to be sent before releasing device (#31381) 2025-07-31 17:50:57 +02:00
integration_mdm_setup_experience_test.go 34376 android sw gitops (#36595) 2025-12-05 20:01:57 -05:00
integration_mdm_test.go 34376 android sw gitops (#36595) 2025-12-05 20:01:57 -05:00
integration_smtp_test.go 🧹 friday cleanup party: substitute deprecated import of go-kit (#19774) 2024-06-17 10:27:31 -03:00
integration_software_titles_test.go trim whitespace from displayname (#36304) 2025-11-25 19:23:31 -05:00
integration_sso_test.go Add sso_server_url configuration for dual URL SSO setups (#31497) 2025-08-01 20:32:15 +02:00
integration_vpp_install_test.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
invites.go Migrate from aws-sdk-go v1 to v2 (#30308) 2025-06-30 17:45:39 -03:00
invites_test.go Allow opting in users to email verification on login (#24273) 2024-12-05 08:37:10 -06:00
jitter.go Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
jitter_test.go Update to Go 1.24.1 (#27506) 2025-03-31 11:14:09 -05:00
labels.go Make host counts optional in "list labels" API (#35831) 2025-11-18 12:17:43 -06:00
labels_test.go Make host counts optional in "list labels" API (#35831) 2025-11-18 12:17:43 -06:00
linux_mdm.go Implement BitLocker "action required" status (#31451) 2025-08-05 11:23:27 -05:00
linux_mdm_test.go Update GET /hosts/:id/encryption_key to return archived key when current key is unavailable (#30396) 2025-07-02 14:57:25 -05:00
live_queries.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
mail_test.go Allow opting in users to email verification on login (#24273) 2024-12-05 08:37:10 -06:00
maintained_apps.go Switch Fleet-maintained apps to use manifest-based structure (#27201) 2025-03-20 21:21:56 -05:00
mdm.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
mdm_profiles.go DCSW: Follow up findings from test plan run (#35280) 2025-11-06 15:30:55 -03:00
mdm_profiles_test.go DCSW: Follow up findings from test plan run (#35280) 2025-11-06 15:30:55 -03:00
mdm_scep.go Updating scep package with latest fixes (#22372) 2024-09-27 07:04:11 -05:00
mdm_test.go Feature branch: Android Setup Experience support (#35951) 2025-12-02 12:27:20 -05:00
mem_failing_policies_set_test.go
metrics.go
metrics_appconfig.go
metrics_change_email.go
metrics_invites.go
metrics_labels.go add ability to create manual labels (#18303) 2024-04-16 17:22:08 +01:00
metrics_sessions.go Replace home-made SAML implementation with https://github.com/crewjam/saml (#28486) 2025-07-07 15:13:46 -03:00
metrics_users.go
microsoft_mdm.go Updating golangci-lint to 2.7.1 (#36678) 2025-12-04 10:45:50 -06:00
microsoft_mdm_test.go DCSW: Follow up fixes from QA (#35976) 2025-11-19 11:25:29 -03:00
orbit.go Windows Manual MDM Enrollment (#36128) 2025-11-25 15:04:53 -05:00
orbit_client.go End-user authentication for Window/Linux setup experience: agent (#34847) 2025-11-03 16:41:57 -06:00
orbit_client_test.go Perform early restart before starting sub-systems and minor refactor of orbit sub-systems (#20610) 2024-07-19 12:44:43 -03:00
orbit_test.go Added new global activity when disk encryption key is escrowed (#31634) 2025-08-08 12:14:48 -04:00
osquery.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
osquery_test.go Make last_restarted_at more consistent (#36243) 2025-11-25 16:15:58 -06:00
packs.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
packs_test.go Activity feed webhooks backend (#19261) 2024-05-24 11:25:27 -05:00
queries.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
queries_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
scheduled_queries.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
scheduled_queries_test.go
scim.go Added scim/details endpoint (#28007) 2025-04-10 14:08:45 -05:00
scripts.go Add "batch script host results" API (#32174) 2025-08-27 16:39:43 -05:00
scripts_test.go Regen mocks and use the new func names (#35655) 2025-11-12 17:01:16 -05:00
secret_variables.go Prevent IT admins from deleting a secret variable in use (#32161) 2025-08-22 11:22:37 -03:00
secret_variables_test.go Add backend APIs for adding, deleting and listing secret variables (#31936) 2025-08-14 19:33:47 -03:00
service.go Add sticky MDM enrollment Redis key (#33935) 2025-10-09 11:22:44 -03:00
service_appconfig.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
service_appconfig_test.go Migrate from aws-sdk-go v1 to v2 (#30308) 2025-06-30 17:45:39 -03:00
service_campaign_test.go Improvements to go tests in CI (#21545) 2024-08-26 08:55:53 -05:00
service_campaigns.go Full-stack: Granular host count data for live queries/policies (#27258) 2025-03-19 09:53:55 -07:00
service_errors.go gitops, basic apis, and table for android certificate templates (#35788) 2025-11-24 15:44:06 -06:00
service_users.go Allow opting in users to email verification on login (#24273) 2024-12-05 08:37:10 -06:00
sessions.go Removing dependencies from endpoint_utils (#36672) 2025-12-08 09:05:02 -06:00
sessions_test.go Regen mocks and use the new func names (#35655) 2025-11-12 17:01:16 -05:00
setup_experience.go Feature branch: Android Setup Experience support (#35951) 2025-12-02 12:27:20 -05:00
setup_experience_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
software.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
software_installers.go Add new self-service auth method for iOS/iPadOS (#36659) 2025-12-05 10:16:46 -05:00
software_installers_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
software_test.go Fixing tests. (#17073) 2024-02-22 16:03:13 -06:00
software_title_icons.go Allow setting software icons via GitOps (#32886) 2025-09-26 15:59:48 -05:00
software_title_icons_test.go Support custom icons for in-house apps (#35161) 2025-11-04 13:34:25 -05:00
software_titles.go Fix software_package info not provided (#34888) 2025-10-28 16:21:51 -04:00
software_titles_test.go Add experimental software title name update endpoint for titles with a bundle ID (#26938) 2025-03-07 11:36:17 -06:00
status.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
targets.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
targets_test.go
team_policies.go 36083 missing display name (#36107) 2025-11-21 16:19:38 -05:00
team_policies_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
team_schedule.go Microsoft Compliance Partner backend changes (#29540) 2025-06-11 14:22:46 -03:00
team_schedule_test.go 21855 – Paginate and filter Queries on the server, update platform filtering from compatible to targeted platforms (#24446) 2024-12-11 10:50:28 -08:00
teams.go Add "No Team" integration configurations for Jira and Zendesk (#32387) 2025-09-02 18:02:34 -05:00
teams_test.go Use lighter Team call when it's obviously safe to do so, comment potential areas for further improvement (#35587) 2025-11-17 17:25:45 -06:00
testing_client.go make display name have patch semantics (#35947) 2025-11-18 19:23:18 -05:00
testing_utils.go Feature branch: Android Setup Experience support (#35951) 2025-12-02 12:27:20 -05:00
translator.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
transport.go BMAA: Add personal enrollment type including aggregate counts (#31091) 2025-07-22 17:24:19 -04:00
transport_setup.go
transport_test.go Filter hosts by batch script execution status (#29547) 2025-06-05 18:53:14 -06:00
trigger.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
user_roles.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
users.go Migrate from aws-sdk-go v1 to v2 (#30308) 2025-06-30 17:45:39 -03:00
users_test.go Allow opting in users to email verification on login (#24273) 2024-12-05 08:37:10 -06:00
validation_setup.go Full-stack: Make "Server url" validation conditions consistent across Fleet, update Web Address form validation and submission logic per Fleet best practices (frontend/docs/patterns.md) (#27455) 2025-03-27 13:56:38 -07:00
vpp.go 35493 Android software configurations API endpoints (#36096) 2025-11-25 11:21:14 -05:00
vpp_test.go Regen mocks and use the new func names (#35655) 2025-11-12 17:01:16 -05:00
vulnerabilities.go service.errorer to fleet.Errorer (#26362) 2025-02-14 16:19:34 -06:00
vulnerabilities_test.go Updated /api/v1/fleet/vulnerabilities/{cve} endpoint (#21463) 2024-08-21 12:52:28 -05:00
windows_mdm_profiles.go Add support for $FLEET_VAR_HOST_HARDWARE_SERIAL in Windows profiles, $FLEET_VAR_HOST_PLATFORM in Windows/Apple profiles (#35812) 2025-11-24 10:18:47 -06:00
windows_mdm_profiles_test.go Add support for $FLEET_VAR_HOST_HARDWARE_SERIAL in Windows profiles, $FLEET_VAR_HOST_PLATFORM in Windows/Apple profiles (#35812) 2025-11-24 10:18:47 -06:00