Skip to main content

Credential Hardening and Config Secrets

The best transfer command is still unsafe if secrets are handled poorly.

Hardening Checklist​

  • Restrict config permissions (chmod 600).
  • Keep config outside user home for service jobs (/etc/rclone/rclone.conf).
  • Avoid plaintext secrets in scripts and shell history.
  • Rotate credentials and test refresh path.

File Permission Pattern​

sudo install -d -m 700 /etc/rclone
sudo cp /root/.config/rclone/rclone.conf /etc/rclone/rclone.conf
sudo chmod 600 /etc/rclone/rclone.conf

Secret Management Options​

OptionStrengthWeakness
Encrypted config + strict file permsSimple and localHost compromise still risky
Environment variablesGood for CICan leak via process tooling
Secret manager injectionStrongest for scaleMore setup complexity

Mapping​

tip

Use dedicated credentials per environment (dev, staging, prod) to isolate incidents.

Common Pitfalls​

PitfallRiskMitigation
Shared admin credentials across jobsBroad compromise impactPer-job scoped credentials
Committing config to gitSecret leakageAdd explicit ignore policy
Manual edits under pressureBroken config syntaxKeep versioned template + runbook

What's Next​