Module system_user

Source
Expand description

Defaults for system users.

use signstar_common::system_user::{get_home_base_dir_path, get_relative_user_secrets_dir};

// Get the base directory below which Signstar system user homes are located.
println!("{:?}", get_home_base_dir_path());

// Get the relative directory below which Signstar secrets are located per system user.
println!("{:?}", get_relative_user_secrets_dir());

Constantsยง

HOME_BASE_DIR ๐Ÿ”’
The relative base directory below which system user homes are located.
PLAINTEXT_SECRETS_EXTENSION ๐Ÿ”’
The file extension of plaintext credential files.
SYSTEMD_CREDS_SECRETS_EXTENSION ๐Ÿ”’
The file extension of systemd-creds encrypted credential files.
USER_SECRETS_DIR ๐Ÿ”’
The directory name below which credentials files are stored.

Functionsยง

get_home_base_dir_path
Returns the base directory below which Signstar system user homes are located.
get_plaintext_secret_file
Returns the path to a plaintext secrets file for a system user and backend user.
get_relative_user_secrets_dir
Returns the relative directory below which Signstar secrets are located per system user.
get_systemd_creds_secret_file
Returns the path to a systemd-creds encrypted secrets file for a system user and backend user.
get_user_secrets_dir
Returns the path to the secrets directory for a specific system user.