feat(devices): add remote platform erase support#3206
Conversation
c7091b5 to
cf0fa97
Compare
58e08ae to
9afb33d
Compare
bb235c9 to
c88557f
Compare
93f60f7 to
f0dfe42
Compare
6b8b3f0 to
0db2b32
Compare
1d2fe9f to
2390145
Compare
5303a5e to
b65818b
Compare
fa9c9e7 to
67d7624
Compare
25c02d3 to
9b6efa3
Compare
871d2e1 to
2c0484a
Compare
| unconfigureCSME: caps.some((c, i) => c.key === 'csmeUnconfigure' && this.eraseCapsArray.at(i)?.value === true) | ||
| } | ||
| if (req.secureEraseAllSSDs && this.isSsdEncrypted()) { | ||
| req.ssdPassword = this.ssdPasswordControl.value ?? '' |
There was a problem hiding this comment.
I don't see this field on MPS ssdPassword , instead powerType is ignored in UI
| ) | ||
| .subscribe({ | ||
| next: () => { | ||
| if (req.unconfigureCSME) { |
There was a problem hiding this comment.
After a successful CSME erase, sendDeactivate() (devices.service.ts:373) behaves differently by deployment:
-
Cloud/MPS: calls DELETE
/api/v1/amt/deactivate/:guideven thoughConfigurationDataResehas already scheduled AMT unprovisioning on the next boot (DeviceAction.ts:257). Could this immediate deactivation interrupt the pending erase process? -
Console/Enterprise: calls DELETE
/api/v1/devices/:guid, which removes the device from Console inventory but does not deactivate AMT — Console has no amt/deactivate route, so the branch is necessary, but the operation isn't equivalent. If the device never reboots or the erase fails, it could become untracked.
Additional concerns:
- Errors from sendDeactivate() are ignored (catchError(() => EMPTY), line 341), so the success snackbar fires and the user is navigated to /devices even when the call fails.
- The confirmation dialog does not mention that the device may be removed from Console inventory.
Could we confirm the intended behavior for both deployment types? If Console record deletion is expected, should the confirmation dialog explicitly state that the device will be removed from inventory?
There was a problem hiding this comment.
@nmgaston @madhavilosetty-intel just making sure, we do not want to enable the “Unconfigure CSME” option at this time. If it is currently enabled or available, please disable it, as using this option could make the device unmanageable through Console or MPS.
There was a problem hiding this comment.
@graikhel-intel It is currently hidden in the UI. I'll make some of the obvious fixes regarding that option, but will leave most of it for when/if we enable that option.
| map((features) => { | ||
| const stream = this.getOrCreateFeaturesStream(guid) | ||
| const current = stream.value | ||
| const merged = current === null ? features : { ...features, rpe: current.rpe } |
There was a problem hiding this comment.
It looks like the cached rpe value overrides the latest server value on every fetch after the first:
{ ...features, rpe: current.rpe }
The UI always replaces the latest rpe value from the server with the old cached value. While, ocr uses the latest server value, so the two settings behave differently.
There was a problem hiding this comment.
I remember there was a problem with a stale GET request after a POST that was overwriting the user's choice for RPE. This helped fix that for RPE anyways. Maybe it should be done for all features.


PR Checklist
What are you changing?
Adds a Remote Platform Erase feature to the device detail view, allowing users to remotely wipe a managed AMT device.
RemotePlatformEraseComponent(src/app/devices/remote-platform-erase/) with:platformEraseEnabledAMT feature via the existing AMT features APIrpeCapsAreYouSureDialogComponent) before initiating an erasemat-progress-barDevicesService: addssendRemotePlatformErase(deviceId, eraseMask)callingPOST /api/v1/amt/remoteErase/:deviceId; renamesenableRPE→platformEraseEnabledin the AMT features request body to align with the updated MPS API (see associated PRs)DeviceDetailComponent: adds "Remote Platform Erase" nav item (phonelink_eraseicon) and routes to the new componentmodels.ts: updatesAMTFeaturesResponse/AMTFeaturesRequesttypes to reflect the renamed field and new response propertiesAnything the reviewer should know when reviewing this PR?
eraseMaskis a bitmask integer; the constants and bit definitions live inremote-platform-erase.constants.ts.Associated PRs