Added SetRecoveryLock support (#757)

This commit is contained in:
tomaswallentinus
2021-06-16 22:48:47 +02:00
committed by GitHub
parent 30ff25e590
commit 1dfa0a8fd0
15 changed files with 1251 additions and 267 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
source $MICROMDM_ENV_PATH
endpoint="v1/commands"
jq -n \
--arg request_type "SetFirmwarePassword" \
--arg udid "$1" \
--arg current_password $2 \
--arg new_password $3 \
--arg request_requires_network_tether $4 \
--arg allow_oroms $5 \
'.udid = $udid
|.current_password = $current_password
|.new_password = $new_password
|.request_requires_network_tether = $request_requires_network_tether
|.allow_oroms = $allow_oroms
|.request_type = $request_type
'|\
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-

View File

@@ -0,0 +1,18 @@
#!/bin/bash
source $MICROMDM_ENV_PATH
endpoint="v1/commands"
jq -n \
--arg request_type "SetRecoveryLock" \
--arg udid "$1" \
--arg current_password $2 \
--arg new_password $3 \
--arg request_requires_network_tether $4 \
--arg allow_oroms $5 \
'.udid = $udid
|.current_password = $current_password
|.new_password = $new_password
|.request_requires_network_tether = $request_requires_network_tether
|.allow_oroms = $allow_oroms
|.request_type = $request_type
'|\
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-

View File

@@ -0,0 +1,15 @@
#!/bin/bash
source $MICROMDM_ENV_PATH
endpoint="v1/commands"
jq -n \
--arg request_type "VerifyFirmwarePassword" \
--arg udid "$1" \
--arg password $2 \
--arg request_requires_network_tether $3 \
--arg allow_oroms $4 \
'.udid = $udid
|.password = $current_password
|.request_requires_network_tether = $request_requires_network_tether
|.request_type = $request_type
'|\
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-

View File

@@ -0,0 +1,15 @@
#!/bin/bash
source $MICROMDM_ENV_PATH
endpoint="v1/commands"
jq -n \
--arg request_type "VerifyRecoveryLock" \
--arg udid "$1" \
--arg password $2 \
--arg request_requires_network_tether $3 \
--arg allow_oroms $4 \
'.udid = $udid
|.password = $current_password
|.request_requires_network_tether = $request_requires_network_tether
|.request_type = $request_type
'|\
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-