fleet/server/mdm
Victor Lyuboslavsky 67d0c576b1
Reset verified certificates to pending during Android host re-enrollment (#43443)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #42600

Unreleased bug:
https://github.com/fleetdm/fleet/issues/42600#issuecomment-4220428519

# Checklist for submitter

## Testing

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

For unreleased bug fixes in a release candidate, one of:

- [x] Confirmed that the fix is not expected to adversely impact load
test results


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

* **Bug Fixes**
* Re-enrolling devices now fully reset certificate templates: templates
return to pending (install retained), retry counts and delivery metadata
are cleared to avoid stale state.

* **Behavior**
* Re-enrollment explicitly deletes prior device certificate entries
before creating fresh pending templates to prevent duplicates and stale
data.

* **Tests**
* Added tests covering Android re-enrollment to verify templates are
recreated and metadata is cleared.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-15 07:36:45 -05:00
..
acme Add a couple OTEL spans for key ACME operations (#42978) 2026-04-03 11:04:18 -05:00
android Reset verified certificates to pending during Android host re-enrollment (#43443) 2026-04-15 07:36:45 -05:00
apple Show configuration profile name and more fine-grained status (#42126) 2026-04-09 12:46:11 -05:00
assets Updated SQL modes in tests to match production. (#31445) 2025-08-03 08:18:13 +02:00
crypto Update nanomdm dependency with latest bug fixes and improvements. (#23906) 2024-11-20 11:47:11 -06:00
cryptoutil Refactoring crypto code for future reuse. (#25148) 2025-01-07 16:14:12 -06:00
internal/commonmdm friday tidy up party (#18106) 2024-04-08 08:42:42 -03:00
lifecycle reset MDM enrollment if SCEP renewal but awaiting configuration (#41881) 2026-03-17 15:31:08 -05:00
linux Linux Encryption Docs (#23622) 2024-12-10 08:26:46 -07:00
maintainedapps 🤖 Add fallback for FMA manifest URL pulls (#43312) 2026-04-09 17:36:18 -05:00
microsoft Verifying jwt signing algo to prevent vulnerability (#43474) 2026-04-13 19:11:55 -05:00
nanodep Rename Apple Business Manager in UI (#42584) 2026-04-08 11:14:19 -06:00
nanomdm don't clear bootstrap token when doing MDM cert renewals (#43098) 2026-04-13 14:37:05 -06:00
profiles Added support for NDES CA for Windows hosts (#41356) 2026-03-12 15:36:44 -05:00
scep ACME MDM -> main (#42926) 2026-04-02 15:56:31 -05:00
testing_utils Update DEP enrollment flow to apply minimum macOS version check when specified (#40720) 2026-03-12 16:54:46 -05:00
mdm.go Increased Apple retry from 1 to 3. (#42331) 2026-03-26 11:29:20 -05:00
mdm_test.go Feature branch for Android config profiles (#32976) 2025-09-22 11:29:57 -04:00