Repository navigation
Offboarding and Archive Vault
Vitrine RMM includes a purpose-built lifecycle and archival engine (backend/src/services/offboarding/index.ts) designed so MSPs never lose critical BitLocker recovery keys or LAPS local admin passwords months after offboarding an endpoint or client — while ensuring retired agents cleanly revert changes and remove themselves.
Every managed endpoint transitions cleanly through three explicit lifecycle_state stages:
-
active: Standard managed online/offline endpoint enrolled in fleet monitoring, patching, and policy enforcement. -
pending_offboard: Offboarding was requested while the endpoint was offline. Scheduled LAPS rotations are automatically skipped, and the cleanup + agent uninstall payload is queued for immediate execution the moment the agent checks in.-
Force Archive: Admins can click Force Archive (
POST /api/devices/:id/force-archive) at any time (e.g., lost/stolen/recycled hardware) to move it immediately into the Archive Vault. -
Auto-Archive Policy: Each policy tier configures
offboard_offline_auto_archive_days(default14days) so long-offlinepending_offboarddevices automatically transition toarchived.
-
Force Archive: Admins can click Force Archive (
-
archived(Data Archive Vault): Offboarding is complete (no longer pending). The endpoint is hidden from active alert noise and billing counts, while all last-known telemetry, hardware serials, AES-256-GCM escrowed BitLocker/LUKS/FileVault keys, and LAPS credential histories remain preserved until an MSP Super Admin explicitly executes a permanent purge (DELETE /api/devices/:id/archive-purge).
When an online endpoint is offboarded (POST /api/devices/:id/offboard), Vitrine dispatches a clean teardown sequence before moving the record to archived:
- Reverts applied Vitrine policy overrides, scheduled tasks, and tray hooks.
- Applies the resolved Managed Local Admin (
LAPS) Offboard Rule (see Section 3). - Cleanly uninstalls the Vitrine companion scripts and MeshCentral agent service.
- Snapshots final LAPS & BitLocker recovery state into the Data Archive Vault and writes an immutable
audit_logsentry.
Across all 4 policy tiers (Global -> Client -> Site -> Role), administrators can independently configure what happens to the managed local admin account (laps_account_name) for each of the three offboarding contexts:
| Context Policy Field | When Applied | Available Actions |
|---|---|---|
laps_offboard_explicit_device_action |
Single endpoint explicitly offboarded (explicit_device) |
keep_account_rotate_final (Default), keep_account_as_is, disable_account, remove_account
|
laps_offboard_client_archived_action |
Entire parent Client offboarded to Archive (client_archived) |
keep_account_rotate_final (Default), keep_account_as_is, disable_account, remove_account
|
laps_offboard_client_deleted_action |
Parent Client permanently deleted (client_deleted) |
remove_account (Default), disable_account, keep_account_rotate_final, keep_account_as_is
|
Via POST /api/tenants/:id/offboard (or Settings / Fleet -> Offboard Client):
-
Default Safe Mode — Archive Entire Client (
mode: 'archive_client'):- Marks the client
lifecycle_state = 'archived'and preserves the entire client organization, sites, BitLocker keys, and LAPS histories in the Data Archive Vault. - Online endpoints cleanly offboard immediately; offline endpoints enter
pending_offboard(or archive immediately ifforceArchiveOfflineDevicesis checked). - Clients can be restored to active status at any time via
POST /api/tenants/:id/reactivate.
- Marks the client
-
Permanent Client Deletion (
mode: 'delete_client_permanently'):- Cleanly offboards online endpoints, registers Client & Device Tombstones (
deleted_tenants_tombstonesanddeleted_tenant_device_tombstones), and permanently purges the client's vault records.
- Cleanly offboards online endpoints, registers Client & Device Tombstones (
Whenever an endpoint wakes up, sends a heartbeat, or runs an installer (POST /api/agent/enroll, POST /api/health, or POST /api/devices/:id/simulate-checkin), handleAgentCheckInOrWake() enforces exact lifecycle safety:
-
Archived Endpoint + Active Parent Client -> Automatic Resurrection (
resurrected_from_archive): Because anarchivedendpoint has already finished any prior offboarding, waking up or reinstalling under an active client automatically restores the existing device record (lifecycle_state = 'active',status = 'online'), preserving its historical audit trail and vault continuity! -
Pending Offboard Endpoint -> Completes Offboard to Archive (
queued_offboard_completed_to_archive): Executes the queued cleanup + LAPS action and transitions cleanly toarchived. -
Archived OR Permanently Deleted Parent Client -> Quiet Self-Offboarding (
quiet_offboard_executed): Even if no device-specific offboard was queued, matching an archived client or the Deleted-Client Tombstone Registry immediately instructs the agent to quietly apply the configured LAPS rule and uninstall itself — never re-creating zombie records for departed clients.