Expand description
Cross-account confirmation cache.
§Purpose
When a cross-account copy requires an explicit large-file confirmation,
the frontend calls cross_account_confirm to obtain a one-time token that
it then passes back via object_copy as confirmed_token.
The cache holds ConfirmationRecords keyed by UUID token string. Each
record is scoped to a specific (source_bucket, source_key, dest_bucket,
dest_key, profile) tuple and expires after 5 minutes. Tokens are
single-use: consume atomically checks the scope and marks the record
consumed so it cannot be replayed.
§OCP
ConfirmScope and ConfirmationRecord are additive — new fields can be
added with #[serde(default)] without breaking existing confirmation flows.
ConfirmationCache is reusable for any “explicit confirmation needed”
pattern (storage-class destructive ops, metadata overwrites, …).
Structs§
- Confirm
Scope - The scope a confirmation token is bound to.
- Confirmation
Cache - Thread-safe in-memory cache of pending confirmation tokens.
- Confirmation
Cache Handle - Newtype around
Arc<ConfirmationCache>used as Tauri managed state. - Confirmation
Record 🔒 - One pending confirmation stored in the cache.
Constants§
- TOKEN_
TTL 🔒 - Time-to-live for confirmation tokens.