[SERVER-54877] Re-enable aggregate_$search authentication test case Created: 02/Mar/21  Updated: 29/Oct/23  Resolved: 11/Jun/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: Backlog
Fix Version/s: 5.0.0-rc2, 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-43897 Make authentication js tests start sh... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding EMEA 2021-06-14
Participants:

 Description   

The aggregate_$search auth test case has been blacklisted in SERVER-43897 because it is failing during the setup stage  when trying to initialize ReplSetTest in runCommandOnEachPrimary with the error "command replSetGetConfig requires authentication".

This is the stack trace of the error:

_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:18:14
_assertCommandWorked@src/mongo/shell/assert.js:719:17
assert.commandWorked@src/mongo/shell/assert.js:811:16
_replSetGetConfig@src/mongo/shell/replsettest.js:125:16
_constructFromExistingSeedNode/conf<@src/mongo/shell/replsettest.js:3268:42
asCluster@src/mongo/shell/replsettest.js:203:20
_constructFromExistingSeedNode@src/mongo/shell/replsettest.js:3268:20
ReplSetTest/<@src/mongo/shell/replsettest.js:3308:13
retryOnNetworkError@src/mongo/shell/utils.js:57:20
ReplSetTest@src/mongo/shell/replsettest.js:3304:9
getConnToPrimaryOrStandalone@jstests/libs/fixture_helpers.js:105:28
mapOnEachPrimary@jstests/libs/fixture_helpers.js:118:31
runCommandOnEachPrimary@jstests/libs/fixture_helpers.js:134:16
setup@jstests/auth/lib/commands_lib.js:228:13
setup@jstests/auth/lib/commands_lib.js:285:25
testProperAuthorization@jstests/auth/commands_user_defined_roles.js:32:17
runOneTest@jstests/auth/commands_user_defined_roles.js:140:15
runOneTest@jstests/auth/lib/commands_lib.js:278:16
runTests@jstests/auth/lib/commands_lib.js:325:19
@jstests/auth/commands_user_defined_roles.js:222:1
failed to load: jstests/auth/commands_user_defined_roles.js

In particular the problem occurs when we try to construct the replica set primary connection . In fact we don't pass the authentication parameters to the replica set constructor that will try to infer them from jsTest.options. Unfortunately in these specific auth tests the authentication file is specified in the test itself and not at the suite level (in the suite yaml file). For this reason the jsTest.options won't contain any useful information that the replSet constructor can use to infer authentication parameters, so it will just assume no authentication is required and will invoke replSetGetConfig without authentication. **

 



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 11/Jun/21 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-54877 Move failpoint activation from setup callback to fixture initialization

(cherry picked from commit 49e1ff73fbeaaf75f36edbc87471e8d5af234115)
Branch: v5.0
https://github.com/mongodb/mongo/commit/2ededeeda27c3b13723031e4ef7ada1e7812f046

Comment by Githook User [ 10/Jun/21 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-54877 Move failpoint activation from setup callback to fixture initialization
Branch: master
https://github.com/mongodb/mongo/commit/49e1ff73fbeaaf75f36edbc87471e8d5af234115

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