Skip to content

feat(dgw): support vmconnect in RDCleanPath #1372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

irvingoujAtDevolution
Copy link
Contributor

  • WIP
  • works

Copy link

github-actions bot commented Jun 4, 2025

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

@irvingoujAtDevolution irvingoujAtDevolution changed the title vmconnect feat(rdcleanpath): support vmconnect Jun 4, 2025
@irvingoujAtDevolution irvingoujAtDevolution marked this pull request as draft June 4, 2025 16:03
@CBenoit CBenoit changed the title feat(rdcleanpath): support vmconnect feat(dgw): support vmconnect in RDCleanPath Jun 5, 2025
Comment on lines +215 to +237
// Preconnection Blob (PCB) is currently only used for Hyper-V VMs.
//
// Connection sequence with Hyper-V VMs (PCB enabled):
// ┌─────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
// │ handled by │ │ handled by IronRDP client │
// │ Gateway │ │ │
// └─────────────────────┘ └─────────────────────────────────────────────────────────────┘
// │PCB → TLS handshake │ → │CredSSP → X224 connection request → X224 connection response │
// └─────────────────────┘ └─────────────────────────────────────────────────────────────┘
//
// Connection sequence without Hyper-V VMs (PCB disabled):
// ┌─────────────────────────────────────────────────────────────┐ ┌──────────────────────┐
// │ handled by Gateway │ │ handled by IronRDP │
// │ │ │ client │
// └─────────────────────────────────────────────────────────────┘ └──────────────────────┘
// │X224 connection request → X224 connection response → TLS hs │ → │CredSSP → ... │
// └─────────────────────────────────────────────────────────────┘ └──────────────────────┘
//
// Summary:
// - With PCB: Gateway handles (1) sending PCB, (2) TLS handshake, then leaves CredSSP
// and X224 connection request/response to IronRDP client
// - Without PCB: Gateway handles (1) X224 connection request, (2) X224 connection response,
// then leaves TLS handshake and CredSSP to IronRDP client
Copy link
Member

@CBenoit CBenoit Jun 5, 2025

Choose a reason for hiding this comment

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

praise: Good summary and explanation.

issue: However, this implementation assumes that the presence of a Preconnection Blob (PCB) implies the use of the Hyper-V VMConnect flow, where X.224 messages are exchanged after the CredSSP sequence. However, this assumption is overly restrictive.
While the PCB is indeed utilized in Hyper-V scenarios, particularly with VMConnect, which employs a unique connection sequence involving CredSSP prior to X.224 negotiation, it's important to recognize that the PCB is a general-purpose mechanism that does not necessarily imply an altered connection sequence. RDP clients, such as MSTSC and FreeRDP, support specifying a PCB without altering the conventional connection sequence, where X.224 negotiation precedes CredSSP authentication.

suggestion: The implementation should not default to the Hyper-V VMConnect flow solely based on the presence of a PCB. For instance, you could verify whether cleanpath_pdu.x224_connection_pdu is Some or None. If it’s None, it seems fair to assume the Hyper-V VMConnect flow.

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

Successfully merging this pull request may close these issues.

2 participants