Skip to content

fix: send SSD password to BIOS for password protected drives during RPE - #1338

Open
nmgaston wants to merge 1 commit into
mainfrom
fixRPEWithEncryptedSSD
Open

nmgaston wants to merge 1 commit into
mainfrom
fixRPEWithEncryptedSSD

Conversation

@nmgaston

@nmgaston nmgaston commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds support for password-protected SSDs during RPE by sending the SSD password to the BIOS so those drives can be accessed/managed correctly during the process.

Also adds a new API GET remoteEraseStatus to allow a more accurate status of the RPE request.

Associated with the UI changes: device-management-toolkit/sample-web-ui#3655

Does not require the UI changes to be checked in to fix the password issue. It will allow polling to give a more accurate state of the RPE request.

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.44%. Comparing base (62f4fba) to head (24348c4).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1338       +/-   ##
===========================================
+ Coverage   62.24%   74.44%   +12.20%     
===========================================
  Files         159      144       -15     
  Lines       13417    11295     -2122     
===========================================
+ Hits         8351     8409       +58     
+ Misses       5066     2886     -2180     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

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.

🔵 Needs a closer look

Destructive firmware behavior requires hardware validation and human review, and the password-limit compatibility issue remains unresolved.

1 open issue
2 files not reviewed
  • internal/mocks/devicemanagement_mocks.go: Generated file
  • internal/mocks/wsman_mocks.go: Generated file
What changed in this PR

Updates Remote Platform Erase to deliver drive credentials to BIOS and expose the last BIOS erase status.

Changes:

  • Encodes SSD passwords and optional PSIDs in boot parameters.
  • Adds a v2 erase-status endpoint.
  • Updates tests, mocks, API documentation, and coverage exclusions.
File Description
internal/​usecase/​devices/​wsman/​rpe.go Encodes and validates drive credentials.
internal/​usecase/​devices/​wsman/​rpe_test.go Tests credential encoding and limits.
internal/​usecase/​devices/​wsman/​interfaces.go Adds the PSID argument.
internal/​usecase/​devices/​interfaces.go Exposes erase-status retrieval.
internal/​usecase/​devices/​boot.go Validates credentials and interprets BIOS status.
internal/​usecase/​devices/​boot_test.go Tests status handling and credential forwarding.
internal/​mocks/​wsman_mocks.go Updates credential method mocks.
internal/​mocks/​devicemanagement_mocks.go Adds erase-status mocks.
internal/​entity/​dto/​v2/​remoteerase.go Defines the status response.
internal/​entity/​dto/​v1/​bootcapabilities.go Adds optional PSID input.
internal/​controller/​openapi/​devicemanagement.go Documents credentials and status retrieval.
internal/​controller/​httpapi/​v2/​devicemanagement.go Adds the status handler.
internal/​controller/​httpapi/​v2/​devicemanagement_test.go Tests status and error responses.
internal/​controller/​httpapi/​v1/​boot_test.go Verifies PSID forwarding.
integration-test/​collections/​console_mps_apis.postman_collection.json Updates erase requests and documentation.
codecov.yml Excludes generated mocks from coverage.

Review effort: Balanced

Comment thread internal/usecase/devices/boot.go Outdated

Copilot AI left a comment

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.

🔵 Needs a closer look

Credential delivery and BIOS-status interpretation for destructive erase operations require hardware-backed validation and human review.

No open issues 🎉

1 resolved since last review
2 files not reviewed
  • internal/mocks/devicemanagement_mocks.go: Generated file
  • internal/mocks/wsman_mocks.go: Generated file

Review effort: Balanced

@nmgaston
nmgaston force-pushed the fixRPEWithEncryptedSSD branch from b115cda to 24348c4 Compare October 20, 2026 01:34
@nmgaston
nmgaston marked this pull request as ready for review October 20, 2026 22:10
@nmgaston
nmgaston requested a review from a team as a code owner October 20, 2026 22:10
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.

2 participants