The drive's share and root folder were accepted when signed by any address whose keys the server served, so a hostile server could vouch for a whole drive of its own making. If the share wasn't created, or the root folder signed, by one of the account's own addresses, reading and writing now fail with an error saying so, unless ignore_signature_errors is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
166 lines
8.9 KiB
Markdown
166 lines
8.9 KiB
Markdown
# Decisions
|
|
|
|
Fork-only. Append-only, newest first. Never edit or delete an entry - supersede
|
|
it with a new one that links back. One entry per decision a future maintainer
|
|
would otherwise have to reverse-engineer.
|
|
No index: `grep -n '^## ' docs/DECISIONS.md` lists every entry.
|
|
|
|
## 2026-11-11 - Proton Drive roots trust in the user's own addresses
|
|
|
|
**Status:** accepted
|
|
**Context:** "Proton Drive distrusts what a forged folder key vouches
|
|
for" and "Proton Drive refuses a file whose node key signature fails"
|
|
read as if every key were checked against keys rclone can trust. But
|
|
the keys of another user's email come from the server, so a server can
|
|
forge a share, root or node "signed" by a foreign address it vouches
|
|
for (Task 16 re-review).
|
|
**Decision:** Corrects those entries. The My Files share's creator and
|
|
the root folder's signer must be addresses whose keys the account
|
|
holds (compared ignoring case); otherwise the share or root key is
|
|
unverified, which makes the whole drive unreadable and unwritable
|
|
without `ignore_signature_errors`, and the error says why. Below the
|
|
root, nodes signed under another user's email are still verified
|
|
against server-supplied keys: a protocol limit Proton's SDK shares,
|
|
documented in spec section 7 and TODO.
|
|
**Alternatives:** Pinning other users' keys on first use (state rclone
|
|
doesn't keep); trusting server keys at the root too.
|
|
**Consequences:** A folder genuinely signed by an address since deleted
|
|
from the account, or whose keys no longer unlock, is unverified: writes
|
|
into it, and reads beneath it, need `ignore_signature_errors`.
|
|
|
|
## 2026-11-11 - Proton Drive won't vouch for a node it couldn't verify
|
|
|
|
**Status:** accepted
|
|
**Context:** Refusing writes into a folder with an unverified key left
|
|
the other direction open: moving or copying an anonymous node out of it
|
|
has rclone sign its server-made passphrase as the user's, after which it
|
|
and everything beneath it verified (Task 16 re-review). And a node made
|
|
under such a folder with `ignore_signature_errors` set was signed by the
|
|
user, so verified later, although whoever made the folder's key can
|
|
decrypt its passphrase.
|
|
**Decision:** Supersedes the inheritance rule of "Proton Drive distrusts
|
|
what a forged folder key vouches for": every node beneath a folder with
|
|
an unverified key is unverified, however it is signed, and so is a
|
|
folder rclone makes there. Moving, copying, directory-moving or
|
|
renaming a node whose key is unverified fails unless
|
|
`ignore_signature_errors` is set.
|
|
**Alternatives:** Inheriting only into anonymous nodes (leaves the
|
|
user-signed children of a forged folder trusted).
|
|
**Consequences:** A genuine folder whose key fails to verify, as one
|
|
signed by a since-deleted address, makes its whole subtree unreadable
|
|
and unwritable without `ignore_signature_errors`.
|
|
|
|
## 2026-11-11 - Proton Drive verifies the manifest before releasing a full read
|
|
|
|
**Status:** accepted
|
|
**Context:** A full read checked the manifest signature at EOF, as the
|
|
SDK does, so blocks swapped, truncated or from an older revision, each
|
|
matching its listed hash and recorded size, reached the reader before
|
|
the error: `rclone cat` and streaming mounts showed wrong bytes (spec
|
|
9.6 asks for "an integrity error, not data").
|
|
**Decision:** A full read lists every block page first, verifies the
|
|
manifest over the listed hashes, then fetches; each block is checked
|
|
against its listed hash, and a block listed again with another hash
|
|
is an integrity error. Pages are fetched one after another. Ranged
|
|
reads keep checking blocks against their listed hashes only.
|
|
**Alternatives:** Keeping the SDK's EOF check; verifying ranged reads
|
|
too by listing the whole file on each ranged open (costly for mounts
|
|
and multi-thread copies without a hash cache).
|
|
**Consequences:** No extra requests, but a file of more than 20 blocks
|
|
waits for its whole list before the first byte. Block metadata, not
|
|
data, is held meanwhile. A whole earlier revision served under the
|
|
current ID stays undetectable (protocol limit).
|
|
|
|
## 2026-11-11 - Proton Drive distrusts what a forged folder key vouches for
|
|
|
|
**Status:** accepted
|
|
**Context:** An anonymous node's passphrase, name and content signatures
|
|
are checked against its parent folder's key. A server can make a folder
|
|
key of its own, seal it to the real parent and sign everything beneath
|
|
it, so a refusal based only on each node's own signature check is
|
|
bypassed (Task 16 review).
|
|
**Decision:** A node key is unverified if its own passphrase signature
|
|
fails, or if it was checked against an unverified parent key; this
|
|
passes down the tree. Reading a file with an unverified key, and
|
|
creating, uploading, renaming, moving or copying into a folder with
|
|
one, fail unless `ignore_signature_errors` is set. Listing such a folder
|
|
still works, with one ERROR for the folder itself.
|
|
**Alternatives:** Leaving the folder's children to their own checks
|
|
(bypassable); refusing to list the folder (a sync would delete its
|
|
destination copy).
|
|
**Consequences:** Builds on the 2026-11-11 entry "Proton Drive refuses a
|
|
file whose node key signature fails". Files in a public-link upload
|
|
folder whose key fails to verify need `ignore_signature_errors`.
|
|
|
|
## 2026-11-11 - Proton Drive refuses a file whose node key signature fails
|
|
|
|
**Status:** accepted
|
|
**Context:** The node passphrase signature was only logged when it
|
|
failed, as the SDK does, so a server could seal a key of its own to
|
|
the parent folder's public key and serve any content under it (spec 7
|
|
puts the server in the threat model; 9.6 asks for an error).
|
|
**Decision:** Opening such a file fails with an integrity error naming
|
|
`ignore_signature_errors`, like a content key or manifest signature
|
|
failure; with the option set it is read, the failure logged once. The
|
|
node is still listed. Sign-in errors that need a reconnect name the
|
|
remote through a hint the seam gives the session, so read errors, which
|
|
don't pass through `translateError`, name it too.
|
|
**Alternatives:** Skipping the node from listings (a sync would then
|
|
delete its copy at the destination); leaving it to the SDK's behaviour.
|
|
**Consequences:** Legacy files whose keys were signed by a since-removed
|
|
address need `ignore_signature_errors`, which the error says.
|
|
|
|
## 2026-11-11 - Proton Drive backend runs on its own client
|
|
|
|
**Status:** accepted
|
|
**Context:** The backend sat on `rclone/Proton-API-Bridge` and
|
|
`rclone/go-proton-api`, which share credentials through package globals,
|
|
write files the official clients can't always read, and can't be tested
|
|
without a live account (spec 001).
|
|
**Decision:** `protondrive.go` was rewritten on the native client built in
|
|
plan Tasks 2-12, keeping every option name and meaning and reading v1.76
|
|
saved sessions without signing in again. `Config` offers browser sign-in
|
|
(default unless a username and password are already set, so existing
|
|
scripted setups keep using them) and password sign-in. An upload whose
|
|
commit outcome can't be known is a no-low-level-retry error: an immediate
|
|
retry could add a revision that already landed, while a later sync pass
|
|
reads the destination first.
|
|
**Alternatives:** Patching the bridge (globals and crypto stay outside the
|
|
tree); keeping browser sign-in the default even with a password set
|
|
(non-interactive `config create` would wait on a browser).
|
|
**Consequences:** The full contract suite runs hermetically against
|
|
`protontest`. Several `Fs` of one account in one process each cache
|
|
separately until events land (spec 6.2).
|
|
|
|
## 2026-11-11 - Fork agent tooling is appended, not merged, into upstream files
|
|
|
|
**Status:** accepted
|
|
**Context:** Upstream rclone already ships a maintainer-written `AGENTS.md`
|
|
and a `CLAUDE.md` that imports it. This fork tracks upstream and intends to
|
|
send work back, so every edit to an upstream file is a future merge conflict
|
|
and a risk of leaking fork-only material into an upstream PR.
|
|
**Decision:** Upstream's `AGENTS.md` text is kept verbatim. Fork rules are one
|
|
"Fork Workflow" section appended at the end. `CLAUDE.md` and `README.md` are
|
|
untouched. Fork-only docs live at the top of `docs/` (Hugo only builds
|
|
`docs/content/`, so they do not reach the website).
|
|
**Alternatives:** Restructuring `AGENTS.md` with the fork rules first (better
|
|
agent attention, permanent conflicts with upstream); a separate fork rules
|
|
file (two sources of truth).
|
|
**Consequences:** `AGENTS.md` sits at 148 of a 150 line budget - a new fork
|
|
rule must replace an old one. Upstream PR branches must be cut so they exclude
|
|
the paths listed in the Fork Workflow section.
|
|
|
|
## 2026-11-11 - Adopt AGENTS.md as single source of truth
|
|
|
|
**Status:** accepted
|
|
**Context:** Agents had no fork-specific workflow or permission config between
|
|
sessions.
|
|
**Decision:** `AGENTS.md` is canonical; `CLAUDE.md`/`GEMINI.md` are pointers.
|
|
Specs are permanent in `docs/specs/`. Plans live in `docs/plans/` only while
|
|
work is in progress and are removed before merge. Both override the
|
|
superpowers default paths.
|
|
**Alternatives:** Per-tool rule files (drift); no rules file (agents
|
|
re-explore the repo every session).
|
|
**Consequences:** Rule changes happen in one file; pointer files stay thin.
|
|
The spec, not the plan, is the record.
|