33 Commits

Author SHA1 Message Date
Jesse Peterson
3b78775481 remove vestiges of sql (#998) 2024-07-22 19:50:02 -07:00
Ian Mckay
2a5636fa4e bugfix: Adjust error comparison in builtin stores (#975) 2024-03-06 13:26:51 -08:00
Jesse Peterson
1f01f70dba Declarative Management hand-off (#882) 2023-05-02 08:54:04 -07:00
hrgbcxd
1e49dc2585 Feature/add lom commands (#839) 2022-07-20 08:27:24 -07:00
Martin Friedrich
7abe02999d Golang updates (#783) 2021-10-29 19:57:49 -04:00
Jesse Peterson
5daf4d1c84 Remove gogo/protobuf (#773) 2021-10-16 13:21:24 -07:00
Kory Prince
804b4391ab Use []byte instead of string for BootstrapToken protobuf (#782) 2021-10-06 13:02:26 -07:00
Kory Prince
fcf1d185fc Bootstrap Token (#781)
* 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>
2021-10-05 10:43:46 -07:00
Jesse Peterson
4e684a40d2 Refactor MDM service to return a payload from check-ins (#764)
* Refactor MDM service to return a payload from check-ins

* Documented public methods, add documentation to main service interface

* Remove interface-implementing comments
2021-07-01 16:13:39 -07:00
Jesse Peterson
ef5d879d27 CircleCI→GitHub Actions (#740)
* CircleCI→GitHub Actions
* Fix gofmt files
2021-04-21 20:51:39 -07:00
Jesse Peterson
c6db60ce61 UDID Cert Auth warn only (#643) 2020-08-29 11:27:34 -07:00
Victor Vrantchan
39230bbdfe replace UUID dependency (#665)
replaced the satori/uuid package which was no longer maintained

Closes #664
2020-04-23 20:00:18 -04:00
Graham Gilbert
310fd1ee75 Add DEPProfileStatus to API response (#617)
Exposes the dep_profile_status field in the devices response.
2019-10-02 11:04:32 -04:00
Victor Vrantchan
127955dc74 Support User Enrollment (#597)
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.
2019-06-29 15:36:13 -07:00
Victor Vrantchan
17bce22e95 add postgres device store (#531) 2018-10-13 21:05:19 -04:00
jenjac
3370b9cb11 GET to POST (#522)
Changed GET to POST as a GET with a request body is not preferred.
2018-10-10 12:32:02 -04:00
Danny Lockard
f45a0469f0 Some cleanup based on goreportcard linters (#517) 2018-10-02 14:54:10 -04:00
Jesse Peterson
d150d031e8 UDID/device certificate authentication (v.2) (#429)
udid-cert auth v.2. refactor udidauth and cert verification to be MDM service middleware
2018-09-11 20:25:49 -07:00
Victor Vrantchan
93fb332b84 Depsync cleanup (#505)
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.
2018-09-11 02:01:25 +00:00
Scott Knight
8a941542f7 Support device removal by serial number (#484)
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.
2018-08-23 14:58:41 -04:00
Scott Knight
529860bf15 Allow removal of device records (#444)
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.
2018-06-21 11:43:16 -04:00
Scott Knight
136567a7a5 Ensure enrollment message is published for newly enrolled devices (#431) 2018-06-11 07:52:28 -07:00
Victor Vrantchan
1ccf1c8ca1 decouple device updates from db CRUD (#427)
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.
2018-05-30 09:14:41 -07:00
Victor Vrantchan
dcd0ec4a41 reorganize MDM service into a single package. (#423) 2018-05-27 17:47:21 -04:00
Scott Knight
4283b5a76e Prevent multiple device records with the same UDID (#422) 2018-05-27 10:16:30 -04:00
Victor Vrantchan
70d26149ae only register HTTP routes once (#418)
Simplified the registration of HTTP routes.
Moved basic auth middleware to use the provided go-kit library.
2018-05-12 19:17:40 -04:00
Jesse Peterson
10d6d99f9b DEP auto-assignment (v2) (#405)
Support DEP auto-assignment in MicroMDM.

Resolves #227.
Resolves #178.
2018-05-11 13:52:06 -07:00
Jesse Peterson
b53f9b5c5e Rename LastCheckin to LastSeen (#409)
Rename LastCheckin variable to LastSeen. Change protobuf names as well.
2018-05-09 15:02:45 -07:00
Brett Demetris
9d15fff516 search a serial out of all serials (#363)
* 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
2018-05-07 10:22:54 -07:00
Brett Demetris
f7580b38bc remove expectation of json from decodeListDeviceRequest (#365) 2018-01-08 20:24:04 -05:00
groob
6dbbd930fd implement failer for device response
Ensures that errors are returned in a structured JSON format.
2017-12-10 10:11:55 -05:00
Victor Vrantchan
1d8f75e290 refactor device api (#354) 2017-12-10 10:01:03 -05:00
Victor Vrantchan
91c236c8c3 organize essential APIs into platform, workflow and pkg folders (#337)
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.
2017-11-23 22:07:57 -05:00