nanomdm

module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2024 License: MIT

README

NanoMDM

Go

NanoMDM is a minimalist Apple MDM server heavily inspired by MicroMDM.

Getting started & Documentation

  • Quickstart
    A quick guide to get NanoMDM up and running using ngrok.

  • Operations Guide
    A brief overview of the various command-line switches and HTTP endpoints and APIs available to NanoMDM.

Getting the latest version

  • Release .zip files containing the server and supplementals should be attached to every GitHub release.
    • Release zips are also published for every main branch commit.
  • A Docker container is built and published to the GHCR.io registry for every release.
    • docker pull ghcr.io/micromdm/nanomdm:latestdocker run ghcr.io/micromdm/nanomdm:latest
    • A Docker container is also published for every main branch commit (and tagged with :main)
  • If you have a Go toolchain installed you can checkout the source and simply run make.

Features

  • Horizontal scaling: zero/minimal local state. Persistence in storage layers. MySQL and PostgreSQL backends provided in the box.
  • Multiple APNs topics: potentially multi-tenant.
  • Multi-command targeting: send the same command (or pushes) to multiple enrollments without individually queuing commands.
  • Migration endpoint: allow migrating MDM enrollments between storage backends or (supported) MDM servers
  • Otherwise we share many features between MicroMDM and NanoMDM, such as:
    • A MicroMDM-emulating HTTP webhook/callback.
    • Enrollment-certificate authorization
    • API-driven interaction (queuing of commands, APNs pushes, etc.)

$x not included

NanoMDM is but one component for a functioning MDM server. At a minimum you need a SCEP server and TLS termination, for example. If you've used MicroMDM before you might be interested to know what NanoMDM does not include, by way of comparison.

  • SCEP.
    • Spin up your own scep server. Or bring your own.
  • TLS.
    • You'll need to provide your own reverse proxy/load balancer that terminates TLS.
  • ADE (DEP) API access.
    • While ADE/DEP enrollments are supported there is no DEP API access.
  • Enrollment (Profiles).
    • You'll need to create and serve your own enrollment profiles to devices.
  • Blueprints.
    • No 'automatic' command sending upon enrollment. Entirely driven by webhook or other integrations.
  • JSON command API.
    • Commands are submitted in raw Plist form only. See the cmdr.py tool that helps generate raw commands
    • The micro2nano project provides an API translation server between MicroMDM's JSON command API and NanoMDM's raw Plist API.
  • VPP.
  • Enrollment (device) APIs.
    • No ability, yet, to inspect enrollment details or state.
    • This is partly mitigated by the fact that both the file and mysql storage backends are "easy" to inspect and query.

Architecture Overview

NanoMDM, at its core, is a thin composable layer between HTTP handlers and a set of storage abstractions.

  • The "front-end" is a set of standard Golang HTTP handlers that handle MDM and API requests. The core MDM handlers adapt the requests to the service layer. These handlers exist in the http package.
  • The service layer is a composable interface for processing and handling MDM requests. The main NanoMDM service dispatches to the storage layer. These services exist under the service package.
  • The storage layer is a set of interfaces and implementations that store & retrieve MDM enrollment and command data. These exist under the storage package.

You can read more about the architecture in the blog post Introducing NanoMDM.

Directories

Path Synopsis
Package certverify contains services for verifying MDM certs
Package certverify contains services for verifying MDM certs
Package cli contains shared command-line helpers and utilities.
Package cli contains shared command-line helpers and utilities.
cmd
Package cryptoutil contains crypto-related helpers and utilities.
Package cryptoutil contains crypto-related helpers and utilities.
Package http includes handlers and utilties
Package http includes handlers and utilties
api
authproxy
Package authproxy is a simple reverse proxy for Apple MDM clients.
Package authproxy is a simple reverse proxy for Apple MDM clients.
mdm
log
ctxlog
Package ctxlog allows logging data stored with a context.
Package ctxlog allows logging data stored with a context.
Package mdm contains structures and helpers related to the Apple MDM protocol.
Package mdm contains structures and helpers related to the Apple MDM protocol.
Package push defines interfaces, types, etc.
Package push defines interfaces, types, etc.
buford
Pacakge buford adapts the buford APNs push package to the PushProvider and PushProviderFactory interfaces.
Pacakge buford adapts the buford APNs push package to the PushProvider and PushProviderFactory interfaces.
nanopush
Pacakge nanopush implements an Apple APNs HTTP/2 service for MDM.
Pacakge nanopush implements an Apple APNs HTTP/2 service for MDM.
service
Package service retrieves push details from storage and sends MDM push notifications.
Package service retrieves push details from storage and sends MDM push notifications.
Package service defines an MDM service
Package service defines an MDM service
certauth
Package certauth
Package certauth
dump
Pacakge dump is a NanoMDM service that dumps raw responses
Pacakge dump is a NanoMDM service that dumps raw responses
microwebhook
Package microwebhook provides a MicroMDM-emulating webhook
Package microwebhook provides a MicroMDM-emulating webhook
multi
Package multi contains a multi-service dispatcher.
Package multi contains a multi-service dispatcher.
nanomdm
Pacakge nanomdm is an MDM service.
Pacakge nanomdm is an MDM service.
Package storage defines interfaces, types, data, and helpers related to storage and retrieval for MDM enrollments and commands.
Package storage defines interfaces, types, data, and helpers related to storage and retrieval for MDM enrollments and commands.
file
Package file implements filesystem-based storage for MDM services
Package file implements filesystem-based storage for MDM services
mysql
Package mysql stores and retrieves MDM data from MySQL
Package mysql stores and retrieves MDM data from MySQL
pgsql
Package pgsql stores and retrieves MDM data from PostgresSQL
Package pgsql stores and retrieves MDM data from PostgresSQL

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL