Commit Graph

39 Commits

Author SHA1 Message Date
Scott Knight
6dcd89ac49 Cleanup blueprint indexing (#447)
Saving a blueprint was creating multiple records in the
blueprint index bucket. One was the index that gets used
for lookup which is a key of the blueprint Name and the value
being the blueprint UUID and the other record had a key and
value of blueprint UUID. The	second with a key of UUID is not
needed since the key in the main blueprint bucket is already UUID
2018-07-05 16:28:26 -04:00
Scott Knight
0b953e5d69 Create a custom http.Client for apns communication (#446)
In order to set custom transport options on the http.Client used
by the push service we need to create our own instance. This
allows us to configure the IdleConnTimeout and prevent connections
from being killed and pushes not being sent. 90 seconds is used
here since it's the same as the DefaultTransport provided by Go.
2018-06-22 17:40:12 -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
f13953790b Create pushinfo Worker separate from DB implementation (#445) 2018-06-21 11:34:19 -04:00
Jesse Peterson
2696fee2e7 Fix code-never-reached situation (#434) 2018-06-13 21:44:37 -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
ee3f43d4c6 create user worker separate from DB implementation. (#426) 2018-05-30 09:18:04 -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
1916f2a2f5 add logging to device block service (#425) 2018-05-29 07:41:57 -04: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
3eca74879a update circle-ci to go 1.10 (#419) 2018-05-12 19:28:56 -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
Victor Vrantchan
c1c1cfb175 refactor command service to use one method per file (#416)
Updated the command service to have the same structure as all the other services within platform/...
2018-05-12 17:04:05 -04:00
Victor Vrantchan
3114badbb7 remove no longer used proto types. (#415) 2018-05-12 16:13:17 -04:00
Victor Vrantchan
6da097ec78 move MDM types to micromdm/micromdm (#341)
Previously the github.com/micromdm/mdm library was used, but the code there was a bit naive and had a few issues as it grew to support the full library of MDM Commands. 

All the request types have been moved to `package mdm`.
2018-05-12 15:54:04 -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
Jesse Peterson
0f0df96176 Only allow saving Blueprints with unique names (#382)
Fixes #380.
2018-05-02 12:36:48 -07:00
Dan Falzon
2768a611d5 updated added another 0 to the value (#387)
Closes #385
2018-03-15 08:15:43 -04:00
Jesse Peterson
979f32be43 Raise command API limit (#376) 2018-01-29 22:51:34 -08:00
Jesse Peterson
91169c9933 Fix issue where errors.Wrap()-ing an error hides its interface type (#372)
* Fix issue where errors.Wrap()-ing an error hides its interface type
* Get the Cause, rather than discarding wrapping
2018-01-23 18:58:51 -08:00
Brett Demetris
f7580b38bc remove expectation of json from decodeListDeviceRequest (#365) 2018-01-08 20:24:04 -05:00
Victor Vrantchan
175b84e631 refactor apns API and datastore (#359)
Closes #306
2017-12-14 20:35:50 -05:00
Victor Vrantchan
6e561224d0 refactor dep api endpoints (#355)
Closes #331
Closes #329
Closes #323
2017-12-12 08:31:35 -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
431a09998c refactor app upload APIs (#353)
Closes #296
2017-12-10 01:21:59 -05:00
Victor Vrantchan
5ff82344be refactor config api (#352)
Closes #300
Closes #303
2017-12-10 00:39:04 -05:00
Victor Vrantchan
c5b1e8ccce refactor user api (#351)
Closes #307
2017-12-09 22:42:03 -05:00
Victor Vrantchan
45aacebb02 add common http functions to httputil pkg (#350) 2017-12-09 21:14:42 -05:00
Victor Vrantchan
5ff0a2f7f3 refactor block service for HA (#349) 2017-12-09 19:04:06 -05:00
Victor Vrantchan
c87bca7116 refactor blueprint service for HA (#348)
Cleanup blueprints by moving the service into its own package.

Closes #297
2017-12-09 18:09:06 -05:00
Victor Vrantchan
83ea8491aa reorganize profile service (#347)
Moved all the endpoints into the profile package.
Defined a Store interface which includes all the used BoltDB methods.
Moved the BoltDB implementation into a subpackage.
2017-12-09 16:50:10 -05:00
Victor Vrantchan
ce6e18f18d add checkout middleware (#342)
Implement a connect service middleware which allows an operator to forcefully un-enroll a device. 

Documentation: https://github.com/micromdm/micromdm/wiki/Terminating-a-Management-Relationship-with-a-device-block
2017-11-30 23:17:51 -05:00
Victor Vrantchan
49d2e582d2 move apiserver into api/server. (#340)
re-did the folder structure for the API. The client still lives in the server
packages, but will be gradually moved into api/client to remove coupling and make the APIs clearer.
2017-11-24 11:00:35 -05:00
Victor Vrantchan
3d77b69b67 add deptoken to the platform folder. (#338)
I noticed that all deptoken is is a store for DEP tokens, which fits nicely with
the rest of the storage/api packages in platform.

The next step will be to move the deptoken store into the config package, but it must be
done in a gradual way since people are already using it today.
2017-11-24 10:26:26 -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