Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: se
- `vault rotate` fails closed: it refuses a kept symmetric recipient it cannot re-wrap (that recipient would be locked out), an unusable X25519 public, or a kept set no one can open; it verifies the new wraps, the new manifest and every resealed object before the header commits, and restores the old epoch on any failure.
- `vault rotate` without `--reseal` on a vault that holds entries is now refused (exit 1, vault unchanged) with a hint to re-run with `--reseal`. It used to publish an empty new-epoch manifest, so every entry vanished from `list`/`cat`/`open`. Rotating an empty vault without `--reseal` still works.
- A failed `vault rotate` now also removes the old-epoch recipients snapshot it wrote, and a failure while restoring is reported together with the original error (nonzero exit) instead of being ignored.
- `vault rotate` help and messages no longer say a dropped recipient keeps reading old objects without `--reseal`: a vault that holds entries requires `--reseal`, so that incomplete-revocation case now only applies to empty vaults.

### Security

Expand Down
15 changes: 9 additions & 6 deletions crates/geode-cli/src/cmd/vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ pub enum VaultCmd {
/// A vault that holds entries requires `--reseal` (objects are sealed per
/// epoch; a new epoch without them would hide every entry). On an empty
/// vault a drop without `--reseal` is incomplete revocation: the former
/// recipient keeps its old-epoch wrap. Do not fix incomplete revocation in policy — recipient
/// possession bypasses policy if the holder runs other software.
/// recipient keeps its old-epoch wrap. Do not fix incomplete revocation
/// in policy — recipient possession bypasses policy if the holder runs
/// other software.
Rotate(RotateArgs),
}

Expand Down Expand Up @@ -87,8 +88,10 @@ pub struct RotateArgs {
/// revocation path.
#[arg(long)]
pub reseal: bool,
/// Drop a recipient by `key_id` (hex). Without `--reseal` this is
/// incomplete revocation: the former recipient still reads old objects.
/// Drop a recipient by `key_id` (hex). A vault that holds entries
/// requires `--reseal`, which completes the revocation. Only on an empty
/// vault is a drop without `--reseal` allowed; the former recipient then
/// keeps its old-epoch wrap (incomplete revocation, nothing to read).
#[arg(long, value_name = "ID")]
pub drop_recipient: Vec<String>,
/// Wrap the new EK for an X25519 recipient `.gpub`.
Expand Down Expand Up @@ -325,7 +328,7 @@ fn bump_header_epoch(
fn rotate(args: &RotateArgs, global: &GlobalArgs, out: OutMode) -> Result<()> {
if !args.yes {
return Err(Error::Format(
"rotate requires --yes (skips confirmation; drop without --reseal is incomplete revocation)"
"rotate requires --yes (skips confirmation; a vault that holds entries also requires --reseal)"
.into(),
));
}
Expand Down Expand Up @@ -421,7 +424,7 @@ fn rotate(args: &RotateArgs, global: &GlobalArgs, out: OutMode) -> Result<()> {
String::new()
};
let incomplete_bit = if incomplete {
"; drop without --reseal is incomplete revocation"
"; vault is empty, so the drop without --reseal is incomplete revocation (the former recipient keeps its old-epoch wrap)"
} else {
""
};
Expand Down
Loading