You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Permission-wrapped VFS affects mount() via populateBin() — fs deny tests must skip driver mounting; childProcess deny tests must include allowAllFs
104
104
- Bridge process.stdin does NOT emit 'end' for empty stdin ("") — pass undefined for no-stdin case
105
+
- TLS bridge: host wraps net.Socket with tls.TLSSocket, remove only specific event types (not removeAllListeners) — TLSSocket forward end/close to wrapped raw socket for library compat (pg relies on original socket's close listener)
105
106
- E2E fixture tests: use NodeFileSystem({ root: projectDir }) for real npm package resolution
106
107
- npm/npx in V8 isolate need host filesystem fallback — createHostFallbackVfs wraps kernel VFS
107
108
- WasmVM _handleSyscall fdRead case MUST call data.set(result, 0) to write to SAB — without this, worker reads garbage
- packages/secure-exec/tests/e2e-docker/pg-ssl/ (new fixture)
2810
+
- **Learnings for future iterations:**
2811
+
- TLS bridge pattern: host wraps existing net.Socket with Node.js tls.TLSSocket, removes old bridge listeners (data/end/error/close), adds new ones to TLS socket
2812
+
- TLSSocket must forward end/close events to the wrapped raw socket — libraries like pg add listeners to the original socket before SSL upgrade, and rely on those listeners to detect shutdown
2813
+
- TLSSocket._connectHost/_connectPort must be copied from the original socket so _cleanup() unregisters the correct active handle
2814
+
- NetSocket._socketId must be accessible (not private) for TLS module to share it — changed to public underscore-prefixed
2815
+
- socket.removeAllListeners() on a raw socket breaks tls.TLSSocket wrapping — only remove specific event types (data/end/error/close/connect)
2816
+
- Postgres SSL: use custom Dockerfile (postgres-ssl.Dockerfile) that installs openssl and generates self-signed cert; existing pg fixtures still work when server has SSL enabled (SSL is optional)
2817
+
- pg_stat_ssl system view verifies the connection is actually encrypted — query WHERE pid = pg_backend_pid()
Copy file name to clipboardExpand all lines: scripts/ralph/prd.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -481,8 +481,8 @@
481
481
"Tests pass"
482
482
],
483
483
"priority": 27,
484
-
"passes": false,
485
-
"notes": "No database connection in the test suite uses TLS/SSL. In production, pg connections are almost always SSL-encrypted. The pg library's SSL support goes through a different code path (tls.connect wrapper) than plain TCP. Since the tls module is deferred (Tier 4), this may require implementing enough of tls for pg's SSL to work, or documenting the limitation."
484
+
"passes": true,
485
+
"notes": "Completed. Implemented tls.connect() bridge for TLS socket upgrade. Host wraps existing net.Socket with tls.TLSSocket, re-wires bridge callbacks for decrypted data. TLSSocket forwards end/close events to wrapped raw socket (pg relies on original socket's 'close' listener for shutdown). Custom postgres-ssl.Dockerfile with self-signed cert. Fixture connects with ssl:{rejectUnauthorized:false}, queries pg_stat_ssl to verify encryption, runs CRUD through TLS. Host and sandbox produce identical output."
0 commit comments