Commit Graph

202 Commits

Author SHA1 Message Date
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
a4bcc70a93 Create CODE_OF_CONDUCT.md (#334) 2017-11-30 23:15:33 -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
groob
d968dc4fdb remove dupe from dockerfile 2017-11-24 10:48:40 -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
Victor Vrantchan
bc34ace413 organize dep packages in a dep subfolder (#336)
Moves deptoken and depsync into dep.
2017-11-23 15:47:53 -05:00
Victor Vrantchan
591dbe37fc Organize MDM server packages into mdm folder (#335)
Organize the packages essential to the MDM server into a mdm folder.
This includes the enroll, checkin and connect services. The packages in this folder make up the
APIs that a device will directly interact with.
2017-11-23 15:37:49 -05:00
Victor Vrantchan
1169794f71 move main into cmd subdirectory (#333)
Moved all the go files from the top level directory into the cmd/ package.
Updated Makefile so that all the commands still work.

The common pattern in Go programs, and one we adapted with the addition with the mdmdctl binary is that binaries live in cmd/binary-name/binary-name.go while libraries live in folders at the top level.
2017-11-23 13:45:53 -05:00
Clayton Burlison
4325c60b0a Update Makefile (#332)
Fix typo
2017-11-21 14:28:09 -08:00
Victor Vrantchan
e3348a9a30 add version handler (#327) 2017-11-19 18:20:22 -05:00
Robin van Boven
0663d4780c Implemented command response webhook as a pubsub listener. (#315)
Closes #223
See #216
2017-11-19 18:13:10 -05:00
Jesse Peterson
30876f2767 Support supplied depsim URL (#318) 2017-11-19 16:35:32 -05:00
Robin van Boven
eabc568319 Created a Dockerfile (#316) 2017-11-09 11:17:43 -05:00
thepriefy
d8b044fe1b create ISSUE_TEMPLATE (#294)
Closes #292
2017-11-05 21:00:55 -05:00
Victor Vrantchan
c8642a17ce update changelog for release (#290) v1.2.0 2017-10-31 00:38:05 -04:00
Nate Walck
a3e228fbbe Added ability to store multiple servers and switch between them (#275)
Added ability to store multiple servers, switch between them and migrate old config format to new config format.

Closes #189
2017-10-30 23:37:12 -04:00
Victor Vrantchan
777f9af8f0 add usage text for dep-profiles (#289)
Closes #288
2017-10-30 22:38:21 -04:00
Victor Vrantchan
3f0238719c correctly encode the pkgurl in the manifest (#287)
Closes #286
2017-10-30 18:04:08 -04:00
Victor Vrantchan
382b3d0cec user checkins (#283)
Enables managing a local user on macOS. 
Network users are not tested/unsupported at this time. Shared iPad probably isn't either. 
When a new managed user is created, the existing managed users from the device are deleted. This is because there can only be one managed user per macOS device so the old users are deleted. 

This change enables targeting a user id instead of a device by using the UserID field (the users GUID) in push notifications and MDM commands. 

Closes #274
Closes #247
Closes #248
Closes #208
2017-10-30 08:45:15 -04:00
Victor Vrantchan
ad4ec6ffdb create push service from TLS cert if there's no cert in the DB (#284) 2017-10-30 08:01:03 -04:00
Victor Vrantchan
c8464f8e6b eliminate dead code (#282) 2017-10-29 18:25:09 -04:00
Victor Vrantchan
b72bdad58a update makefile to include linux build of mdmctl (#281)
Closes #277
2017-10-29 12:41:47 -04:00
Victor Vrantchan
e7082433de use the topic from -apns-cert if specified (#280)
The MDM Certificate should now be uploaded instead of specified in a
flag, but the flag should still work for backwards compatibility.

Closes #260
2017-10-28 18:29:05 -04:00
Victor Vrantchan
bbf44ab586 timeout boltdb open connections after 1 second (#279)
Closes #267
2017-10-28 18:10:11 -04:00
Victor Vrantchan
40ff3673ce add erasedevice and devicelock fields (#271) 2017-10-27 01:15:06 -04:00
Victor Vrantchan
1defd8b922 add accountconfiguration flags to blueprint (#269)
Closes #261
2017-10-27 00:23:14 -04:00
Nate Walck
9c9455330a Remove u.Scheme as we are handling that just before parsing (#266)
Added tests
2017-10-26 13:01:53 -04:00
Nate Walck
a0b092af5c Fixed https prepend logic (#265) 2017-10-26 11:16:31 -04:00
Nate Walck
aab6e291eb Changed output file extension to .plist for PushCertificateRequest (#264)
Closes #259
2017-10-26 10:53:21 -04:00
Victor Vrantchan
a100e7570d add logging middleware to push service (#262) 2017-10-24 21:33:11 -04:00
Victor Vrantchan
dd189edfae remove go1.8 compatibility (#263) 2017-10-24 21:24:57 -04:00
Victor Vrantchan
43d026c970 Add users (#258)
For #248 

Added a User DB similar to the Device DB. 
The user specification be added with the API/mdmctl commands and then referenced with a blueprint. 
If added to the blueprint, the user will be installed as an administrator during the AccountConfiguration step.
2017-10-24 20:34:41 -04:00
Victor Vrantchan
ad28f03a95 add proper logging to connect service (#257) 2017-10-21 17:38:18 -04:00
Victor Vrantchan
5677f44e3d model AccessRights as OR bit-flags (#256)
Exactly as specified in "Structure of MDM Payloads"
2017-10-21 17:16:38 -04:00
Victor Vrantchan
4b285af74e send mdm responses to pubsub (#254)
Wraps mdm.Responses into pubsub events and sends them downstream
This PR does not yet implement the full mdm.Response as an event, only the metadata.

The device db adds a subscription to mdm responses and updates the LastCheckin key.

Closes #251
2017-10-21 16:17:37 -04:00
Nate Walck
665e2b8bcc Fixed formatting in mdmctl for #240 (#250)
Closes #240
2017-10-17 08:20:56 -04:00
Victor Vrantchan
8d153ca7a7 add settings mdm command (#245) 2017-10-16 14:54:48 -04:00
Victor Vrantchan
d61c1c9b22 marshal install_action key (#244) 2017-10-16 00:02:24 -04:00
Victor Vrantchan
8724f75a5d refresh lockfile (#243)
Bring dependencies up to date

PROJECT                             CONSTRAINT  VERSION        REVISION  LATEST   PKGS USED
github.com/RobotsAndPencils/buford  *           v0.12.0        1589c17   1589c17  3
github.com/boltdb/bolt              ^1.3.0      v1.3.1         2f1ce7a   2f1ce7a  1
github.com/fullsailor/pkcs7         *           branch master  a009d8d   a009d8d  1
github.com/garyburd/go-oauth        *           branch master  4cff9ef   4cff9ef  1
github.com/go-kit/kit               ^0.6.0      v0.6.0         4dc7be5   4dc7be5  5
github.com/go-logfmt/logfmt         *           v0.3.0         390ab79   390ab79  1
github.com/go-stack/stack           *           v1.6.0         817915b   817915b  1
github.com/gogo/protobuf            *           v0.5           342cbe0   342cbe0  1
github.com/golang/protobuf          *           branch master  130e6b0   130e6b0  1
github.com/gorilla/context          *           v1.1           1ea2538   1ea2538  1
github.com/gorilla/mux              ^1.3.0      v1.5.0         24fca30   24fca30  1
github.com/groob/finalizer          *           branch master  4c2ed49   4c2ed49  2
github.com/groob/plist              *           branch master  7b367e0   7b367e0  1
github.com/kr/logfmt                *           branch master  b84e30a   b84e30a  1
github.com/micromdm/dep             *           branch master  3e565f8   3e565f8  1
github.com/micromdm/go4             *           branch master  486ea5f   486ea5f  3
github.com/micromdm/mdm             *           branch master  97c19c7   97c19c7  1
github.com/micromdm/scep            *           v1.0.0         a202afd   a202afd  5
github.com/pkg/errors               ^0.8.0      v0.8.0         645ef00   645ef00  1
github.com/satori/go.uuid           ^1.1.0      v1.1.0         879c588   879c588  1
golang.org/x/crypto                 *           branch master  9419663   9419663  4
golang.org/x/net                    *           branch master  a04bdac   a04bdac  5
golang.org/x/sys                    *           branch master  6860007   6860007  1
golang.org/x/text                   *           branch master  c01e476   c01e476  14
golang.org/x/tools                  *           branch master  9bd2f44   9bd2f44  2
2017-10-15 23:12:11 -04:00
Victor Vrantchan
91c9b96f44 try to set topic when initializing enroll service (#242) 2017-10-15 23:01:29 -04:00
Victor Vrantchan
4b9b004d39 mdmctl dep-tokens provide defaults (#241)
Adds default paths to save the DEP token and public key for the
dep-tokens commands.
2017-10-15 21:44:04 -04:00
Victor Vrantchan
dfc8cca3d8 mdmctl can upload/replace push certificate (#238)
Closes #236
2017-10-15 21:08:48 -04:00
Victor Vrantchan
aacac39945 move certhelper into mdmctl (#235)
Add mdmcert subcommand which helps create new MDM Push certificates.
2017-10-15 14:47:10 -04:00
Victor Vrantchan
df2c83cdf0 use CircleCI workflows to create build matrix. (#234)
Updates the CircleCI config to use the Workflows feature, which allows
testing multiple Go versions.
2017-10-04 11:58:39 -04:00
Victor Vrantchan
e3652d14e3 use current platform when building with make (#233) 2017-10-04 11:43:23 -04:00
Victor Vrantchan
fe191eb7cc Added micromdm/go4 as a dependency. (#229)
Improves http debug logging by also logging the sent response.
Converts regular http logs to key-value format.
Changes the http server options to httputil.ListenAndServe, which is antended to be a standard
ListenAndServe method for all micromdm project.

Adds environment variables as configuration options for sensitive values.
Closes #196
2017-09-11 17:14:12 +03:00
Victor Vrantchan
07adb497bb add Makefile (#228) 2017-09-10 21:40:57 +03:00
Niklas Bölter
4f86fe5679 Power Nap leads to infinite loop (#225)
* Fix: do not send new command after NotNow

* Fixed NotNow infinite loop by adding new queue
2017-09-04 05:54:55 +03:00