Commit Graph

7 Commits

Author SHA1 Message Date
Warren
e07d17aee7 Implement User Management UI (Phase 11 P0 #1)
Some checks failed
Test / build (push) Has been cancelled
Test / test (push) Has been cancelled
User Management Features:
- Users.vue: Complete user CRUD interface
- Tauri commands: 5 auth user endpoints
- REST API: DataProvider trait extensions

UI Components:
- User list table (username, home_dir, status)
- Create user dialog (username, password, home_dir, status)
- Edit user dialog (password optional, home_dir, status)
- Delete user confirmation
- Reset password prompt

Tauri Commands (renamed to avoid conflict):
- list_auth_users: List all users from auth database
- create_auth_user: Create user with bcrypt password
- update_auth_user: Update user (optional password)
- delete_auth_user: Delete user
- reset_auth_password: Reset password

DataProvider Trait Extensions:
- list_users(): List all users
- create_user(): Create user with password
- update_user(): Update user (optional password)
- delete_user(): Delete user
- reset_password(): Reset password

Implementations:
- SqliteProvider: Full implementation (sftpgo_users table)
- PgProvider: Full implementation (users table)

Router:
- Added /users route

Home.vue:
- Added User Management card

Build:  Tauri + markbase-core
Tests: 495 markbase-core + 201 smb-server
2026-06-24 05:10:27 +08:00
Warren
57fd6a475f macOS Time Machine AFP monitoring: backup_time update on file modification
- Added afp_monitor.rs module to track AFP_AfpInfo backup_time
- Open struct now has 'modified' flag to track file modifications
- write.rs sets modified=true on successful write
- close.rs calls AfpMonitor::update_backup_time() on modified files
- create.rs calls AfpMonitor::init_afp_info() on new file creation
- AFP_AfpInfo stored as xattr com.apple.aapl.AfpInfo
- backup_time updated to current epoch time on modification

Also includes:
- LZ4 compression using lz4_flex crate
- Case sensitivity conditional on backend capabilities
- LDAP cfg feature gate fix
- RAID rebuild reconstruction implementation
- DOS attributes xattr persistence
- Snapshot disk persistence

Tests: 201 smb-server, 452 markbase-core (653 total)
2026-06-24 00:46:33 +08:00
Warren
912bc21929 Implement LDAP Provider Phase 2.1: DataProvider trait with OpenLDAP/AD support
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
2026-06-22 03:34:17 +08:00
Warren
d94cb2df4c Fix code quality: trailing whitespace, unused imports, clippy warnings
- Fix trailing whitespace in kex.rs and s3.rs
- Add missing KexProposal import in kex_complete.rs
- Auto-fix clippy warnings across all crates
- All 153 tests pass
2026-06-19 05:21:38 +08:00
Warren
963513ef0b Add Security Audit Phase 9: comprehensive SSH security tests
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- auth_security: password brute force, public key, user status, home dir
- crypto_security: AES-CTR, HMAC-SHA256, Curve25519, Ed25519
- file_access_security: path traversal, absolute path, symlink attack
- channel_security: window limits, request validation
- 18 new security tests, all pass (153 total)
2026-06-19 01:37:59 +08:00
Warren
68472e0fb7 Fix all remaining test failures
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
- archive::metadata: add failed_files to test_extract_result
- archive::tests: use TempDir for validate_extraction_path test
- provider::sqlite: fix db path using CARGO_MANIFEST_DIR/../data/auth.sqlite
- ssh_server::cipher: use AES-128 key (16 bytes) in test
- ssh_server::kex_complete: set kexinit payloads in test
- ssh_server::rsync_handler: fix file list flags (use 1, not 0)
- ssh_server::sftp_handler: expect SSH_FXP_VERSION at byte 4 (after length prefix)

All 135 tests now pass
2026-06-19 00:48:53 +08:00
Warren
f90e4f496c VFS/DataProvider/Config refactoring + SSH public key authentication
Some checks failed
Test / test (push) Has been cancelled
Test / build (push) Has been cancelled
Phase 1-6 of refactoring plan:
- VFS abstraction (VfsBackend trait + LocalFs + OpenFlags builder)
- DataProvider trait (SqliteProvider + PgProvider, SFTPGo-compatible)
- Config refactoring (AppConfig unified sections, env overrides)
- SSH handlers (sftp/scp/rsync) migrated to VFS + DataProvider
- SSH public key authentication (Ed25519 signature verification)
- SSH stderr → CHANNEL_EXTENDED_DATA support
- Web auth uses DataProvider instead of direct SQL
- User home directory from provider (per-user isolation)
- PostgreSQL auth provider for SFTPGo compatibility
2026-06-18 23:35:18 +08:00