Skip to content

[IMP] storage_backend_sftp: security, compatibility and debugging#587

Open
IJOL wants to merge 1 commit intoOCA:18.0from
BITVAX:18.0-bitvax-sftp-security
Open

[IMP] storage_backend_sftp: security, compatibility and debugging#587
IJOL wants to merge 1 commit intoOCA:18.0from
BITVAX:18.0-bitvax-sftp-security

Conversation

@IJOL
Copy link
Copy Markdown

@IJOL IJOL commented Apr 5, 2026

Summary

  • Add host key verification to prevent MITM attacks
  • Flexible key input accepting file paths, PEM content, or bytes
  • Legacy SSH algorithm support for older SFTP servers (banking, etc.)
  • Verbose logging for connection troubleshooting
  • Atomic file get operations using tempfile (prevents partial reads)

New fields: sftp_verify_hostkey, sftp_hostkey, sftp_legacy_algorithms, sftp_verbose_logging

Test plan

  • Install storage_backend_sftp on a clean database
  • Configure an SFTP backend with password authentication — verify connection works
  • Configure with SSH key (file path and direct content) — verify both work
  • Enable verbose logging — verify debug output in logs
  • Enable host key verification with correct key — verify connection succeeds
  • Enable host key verification with wrong key — verify connection is rejected
  • Enable legacy algorithms — verify connection to older servers works
  • Test file get operation — verify atomic download via tempfile

… options

- Host key verification (MITM prevention)
- Flexible key input (file paths, content, bytes) via normalize_key_input()
- Legacy SSH algorithm support for older servers (banks, etc.)
- Verbose logging for connection troubleshooting
- Atomic file get operations using tempfile (prevents partial reads)

Port of BITVAX improvements from 16.0-bitvax-migrations branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant