* Partial implementation of Bootstrap Token
Fetching the token from the db and sending it back to the client when the client asks for it ie sends the GetBootstrapTokenRequest is not implemented
Also earlier code for Bootstrap Token from commit 58c3782 "mdm: add SetBootstrapToken command." is removed
* implements rest of the bootstrap token feature - micromdm now sends bootstrap token back to the client, when client requests it
* regenerate some proto files
* use original proto generator versions
checkin.pb.go: golang/protobuf@v1.2.0
mdm.pb.go: gogo/protobuf@v1.3.2
device.pb.go: golang/protobuf@v1.0.0
* cleanup syntax
* use more idiomatic naming
* clean up BootstrapToken storage
* add GetBootstrapToken test
* remove extra newline
Co-authored-by: Jesse Peterson <jessepeterson@users.noreply.github.com>
* add doc comments
Co-authored-by: Ilkka Vanhatalo <ilkka.vanhatalo@helsinki.fi>
Co-authored-by: Jesse Peterson <jessepeterson@users.noreply.github.com>
* Refactor MDM service to return a payload from check-ins
* Documented public methods, add documentation to main service interface
* Remove interface-implementing comments
In iOS 10.13/macOS 10.15 a new, BYOD specific enrollment type was added, called User Enrollment.
This enrollment type replaces the typical UDID field in checkin and acknowledge requests with a EnrollmentID field which is unique per each enrollment. One important aspect of this enrollment type is that no personally identifiable information is available to the MDM (UDID, SerialNumber).
The implementation implemented here adds the new EnrollmentID field where appropriate, and ensures that the device tables do not store the enrollment ID.
I will follow up this change set with one that allows listing/removing current enrollment IDs in a similar way that mdmctl get devices and mdmctl get users does.
Closes#302
This package still needs a lot of work, but I feel like this is a good stopping point.
In a follow up, I plan on writing some tests, and refactoring some of the ways the sync.Watcher goroutines are managed.
The remove devices command now supports taking a list of udids and list of serials. You can provide list or the other or both. The remove command will simply loop through all devices passed in and attempt to delete.
The new remove devices command takes a UDID or list of UDIDs
as input and calls the devices delete endpoint. Since serial number
isn't strictly required by the spec it seemed to make more sense
to keep the remove working with only UDIDs. The get devices command
with a serial number filter can always be used to look up a UDID
from a serial number.
Move the code for polling topics and updating device records into an independent worker.
Cleans up the code and makes it possible to swap the db backend.
* search a serial out of all serials
* clean up usage
* roll back development code, cleanup
* pull changes to mdmctl and decode url params
* wire up List to accept opts with debugging
* implement forEach without filtering opt
* implement filtering for multiple inbound serials
* drop gorilla/schema in favor of json body
* address comments
* tighten up return
* remove device.Store ref and make use of httputil pkg
Add more logic to the way code is organized.
/pkg -- library code not directly connected to micromdm
/mdm -- packages meant for the services devices interract with. The MDM protocol.
/dep -- DEP API and related packages.
/platform -- Core APIs the server provides. Commands API, Devices API, queue, pubsub etc.
/workflow -- Packages/API that build on top of platform. Today that's the webhook package.
Depending on what ends up here, the workflow folder might become its own repository.