-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Background
Today, rpc-go acts as a proxy between Intel AMT (local MEI/LMS flow) and RPS. In the current mode, a secure WebSocket connection between RPS and rpc-go is terminated at rpc-go, and then a separate TLS connection is established between rpc-go and AMT/LMS.
Solution
Implement an end-to-end TLS flow where feasible so the communication between AMT and RPS is protected without intermediate TLS termination at rpc-go.
Additional flow details
We can split the RPS provisioning flows into two buckets, based on whether rpc-go can use TLS to LMS in pre-provisioning.
Use the rpc-go driver call STATE_INDEPENDENCE_IsChangeToAMTEnabled to determine whether rpc-go can connect to LMS over TLS in the pre-provisioning mode (i.e., whether we can start with TLS immediately or we must start non-TLS and transition later).
Pre-provisioning to ACM or CCM
Flow A: TLS available in pre-provisioning (AMT >= 19)
- rpc-go calls
STATE_INDEPENDENCE_IsChangeToAMTEnabledand determines that TLS is available in pre-provisioning - rpc-go opens a TCP connection to LMS on localhost:16993 (TLS port). At this point, this is only a TCP socket; no TLS handshake is initiated by rpc-go
- rpc-go sends a message to RPS with the current device state and indicates it is ready to start receiving tunneled TLS bytes. Links to the current message structure https://github.com/device-management-toolkit/rps/blob/main/src/models/RCS.Config.ts#L206 and https://github.com/device-management-toolkit/rps/blob/main/src/models/RCS.Config.ts#L217
- RPS initiates TLS client handshake toward AMT and sends the generated TLS handshake bytes to rpc-go
- AMT (acting as the TLS server) responds with TLS handshake bytes, including its ODCA certificate chain, via LMS
- rpc-go forwards the TLS handshake bytes unchanged to LMS over the TCP connection to port 16993
- AMT (acting as the TLS server) responds with TLS handshake bytes, including its ODCA certificate chain, via LMS
- rpc-go forwards the TLS handshake bytes received from LMS back to RPS without modification
- RPS validates the ODCA certificate chain presented by AMT and completes the TLS handshake end-to-end with AMT
- After the end-to-end TLS tunnel is established, RPS sends the required WSMAN messages to activate AMT to CCM
- Once activated in CCM, AMT uses its default self-signed certificate. We need to replace that with a DMT-generated self-signed certificate
- During DMT self-signed certificate generation, capture the public key hash (for certificate pinning) and store it in the database
- Enable the DMT self-signed certificate into AMT (
putLocalTLSDataandputRemoteTLSDatafunctions in tls.ts), so future TLS sessions can be pinned/validated using the stored public key hash - Perform
Upgrade to ACMafter this step, and then continue with the rest of the provisioning workflow (network settings,ciraetc.)#### Flow B: TLS not available in pre-provisioning (AMT <= 18)
Activate to CCM, Enable TLS, and then transition to TLS
- rpc-go connects to LMS in non-TLS mode (port 16992).
- rpc-go activates AMT to CCM.
- rpc-go configures Self-signed Certificate (certs and configuration) needed for the TLS session.
- rpc-go closes the non-TLS connection.
- rpc-go starts a new TLS connection to LMS (port 16993).
- rpc-go now forwards raw TLS stream bytes between AMT/LMS and RPS (same as Flow A from this point onward).
Not end-to-end from the very first byte, but the steady-state provisioning channel becomes end-to-end TLS once TLS is configured and the TLS session is established.

Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status