[SERVER-82335] Stop parsing tenant prefix without atlas proxy protocol in multitenancy Created: 19/Oct/23 Updated: 01/Feb/24 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Sophia Tan | Assignee: | Dominic Hernandez |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | ntdi_code_quality, ntdi_must_have | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Description |
|
As Atlas Proxy would send tenant token with "expectPrefix: true" on every request before we rolled out mongoq, that means we only parse tenant id from database strings when "expectPrefix:true" is set in the unsigned security token. We need to remove support for parsing tenant id from prefix of database strings without "expectPrefix: true". For example, if we receive a request {count: ..., $db: tenantA_myDb} without security token, we should return error instead of counting documents of the tenant db with DatabaseName(tenantA, myDb). |