fleet/server/mdm/android
Victor Lyuboslavsky c88cc953fb
Refactor endpoint_utils for modularization (#36484)
Resolves #37192

Separating generic endpoint_utils middleware logic from domain-specific
business logic. New bounded contexts would share the generic logic and
implement their own domain-specific logic. The two approaches used in
this PR are:
- Use common `platform` types
- Use interfaces

In the next PR we will move `endpointer_utils`, `authzcheck` and
`ratelimit` into `platform` directory.

# Checklist for submitter

- [x] Added changes file

## Testing

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



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

## Summary by CodeRabbit

* **Refactor**
* Restructured internal error handling and context management to support
bounded context architecture.
* Improved error context collection and telemetry observability through
a provider-based mechanism.
* Decoupled licensing and authentication concerns into interfaces for
better modularity.

* **Chores**
* Updated internal package dependencies to align with new architectural
boundaries.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-31 09:12:00 -06:00
..
mock 34376 android sw gitops (#36595) 2025-12-05 20:01:57 -05:00
service Refactor endpoint_utils for modularization (#36484) 2025-12-31 09:12:00 -06:00
tests Refactor endpoint_utils for modularization (#36484) 2025-12-31 09:12:00 -06:00
android.go cherry-pick: fix some issues with teams and self-service android apps #37062 (#37362) 2025-12-17 11:44:25 -05:00
arch_test.go Refactor endpoint_utils for modularization (#36484) 2025-12-31 09:12:00 -06:00
datastore.go Update golangci-lint to v2.4.0 (#33251) 2025-09-22 13:17:11 -05:00
errors.go Hook up Android fleetdm.com/proxy (#29645) 2025-06-12 19:42:15 -05:00
pubsub.go Added custom auth for PubSub push endpoint. (#26664) 2025-02-27 15:16:32 -06:00
README.md Basic Android enroll functionality (#26386) 2025-02-24 14:31:21 -06:00
service.go Don't delete Android agent when transferring teams. (#37517) 2025-12-19 18:05:48 -06:00

The MDM Android package attempts to decouple Android-specific service and datastore implementations from the core Fleet server code.

Any tightly coupled code that needs both the core Fleet server and the Android-specific features must live in the main server/fleet, server/service, and server/datastore packages. Typical example are MySQL queries. Any code that implements Android-specific functionality should live in the server/mdm/android package. For example, the common code from server/datastore package can call the android datastore methods as needed.

This decoupled approach attempts to achieve the following goals:

  • Easier to understand and find Android-specific code.
  • Easier to fix Android-specific bugs and add new features.
  • Easier to maintain Android-specific feature branches.
  • Faster Android-specific tests, including ability to run all tests in parallel.