nanodep

module
v0.4.0 Latest Latest
Warning

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

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

README

NanoDEP

Go Go Reference

NanoDEP is a set of tools and a Go library powering them for communicating with Apple's Device Enrollment Program (DEP) API servers.

Getting started & Documentation

  • Quickstart
    A guide to get NanoDEP up and running quickly.

  • Operations Guide
    A brief overview of the various tools and utilities for working with NanoDEP.

Getting the latest version

  • Release .zip files containing the project 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/nanodep:latestdocker run ghcr.io/micromdm/nanodep: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.

Tools and utilities

NanoDEP contains a few tools and utilities. At a high level:

  • DEP configuration & reverse proxy server. The primary server component, called depserver is used for configuring NanoDEP and talking with Apple's DEP servers. It hosts its own API for configuring MDM server instances used with Apple's servers (called DEP names) and also hosts a transparently authenticating reverse proxy for talking 'directly' to Apple's DEP API endpoints.
  • Device sync & assigner. The depsyncer tool handles the device fetch/sync cursor logic to continually retrieve the assigned devices from one or more Apple DEP MDM server instance(s).
  • Scripts, tools, and helpers.
    • A set of tools and utilities for talking to the Apple DEP API services — mostly implemented as shell scripts that communicate to the depserver.
    • A stand-alone deptokens tool for locally working with certificate generation for DEP token decryption.

See the Operations Guide for more details and usage documentation.

Go library

NanoDEP is also a Go library for accessing the Apple DEP APIs. There are two components to the Go library:

  • The higher-level godep package implements Go methods and structures for talking to the individual DEP API endpoints.
  • The lower-level client package implements primitives, helpers, and middleware for authenticating to the DEP API and managing sessions tokens.

See the Go Reference documentation (or the Go source itself, of course) for details on these packages.

Directories

Path Synopsis
Package cli contains shared command-line helpers and utilities.
Package cli contains shared command-line helpers and utilities.
Package client implements HTTP primitives for talking with and authenticating with the Apple DEP APIs.
Package client implements HTTP primitives for talking with and authenticating with the Apple DEP APIs.
cmd
Package godep provides Go methods and structures for talking to individual DEP API endpoints.
Package godep provides Go methods and structures for talking to individual DEP API endpoints.
Package http includes handlers and utilties
Package http includes handlers and utilties
api
Package api implements HTTP handlers for the NanoDEP API.
Package api implements HTTP handlers for the NanoDEP API.
log
ctxlog
Package ctxlog allows logging data stored with a context.
Package ctxlog allows logging data stored with a context.
Pacakge proxy provides a reverse proxy for talking to Apple DEP APIs based on the standard Go reverse proxy.
Pacakge proxy provides a reverse proxy for talking to Apple DEP APIs based on the standard Go reverse proxy.
test
Package test offers a battery of tests for storage.AllStorage implementations.
Package test offers a battery of tests for storage.AllStorage implementations.
Package sync provides services to sync devices and assign profile UUIDs using the Apple DEP APIs.
Package sync provides services to sync devices and assign profile UUIDs using the Apple DEP APIs.
Package tokenpki includes helpers and utilities for exchanging certificates and parsing token PKCS#7 S/MIME messages from the Apple ABM/ASM/BE portals.
Package tokenpki includes helpers and utilities for exchanging certificates and parsing token PKCS#7 S/MIME messages from the Apple ABM/ASM/BE portals.

Jump to

Keyboard shortcuts

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