Accessing the Sisense Application Database

When Sisense is installed, Sisense installs a MongoDB database as the application database with three MongoDB users:

The AppUser is created to allow the Sisense Application to interact with the application database. This password is unique to your Sisense installation and should not be changed. The credentials of the AppUser are shared between each node of the replica set. If you want to create a Sisense MongoDB instance on server where Sisense is not installed, see Hosting an Application Server.

By default, Sisense limits access to your application database to localhost. If you want to limit access to your application database, see Limiting Access to the Application Database.

Creating Application Database Users

The ReadUser and WriteUser can be used to access your Sisense application database. These users have the relevant read-only and write-only MongoDB roles assigned to them for accessing the application database.

To create an application database user:

  1. Open the Sisense REST API.
  2. In the REST API, select admin POST /app_database/change_database_user_password.

  3. In the field Authorization, enter your API token. See Using the REST API for more information.
  4. In the User object, provide the username (ReadUser or WriteUser depending on which user’s password you want to change) and the new password:
    {
    "userName": "string", (ReadUser or WriteUser)
    "password": "string" (The password you enter here is the password you will provide when connecting to the database)
    }
  5. Click RUN.

This endpoint encrypts your password and saves it in Sisense application database. When you connect to the application database, use the plaintext password you entered as the value of the password parameter, not the encrypted password returned by the API.

Connecting to the Application Database

Once you have defined the username and passwords for your application database users, these users can connect to the application database through applications such as RoboMongo or when importing data into an ElastiCube from your Sisense MongoDB as described in Connecting to MongoDB.

For example, in RoboMongo, you can connect to your local Sisense MongoDB by connecting to the Address localhost through port 27018.

In the Authentication tab, enter the name of the Sisense MongoDB, admin, and your username and password. The username is the user whose password you changed, in this example, ReadUser. The password is the password you provided through the POST admin/app_database/change_database_user_password endpoint. This password is not the encrypted password that was returned, but the password you defined as the value of the password parameter, for example “mypassword”.

Click Test to verify that your user can connect. If your credentials are authenticated successfully, click Save and then connect to the database. Your Sisense MongoDB tables will be displayed.