* 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>
- Upgrade to micromdm/scep v2 & updated API usage
- Use interfaces rather than concrete types in a few places
- Switch to Mozilla's PKCS7 fork (actually @omorsi's fork of that fork)
- Import order: stdlib, project/self, 3rd party
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 dep library was initially a self contained project, but doesn't have a community of users.
Keeping it in the main repo should reduce the maintenance burden and simplify dependency management for the project.
The SCEP CA certificate is not needed to establish trust between the client and MDM server. Thus including it in the enrollment profile is unnecessary. Separately, and since we don't need it, we can clean up the enrollment service a little by not reading the certificate from disk. Finally — just don't write it out to disk at all. Its usefulness on disk (for the sake of being in its own file) is debatable.