docs(smb2): note response-signature verification in AI disclosure
CI / format (pull_request) Successful in 2m4s
CI / lint (pull_request) Successful in 2m4s
CI / install (pull_request) Successful in 6m26s
CI / typetest (pull_request) Successful in 2m7s
CI / node-tests (pull_request) Successful in 2m24s
CI / typecheck (pull_request) Successful in 2m45s
CI / browser-tests (pull_request) Successful in 6m50s
CI / format (pull_request) Successful in 2m4s
CI / lint (pull_request) Successful in 2m4s
CI / install (pull_request) Successful in 6m26s
CI / typetest (pull_request) Successful in 2m7s
CI / node-tests (pull_request) Successful in 2m24s
CI / typecheck (pull_request) Successful in 2m45s
CI / browser-tests (pull_request) Successful in 6m50s
Reflect the final state in AI_CHANGES.md: the client verifies inbound response signatures (not just signs requests), advertises no cipher, and the mock server does a real signed round-trip with tamper/unsigned rejection tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014AcGBx7EjVaByiHcBcsSfP
This commit was merged in pull request #60.
This commit is contained in:
+2
-2
@@ -93,8 +93,8 @@ The test suite for `packages/http` was mostly generated by Claude Code, which al
|
||||
- **`@webnet/smb2` — new SMB2/3 client package**: Claude Code (Fable 5) designed and implemented a new `@webnet/smb2` package: an SMB2/3 client that runs over the existing `RawTransport`/`RawDialer` abstraction (TCP/445 in Node, relayed through tsconnect's `IPNDialer` in the browser) and exposes a remote Windows/Samba share as an `@webnet/vfs` `AsyncVFS` (`SMB2Client`), mirroring how `@webnet/drive` exposes WebDAV. It targets default Windows 10/11 (including 24H2's mandatory SMB signing) and supported Samba 4.x, negotiating dialects {2.0.2, 2.1, 3.1.1}. Highlights:
|
||||
- **Isomorphic crypto, no Node APIs, no new dependencies.** The primitives Web Crypto lacks are hand-written in TypeScript and only run over small NTLM blobs: MD4, MD5, HMAC-MD5. SMB3 AES-CMAC signing is built on Web Crypto `AES-CBC` (RFC 4493 subkey construction); the SP800-108 key-derivation function on Web Crypto `HMAC-SHA256`; SHA-512 preauth-integrity and HMAC-SHA256 signing use Web Crypto natively. All primitives are covered by published test vectors (RFC 1320/1321/2202/4231/4493, NIST SP800-108, and the MS-NLMP §4.2.4 NTLMv2 sample).
|
||||
- **Authentication:** NTLMv2 inside NTLMSSP inside a minimal hand-rolled SPNEGO (DER) wrapper, with the message-integrity code (MIC) and channel-binding AV pair.
|
||||
- **Signing** (HMAC-SHA256 for 2.x, AES-CMAC for 3.x) and 3.1.1 SHA-512 preauth-integrity hashing are implemented; SMB3 encryption is deferred (the transform layer is structured so it can be added without restructuring).
|
||||
- **Signing** (HMAC-SHA256 for 2.x, AES-CMAC for 3.x) and 3.1.1 SHA-512 preauth-integrity hashing are implemented; the client both signs its requests and **verifies inbound response signatures** (rejecting unsigned or invalid responses on a signed session, per [MS-SMB2] 3.2.5.1.3). SMB3 encryption is deferred (the transform layer is structured so it can be added without restructuring), and no cipher is advertised so an encryption-mandating share fails cleanly at TREE_CONNECT.
|
||||
- **VFS surface:** `stat`, `readdir`, `readFile`/`readFileRange` (streaming, credit-aware, chunked to the negotiated max read size), `writeFile`, `mkdir`, `delete` (recursive), `move` (rename), `copy`, and `setProps` (timestamps), plus `connect`/`disconnect`. NTSTATUS codes are translated to `VFSError` codes at the boundary.
|
||||
- **Tests:** unit tests with the crypto/auth vectors above, protocol codec round-trip tests, and an in-repo mock SMB2 server exercising the full client path end-to-end over the loopback transport. An opt-in `smb2.integration.test.ts` (gated behind `SMB2_TEST_*` env vars) runs against a real Samba/Windows share.
|
||||
- **Tests:** unit tests with the crypto/auth vectors above, protocol codec round-trip tests, and an in-repo mock SMB2 server that performs a real SMB 3.1.1 signed round-trip end-to-end over the loopback transport (including tests that tampered and unsigned responses are rejected). An opt-in `smb2.integration.test.ts` (gated behind `SMB2_TEST_*` env vars) runs against a real Samba/Windows share.
|
||||
- Wired into `@webnet/test-app` (exposed as `window.smb2`) for a browser smoke check.
|
||||
- The protocol command codecs and the mock server were drafted by subordinate Sonnet agents from exact wire-layout specifications; the crypto, authentication, connection/session state machine, and VFS mapping were written and reviewed by Fable 5.
|
||||
|
||||
Reference in New Issue
Block a user