AFS_AETHER_LOG_REDACT
Deep-dive reference for:
AFS_AETHER_LOG_REDACT
Status
active
Audience
production/user
Type and Default
- Type: string enum.
- Accepted values:
off,hash(case-insensitive in env input). - Default:
hash(with no salt unless configured).
What It Does
Controls whether selected sensitive log fields are emitted raw or hashed.
off: sensitive fields are emitted as-is.hash: sensitive fields are replaced with SHA-256 hashes.
Input Surfaces
- Env:
AFS_AETHER_LOG_REDACT=<off|hash> - Config file (
aether.toml):[logging] redaction = "off"or[logging] redaction = "hash"
There is currently no dedicated CLI flag for log redaction mode.
Resolution and Override Order
- Built-in default (
hashwithsalt=None) aether.toml([logging].redaction)- Environment (
AFS_AETHER_LOG_REDACT)
What Gets Redacted
Redaction is field-name based (case-insensitive). The current sensitive field set is:
pathtarget_pathlink_pathxattr_nametokenauth_tokenauthorizationsession_tokensecretrequest_path
Only values recorded under those field names are transformed.
Important Limitation
AFS_AETHER_LOG_REDACT does not automatically sanitize arbitrary free-form message text.
If sensitive values are embedded directly in message strings, they can still appear in logs.
Salt Interaction
AFS_AETHER_LOG_REDACT_SALTprovides optional hash salt.- If salt is set while redaction mode is
off, config logic promotes mode tohashwith that salt.
Reload Behavior (SIGHUP)
log_redaction changes are detected on config reload, but are not hot-applied.
The process logs a restart-required warning; changes take effect after restart.
Validation
- Invalid env values fail config load with:
unknown redaction mode '<value>'
Examples
- Disable redaction:
AFS_AETHER_LOG_REDACT=off aether mount --session-id s1 --mount-dir /mnt/aether
- Enable hashed redaction:
AFS_AETHER_LOG_REDACT=hash aether mount --session-id s1 --mount-dir /mnt/aether
- Enable hashed redaction with salt:
AFS_AETHER_LOG_REDACT=hash AFS_AETHER_LOG_REDACT_SALT=team-secret aether mount --session-id s1 --mount-dir /mnt/aether
Related Variables
AFS_AETHER_LOG_REDACT_SALTAFS_AETHER_LOG_FORMATAFS_AETHER_LOG
Primary Implementation Sources
packages/aether/src/config/types/model_defaults.rspackages/aether/src/config/types/apply_env.rspackages/aether/src/config/types/file_config_loader.rspackages/aether/src/observability/logging.rspackages/aether/src/config/reload.rs