[SERVER-12111] usersInfo command does not display users halfway through an upgrade from 2.4 to 2.6 Created: 16/Dec/13  Updated: 11/Jul/16  Resolved: 21/Jan/14

Status: Closed
Project: Core Server
Component/s: Security, Usability
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: sam.helman@10gen.com Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File blank_users_info_repro.js    
Issue Links:
Related
Operating System: ALL
Participants:

 Description   

To reproduce, in a trivial case:

  • Bring up a 2.4 standalone
  • Insert a user in the admin database with the 'userAdminAnyDatabase' and 'clusterAdmin' roles
  • Restart the node as 2.6
  • Run the authSchemaUpgradeStep command once, so that the authSchemaVersion is 2.
  • Run 'usersInfo' on the admin database. It reports no users.

In more complex cases (i.e multiple users on multiple databases), the command has the same issue of reporting no users when authSchemaVersion is 2. This is, however, the simplest possible reproducing case.

Reproducing script attached.



 Comments   
Comment by Spencer Brody (Inactive) [ 21/Jan/14 ]

https://github.com/mongodb/mongo/commit/6d52377da1545aef697889a7e83800e80cf93084

Comment by Andy Schwerin [ 19/Dec/13 ]

This is almost certainly caused by usersInfo failing to consider the current version when choosing whether to read from admin.system.users or admin.system.new_users. Should be a very easy fix, perhaps a one liner.

Generated at Thu Feb 08 03:27:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.