feat(rustfs): add ftps/webdav defaults to info output#2845
Merged
Conversation
Contributor
|
CLA requirements are satisfied for this pull request. |
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
loverustfs
approved these changes
May 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates RustFS’s info -all output to reflect that FTPS and WebDAV are now enabled by default, and expands the configuration section to surface FTPS/WebDAV-related environment keys and effective values. This aligns the CLI’s introspection output with the crate’s new default feature set.
Changes:
- Enable
ftpsandwebdavas default features inrustfs/Cargo.toml. - Update
rustfs info -all“Default Features” output to show FTPS/WebDAV as enabled by default. - Extend “Configuration Information” output with FTPS/WebDAV sub-items, and add tests covering the new output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rustfs/src/config/info.rs | Marks FTPS/WebDAV as default-enabled in feature reporting; adds FTPS/WebDAV config rows to info output; adds output assertions in tests. |
| rustfs/Cargo.toml | Enables ftps and webdav as default features; minor formatting cleanup in Tokio feature list. |
Comment on lines
+785
to
+810
| fn format_protocol_config_info() -> String { | ||
| const DEFAULT_FTPS_PASSIVE_PORTS: &str = "40000-50000"; | ||
| const DEFAULT_WEBDAV_MAX_BODY_SIZE: u64 = 5 * 1024 * 1024 * 1024; | ||
| const DEFAULT_WEBDAV_REQUEST_TIMEOUT_SECS: u64 = 300; | ||
|
|
||
| let ftps_enable = rustfs_utils::get_env_bool(rustfs_config::ENV_FTPS_ENABLE, false); | ||
| let ftps_address = rustfs_utils::get_env_str(rustfs_config::ENV_FTPS_ADDRESS, rustfs_config::DEFAULT_FTPS_ADDRESS); | ||
| let ftps_tls_enabled = rustfs_utils::get_env_bool(rustfs_config::ENV_FTPS_TLS_ENABLED, true); | ||
| let ftps_certs_dir = | ||
| rustfs_utils::get_env_opt_str(rustfs_config::ENV_FTPS_CERTS_DIR).unwrap_or_else(|| "(not set)".to_string()); | ||
| let ftps_ca_file = rustfs_utils::get_env_opt_str(rustfs_config::ENV_FTPS_CA_FILE).unwrap_or_else(|| "(not set)".to_string()); | ||
| let ftps_passive_ports = rustfs_utils::get_env_opt_str(rustfs_config::ENV_FTPS_PASSIVE_PORTS) | ||
| .unwrap_or_else(|| DEFAULT_FTPS_PASSIVE_PORTS.to_string()); | ||
| let ftps_external_ip = | ||
| rustfs_utils::get_env_opt_str(rustfs_config::ENV_FTPS_EXTERNAL_IP).unwrap_or_else(|| "(not set)".to_string()); | ||
|
|
||
| let webdav_enable = rustfs_utils::get_env_bool(rustfs_config::ENV_WEBDAV_ENABLE, false); | ||
| let webdav_address = rustfs_utils::get_env_str(rustfs_config::ENV_WEBDAV_ADDRESS, rustfs_config::DEFAULT_WEBDAV_ADDRESS); | ||
| let webdav_tls_enabled = rustfs_utils::get_env_bool(rustfs_config::ENV_WEBDAV_TLS_ENABLED, true); | ||
| let webdav_certs_dir = | ||
| rustfs_utils::get_env_opt_str(rustfs_config::ENV_WEBDAV_CERTS_DIR).unwrap_or_else(|| "(not set)".to_string()); | ||
| let webdav_ca_file = | ||
| rustfs_utils::get_env_opt_str(rustfs_config::ENV_WEBDAV_CA_FILE).unwrap_or_else(|| "(not set)".to_string()); | ||
| let webdav_max_body_size = rustfs_utils::get_env_u64(rustfs_config::ENV_WEBDAV_MAX_BODY_SIZE, DEFAULT_WEBDAV_MAX_BODY_SIZE); | ||
| let webdav_request_timeout = | ||
| rustfs_utils::get_env_u64(rustfs_config::ENV_WEBDAV_REQUEST_TIMEOUT, DEFAULT_WEBDAV_REQUEST_TIMEOUT_SECS); |
Comment on lines
+1031
to
+1037
| assert!(output.contains("| FTPS > Enabled (`RUSTFS_FTPS_ENABLE`) |")); | ||
| assert!(output.contains("| FTPS > Address (`RUSTFS_FTPS_ADDRESS`) |")); | ||
| assert!(output.contains("| FTPS > Passive Ports (`RUSTFS_FTPS_PASSIVE_PORTS`) |")); | ||
| assert!(output.contains("| WebDAV | --- |")); | ||
| assert!(output.contains("| WebDAV > Enabled (`RUSTFS_WEBDAV_ENABLE`) |")); | ||
| assert!(output.contains("| WebDAV > Address (`RUSTFS_WEBDAV_ADDRESS`) |")); | ||
| assert!(output.contains("| WebDAV > Max Body Size (`RUSTFS_WEBDAV_MAX_BODY_SIZE`) |")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
N/A
Summary of Changes
ftpsandwebdavinrustfsdefault features (rustfs/Cargo.toml).rustfs info -alloutput:Default Featuresnow explicitly showsftpsandwebdavas enabled by default.Configuration Informationnow includes FTPS and WebDAV sub-items with related env keys and effective values.rustfs/src/config/info.rsto verify both outputs.Verification
make pre-commitcargo test -p rustfs --lib config::info::tests -- --nocapturecargo fmt --all --checkImpact
rustfs info -all:Additional Notes
N/A