You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WEB-4891: make the discovery key optional for the per-user onboard cron (#206)
Per-user onboarding now scans with the user's own API key, so the scheduled
`onboard` run no longer needs a separate discovery key. Stop requiring it at
install time and in the cron wrapper (bash + PowerShell); forward it only when
one was stored, for older/MDM-style setups. MDM/all-users scheduled scans use
the `discover` command and are unchanged.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
if [ \$EXIT_CODE -ne 0 ] && tail -40 "\$LOG_DIR/scheduled.log" | grep -qiE "401|[Ii]nvalid.*(api.?key|key)|[Uu]nauthorized"; then
336
-
log "HINT: Auth error detected — your API key may have been rotated in the Unbound dashboard. Re-run to update stored credentials: unbound onboard --set-cron --api-key <NEW_KEY> --discovery-key <NEW_DISCOVERY_KEY>"
338
+
log "HINT: Auth error detected — your API key may have been rotated in the Unbound dashboard. Re-run to update stored credentials: unbound onboard --set-cron --api-key <NEW_KEY>"
337
339
fi
338
340
;;
339
341
*)
@@ -647,10 +649,9 @@ if [ -z "$API_KEY" ]; then
647
649
echo"Error: --api-key is required"
648
650
usage
649
651
fi
650
-
if [ "$COMMAND"="onboard" ] && [ -z"$DISCOVERY_KEY" ];then
651
-
echo"Error: --discovery-key is required when --command onboard"
652
-
usage
653
-
fi
652
+
# --discovery-key is optional for onboard: per-user onboarding scans with the
653
+
# user's own API key (WEB-4891). It is only needed for sudo/MDM (all-users)
654
+
# enrollment, which is scheduled via --command discover, not onboard.
654
655
if [ "$COMMAND"="discover" ] && [ -z"$DOMAIN" ];then
655
656
echo"Error: --domain is required when --command discover"
0 commit comments