Skip to content

Commit

Permalink
Add file security docs for running Zebra with elevated permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Apr 13, 2023
1 parent fbeb79a commit 1eecebe
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions zebra-consensus/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ use serde::{Deserialize, Serialize};

/// Configuration for parallel semantic verification:
/// <https://zebra.zfnd.org/dev/rfcs/0002-parallel-verification.html#definitions>
///
/// Automatically downloads the Zcash Sprout and Sapling parameters to the default directory:
/// - Linux: `$HOME/.zcash-params`
/// - macOS: `$HOME/Library/Application Support/ZcashParams`
/// - Windows: `%APPDATA%\ZcashParams` or `C:\Users\%USERNAME%\AppData\ZcashParams`
///
/// # Security
///
/// If you are running Zebra with elevated permissions ("root"), create the
/// parameters directory before running Zebra, and make sure the Zebra user
/// account has exclusive access to that directory, and other users can't modify
/// its parent directories.
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields, default)]
pub struct Config {
Expand Down
7 changes: 7 additions & 0 deletions zebra-state/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ pub struct Config {
/// | macOS | `$HOME/Library/Caches/zebra` | `/Users/Alice/Library/Caches/zebra` |
/// | Windows | `{FOLDERID_LocalAppData}\zebra` | `C:\Users\Alice\AppData\Local\zebra` |
/// | Other | `std::env::current_dir()/cache/zebra` | `/cache/zebra` |
///
/// # Security
///
/// If you are running Zebra with elevated permissions ("root"), create the
/// directory for this file before running Zebra, and make sure the Zebra user
/// account has exclusive access to that directory, and other users can't modify
/// its parent directories.
pub cache_dir: PathBuf,

/// Whether to use an ephemeral database.
Expand Down
7 changes: 7 additions & 0 deletions zebrad/src/components/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ pub struct Config {
/// The need to create two files means that we will slightly manipulate the
/// path given to us to create the two representations.
///
/// # Security
///
/// If you are running Zebra with elevated permissions ("root"), create the
/// directory for this file before running Zebra, and make sure the Zebra user
/// account has exclusive access to that directory, and other users can't modify
/// its parent directories.
///
/// # Example
///
/// Given `flamegraph = "flamegraph"` we will generate a `flamegraph.svg` and
Expand Down

0 comments on commit 1eecebe

Please sign in to comment.