[SERVER-35382] _isSelf command needs to be marked requiresAuth false Created: 04/Jun/18  Updated: 29/Oct/23  Resolved: 05/Jun/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.6.17, 4.0.0, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
Problem/Incident
is caused by SERVER-34653 don't even parse requiresAuth command... Closed
Related
is related to SERVER-38390 Set requiresAuth to false for certain... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Platforms 2018-06-04, Platforms 2018-06-18
Participants:
Linked BF Score: 0

 Description   

The _isSelf command can be issued while digesting a replica set config if we cannot determine the "is self" answer by other means. Those other means seem to be unable to determine the "is self" on some platforms [*], so we fall back to issuing an _isSelf on the network.

In the referenced BFs, this was happening in a restarted single-node replica set. When it restarts, it issues _isSelf and fails because it has no key file (single-node replica sets don't think they need a key file) and so won't accept __system user commands.

The fix is to just override _isSelf's Command to make requiresAuth() return false.

[*] Debian builders and on my Ubuntu 18.04 workstation, but not other evergreen builders like RHEL.



 Comments   
Comment by Githook User [ 20/Dec/19 ]

Author:

{'name': 'Spencer Jackson', 'email': 'spencer.jackson@mongodb.com', 'username': 'spencerjackson'}

Message: SERVER-35382 _isSelf requiresAuth false

(cherry picked from commit a54afcecfd5b802904c3224de9e35348621bd2dc)
(cherry picked from commit 076c5057d7508df28ebe3af0870be8328dc280af)
Branch: v3.6
https://github.com/mongodb/mongo/commit/f706a9ff004733b7de98dec726c227165d60fd4c

Comment by Githook User [ 05/Jun/18 ]

Author:

{'username': 'BillyDonahue', 'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-35382 _isSelf requiresAuth false

(cherry picked from commit a54afcecfd5b802904c3224de9e35348621bd2dc)
Branch: v4.0
https://github.com/mongodb/mongo/commit/076c5057d7508df28ebe3af0870be8328dc280af

Comment by Githook User [ 05/Jun/18 ]

Author:

{'username': 'BillyDonahue', 'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-35382 _isSelf requiresAuth false

(cherry picked from commit 34345645bb77e0f1804f63ae1be454e468612ecd)
Branch: master
https://github.com/mongodb/mongo/commit/a54afcecfd5b802904c3224de9e35348621bd2dc

Generated at Thu Feb 08 04:39:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.