Repository navigation
fix(migrations): check source key scopes for DocumentsDB and VectorsDB - #14868
Conversation
For a migration from another project on the same cluster, the source key is now checked against the DocumentsDB and VectorsDB APIs whenever those families are requested, not only TablesDB. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Review complete. 🟡 2 medium 💬 Inline comments (2)
The change adds per-family scope probes for DocumentsDB and VectorsDB in
Reviewed commit: 8e7a306 |
🟢 Tier S · Ready to merge
The migration worker validates source API keys against each requested database family and its resource scopes before reading data directly. E2E coverage verifies rejection of cross-family or missing scopes and successful migration with a correctly scoped DocumentsDB key. Latest changes: The new commits gate TablesDB probes on requested TablesDB resources, add DocumentsDB and VectorsDB index-scope probes, and test rejection when the DocumentsDB index scope is missing.
📂 Walkthrough · 2
Reviewed the commits since |
There was a problem hiding this comment.
This PR extends the migrations worker's source-authentication scope probing to the DocumentsDB and VectorsDB database families with e2e coverage, but keeps an unconditional TablesDB probe that rejects narrowly scoped keys and misses the families' dedicated index scopes.
Key findings
- 🟡 Unconditional
TablesDB->list()probe rejects documentsdb/vectorsdb-scoped keys — Migrations.php:377 - 🟡 Scope probe skips
documentsdb.indexes.read/vectorsdb.indexes.read— Migrations.php:421
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
… index scopes A DocumentsDB or VectorsDB migration no longer needs TablesDB scopes, since TablesDB databases are only exported when TYPE_DATABASE is requested. Index exports for DocumentsDB and VectorsDB now require that family's indexes read scope. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…scopes fix(migrations): check source key scopes for DocumentsDB and VectorsDB (cherry picked from commit 67d57dc)
What does this PR do?
For a migration from another project on the same cluster, the source key is now checked against the DocumentsDB and VectorsDB APIs whenever those families are requested, not only TablesDB.
Test Plan
Three new e2e tests in tests/e2e/Services/Migrations/MigrationsBase.php (TablesDB-only key for DocumentsDB, for VectorsDB, and a correctly scoped key). Migrations e2e 83/83 with _APP_DOCUMENTSDB and _APP_VECTORSDB enabled. Lint, PHPStan and Rector are clean.
Related PRs and Issues
Checklist
🤖 Generated with Claude Code