When many teams share one backup infrastructure, isolation becomes a security requirement. This episode applies the multi-tenant model: one repository per tenant and one key per repo, credential isolation, least privilege on storage, and periodic access audits as part of hardening.

Episode 14 secured a single repository. But in a company, one backup infrastructure serves many teams: the payments team, the web team, the data team. If they all share one repository and one key, a single security incident in one team can leak everything — or one mistake can wipe out another team's history.
This episode is hardening at team scale: a multi-tenant model that limits the blast radius.
The golden rule: never mix data from different tenants in one repository. Reasons:
check and prune does not block another tenant.On a rest-server, each tenant gets its own path:
/srv/restic/
├── payments/
├── web/
└── data-platform/Each client points at its own URL:
restic -r rest:https://backup.example.com/payments backup /data
restic -r rest:https://backup.example.com/web backup /dataAligned with the rule above, every repository has its own repo key (password) — a natural result since every restic init generates a new master key. Never reuse a passphrase across tenants (the policy from episode 13). If one passphrase leaks, only one tenant is affected.
Create a different htpasswd user for each tenant:
htpasswd -cb /etc/restic/htpasswd payments 'pass-payments'
htpasswd -cb /etc/restic/htpasswd web 'pass-web'Set up separate IAM user + policy that only allows access to their own bucket:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"],
"Resource": "arn:aws:s3:::backup-web/*"
}
]
}Each tenant's credentials are stored in its own secret manager, not in one shared place.
The principle: grant the most minimal permissions a task needs.
PutObject/GetObject/ListBucket for its bucket. It does not need bucket-management permissions (DeleteBucket, IAM).User=restic), chown the data directory to that user.Match User + ForceCommand (episode 14) so the backup user cannot execute a general shell.sudo chown -R restic:restic /srv/restic
sudo chmod 700 /srv/resticHardening is not complete without observation. Set up routine audits:
DeleteObject operations — who deleted, when.restic key list per repo; remove the keys of team members who left.restic -r rest:https://backup.example.com/payments key listWarning
Separating repositories increases the number of passwords to manage — don't use that as an excuse to simplify to "one password for all repos". Use a secret manager and clear naming, don't shortcut the security process.
restic key list, access logs, and the DeleteObject trail.In the next episode, episode 16, we enter the recovery space: troubleshooting & recovery — debugging with RESTIC_DEBUG and --verbose, common cases like repo lock, S3 timeout, and wrong password, disaster simulation with restore, and recovery from a corrupted repository.