Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-323

getUser() userId field is outputted as binary

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 0.2.2
    • Fix Version/s: 0.3.1
    • Component/s: Shell
    • Labels:
      None
    • # Replies:
      0
    • Last comment by Customer:
      true
    • Documentation Changes:
      Not Needed
    • Sprint:
      Iteration Lime

      Description

      When I run getUser() in mongosh, version 0.1.1, the userId field is returned as binary:

      > db.getUser("accountAdmin01")
      {
        _id: 'products.accountAdmin01',
        userId: BinData(4, "d*øÖ4M¯£Mky9—"),
        user: 'accountAdmin01',
        db: 'products',
        customData: { employeeId: '0x3039' },
        roles: [ { role: 'read', db: 'assets' } ],
        mechanisms: [ 'SCRAM-SHA-1', 'SCRAM-SHA-256' ]
      }
      

      Compare with the output from the current mongo shell:

      MongoDB Enterprise > db.getUser("accountAdmin01")
      {
      	"_id" : "products.accountAdmin01",
      	"userId" : UUID("02642af8-d634-4d0f-afa3-4d126b793997"),
      	"user" : "accountAdmin01",
      	"db" : "products",
      	"customData" : {
      		"employeeId" : "0x3039"
      	},
      	"roles" : [
      		{
      			"role" : "read",
      			"db" : "assets"
      		}
      	],
      	"mechanisms" : [
      		"SCRAM-SHA-1",
      		"SCRAM-SHA-256"
      	]
      }
      

        Attachments

          Activity

            People

            Assignee:
            anna.henningsen Anna Henningsen
            Reporter:
            jeffrey.allen Jeffrey Allen
            Participants:
            Last commenter:
            Anna Henningsen Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              39 weeks, 2 days ago