provide-terminal
2026-03-31
PAM server-side integration, capture modes, gateway WS reconnect, rate limiting
47 files · 6,106+ · 151-
Server-side PAM integration: notify/capture modes and CF relay
3 files changed
pam_server.pyPAM event server: notify and capture modes for sshd bridgeapp.pyPAM events forwarded to CF DO and auto-tunnel via TunnelClientlibpam.pyDirect libpam ctypes bindings replacing pamela dependency — works on Python 3.12+
- PAM server-side integration wires pam_uterm.so into the server: notify mode broadcasts PAM open/close events; capture mode routes PTY streams to CF Durable Object via TunnelClient relay. pamela dependency replaced with direct libpam ctypes for Python 3.12+ compatibility. relay_url/relay_token renamed from cf_url/cf_token.
instantiate
behavioral
3 files
pam_server.pyapp.pylibpam.py
Colima PAM smoke test and LD_PRELOAD capture integration tests
3 files changed
test_pam_colima.pyColima smoke test: proves pam_uterm.so fires open/close events on a real PAM stacktest_capture_linux.py5 Linux integration tests proving LD_PRELOAD capture worksinstall_colima.shColima install script for pam_uterm.so + libuterm_capture.so
- Colima PAM smoke test proves pam_uterm.so fires open/close events on a real PAM stack in a Docker/Colima environment. Five Linux integration tests prove LD_PRELOAD capture intercepts PTY output. Full PAM lifecycle and CaptureConnector tests added. CF DO E2E relay tests verify end-to-end PAM event forwarding.
qualify
internal
2 files
test_pam_colima.pytest_capture_linux.py
Capture demo server and E2E proof scripts
2 files changed
capture_demo_server.pyCapture demo server for testing capture pipelinecapture_e2e_proof.pyE2E proof script demonstrating capture flow end to end
Gateway WS reconnect, runtime recv drain, rate limiting
3 files changed
gateway.pyReconnect on WS drop while TCP client is alivesession_runtime.pyDrain completed recv_task before recreating — prevent dropped inbound messagesconfig.pybrowser_rate_limit_per_sec config added — default 300 WS messages/sec
- Gateway now reconnects WebSocket when the WS drops but TCP client is still alive, preventing session loss on transient network blips. recv_task now drained before recreation to prevent dropped inbound messages during restart. browser_rate_limit_per_sec config added (default 300 WS msg/sec) to cap browser message rate.
remediate
behavioral
3 files
gateway.pysession_runtime.pyconfig.py
macOS DYLD_INTERPOSE and pam_uterm.c buffer hardening
1 file changed
pam_uterm.cGCC 13 write() warning fixed; buffer hardened; macOS DYLD_INTERPOSE resolves originals from interpose struct