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

getUser() userId field is outputted as binary

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 0.2.2
    • 0.3.1
    • Shell
    • None
    • Not Needed
    • 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

            anna.henningsen@mongodb.com Anna Henningsen
            jeffrey.allen@mongodb.com Jeffrey Allen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: