Repository navigation
fix(storage): keep the platform default bucket private - #14814
Conversation
The platform bucket that holds data exports and console import uploads granted every permission to any role. Exports are reached through their signed download link and imports through the migration endpoints, so the bucket only needs to let console users upload; reads, updates and deletes follow per-file permissions. Existing installs get the stored permissions corrected on server start.
|
Review complete. No issues found — approved ✅. The change bootstraps the default storage bucket at HTTP process init and extends the storage console e2e suite accordingly. Verified reviewers raised only low-confidence notes on bucket permission semantics and idempotency of the bootstrap path; nothing met the reporting threshold. Reviewed commit: 3225fb7 |
🟢 Tier S · Ready to merge
The platform
📂 Walkthrough · 2
Reviewed |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
The console default bucket granted create, read, update and delete to any. It now only lets users create files, and file security governs the rest. Existing installs get the permissions corrected on start. (cherry picked from commit 2c5a569)
The console default bucket granted create, read, update and delete to any. It now only lets users create files, and file security governs the rest. Existing installs get the permissions corrected on start. (cherry picked from commit 2c5a569)
The console default bucket granted create, read, update and delete to any. It now only lets users create files, and file security governs the rest. Existing installs get the permissions corrected on start. (cherry picked from commit 2c5a569)
…bucket fix(storage): keep the platform default bucket private (cherry picked from commit 2c5a569)
What
The platform
defaultbucket (console project) holds CSV/JSON data exports and the files the Console stages for imports. It was created with create/read/update/delete granted toany, which is far broader than either flow needs.create("users"), so signed-in console users can still upload import files (Console: local file → console storage →createCSVImport(internalFile: true)). Reading, updating and deleting a file follow its own permissions (fileSecurityis on): the uploader getsread/update/delete("user:<id>")by default, and export files keep theirread("user:<id>")grant./pushlink, and imports read the file through the migration endpoints; both already load the bucket and file with authorization skipped, so neither depends on the bucket grants.migrate, so no versioned migration is needed. The bucket reads and writes at startup now run underauthorization->skip()like thescreenshotsbucket next to it, since the document is no longer readable byany.Compatibility
Guests can no longer upload to, list, read, update or delete files in the console project's
defaultbucket. Console users only see files they uploaded or exports created for them.Tests
StorageConsoleClientTest::testConsoleDefaultBucketIsPrivate: a console user can upload to and read their file indefault; a guest and a second console user cannot see it in the list, get, download, update or delete it; a guest cannot upload. Runs on CI (no local stack for this branch).Related: appwrite-labs/cloud#6674