[SERVER-62239] Put tenantId on opCtx if passed as $tenant Created: 22/Dec/21  Updated: 29/Oct/23  Resolved: 18/Jan/22

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

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-62725 Use internal action for creating tena... Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2021-12-27, Server Serverless 2022-01-10, Server Serverless 2022-01-24
Participants:
Linked BF Score: 152

 Description   

Currently the tenantId is included in the authenticatedUser object on the opCtx if it was provided as a part of the security token over the wire. This ticket is to create new object on the opCtx (different from the authenticatedUser object) that can store the tenantId in the event that it is passed some way other than the security token. This ticket should also set this new object when a tenantId is received in the $tenant field. Future work will need to be done to set this object when the tenantId is passed as a prefix or if some background thread is doing work on behalf of a tenant.



 Comments   
Comment by Githook User [ 18/Jan/22 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-62239 Put tenantId on opCtx if passed as $tenant
Branch: master
https://github.com/mongodb/mongo/commit/fcdbc3e8e383f0865b05189665a5a0524169b3bf

Comment by Githook User [ 18/Jan/22 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-62239 Put tenantId on opCtx if passed as $tenant
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/671411d03bcc6d2142fd737cd6ae3717f7280c77

Comment by Janna Golden [ 18/Jan/22 ]

Code review for test fix:
https://github.com/10gen/mongo/pull/2776

Comment by Githook User [ 16/Jan/22 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: Revert "SERVER-62239 Put tenantId on opCtx if passed as $tenant"
Revert "SERVER-61986 Add TenantNamespace to Collection object"

This reverts commit da6685f2648051ce806ad700d31787a1f365cfdc.
This reverts commit 560cf02296f03685faaaf5f655dec00316dbbd85.
Branch: master
https://github.com/mongodb/mongo/commit/b2915693899db7af9e22346504a10157857f55c8

Comment by Githook User [ 16/Jan/22 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: Revert "SERVER-62239 Put tenantId on opCtx if passed as $tenant"
Revert "SERVER-61986 Add TenantNamespace to Collection object"

This reverts commit 7b998aa933ea2ab8730198a6c3a95cfc2d5f2d41.
This reverts commit 25d67fb471cc3f64445074a2d9fd28a089c6695a.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/ceaa46605410f237ea8a4599808936e545928c11

Comment by Githook User [ 14/Jan/22 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-62239 Put tenantId on opCtx if passed as $tenant
Branch: master
https://github.com/mongodb/mongo/commit/da6685f2648051ce806ad700d31787a1f365cfdc

Comment by Githook User [ 14/Jan/22 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-62239 Put tenantId on opCtx if passed as $tenant
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/7b998aa933ea2ab8730198a6c3a95cfc2d5f2d41

Generated at Thu Feb 08 05:54:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.