{
  "generated_at": "2026-06-12T22:05:57.134Z",
  "system": {
    "id": "topolo-mdm",
    "name": "TopoloMDM",
    "slug": "topolo-mdm",
    "kind": "application",
    "summary": "MDM platform cluster spanning a device API, tenant realtime hub, operator console, Android DPC, and mobile scaffold.",
    "aliases": [],
    "lifecycle": "active",
    "last_verified": "2026-05-14",
    "owners": [
      "device-platform"
    ],
    "repo_paths": [
      "apps/system/TopoloProvision"
    ],
    "external_repo_paths": [
      "Apps/business/TopoloMDM"
    ],
    "service_ids": [
      "srv_02eOqAEBBG3F",
      "srv_CybRl1xIRoAI",
      "srv_Vfp9Yn4yduAV"
    ],
    "visibility": "public",
    "api_contract": {
      "type": "curated",
      "source": "PlatformApplications/TopoloDocs/src/content/public/applications/mdm.mdx",
      "notes": "Canonical MDM coverage now lives in the docs application, and the console authenticated workspace renders through `TopoloAppShell`, inheriting shared Improve Topolo and TopoloNotify chrome while keeping fleet workflows MDM-owned. The console now routes launcher catalog reads plus tenant bootstrap through same-origin /api/auth/* on the app host. The console browser callback delegates one-time `sso_code` exchange to the shared Auth client instead of carrying MDM-local `/sso/exchange` protocol logic. The API worker validates browser console JWTs by resolving the `topolo-mdm` service slug and keeps API-key validation under the separate `topolo-mdm-api` slug. Device registration and first-poll recovery consume authenticated enrollment-session tokens, then issue device credentials required for subsequent poll, command-status, device realtime, and device FCM-token registration calls. The API worker owns a tenant-scoped `TENANT_EVENTS` Durable Object for operator WebSocket fleet events and device command wakeups, and uses Firebase Cloud Messaging HTTP v1 as a data-only wake channel for enrolled Android devices that have posted an FCM token. TopoloProvision QR/R2 APK builds remain the device-owner enrollment path, while Google Play internal-testing builds are a sales/demo distribution lane that runs without kiosk/device-owner assumptions until Android Enterprise enrollment. Current Android DPC builds call `https://mdm-api.topolo.app`; the Topolo-owned staging mirror uses `https://mdm-api.stg.topolo.us`. The Android package id is `com.topolo.provision` for Firebase, Google Play, and Android Enterprise device-admin payloads. Install-package catalog reads now point at the Developers-owned `https://developers.topolo.app/api/apps` route, where Topolo Feed, Topolo Provision, and the 22 retained Topolo Mobile Android APKs are R2-backed installable rows served from apk.topolo.app, while Topolo MDM Mobile remains Android/iOS metadata until its own mobile release. The mobile scaffold reads only the SDK-managed topolo_access_token key for bearer API requests, subscribes to `/events` for fleet freshness, and resolves `topolo_auth_flutter` from the canonical Auth repo git package path."
    },
    "primary_hosts": [
      "https://mdm.topolo.app",
      "https://mdm-api.topolo.app",
      "https://mdm.stg.topolo.us",
      "https://mdm-api.stg.topolo.us"
    ],
    "doc_paths": [
      "applications/mdm",
      "internal/apps/mdm"
    ],
    "security_assurance": {
      "risk_tier": "critical",
      "auth_boundary": "Topolo Auth one-time SSO exchange-code callback with MDM-owned device, tenant, and API authorization. Protected MDM API bearer-token requests must validate through Auth, browser console JWTs validate against the console service id, API-key requests validate against the API service id, device enrollment consumes one-time server-issued enrollment tokens before issuing per-device credentials, and no path may fall back to locally decoded JWT claims from a Worker secret.",
      "tenant_isolation": "organization_scoped",
      "external_inputs": [
        "browser",
        "api",
        "callback",
        "queue",
        "scheduled_task"
      ],
      "sensitive_data": [
        "identity",
        "org_data",
        "customer_content",
        "telemetry"
      ],
      "last_security_review": "2026-04-30",
      "security_review_status": "reviewed",
      "pentest_status": "passed",
      "evidence_doc": "internal/apps/mdm"
    },
    "data_privacy": {
      "classification": "restricted",
      "sensitive_data_classes": [
        "customer_content",
        "device_data",
        "identity",
        "organization",
        "telemetry"
      ],
      "storage_locations": [
        "external_provider",
        "kv",
        "r2"
      ],
      "encryption_at_rest": "application_layer_required",
      "encryption_in_transit": "https_only",
      "key_management": "versioned_platform_key_required",
      "retention_policy": "partial",
      "deletion_export_status": "planned",
      "logging_redaction_status": "needs_review",
      "privacy_review_status": "reviewed",
      "enterprise_ready": false,
      "evidence_doc": "internal/apps/mdm"
    },
    "dependencies": [
      "topolo-auth",
      "applications-packages",
      "topolo-developers"
    ],
    "bugfix_policy": {
      "tier": "autonomous",
      "preferred_agent": "either",
      "require_validator": false
    },
    "public_hub_url": "/systems/topolo-mdm",
    "internal_hub_url": null,
    "application_api_url": "/reference/apps/topolo-mdm",
    "generated_openapi_url": null,
    "machine_urls": {
      "system": "/machine/systems/topolo-mdm.json",
      "application": "/machine/applications/topolo-mdm.json"
    }
  },
  "docs": {
    "public": [
      {
        "id": "applications/commerce",
        "title": "TopoloCommerce",
        "summary": "Public overview of the multi-vertical commerce platform for venue operations, guest runtimes, and staff execution.",
        "audience": "public",
        "tags": [
          "commerce",
          "venues",
          "kiosk"
        ],
        "url": "/applications/commerce",
        "last_verified": "2026-05-13"
      },
      {
        "id": "applications/mdm",
        "title": "TopoloMDM",
        "summary": "Public overview of the device-management cluster spanning the MDM API, operator console, and mobile scaffold.",
        "audience": "public",
        "tags": [
          "mdm",
          "devices",
          "operations"
        ],
        "url": "/applications/mdm",
        "last_verified": "2026-05-13"
      }
    ],
    "internal": [],
    "runbooks": []
  },
  "authority": {
    "owners": [
      "device-platform"
    ],
    "repo_paths": [
      "apps/system/TopoloProvision"
    ],
    "service_ids": [
      "srv_02eOqAEBBG3F",
      "srv_CybRl1xIRoAI",
      "srv_Vfp9Yn4yduAV"
    ],
    "dependencies": [
      "topolo-auth",
      "applications-packages",
      "topolo-developers"
    ],
    "aliases": []
  },
  "interfaces": {
    "contract_type": "curated",
    "contract_source": "PlatformApplications/TopoloDocs/src/content/public/applications/mdm.mdx",
    "contract_source_exists": false,
    "openapi": null,
    "readme": null
  },
  "auth": {
    "depends_on_topolo_auth": true,
    "api_key_scopes": [
      {
        "id": "aks_mdm_apps_read",
        "name": "apps.read",
        "description": "View app catalog and installations",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_apps_write",
        "name": "apps.write",
        "description": "Manage app deployments",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_commands_invoke",
        "name": "commands.invoke",
        "description": "Send remote commands to enrolled devices",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_dashboard_read",
        "name": "dashboard.read",
        "description": "View MDM dashboard",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_devices_admin",
        "name": "devices.admin",
        "description": "Administer managed devices and tenant-level device access",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_devices_control",
        "name": "devices.control",
        "description": "Send commands to devices (lock, wipe, etc)",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_devices_read",
        "name": "devices.read",
        "description": "View device inventory and status",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_devices_write",
        "name": "devices.write",
        "description": "Enroll and configure devices",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_admin",
        "name": "mdm.admin",
        "description": "Administer MDM fleet management operations",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_policies_manage",
        "name": "policies.manage",
        "description": "Author and assign device policies",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_policies_read",
        "name": "policies.read",
        "description": "View device policies and profiles",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_policies_write",
        "name": "policies.write",
        "description": "Create and edit device policies",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_reports_read",
        "name": "reports.read",
        "description": "View MDM reports and analytics",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_state_analytics_read",
        "name": "analytics.read",
        "description": "Access device analytics and metrics",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_state_commands_read",
        "name": "commands.read",
        "description": "View device command history",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_state_commands_write",
        "name": "commands.write",
        "description": "Send commands to devices",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_state_events_read",
        "name": "events.read",
        "description": "View device events and logs",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_state_read",
        "name": "state.read",
        "description": "Read device state and status data",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_state_write",
        "name": "state.write",
        "description": "Update device state information",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_api_keys_write",
        "name": "api_keys.write",
        "description": "Manage MDM API machine credentials",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_api_admin",
        "name": "mdm.admin",
        "description": "Full device management access",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_api_read",
        "name": "mdm.read",
        "description": "Read device information",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "id": "aks_mdm_api_write",
        "name": "mdm.write",
        "description": "Send commands to managed devices",
        "resourcePattern": null,
        "kind": "api_key_scope"
      }
    ],
    "service_permissions": [
      {
        "id": "perm_mdm_apps_read",
        "name": "apps:read",
        "description": "View app catalog and installations",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_apps_write",
        "name": "apps:write",
        "description": "Manage app deployments",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_commands_invoke",
        "name": "commands:invoke",
        "description": "Send remote commands to enrolled devices",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_dashboard_read",
        "name": "dashboard:read",
        "description": "View MDM dashboard",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_devices_admin",
        "name": "devices:admin",
        "description": "Administer managed devices and tenant-level device access",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_devices_control",
        "name": "devices:control",
        "description": "Send commands to devices (lock, wipe, etc)",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_devices_read",
        "name": "devices:read",
        "description": "View device inventory and status",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_devices_write",
        "name": "devices:write",
        "description": "Enroll and configure devices",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_admin",
        "name": "mdm:admin",
        "description": "Administer MDM fleet management operations",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_policies_manage",
        "name": "policies:manage",
        "description": "Author and assign device policies",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_policies_read",
        "name": "policies:read",
        "description": "View device policies and profiles",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_policies_write",
        "name": "policies:write",
        "description": "Create and edit device policies",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_reports_read",
        "name": "reports:read",
        "description": "View MDM reports and analytics",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_state_analytics_read",
        "name": "analytics:read",
        "description": "Access device analytics and metrics",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_state_commands_read",
        "name": "commands:read",
        "description": "View device command history",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_state_commands_write",
        "name": "commands:write",
        "description": "Send commands to devices",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_state_events_read",
        "name": "events:read",
        "description": "View device events and logs",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_state_read",
        "name": "state:read",
        "description": "Read device state and status data",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_state_write",
        "name": "state:write",
        "description": "Update device state information",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_api_keys_write",
        "name": "api_keys:write",
        "description": "Manage MDM API machine credentials",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_api_admin",
        "name": "mdm:admin",
        "description": "Full device management access",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_api_read",
        "name": "mdm:read",
        "description": "Read device information",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "id": "perm_mdm_api_write",
        "name": "mdm:write",
        "description": "Send commands to managed devices",
        "resourcePattern": null,
        "kind": "permission"
      }
    ]
  },
  "runtime": {
    "primary_hosts": [
      "https://mdm.topolo.app",
      "https://mdm-api.topolo.app",
      "https://mdm.stg.topolo.us",
      "https://mdm-api.stg.topolo.us"
    ],
    "repo_entries": [],
    "wrangler_surfaces": [],
    "packages": []
  },
  "data": {
    "env_vars": [],
    "bindings": [],
    "queue_bindings": [],
    "storage_kinds": [],
    "workflow_signals": []
  },
  "deployment": {
    "commands": [],
    "routes": [],
    "environments": [],
    "assets_directories": [],
    "observability_enabled": false
  },
  "debugging": {
    "failure_modes": [
      "No wrangler.toml surface was discovered under the registered repo paths.",
      "The registered contract source is missing: PlatformApplications/TopoloDocs/src/content/public/applications/mdm.mdx",
      "Neither OpenAPI nor README-derived interface detail was found."
    ],
    "entrypoints": [
      "PlatformApplications/TopoloDocs/src/content/public/applications/mdm.mdx"
    ]
  }
}