For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data Security

Data Security

Mondrian uses a role-based security model to restrict access to data. Users are assigned to roles, and each role defines what data they can see within the OLAP cube. This allows a single analytics database to serve multiple user types while showing each user only their authorized data.

RBAC

Roles

Mondrian uses a role-based security model to restrict access to data. Users are assigned to roles, and each role defines what data they can see within the ROLAP cube. Consider a sales manager role:

individuals in this position need visibility into their team's performance metrics, product-specific sales figures, and key customer accounts. To fulfill these responsibilities, the sales manager requires access to data spanning products, sales transactions, customer information, and related dimensions.

Within Mondrian, roles must be explicitly defined in the schema where they will be enforced. Creating a role is straightforward—simply declare a Role element and specify its name attribute to identify it.

Role configuration in Pentaho Mondrian requires establishing a connection between Pentaho's authentication system and Mondrian's security layer. This is achieved through a role mapper component.

Configuration Location:

  • File: pentahoObjects.spring.xml

  • Path: pentaho-solutions/system directory

  • Bean ID: Mondrian-UserRoleMapper

The role mapper translates Pentaho user roles into corresponding Mondrian roles, enabling Mondrian to enforce the appropriate security grants defined in your schema.

Pentaho includes three built-in role mapper types to accommodate different security requirements and organizational structures:

One-to-One Role Mapper

The one-to-one role mapper is the most straightforward mapping approach. It directly passes Pentaho user roles to Mondrian without any transformation. For example, if a user has a "Sales Manager" role in Pentaho, Mondrian receives that exact same "Sales Manager" role.

This mapper is widely used because it works seamlessly with existing organizational role structures—there's no need to create separate role names or maintain complex mapping logic between Pentaho and Mondrian.

Security Parameter: failOnEmptyRoleList

This mapper includes an important security parameter that controls behavior when a user has no matching Mondrian roles:

  • Default (Recommended): The mapper throws an exception if no role mapping is found, preventing unauthorized access. This is the secure configuration.

  • Alternative Setting: If set to false, users without matching roles will be granted full permissions to all data—effectively the same as having no security configured at all. This setting should be avoided in production environments.

Best Practice: Leave the default behavior enabled to ensure that only users with explicitly defined roles can access your Mondrian data.

Was this helpful?