Change command listDatabases to only list dbs of current tenant

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Server Serverless 2022-10-03, Server Serverless 2022-10-17
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Today, the listDatabases command does not filter dbs with current tenant of the command request. In this ticket, we should change this so that we only list dbs of the current tenant, if one sent in the request. In order to do this, we'll want to filter out the list returned here to only include dbs who have a matching tenantId. Then, pass this filtered list to setReplyItems.

      We need to follow the same behavior for serializing the DatabaseNames as we are for NamespaceStrings, so we may want to create a similar serialize function for DatabaseName as we did for NamespaceString, and then use it to return the serialized database names correctly here instead of always calling db() as we are today.

      Then, let's add a test to the native_tenant_data_isolation_basic... tests to test that this works both when sending this command with $tenant, and when sending it with a security token.

            Assignee:
            Adi Agrawal (Inactive)
            Reporter:
            Sophia Tan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: