Repository navigation
fix(response): keep key and webhook secrets out of the 1.9.4 project format - #14815
Conversation
…format The V26 filter rebuilds legacy project keys and webhooks from the raw project document, so it bypassed the redaction the current models and key endpoints apply. Key secrets now require keys.write, and webhook credentials stay write-only like the current webhook model.
|
Review complete. No blocking issues — approved ✅; 1 nitpick below. 🧹 Nitpicks (1) — 🟢 1 low
This change makes the legacy response-format filter (
Reviewed commit: bca29a0 |
🟢 Tier S · Ready to merge
The V26 response filter now redacts webhook credentials in legacy project responses and includes key secrets only for callers authorized to manage keys. It uses request scopes for both individual project and project-list responses, with unit and E2E coverage for the redaction behavior. Latest changes: The newest commits also allow
📂 Walkthrough · 5
✅ Fixed since the last review · 1
Reviewed the commits since |
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
|
On the tenki nitpick about webhook credentials: this is intended. The current webhook model makes |
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
…26-secrets fix(response): keep key and webhook secrets out of the 1.9.4 project format (cherry picked from commit 9f332f7)
What
The V26 response filter (formats older than 1.9.5) rebuilds the legacy
keysandwebhooksarrays of the project model from the raw project document, so it did not apply the redaction the current models and key endpoints use.secretis only included when the caller holdskeys.writeororganization.projects.keys.write, matching the project and organization key endpoints. The filter reads the caller's scopes from the request it is constructed with.authPasswordandsecretare always empty, matching the current webhook model (password is write-only, signature key is only returned on creation and rotation).V26 is the only response filter that reads the raw document, so no other filter needed the same change.
Compatibility
Clients using a response format older than 1.9.5 no longer receive webhook credentials in the project model, and only receive key secrets when they can manage keys.
Tests
tests/unit/Utopia/Response/Filters/V26Test.phpcovers the project and project list models with and withoutkeys.write(fails on main, passes here).ProjectCustomServerTest::testGetProjectLegacyFormatHidesSecretscallsGET /v1/projectwith response format 1.9.4 using aproject.readkey and a full server key (CI only).ProjectsConsoleClientTest::testGetProjectnow expects empty webhook credentials in the legacy format.Related: appwrite-labs/cloud#6674