Skip to content
This repository was archived by the owner on Mar 11, 2021. It is now read-only.

Commit 11fe53b

Browse files
groobjoeblau
authored andcommitted
Initial commit
0 parents  commit 11fe53b

26 files changed

Lines changed: 1474 additions & 0 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 MicroMDM
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# docs

config.toml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
baseURL = "https://www.micromdm.io/"
2+
languageCode = "en-us"
3+
title = "MicroMDM Docs"
4+
theme = "hugo-material-docs"
5+
metadataformat = "yaml"
6+
canonifyurls = true
7+
8+
9+
[params]
10+
author = "Joe Blau"
11+
description = "MicroMDM documentation."
12+
copyright = "Released under the MIT license"
13+
provider = "GitHub"
14+
repo_url = "https://github.com/micromdm/docs"
15+
logo = "images/logo.svg"
16+
17+
[params.palette]
18+
primary = "light-blue"
19+
accent = "red"
20+
21+
[params.font]
22+
text = "Ubuntu"
23+
code = "Ubuntu Mono"
24+
25+
[[menu.main]]
26+
name = "MicroMDM docs"
27+
url = ""
28+
weight = 10
29+
30+
[[menu.main]]
31+
name = "API"
32+
url = "api"
33+
weight = 20
34+
35+
[[menu.main]]
36+
name = "Bugs"
37+
url = "bugs"
38+
weight = 30
39+
40+
[[menu.main]]
41+
name = "Community"
42+
url = "community"
43+
weight = 40
44+
45+
[[menu.main]]
46+
name = "Contributing"
47+
url = "contributing"
48+
weight = 50
49+
50+
[[menu.main]]
51+
name = "DEP"
52+
url = "dep"
53+
weight = 60
54+
55+
[[menu.main]]
56+
name = "Deployment"
57+
url = "deployment"
58+
weight = 70
59+
60+
[[menu.main]]
61+
name = "Device Block"
62+
url = "device-block"
63+
weight = 80
64+
65+
[[menu.main]]
66+
name = "Distribution"
67+
url = "distribution"
68+
weight = 90
69+
70+
[[menu.main]]
71+
name = "Hancock"
72+
url = "hancock"
73+
weight = 100
74+
75+
[[menu.main]]
76+
name = "mdmcert"
77+
url = "mdmcert"
78+
weight = 110
79+
80+
[[menu.main]]
81+
name = "Quickstart"
82+
url = "quickstart"
83+
weight = 120
84+
85+
[[menu.main]]
86+
name = "RFCs"
87+
url = "rfcs"
88+
weight = 130
89+
90+
[[menu.main]]
91+
name = "Troubleshooting"
92+
url = "troubleshooting"
93+
weight = 140
94+
95+
[[main.menu]]
96+
name = "Using MicroMDM"
97+
url = "using-micromdm"
98+
weight = 150
99+
100+
101+
[blackfriday]
102+
smartypants = true
103+
fractions = true
104+
smartDashes = true
105+
plainIDAnchors = true

content/api/index.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: API
3+
url: api
4+
---
5+
6+
7+
## Push
8+
9+
Trigger a push notification manually. This endpoint is mainly used for debugging.
10+
11+
### **GET** - /push/{{device-udid}}
12+
<details>
13+
#### CURL
14+
15+
```sh
16+
curl -X GET "https://dev.micromdm.io/push/<device-udid>" \
17+
-u "micromdm":"<your-api-token>"
18+
```
19+
20+
#### Security
21+
22+
- Basic Authentication
23+
- **username**: micromdm
24+
- **password**: your-api-token
25+
</details>
26+
27+
# MDM Commands
28+
## DeviceInformation
29+
<details>
30+
### **POST** - /v1/commands
31+
32+
#### CURL
33+
34+
```sh
35+
curl -X POST "https://dev.micromdm.io/v1/commands" \
36+
-H "Content-Type: application/json; charset=utf-8" \
37+
--data-raw "$body" \
38+
-u "micromdm":"<your-api-token>"
39+
```
40+
41+
#### Header Parameters
42+
43+
- **Content-Type** should respect the following schema:
44+
45+
```
46+
{
47+
"type": "string",
48+
"enum": [
49+
"application/json; charset=utf-8"
50+
],
51+
"default": "application/json; charset=utf-8"
52+
}
53+
```
54+
55+
#### Body Parameters
56+
57+
- **body** should respect the following schema:
58+
59+
```
60+
{
61+
"type": "string",
62+
"default": "{\"request_type\":\"DeviceInformation\",\"udid\":\"564DA875-35DE-E49B-7FCF-6A8FFBE52EF7\"}"
63+
}
64+
```
65+
66+
#### Security
67+
68+
- Basic Authentication
69+
- **username**: micromdm
70+
- **password**: your-api-token
71+
72+
</details>
73+

content/bugs/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Bugs
3+
url: bugs
4+
---
5+
6+
List of known MDM/DEP/VPP related radars.
7+
8+
# Unresolved issues
9+
* [storedownloadd hangs and blocks install of other applications](https://openradar.appspot.com/26517261)
10+
* [DEP (MDM) Setup Assistant enrollment & Over-the-Air Profile Service Phase 2 & 3 certificates missing](https://openradar.appspot.com/radar?id=4957320861712384)
11+
* [/usr/libexec/mdmclient dep nag does not nag if user has doNotDisturb enabled](https://openradar.appspot.com/35571322)
12+
* [/usr/libexec/mdmclient should be able to enroll into DEP mdm](https://openradar.appspot.com/35295502)
13+
* [InstallApplication MDM command sometimes results in a non-download](https://openradar.appspot.com/radar?id=6076949143224320)
14+
* [Sending multiple InstallApplication commands to a macOS device causes only one to download/install despite responding Acknowledged to each command](https://openradar.appspot.com/radar?id=4927456712589312)
15+
* [InstallApplication does not work with High Sierra](https://openradar.appspot.com/radar?id=4951049236381696)
16+
* [Query to show download/installation progress for a distribution package installed via InstallApplication](https://openradar.appspot.com/radar?id=5039897077350400)
17+
18+
# Resolved issues
19+
20+
# 10.13
21+
* [storedownloadd does not process pkg download for MDM InstallApplication](https://openradar.appspot.com/32601199) - Discovered in 10.13.0-17A264c, fixed in 10.13.0 GA

content/community/index.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Community
3+
url: community
4+
---
5+
6+
This page has links to project, blog posts and other media related to open source MDM development.
7+
8+
## Media
9+
10+
### Blog Posts
11+
12+
* Official [micromdm.io blog](http://micromdm.io/blog/)
13+
14+
* [MDM-azing - setting up your own MDM server](http://enterprisemac.bruienne.com/2015/06/06/mdm-azing-setting-up-your-own-mdm-server/)
15+
* [Installing OS X PKGs using an MDM service](http://enterprisemac.bruienne.com/2015/11/17/installing-os-x-pkgs-using-an-mdm-service/)
16+
* [MDM from scratch](https://groob.io/posts/mdm-experiments/)
17+
* [Munkiing around with DEP](https://groob.io/posts/dep-micromdm-munki/)
18+
* [Erik Gomez blog on Custom DEP - part 1](http://blog.eriknicolasgomez.com/2017/03/08/Custom-DEP-Part-1-An-Introduction/)
19+
20+
21+
### Podcasts
22+
* [Frogor 45 - Ep. 3 – Fuse to the MDM Powder Keg](https://www.afp548.com/2016/03/07/ep-3-fuse-to-the-mdm-powder-keg/)
23+
* [Macadmins.org - Episode 4: Developers, Developers, Developers](http://podcast.macadmins.org/2016/05/17/macadmins-org-podcast-episode-4-developers-developers-developers/)
24+
* [Macadmins.org - Episode 37: F/OSS MDMs with Victor Vrantchan and Jesse Peterson](http://podcast.macadmins.org/2017/05/24/episode-37-foss-mdms-with-victor-vrantchan-and-jesse-peterson/)
25+
26+
## Other open source projects
27+
* [Commandment](https://github.com/jessepeterson/commandment) - MDM server written in python.
28+
* [macadmins/mdm-server](https://github.com/macadmins/mdm-server) - experimental MDM server written in python.
29+
* [DEPy](https://github.com/bruienne/depy) - python SDK for DEP API
30+
* [apple_dep_client](https://github.com/cellabus/apple_dep_client) - ruby gem for dep
31+
* [DockServiceManager](https://github.com/ygini/DockServiceManager) - manage the dock content via MDM and dockutil
32+
* [ProgressScreen](https://github.com/jason-tratta/ProgressScreen) - recreation of IBMs Casper Enrollment screen demoed at JNUC 2015
33+
* [mk_pkg_manifest.py](https://gist.github.com/jessepeterson/d9d1f592a8c54395827f73dc60b3a0f3) - Jesse Petterson's python script to create a manifest plist.
34+
* [mdmvendorsign](https://github.com/grinich/mdmvendorsign) - python script to sign a CSR as an mdm vendor.

content/contributing/index.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Contributing
3+
url: contributing
4+
---
5+
6+
# Contributing
7+
For now, reference the contributing [README](https://github.com/micromdm/micromdm/blob/master/CONTRIBUTING.md).
8+
9+
# Troubleshooting
10+
This section will assist in troubleshooting issues that arise with your environment or Go tooling in the course of building micromdm.
11+
12+
## Common Errors
13+
14+
### Incorrect Go Version
15+
```
16+
$ go build
17+
# github.com/micromdm/micromdm
18+
./serve.go:232: unknown "net/http".Server field 'ReadHeaderTimeout' in struct literal
19+
./serve.go:233: unknown "net/http".Server field 'IdleTimeout' in struct literal
20+
./serve.go:275: srvURL.Hostname undefined (type *url.URL has no field or method Hostname)
21+
./serve.go:333: undefined: tls.X25519
22+
./serve.go:339: undefined: tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
23+
./serve.go:340: undefined: tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
24+
```
25+
26+
**FIX:** Install Go `1.8` from the [Go downloads page](https://golang.org/dl/).
27+
28+
### protobuf development
29+
30+
MicroMDM uses protobufs, or [protocol buffers](https://developers.google.com/protocol-buffers/) for a number of internal communication channels. To be able to work with them you need both the `protoc` binary and the protobuf go packages and binaries. Note you should not need to install the protobuf tools _just_ to compile and run the source, only for actually working with the protobuf definitions.
31+
32+
Perhaps the easiest way to get these tools on a Mac is to have [Homebrew](https://brew.sh/) install the dependencies for you, then build protobuf from source:
33+
34+
Install proto3 from source:
35+
```
36+
brew install autoconf automake libtool
37+
git clone https://github.com/google/protobuf && cd protobuf
38+
./autogen.sh && ./configure && make && make install
39+
```
40+
41+
Update protoc Go bindings via:
42+
```
43+
go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
44+
```
45+
46+
(Above borrowed from [go-kit](https://raw.githubusercontent.com/go-kit/kit/master/examples/addsvc/pb/compile.sh))
47+
48+
Once the tools are installed then you use the `go generate` command in the directory with the `*.proto` files (which should subsequently (re-)generate the `*.pb.go` files).
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: "Connect MicroMDM with DEP"
3+
url: dep/connect-to-micromdm
4+
menu:
5+
main:
6+
parent: DEP
7+
identifier: "Connect MicroMDM with DEP"
8+
weight: 20
9+
---
10+
11+
To connect MicroMDM with DEP, you'll need to create a new virtual server in the DEP portal, and import the necessary credentials to micromdm:
12+
13+
## Get public key
14+
15+
First, extract the public key which you will need to upload when creating a new virtual server:
16+
17+
```
18+
mdmctl get dep-tokens -export-public-key /tmp/DEP_Public_key.pem
19+
ConsumerKey AccessTokenExpiry
20+
21+
Wrote DEP public key to: /tmp/DEP_Public_key.pem
22+
```
23+
24+
This assumes you've already configured your mdmctl client to talk to the micromdm server.
25+
26+
## Create server in DEP portal and get P7M file
27+
28+
Next, Go to the DEP portal and create a "MDM Server" (as its called in the DEP poral) record. You will be prompted to upload the public key. Once you successfully create the server, you'll be offered a new download - a file ending `.p7m`. This files contains the encrypted DEP tokens.
29+
30+
## Upload P7M file in micromdm
31+
32+
Next, You'll have to import the downloaded `p7m` file somewhere that MicroMDM can access.
33+
34+
```
35+
mdmctl apply dep-tokens -import /Users/groob/Downloads/my_dep_token.p7m
36+
imported DEP token
37+
```
38+
39+
If you see a `imported DEP token` message, your MDM server will now be able to sync devices from DEP. You can check to see that the token imported correctly by just listing the DEP tokens:
40+
41+
```
42+
mdmctl get dep-tokens
43+
ConsumerKey AccessTokenExpiry
44+
CK_4e84a1be9638d4bce37443ff2dad55abcacb… 2018-04-22 07:54:12 +0000 UTC
45+
```
46+
47+
## Exporting JSON token.
48+
49+
If you need to interact with DEP directly, there is an option to export the OAUTH token used by the server:
50+
```
51+
mdmctl get dep-tokens -export-token /path/to/stoken.json
52+
ConsumerKey AccessTokenExpiry
53+
CK_4e84a1be9638d4bce37443ff2dad55abcacb… 2018-04-22 07:54:12 +0000 UTC
54+
55+
Wrote DEP token JSON to: /path/to/stoken.json
56+
```
57+
58+
## Other resources
59+
60+
The DEP API is documented by Apple [here](https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/MobileDeviceManagementProtocolRef/4-Profile_Management/ProfileManagement.html#//apple_ref/doc/uid/TP40017387-CH7-SW68) and there are several DEP libraries:
61+
62+
- Go: https://github.com/micromdm/dep
63+
- Python: https://github.com/bruienne/depy

0 commit comments

Comments
 (0)