Download Free Trial
Table of contents

Mondrian / Сonfiguring username/password protection


Flexmonster Pivot Component supports credentials to access the data source. It is commonly used for the following purposes:

  • provide credentials for data source connectivity
  • provide access for users with different roles and access levels

Here are the step-by-step instructions to configure secure connection with username/password protection.


  • Flexmonster Pivot Component v2.205 SITE edition or higher
  • Relational database and Mondrian schema for it
  • Java JRE 1.7+

Step 1: Create a default user for Accelerator

We recommend creating a default user for Accelerator with minimum privileges. It is used to start the Accelerator, check connection to the data source and connect anonymous users. Refer to the documentation of your database to create a new user (i.e. MySQL, Oracle).

Step 2: Configure Accelerator

Open flexmonster.config and specify user and password in the CONNECTION_STRING parameters. After editing, flexmonster.config should look like the following:


Accelerator is ready to be launched. Just execute the following command in terminal:

java -jar flexmonster-proxy-mondrian.jar

You can check the Accelerator is up and running by navigating to its URL in the browser (i.e. http://localhost:50006).

Step 3: Configure Flexmonster Pivot Component

All data that is sent by HTTP is not encrypted and username/password can be intercepted. We recommend using credentials only with HTTPS. HTTPS encrypts all data that is sent from the client to Accelerator.
Read more at How to configure secure HTTPS connection.

Now, let’s specify credentials for database user in the configuration. Here is a minimal sample created with JavaScript API (replace proxyUrl, catalog, cube and credentials parameters with your specific values):

var pivot = $("#pivotContainer").flexmonster({
	toolbar: true, 
	report: {
		dataSource: {
			dataSourceType: "mondrian",
			proxyUrl: "http://localhost:50006",
			dataSourceInfo: "MondrianFoodMart",
			catalog: "FoodMart",
			cube: "Sales",
			binary: true,
			// Credentials of database user
			username: "webuser",
			password: "1234"