101 Commits

Author SHA1 Message Date
drkr-sl
f028dcf42f fix(queue): in memory concurrent r/w panic (#1078) 2025-05-05 11:31:46 -07:00
Jesse Peterson
da16c24036 switch to micromdm/plist and update jessepeterson/cfgprofiles 2025-01-17 00:13:33 -08:00
Kory Prince
c6ae057c40 add detection of buggy DEP sync (#1016) 2024-12-05 14:43:45 -06:00
Jesse Peterson
3b78775481 remove vestiges of sql (#998) 2024-07-22 19:50:02 -07:00
Jesse Peterson
42f84c4e19 fix crash with nil check for in-memory queue for NotNow. resolves #983. (#984) 2024-04-12 19:28:15 -07:00
Ian Mckay
2a5636fa4e bugfix: Adjust error comparison in builtin stores (#975) 2024-03-06 13:26:51 -08:00
Jesse Peterson
9f3e04982e switch to smallstep/pkcs7 (#944) 2023-12-02 14:41:37 -08:00
Jesse Peterson
4070b42a62 adding long-forgotten protobuf generator 2023-11-30 23:52:42 -08:00
Graham Gilbert
c4a1cd97ef Add endpoint for inspecting the MDM command queue (#895) 2023-07-11 18:07:42 -05:00
Jesse Peterson
1f01f70dba Declarative Management hand-off (#882) 2023-05-02 08:54:04 -07:00
Kory Prince
3d0746f3e3 Add raw command and clear device queue endpoints (#864) 2023-04-23 14:47:42 -07:00
hrgbcxd
1e49dc2585 Feature/add lom commands (#839) 2022-07-20 08:27:24 -07:00
Kory Prince
50fb48b7f3 mdmctl: don't send a request body for GET requests (#821) 2022-05-13 11:24:12 -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
Jesse Peterson
ddcea1ad93 New inmem command queue (#736) 2021-10-10 12:45:09 -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
6dc4facba0 Process devices before we sync (#779) 2021-10-01 15:07:51 -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
0ba759a5c1 protobuf updates (#742) 2021-06-09 15:55:32 -07:00
Jesse Peterson
4d5fbf5fd1 scep v2, Mozilla PKCS7 fork, cleanup (#737)
- 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
2021-06-09 15:44:58 -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
d15dab703c Avoid queue save when not needed (#711)
* Avoid queue save when not needed
2021-02-10 11:21:22 -08:00
tperfitt
4e20295a8d fix for issue #549: Blueprints InstallApplication array always install last application (#704)
Co-authored-by: tperfitt <tperfitt@twocanoes.com>
2020-09-08 15:21:41 -04:00
Jesse Peterson
c6db60ce61 UDID Cert Auth warn only (#643) 2020-08-29 11:27:34 -07:00
meta-gitub
e85a21bac4 make http transport for apns proxy-aware (#698)
Co-authored-by: Thomas Esser <meta.kontakte@gmail.com>
2020-08-05 18:12:54 -04:00
Jesse Peterson
e01ef8a382 Clear a UDID's command queue during Authenticate Check-in (enrollment) (#692) 2020-07-20 22:25:06 -07:00
Jesse Peterson
39f595bb27 Adds the ability to send a DELETE request to clear the DEP profile assignment (#687)
for one or more serial numbers.

DELETE /v1/dep/profiles
{
"serials" : [a,b,c,d]
}
2020-07-17 12:41:03 -04:00
Dan Lamppa
cdf34edd12 When a QueueCommandQueued is marshaled in MarshalQueuedCommand, the QueueCommandQueued.DeviceUDID property rather than the CommandUUID property was copied to the protobuf CommandUuid property. Now the CommandUUID property is copied to the CommandUuid property. (#690)
Co-authored-by: Dan Lamppa <dan.lamppa@medtronic.com>
2020-07-17 08:53:38 -07:00
Dan Lamppa
c6c95bb9bc When a DEP sync event was serialized and deserialized, the dep.Device.ProfileStatus property was not included so its value was not later copied to device.Device.ProfileStatus and saved to the database. (#682)
Co-authored-by: Dan Lamppa <dan.lamppa@medtronic.com>
2020-07-07 18:30:23 -04: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
Jesse Peterson
defacdff15 Fixes and typo corrections for SCEP dynamic challenges (#656)
* Fixes and typo corrections for SCEP dynamic challenges
* Guard against not being configured
2020-03-20 13:48:48 -07:00
Jesse Peterson
9e65297e46 dynamic SCEP challenge support (#642) 2020-02-20 16:51:17 -08:00
Jesse Peterson
ea5c0a3865 Protect against nil blueprint (#634) 2020-01-10 11:01:28 -08:00
Jesse Peterson
05af177cf6 Add option to opt out of saving device command history. (#640) 2020-01-10 10:55:07 -08:00
Jesse Peterson
bb88bda14c Rework the DEP sync runner loop (#632)
* Rework the DEP sync runner loop. Primarily to fix #582. Also add & make more consistent logging, dedup some code, and clean up.

* Group vars in var(), remove commented code
2020-01-06 13:30:18 -08:00
Jesse Peterson
9da84c1e79 Fixes #546. Save a record of the last imported DEP token and prefer use that one first when we read out tokens back. (#633) 2020-01-06 13:22:18 -08: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
7c720e61c5 add assign profile endpoint (#611)
Adds the ability to send a POST request to assign one or more serials to
a profile ID that was defined with the define profile endpoint.

POST /v1/dep/assign
{
"id" : "profile_id",
"serials" : [a,b,c,d]
}
2019-08-08 22:32:05 -04:00
Victor Vrantchan
74599d5f20 apns: Add ability to set an APNS message expiration. (#609)
When sending a push notification, allow adding an ?expiration=<unix_epoch_time> value.
Apple will retry delivery until this time. The default behavior only tries once.
2019-08-02 19:26:29 -04:00
Victor Vrantchan
ed0e372a6e set ack time only if command is not nil 2019-06-30 00:27:45 -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
438fdfa990 blueprint: do not send DeviceConfigured when there are no user configured blueprints (#586)
Instead of defaulting to sending a DeviceConfigured command on all enrollments, only do that if the user has configured a blueprint.
Not sending DeviceConfigured by default will allow a workflow service to make decisions about enrollment.
2019-05-03 11:21:52 -04:00
Brett Demetris
9e400c93e6 set acknowledge time when moving command to completed queue (#581)
quick resolve for https://github.com/micromdm/micromdm/issues/580

this just ensures that each time a command is moved to completed it's time is recorded in the struct.  useful to prune completed commands by date.
2019-03-22 11:46:47 -07:00
Victor Vrantchan
276e5756af refactor blueprint with worker (#533)
Closes #495
2018-10-14 00:02:05 -04:00
Victor Vrantchan
03734c9797 add push_info table to postgres (#532) 2018-10-13 22:00:38 -04:00
Victor Vrantchan
17bce22e95 add postgres device store (#531) 2018-10-13 21:05:19 -04:00
Victor Vrantchan
1593659382 add proper logger to queue (#530) 2018-10-13 14:25:11 -04:00
Victor Vrantchan
3707d489a6 read apns cert from db if stored 2018-10-12 09:16:52 -04:00