diff --git a/crates/credentials/src/constants.rs b/crates/credentials/src/constants.rs index b73968bfd..ee5781446 100644 --- a/crates/credentials/src/constants.rs +++ b/crates/credentials/src/constants.rs @@ -66,7 +66,7 @@ mod tests { // In production environment, access key and secret key should be different // These are default values, so being the same is acceptable, but should be warned in documentation - println!("Warning: Default access key and secret key are the same. Change them in production!"); + assert_eq!(DEFAULT_ACCESS_KEY, DEFAULT_SECRET_KEY); } #[test] @@ -74,10 +74,8 @@ mod tests { // Test security best practices // These are default values, should be changed in production environments - println!("Security Warning: Default credentials detected!"); - println!("Access Key: {DEFAULT_ACCESS_KEY}"); - println!("Secret Key: {DEFAULT_SECRET_KEY}"); - println!("These should be changed in production environments!"); + assert_eq!(DEFAULT_ACCESS_KEY, "rustfsadmin"); + assert_eq!(DEFAULT_SECRET_KEY, "rustfsadmin"); // Verify that key lengths meet minimum security requirements assert!(DEFAULT_ACCESS_KEY.len() >= 8, "Access key should be at least 8 characters"); diff --git a/deploy/build/rustfs.service b/deploy/build/rustfs.service index 72ac1123a..4482edacb 100644 --- a/deploy/build/rustfs.service +++ b/deploy/build/rustfs.service @@ -16,8 +16,12 @@ Group=rustfs # working directory WorkingDirectory=/opt/rustfs -# environment variable configuration and main program (single active ExecStart). +# environment variable configuration and main program (Option 1: Directly specify arguments) # Credentials are loaded from /etc/default/rustfs below. Replace the sample values before deployment. +ExecStart=/usr/local/bin/rustfs \ + --address 0.0.0.0:9000 \ + --volumes /data/rustfs/vol1,/data/rustfs/vol2 \ + --console-enable # environment variable configuration (Option 2: Use environment variables) # rustfs example file see: `../config/rustfs.env`