Skip to content

feat(devices): add remote platform erase support#3206

Open
nmgaston wants to merge 34 commits into
mainfrom
remotePlatformErase
Open

feat(devices): add remote platform erase support#3206
nmgaston wants to merge 34 commits into
mainfrom
remotePlatformErase

Conversation

@nmgaston

@nmgaston nmgaston commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

  • Unit Tests have been added for new changes
  • API tests have been updated if applicable
  • All commented code has been removed
  • If you've added a dependency, you've ensured license is compatible with Apache 2.0 and clearly outlined the added dependency.

What are you changing?

Adds a Remote Platform Erase feature to the device detail view, allowing users to remotely wipe a managed AMT device.

  • New RemotePlatformEraseComponent (src/app/devices/remote-platform-erase/) with:
    • Detection and display of whether the device supports remote platform erase
    • Toggle to enable/disable the platformEraseEnabled AMT feature via the existing AMT features API
    • Per-capability checkboxes (Secure Erase of All SSDs, TPM Clear, Restore BIOS to EOM State, Unconfigure Intel CSME Firmware) driven by a bitmask parsed from rpeCaps
    • Selecting "Unconfigure Intel CSME Firmware" deselects and disables all other options, as it performs a full AMT unprovision and cannot be combined with other operations
    • Confirmation dialog (reusing AreYouSureDialogComponent) before initiating an erase
    • Warning banners and error snackbar notifications for destructive/failed operations
    • Loading state via mat-progress-bar
  • DevicesService: adds sendRemotePlatformErase(deviceId, eraseMask) calling POST /api/v1/amt/remoteErase/:deviceId; renames enableRPEplatformEraseEnabled in the AMT features request body to align with the updated MPS API (see associated PRs)
  • DeviceDetailComponent: adds "Remote Platform Erase" nav item (phonelink_erase icon) and routes to the new component
  • models.ts: updates AMTFeaturesResponse/AMTFeaturesRequest types to reflect the renamed field and new response properties
  • i18n: adds translation keys for all UI strings across all 12 supported locales
  • Cypress E2E tests covering: not-supported state, feature enabled/disabled states, toggle on/off with API assertion, confirm/cancel erase dialog, and error snackbar on API failure

Anything the reviewer should know when reviewing this PR?

Associated PRs

@nmgaston
nmgaston force-pushed the remotePlatformErase branch from c7091b5 to cf0fa97 Compare March 18, 2026 00:17
Comment thread src/assets/i18n/ar.json
@rsdmike

rsdmike commented Apr 17, 2026

Copy link
Copy Markdown
Member

Thanks for doing this! Few things i see:

  1. There are some errors showig on the device detail page:
_effect-chunk2.mjs:2601 ERROR Error: Cannot find control with name: 'enablePlatformErase'
    at _throwError (forms.mjs:1658:9)
    at setUpControl (forms.mjs:1524:19)
  ...
  1. Remote Platform Erase is allowing me to click it device details page, but my device doesnt support it.
  2. icon on menu should probably be computer cancel instead of mobile cancel
  3. I think since the checkbox is already on amt device info, if its enabled no need to show the checkbox here:
image I think need to move this: image in to one box, hidden until the feature is enabled. If its enabled, then should show this capabilites to select. the call to action button (initiate) should be up in the top right of the RPE box to follow the design pattern of KVM, SOL, Audit Log, etc...

@nmgaston
nmgaston force-pushed the remotePlatformErase branch from 1d2fe9f to 2390145 Compare June 24, 2026 20:11
@nmgaston
nmgaston force-pushed the remotePlatformErase branch 2 times, most recently from 5303a5e to b65818b Compare June 26, 2026 21:43
@nmgaston
nmgaston force-pushed the remotePlatformErase branch 2 times, most recently from fa9c9e7 to 67d7624 Compare July 1, 2026 19:32
@nmgaston
nmgaston force-pushed the remotePlatformErase branch 2 times, most recently from 25c02d3 to 9b6efa3 Compare July 1, 2026 22:56
@nmgaston
nmgaston requested review from DevipriyaS17 and nbmaiti July 13, 2026 19:23
@nmgaston
nmgaston force-pushed the remotePlatformErase branch from 871d2e1 to 2c0484a Compare July 15, 2026 17:24
Comment thread src/app/devices/remote-platform-erase/remote-platform-erase.component.ts Outdated
Comment thread src/app/devices/devices.service.ts Outdated
unconfigureCSME: caps.some((c, i) => c.key === 'csmeUnconfigure' && this.eraseCapsArray.at(i)?.value === true)
}
if (req.secureEraseAllSSDs && this.isSsdEncrypted()) {
req.ssdPassword = this.ssdPasswordControl.value ?? ''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this field on MPS ssdPassword , instead powerType is ignored in UI

)
.subscribe({
next: () => {
if (req.unconfigureCSME) {

@madhavilosetty-intel madhavilosetty-intel Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a successful CSME erase, sendDeactivate() (devices.service.ts:373) behaves differently by deployment:

  • Cloud/MPS: calls DELETE /api/v1/amt/deactivate/:guid even though ConfigurationDataRese has 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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks!

Comment thread src/app/devices/devices.service.ts Outdated
Comment thread src/app/devices/devices.service.ts Outdated
map((features) => {
const stream = this.getOrCreateFeaturesStream(guid)
const current = stream.value
const merged = current === null ? features : { ...features, rpe: current.rpe }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Remote Platform Erase in Console Add support for Remote Platform Erase in MPS

4 participants