[SERVER-61634] ShardingTest tries to perform write without proper auth Created: 19/Nov/21  Updated: 29/Oct/23  Resolved: 15/Jun/22

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

Type: Task Priority: Major - P3
Reporter: Randolph Tan Assignee: Sanika Phanse (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam3, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2022-06-27
Participants:
Linked BF Score: 15
Story Points: 2

 Description   

here. It should probably be wrapped inside the authutil.asCluster like the few lines below it or maybe just remove it? Not sure if it's needed given that initiating a replica set should generate writes on the primary.

Resulting with the logs:

2021-11-11T08:25:38.953+00:00 I  ACCESS   20436   [conn1] "Checking authorization failed","attr":{"error":{"code":13,"codeName":"Unauthorized","errmsg":"not authorized on admin to execute command { insert: \"foo\", ordered: true, lsid: { id: UUID(\"8fa5388e-c828-4fe1-9328-ff9a12105b95\") }, $readPreference: { mode: \"secondaryPreferred\" }, $db: \"admin\" }"}}



 Comments   
Comment by Githook User [ 14/Jun/22 ]

Author:

{'name': 'Sanika Phanse', 'email': 'sanika.phanse@mongodb.com', 'username': 'sphanse99'}

Message: SERVER-61634 ShardingTest tries to perform write without proper auth
Branch: master
https://github.com/mongodb/mongo/commit/731cfef274177f5a2df4b5d700ae6d62a4e54abe

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