Skip to content

Bind remote reads to opened SFTP and SMB objects - #153

Merged
bifrost0x merged 1 commit into
mainfrom
dev/sftp-reader-object-binding
Aug 26, 2026
Merged

Bind remote reads to opened SFTP and SMB objects#153
bifrost0x merged 1 commit into
mainfrom
dev/sftp-reader-object-binding

Conversation

@bifrost0x

Copy link
Copy Markdown
Owner

Summary

  • introduce a protocol-neutral reader lease that keeps remote metadata bound to the exact SFTP or SMB handle supplying bytes
  • use SFTP handle stat and SMB2 CREATE metadata, reject invalid or non-readable opened objects, and preserve separate transfer I/O lanes
  • open downloads before response construction, disable byte ranges, enforce declared and observed byte limits, and close handles on every response outcome
  • apply the same binding to previews, editor reads, archive members, remote ZIP streams, and server-to-server copies

Security boundaries

  • WebSSH does not add a virtual allowed-folder root for SFTP; deployments that require subtree confinement must use the remote account and server-side chroot
  • supported SMB targets must continue to disable symlink and wide-link traversal; final read handles are also opened without following reparse points and validated from CREATE metadata
  • RBAC and role-based connection visibility are intentionally not part of this change

Validation

  • pytest tests/test_binary_transfer_preview.py tests/test_file_backend.py tests/test_remote_transfer.py tests/test_sftp_backend.py tests/test_sftp_handler.py tests/test_smb_backend.py tests/test_transfer_cancellation.py tests/test_transfer_routes.py -q — 221 passed
  • pytest tests -q — 2,213 passed, 33 skipped
  • python scripts/run_integration_tests.py — 27 passed against disposable OpenSSH targets
  • python scripts/run_smb_integration_tests.py — SMB 3.1.1 integration checks passed
  • security diff review — 0 findings across 7 changed production modules

@bifrost0x
bifrost0x merged commit adb5784 into main Aug 26, 2026
16 of 17 checks passed
@bifrost0x
bifrost0x deleted the dev/sftp-reader-object-binding branch August 26, 2026 12:39
@github-project-automation github-project-automation Bot moved this from Backlog to Done in WebSSH Roadmap Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant