Skip to content
Topolo Platform Topolo Docs
Open workspace
Documentation

MDM

Public overview of the device-management cluster spanning the MDM API, operator console, and mobile scaffold.

On this page

What It Is#

TopoloMDM is the device-management cluster for registration, polling, realtime and Firebase wake events, fleet control, operator console workflows, an Android DPC, and an early mobile client scaffold.

Architecture#

The repo currently spans a worker/API surface, a browser console, a workspace-scoped realtime event hub, a retryable notification outbox with scheduled offline detection, and a mobile scaffold with uneven maturity across those layers.

Workspace Management#

The shared Topolo workspace control reads and manages app-scoped workspace identity through Topolo Auth: authenticated users can list, create, rename, choose a default, and delete an eligible workspace. Workspace IDs and slugs remain stable and exactly one default is explicit. The selected platform workspace scopes this application's app-owned records; the app retains only domain-specific deletion guards for default or non-empty workspaces.

Runtime Surfaces#

Use /systems/topolo-mdm for the current API host and repo inventory.

API Reference#

The active route surface centers on device registration, polling, realtime operator events, device command wakeups, Firebase token registration, commands, fleet inspection, admin API-key operations, and operator helper endpoints. MDM also publishes typed enrollment, command-result, compliance, profile-change, and offline facts through the Developers notification catalog and TopoloNotify.

Auth and Permissions#

Device registration and polling use public network routes, but enrollment now requires a server-issued one-time enrollment token and continuing device poll/status calls require the issued device credential. Device realtime wakeups and Firebase token registration use the same issued credential and only trigger the existing /poll path. Operator and admin actions rely on Topolo Auth. Protected MDM API bearer-token requests validate through Auth and do not accept locally decoded JWT claims from a Worker secret. Browser console JWTs validate under the console service, while API-key requests remain scoped to the API service. The console and API resolve those Auth service boundaries from the topolo-mdm and topolo-mdm-api service slugs at runtime rather than embedding fixed app ids in browser or worker code. The operator console now uses the shared Topolo cookie-refresh auth client for browser sessions. The operator console browser callback accepts only Auth one-time sso_code handoffs on /auth/callback, delegates exchange to the shared Auth client, and no longer exposes direct-token callback or public SSO debug routes.

Data Ownership#

TopoloMDM owns workspace-scoped device state, command queues, realtime fleet-event fanout, notification outbox/incident markers, operator console state, and related fleet-control records.

Mobile Experience#

The checked-in mobile experience contract is published in native_capability mode. Its fallback route is /devices, its offline policy is read_through_cache, and it requires organization context.

Published permissions: devices:read, policies:read, apps:read.

  • /devices uses /api/devices with the record.list template and mdm.devices.list data source.
  • /device-profiles uses /api/device-profiles with the record.list template and mdm.deviceProfiles.list data source.
  • /device-profiles/:id uses /api/device-profiles/:id with the record.detail template and mdm.deviceProfiles.detail data source.

The native clients consume this manifest as an explicit rendering contract. A web mode record intentionally opens the product web experience; native_capability publishes the listed native routes and actions. Do not infer unlisted native behavior.

Deployments#

TopoloMDM deploys as a cluster rather than a single polished product surface: worker API, console, Android DPC, and mobile scaffolding move at different speeds. TopoloProvision QR/R2 APK builds remain the production Android Enterprise enrollment lane. Google Play internal testing builds are available for sales and demo installs, but they run as normal Android demo sessions until a device is enrolled through QR or another Android Enterprise provisioning path. Current Android DPC builds call the live mdm.topolo.app/api surface through the console Worker/API service binding. Firebase Cloud Messaging is a wake channel for enrolled Android devices; commands still come from the authenticated polling endpoint. Installable app catalog metadata is read from the Developers-owned developers.topolo.app/api/apps route, which now includes Topolo Feed, Topolo Provision, and the 22 retained Topolo Mobile Android APKs as R2-backed installable rows served from apk.topolo.app. Topolo Provision and Topolo MDM Mobile are now first-party mobile app records under the Topolo Technology workspace in Developers, while the MDM repo remains the runtime/code owner.

Failure Modes#

  • mobile or console maturity is overstated compared with the actual repo surface
  • Google Play demo installs are mistaken for enrolled device-owner MDM devices
  • authenticated control flows are confused with public device registration flows
  • realtime command wakeups are treated as command execution instead of a trigger for the authenticated /poll path
  • Firebase wake delivery is configured without the matching Android app values or worker service-account secrets
  • Developers-owned package-catalog metadata is mistaken for core MDM API ownership
  • enrollment QR payloads point at stale TopoloProvision APK URLs, checksums, or expired enrollment tokens
  • enrolled devices miss the initial registration call during Android provisioning and only reach the worker through command polling without a valid enrollment token

Debugging#

Start with /systems/topolo-mdm, then separate API, console, realtime, Android DPC, Firebase wake, mobile-scaffold, and Developers-owned app-catalog issues before debugging deeper. For QR enrollment failures, verify that the referenced TopoloProvision APK URL returns application/vnd.android.package-archive, that the payload checksum matches the served APK bytes, and that the QR was generated from a fresh authenticated enrollment session. If a Play-installed app is being evaluated, confirm it shows demo mode and do not expect kiosk/device-owner control until QR enrollment. If enrollment completes but the console remains empty, inspect the tenant-scoped TOPOLO_STATE keys and confirm the device either registered through /register or was recovered by the first /poll request with the one-time enrollment token. If command latency is high, verify the worker TENANT_EVENTS binding, operator /events bearer WebSocket, device /device-events X-Device-Secret handshake, and FCM token registration before tuning polling.

Pre-April Scope Freeze#

As of 2026-04-29 (run run_3a14d172049a):

  • Live implemented surfaces: topolo-mdm-api and topolo-mdm-console.
  • Operationally real but partial: apps/mobile/mdm (authenticated session + realtime event wiring exists, but it is not a full production client workflow yet).
  • Ownership/coordination lanes: TopoloProvision APK enrollment and Android artifact metadata are production-owned by this cluster for runtime behavior, while broader catalog ownership and long-lived mobile artifact operations live through Topolo Developers (https://developers.topolo.app/api/apps).
  • Out of scope for pre-April lane: new feature expansion, major UI redesigns, and re-platforming beyond documented API/console parity fixes.

Use It#

Open TopoloMDM for the human product surface. The system handbook records its current hosts, ownership, Auth scopes, storage, deployment, failure modes, and machine artifact.

Discover the credential-scoped automation surface before making an API call:

bash
topolo services --query topolo-mdm --json
topolo actions --service topolo-mdm --json
topolo actions capabilities --service topolo-mdm --json

Choose an action, inspect it with topolo actions get <action-id> --json, then validate and plan a published example. The Agent Actions reference exposes the same public schemas, effects, examples, verification, and recovery guidance.

Example workflow:

  1. Confirm the active identity and organization with topolo whoami --json.
  2. Discover TopoloMDM and select one published action rather than guessing a route.
  3. Inspect its input/output schemas and published example.
  4. Validate and plan the exact payload; obtain confirmation for a mutation.
  5. Execute and perform every published verification step.

Change Log / Verification#

  • Verified the native_capability mobile experience contract and its 3 published route(s) against apps/TopoloMDM origin/staging 627ad3b7f1d5 on 2026-07-27.

  • Reconciled this page against apps/TopoloMDM origin/staging 9a12af430300 on 2026-07-24 after reviewing every docs-relevant commit since its previous verification watermark. Dependency-only currency commits were checked by the fleet production-dependency gate and did not change this page's product contract.

  • Published the eight app-owned MDM notification contracts on 2026-07-20, backed by durable enrollment, command, compliance, profile, and scheduled offline transitions with retryable delivery through TopoloNotify.

  • Reconciled workspace verification on 2026-06-28 against apps/TopoloMDM commits through 4ec9479; reviewed 374 commits since 2026-05-14, including 4ec9479 Remove MDM devices bottom scroll padding; fadbd64 Restore MDM device table scroll on collapse; bf8ae92 Clamp MDM devices scroll after row collapse; 12ab1fe chore(deps): refresh @topolo-io/app-shell pins (package.json + lockfile).

  • Hardened enrollment-session Durable Object migrations on 2026-06-28 so QR session creation stays idempotent across existing workspace state.

  • Finalized pre-April TopoloMDM scope freeze (live console+API, partial mobile scaffold, externalized app-catalog ownership via Developers) on 2026-04-29.

  • Published TopoloProvision core 1.2.172 to apk.topolo.app and switched MDM enrollment and install-package APK references to that host on 2026-04-23.

  • Exposed all 22 retained Topolo Mobile Android APKs to MDM through the Developers-owned /api/apps catalog on 2026-04-23.

  • Registered Topolo Provision and Topolo MDM Mobile as first-party Developers mobile app records on 2026-04-23.

  • Repointed MDM install-package catalog defaults to the Developers-owned /api/apps catalog on 2026-04-22.

  • Hardened MDM enrollment on 2026-04-22 so QR payloads carry server-issued enrollment tokens, registered devices receive per-device credentials, and authenticated debug routes redact device secrets.

  • Added Firebase Cloud Messaging wake delivery on 2026-04-22 so enrolled TopoloProvision devices can wake the existing authenticated poll path while backgrounded.

  • Aligned MDM API public references to the live mdm-api.topolo.app host on 2026-04-29.

  • Added TopoloProvision Google Play internal-testing readiness on 2026-04-22 so sales/demo installs are available without changing the QR enrollment authority.

  • Added realtime MDM events on 2026-04-22 so authenticated operator mobile sessions refresh from WebSocket events and enrolled TopoloProvision v1.2.169 devices wake the existing /poll worker as soon as commands are queued.

  • Corrected MDM enrollment QR payloads on 2026-04-22 so the console and mobile scaffold reference a live TopoloProvision APK URL with matching file and signature checksums.

  • Added first-poll registration recovery on 2026-04-22 so a provisioned device can enter the fleet if Android provisioning interrupted the initial DPC registration call.

  • Tightened Android provisioning on 2026-04-22 so the QR waits for DPC policy compliance and the compliance activity registers the device before setup completes.

  • Split MDM API validation for browser JWTs and API-service credentials on 2026-04-20 so the authenticated console can load device data without post-login 401 polling.

  • Moved MDM console/API app identity to runtime Auth slug resolution on 2026-05-13 so the deployed code keeps the console and API service boundary without hardcoded app ids.

  • Removed the MDM API worker's residual local JWT_SECRET handoff on 2026-04-18 so protected bearer-token requests validate through Auth.

  • Verified on 2026-04-18 that the MDM console browser callback delegates sso_code exchange to the shared Auth client instead of carrying console-local protocol logic

  • Verified the MDM console browser callback on 2026-04-17 so it completes sign-in through one-time sso_code exchange and removes public legacy SSO/debug callback routes

  • Standardized TopoloMDM console browser auth on the shared Topolo auth client on 2026-03-31

  • Added canonical TopoloMDM coverage and retired repo-local MDM docs on 2026-03-30