-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
priority:highHigh priority issueHigh priority issuestatus:doneCompletedCompletedtype:enhancementNew feature or requestNew feature or request
Description
Summary
Create a comprehensive configuration system for bssh-server that supports YAML configuration files, environment variables, and CLI argument overrides.
Parent Epic
- Implement bssh-server with SFTP/SCP support #123 - bssh-server 추가 구현
- Depends on: Create shared module structure for client/server code reuse #124 (shared module structure)
Design Goals
- Container-friendly: CLI args can override all config options
- Hierarchical: CLI > Environment > Config File > Defaults
- Validated: Configuration errors caught at startup
- Documented: All options documented in code and generated docs
Implementation Status
All core functionality has been implemented:
✅ Configuration types defined with serde support
✅ YAML configuration file loading with default search paths
✅ Environment variable overrides (BSSH_* prefix)
✅ Configuration validation at startup
✅ Default value functions for all optional fields
✅ Config template generation function
✅ Comprehensive documentation on all config fields
✅ Full test coverage (25 tests passing)
✅ Backward compatibility maintained with existing ServerConfig API
Files Created/Modified
| File | Status | Description |
|---|---|---|
src/server/config/mod.rs |
✅ Created | Module exports and backward compatibility layer |
src/server/config/types.rs |
✅ Created | Configuration types with serde support |
src/server/config/loader.rs |
✅ Created | Config loader with env/validation |
Cargo.toml |
✅ Modified | Added ipnetwork = "0.20" |
Acceptance Criteria
- All configuration types defined with serde
- YAML configuration file loading
- Environment variable overrides
- CLI argument overrides (preparation for Create server CLI interface (bssh-server binary) #131)
- Configuration validation at startup
- Default value functions for all optional fields
- Config template generation command
- Documentation comments on all config fields
- Tests passing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority:highHigh priority issueHigh priority issuestatus:doneCompletedCompletedtype:enhancementNew feature or requestNew feature or request