fix (3/5): treat present-but-Nil property as absent in PsDeserialize#22
Merged
irvingouj@Devolutions (irvingoujAtDevolution) merged 5 commits intoJun 23, 2026
Conversation
A PowerShell <Nil/> member is semantically equivalent to an absent one. For Option/#[ps(default)] fields, a present-but-Nil property must map to None/Default instead of being fed to from_ps_value (which rejects Nil). Fixes WriteProgress rejection when ProgressRecord.CurrentOperation arrives as <Nil/>.
…ed auth Over plain HTTP, SSPI message sealing is used (application/HTTP-SPNEGO-session- encrypted). Over HTTPS, TLS provides confidentiality so the body is sent plain (application/soap+xml) and authentication is connection-oriented (RFC 4559): the connection is authenticated once during the handshake (the first operation rides the SPNEGO challenge legs) and every subsequent operation reuses that authenticated connection. requires_sspi_sealing() is therefore true only for plain HTTP. Key points: - SSPI INTEGRITY (sign) is requested unconditionally; CONFIDENTIALITY (seal) only when sealing. INTEGRITY over HTTPS lets the server trust the connection and produces the NTLM MIC / SPNEGO mechListMIC. - EPA channel binding (tls-server-end-point): learned from the server cert after a 401 and applied on a restarted auth sequence. - AlreadyComplete is handled consistently across all four transports (tokio direct, gateway, sync, web). - Fail fast on terminal auth rejection (401 -> PwshCoreError::Auth), try_join! so a failed handshake short-circuits, and the non-interactive client exits non-zero on failure / clean on success (command_completed is authoritative). - Basic over plain HTTP is refused unless --http-insecure is given.
…lding Add the 10-case transport_auth_matrix asserting the WinRM rule against a real server: HTTP+SSPI seals; HTTPS+SSPI is unsealed (TLS); Basic refused over plain HTTP unless forced, allowed (unsealed) over HTTPS. Helpers: sealed() detects the multipart/encrypted envelope, connected() detects pipeline completion. Also makes the shared e2e scaffolding auth-aware: e2e_pwsh_config gains default_auth_method(); native_pty_matrix and pty_harness use it (the default DC refuses Basic over HTTP), and fall back to the standard e2e host/creds out of the box.
test (5/5): transport × auth × sealing e2e matrix
feat (4/5): spec-correct WinRM HTTP/HTTPS transport + connection-oriented auth
df73713
into
stack/02-rfc12-message-derives
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 3 of 5 — base:
stack/02-rfc12-message-derives(stacked on #21).A PowerShell
<Nil/>member is semantically equivalent to an absent one. ForOption/#[ps(default)]fields the derivedPsDeserializemust map a present-but-Nilproperty to
None/Defaultinstead of feeding it tofrom_ps_value(which rejectsNil). Fixes WriteProgress being rejected when
ProgressRecord.CurrentOperationarrives as
<Nil/>(the first "Preparing modules for first use." progress record).Includes a regression test (
host::test::test_write_progress_tolerates_nil_fields).