Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Erase status can falsely report success, while SSD credentials can leak through validation responses and transport logs.
3 open issues
What changed in this PR
Updates MPS remote platform erase (RPE) to send SSD credentials to BIOS through UEFI parameters and adds an endpoint for querying the last BIOS erase status.
Changes:
- Encodes SSD master passwords and optional PSIDs in UEFI TLVs, with 64-byte UTF-8 limits.
- Adds a CIRA-protected BIOS status endpoint and related logging.
- Expands unit tests, API test cases, and API documentation.
| File | Description |
|---|---|
swagger.yaml |
Documents credentials and the BIOS status endpoint. |
src/test/collections/MPS.postman_collection.json |
Adds credential examples and a status request. |
src/test/collections/mps_security_api_test_postman_collection.json |
Updates the collection description. |
src/test/collections/data/mps_security_api_test_data.json |
Adds status and credential-limit cases. |
src/routes/amt/sendRPEValidator.ts |
Validates both credential types and byte limits. |
src/routes/amt/sendRPEValidator.test.ts |
Covers credential types and UTF-8 boundaries. |
src/routes/amt/sendRPE.ts |
Forwards PSID alongside the SSD password. |
src/routes/amt/sendRPE.test.ts |
Verifies credential forwarding. |
src/routes/amt/index.ts |
Registers the CIRA-protected status route. |
src/routes/amt/getRemoteEraseStatus.ts |
Maps BIOS status values to API responses. |
src/routes/amt/getRemoteEraseStatus.test.ts |
Tests status mapping, failures, and route registration. |
src/logging/messages.ts |
Adds BIOS status event messages. |
src/amt/DeviceAction.ts |
Builds credential TLVs and redacts diagnostic XML. |
src/amt/deviceAction.test.ts |
Tests TLV encoding, limits, omission, and redaction. |
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Destructive credential encoding and BIOS status mappings need firmware or device validation because the tests use synthetic responses and do not establish end-to-end erase behavior.
1 open issue
2 resolved since last review
Review effort: Balanced
de46cbc to
d8691d2
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Destructive credential TLV framing and BIOS status decoding need validation against Intel’s specification or real hardware, since the tests use mocked responses.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The credential TLV encoding and BIOS status mapping need validation against supported hardware or an authoritative protocol fixture because mocked tests cannot establish interoperability for an irreversible erase operation.
No open issues 🎉
Review effort: Balanced
2857c2f to
04be829
Compare


PR Checklist
What are you changing?
1. Send SSD credentials to BIOS as UEFI TLVs instead of
RSEPasswordRemote Platform Erase (RPE) of password-protected SSDs did not work, because MPS sent the SSD password in the
RSEPasswordfield ofAMT_BootSettingData. BIOS reads erase credentials from the UEFI boot parameters array, so it never got the password.DeviceAction.sendRPEnow appends the credentials toUefiBootParametersArrayas extra Intel TLVs, after the existing erase-mask TLV:110psidrequest field20ssdPasswordrequest fieldEach TLV has the layout
[vendor 0x8086 : u16 LE][type : u16 LE][length : u32 LE][value], andUefiBootNumberOfParamsis set to match the number of TLVs.RSEPasswordis no longer sent.AMT.Models.BootSettingDatatype, and the olddeletecleanup of conflicting and read-only fields is removed because the body is built explicitly.2. New
psidrequest field and credential validationPOST /api/v1/amt/boot/remoteErase/{guid}accepts an optionalpsidalongsidessdPassword.MAX_SSD_PASSWORD_LENGTH). The limit is checked in two places:sendRPEValidator, which returns 400DeviceAction.sendRPE, before any WS-Man call, so device state isn't changed by a request that is going to fail3. New endpoint:
GET /api/v1/amt/boot/remoteErase/{guid}/statusThe endpoint reads
AMT_BootSettingData.BIOSLastStatusand returns{ status, message }:BIOSLastStatusstatus[0, 0]succeeded[1, *]pending[2, *](Not Updated)unknown[0xFFFF, 1/2/3/other]failed(general / password-auth / unsupported / generic)unknownNotes for API consumers:
BIOSLastStatusis the result of the last BIOS boot. It has no operation ID, so callers should seependingafter submitting an erase before trusting asucceededorfailedresult.succeededmeans BIOS reported that the erase completed. It does not independently verify that the media was erased.4. Keeping credentials out of logs and errors
ssdPassword/psidvalidators and the whole-body validator use.hide(), so credential values never show up in validation error responses.logger.silly(buffer.toString('utf8'))call is removed fromHttpHandler.wrapIt. It logged entire outgoing WS-Man requests, credentials included.MPS_RPE_LOG_REDACTED_XML) now redactsUefiBootParametersArrayinstead ofRSEPassword.5. Docs and tests
swagger.yaml:psid, the byte limits, and the new status endpoint andRemoteEraseStatusschemaAnything the reviewer should know when reviewing this PR?
DeviceAction.tsis re-indentation insidewithDeviceLock. The real logic change is the TLV construction block.RSEPasswordis no longer sent. Any firmware that depended on it would now get the password only through the TLV.TODO: platform / BIOS version / drive tested (locked SSD + PSID revert).If there are associated PRs in other repositories, please link them here