[SERVER-80833] Pass serialization context into agg parseFromBSON from auth Created: 06/Sep/23  Updated: 12/Sep/23  Resolved: 12/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Hugh Tong (Inactive) Assignee: Hugh Tong (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-65456 Make NamespaceString::db_deprecated()... Closed
is depended on by SERVER-73113 Allow only specific global dbs to be ... Closed
Sprint: Server Serverless 2023-09-18
Participants:

 Description   

checkAuthForCreateOrModifyView calls aggregation_request_helper::parseFromBSON without a serialization context, which can cause us failure in passing the serialization flags from the original request to the aggregation request.  checkAuthForCreateOrModifyView is accessed via a regular db command and as a sharded command, the latter of which is out of scope.

checkAuthForCreateOrModifyView
    checkAuthForCreate
        CmdCreate::Invocation::doCheckAuthorization
        CreateCmd::Invocation::doCheckAuthorization    <-- sharded
    checkAuthForCollMod
        ShardsvrCollModCommand::checkAuthForOperation  <-- sharded
        CollectionModCmd::checkAuthForOperation        <-- sharded

Where we have access to the original request, we should use the serialization context from that.  Otherwise, we can pass in a default serialization context for sharded calls.



 Comments   
Comment by Hugh Tong (Inactive) [ 12/Sep/23 ]

Fix duplicated by SERVER-65456.

Generated at Thu Feb 08 06:44:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.