Add CLI flag to opt in to world-readable log files (#3747)

## Issue Addressed

#3732

## Proposed Changes

Add a CLI flag to allow users to opt out of the restrictive permissions of the log files.

## Additional Info

This is not recommended for most users. The log files can contain sensitive information such as validator indices, public keys and API tokens (see #2438). However some users using a multi-user setup may find this helpful if they understand the risks involved.
This commit is contained in:
Mac L
2022-11-25 07:57:11 +00:00
parent e9bf7f7cc1
commit 969ff240cd
7 changed files with 36 additions and 1 deletions

View File

@@ -1548,6 +1548,23 @@ fn enabled_disable_log_timestamp_flag() {
assert!(config.logger_config.disable_log_timestamp);
});
}
#[test]
fn logfile_restricted_perms_default() {
CommandLineTest::new()
.run_with_zero_port()
.with_config(|config| {
assert!(config.logger_config.is_restricted);
});
}
#[test]
fn logfile_no_restricted_perms_flag() {
CommandLineTest::new()
.flag("logfile-no-restricted-perms", None)
.run_with_zero_port()
.with_config(|config| {
assert!(config.logger_config.is_restricted == false);
});
}
#[test]
fn sync_eth1_chain_default() {