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

getUser() userId field is outputted as binary

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.3.1
    • Affects Version/s: 0.2.2
    • Component/s: Embedded Shell
    • None
    • Not Needed
    • Iteration Lime

      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"
      	]
      }
      

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

              Created:
              Updated:
              Resolved: