Skip to content

Refuse an instance backup restored under another archive's name #439

Done

Description

@samuelmbabhazi

Problem

A restore authenticates an instance backup (ADR 0026): its HMAC proves that a server holding the backup key made it. It does not prove that the archive is the one the operator asked for. Someone who can write where archives are kept (an S3 bucket, or a plain HTTP path with SHIPKEEP_BACKUP_S3_ALLOW_HTTP=true) can put an older valid archive of the same installation in the requested one's place. The restore would then bring back an older state.

Today the restore prints the archive's creation time, and INSTALL.md asks the operator to check it (#428).

Proposal

Bind the archive's name into its manifest, under the HMAC:

  • backup.sh create passes the name it chose to backup.js create, for a local file and for S3;
  • restore passes the requested name, and the restore refuses an archive whose manifest names another one.

This is a format change (manifest version 2). Version 1 archives are still accepted, with a warning.

Acceptance

Restoring s3:A when the storage serves archive B under that name is refused before anything changes, with a test.

Activity

  1. added a commit that references this issue on Nov 28, 2026
    c37848c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions