The Pentaho Security Guide
The Pentaho Security Guide
This document supports Pentaho Business Analytics Suite 4.8 GA and Pentaho Data Integration 4.4 GA,
documentation revision October 31, 2012.
This document is copyright © 2012 Pentaho Corporation. No part may be reprinted without written permission from
Pentaho Corporation. All trademarks are the property of their respective owners.
Trademarks
Pentaho (TM) and the Pentaho logo are registered trademarks of Pentaho Corporation. All other trademarks are the
property of their respective owners. Trademarked names may appear throughout this document. Rather than list
the names and entities that own the trademarks or insert a trademark symbol with each mention of the trademarked
name, Pentaho states that it is using the names for editorial purposes only and to the benefit of the trademark
owner, with no intention of infringing upon that trademark.
Company Information
Pentaho Corporation
Citadel International, Suite 340
5950 Hazeltine National Drive
Orlando, FL 32822
Phone: +1 407 812-OPEN (6736)
Fax: +1 407 517-4575
http://www.pentaho.com
E-mail: [email protected]
Sales Inquiries: [email protected]
Documentation Suggestions: [email protected]
Sign-up for our newsletter: http://community.pentaho.com/newsletter/
| TOC | 3
Contents
Introduction: Configuring Security..............................................................................................5
Security Overview......................................................................................................................6
Supported Technologies............................................................................................................7
Security Implementation Checklist.............................................................................................8
BA Server User Authentication.................................................................................................. 9
Pentaho (Default)..........................................................................................................................................9
Switching to LDAP........................................................................................................................................ 9
Microsoft Active Directory Configuration..........................................................................................10
LDAP Configuration in the Pentaho Enterprise Console................................................................. 11
Forcing Case-Sensitivity in LDAP.................................................................................................... 12
Switching to JDBC...................................................................................................................................... 13
Switching to an LDAP/JDBC Hybrid........................................................................................................... 13
Implementing Single Sign-On..................................................................................................................... 15
Switching to Central Authentication Service (CAS)......................................................................... 15
Switching to Integrated Windows Authentication (IWA)...................................................................17
Assigning Permissions in the Pentaho User Console.................................................................................18
Permissions Settings....................................................................................................................... 19
BA Server Content Authorization.............................................................................................20
User and Role Configuration...................................................................................................................... 20
Adding Users................................................................................................................................... 20
Editing User Information.................................................................................................................. 20
Deleting Users................................................................................................................................. 20
Adding Roles....................................................................................................................................21
Editing Roles....................................................................................................................................21
Deleting Roles..................................................................................................................................21
Assigning Users to Roles.................................................................................................................21
How to Change the Administrator Role............................................................................................22
Implementing Nested Roles in LDAP...............................................................................................22
Resetting or Creating a new Pentaho Enterprise Console User......................................................23
Adding Web Resource Authentication........................................................................................................ 24
Domain Object Authorization...................................................................................................................... 24
Reapplying the Default Access Control Lists..............................................................................................25
Configuring SQL Filters for Dashboards.....................................................................................................26
Assigning Data Source Permissions for the Pentaho User Console.......................................................... 27
Managing Users and Roles in the Pentaho Enterprise Repository..........................................28
Adding Users.............................................................................................................................................. 28
Editing User Information............................................................................................................................. 29
Deleting Users............................................................................................................................................ 29
Best Practices for Deleting Users and Roles in the Pentaho Enterprise Repository....................... 29
Adding Roles.............................................................................................................................................. 30
Editing Roles...............................................................................................................................................30
Deleting Roles............................................................................................................................................ 30
Assigning Users to Roles............................................................................................................................31
Making Changes to the Admin Role........................................................................................................... 31
Assigning Permissions in the Pentaho Enterprise Repository.................................................32
Permissions Settings.................................................................................................................................. 33
Enabling System Role Permissions in the Pentaho Enterprise Repository................................................ 33
Securing the Pentaho Enterprise Console and BA Server...................................................... 35
Configuring SSL (HTTPS) in the Pentaho Enterprise Console and BA Server.......................................... 35
Enabling SSL in the BA Server With a Certificate Authority............................................................ 35
Enabling SSL in the BA Server With a Self-Signed Certificate........................................................ 35
Changing the BA Server Base URL.................................................................................................36
Enabling SSL in the Pentaho Enterprise Console........................................................................... 36
Changing Default Enterprise Console Security Settings............................................................................ 37
| TOC | 4
Changing the Admin Credentials for the Pentaho Enterprise Console............................................ 39
Creating a Custom Login Module.................................................................................................... 40
Using the Apache Web Server (httpd) For Socket Handling...................................................................... 40
Using Apache httpd With SSL For Delivering Static Content...........................................................40
Removing Security...................................................................................................................43
Switching the Metadata Domain Repository...............................................................................................44
Switching to a File-Based Solution Repository........................................................................................... 45
Metadata Security....................................................................................................................46
Configuring the Security Service................................................................................................................ 46
Adding Column-Level Security Constraints................................................................................................ 46
Adding Global Row-Level Security Constraints.......................................................................................... 47
MQL Formula Syntax For Global Constraints.................................................................................. 47
Adding User or Role Row-Level Security Constraints................................................................................ 49
MQL Formula Syntax For User and Role Row-Level Constraints................................................... 49
Restricting Metadata Models to Specific Client Tools.................................................................................50
Analysis Schema Security....................................................................................................... 51
Restricting Access to Specific Members.....................................................................................................51
Mondrian Role Mapping in the BA Server.................................................................................................. 52
The Mondrian One-To-One UserRoleMapper................................................................................. 52
The Mondrian SampleLookupMap UserRoleMapper.......................................................................52
The Mondrian SampleUserSession UserRoleMapper..................................................................... 52
Restricting ROLAP Schemas Per User...................................................................................................... 53
Using Security Information In Action Sequences.....................................................................54
Troubleshooting....................................................................................................................... 55
Miscellaneous Troubleshooting Tips.......................................................................................................... 55
Increasing Security Log Levels in the BI Platform...................................................................................... 55
Enabling Extra LDAP Security Logging........................................................................................... 56
Log Output Analysis....................................................................................................................................57
LDAP Roles Are Not "Admin" and "Authenticated".....................................................................................58
With LDAP Authentication, the PDI Repository Explorer is Empty............................................................. 58
LDAP incorrectly authenticates user IDs that don't match letter case........................................................ 59
| Introduction: Configuring Security | 5
Security Overview
The first half of this guide covers low-level BA Server and Pentaho Enterprise Console configuration.
• Switch to a different authentication backend: Many Pentaho admins prefer to use their own authentication
method such as LDAP, Active Directory, single sign-on, or custom security tables in an existing RDBMS. There is
also information about how to remove all authentication support in rare situations where logins are disfavored.
• Access to the Pentaho Enterprise Console: Because Enterprise Console has many options for low-level BA
Server configuration, you may want to restrict access to it. You might also want to enable https support to ensure
secure communication.
The second half of this guide covers the many ways to restrict access to Pentaho content. These restrictions only apply
to the Pentaho User Console and its client tools: Analyzer, Dashboard Designer, and Interactive Reporting, as well as
any extension, plugin, or service that uses the BA Server or BI Platform for user authentication (such as CDF, or an
action sequence).
Note: There is no way to restrict access to any content that is not published to the BA Server. So if you create a
report in Report Designer but do not publish it to the BA Server, there are no access restrictions available for it.
Also, anyone with local user access to the BA Server solution repository (the pentaho-solutions directory) or the
database that stores solutions and schedules (hibernate and quartz) will be able to see all published BA Server
content. The restrictions described below only apply to users accessing the Pentaho User Console through a
Web browser (over a private intranet or the public Internet).
• Access to "raw" data sources: Using the Pentaho Enterprise Console, you can restrict access to Pentaho data
sources that have been established through Enterprise Console. However, any user can use a flat file (CSV, XML,
XLS) to establish a data source, and any user that knows JDBC or JNDI connection information to a database can
establish a data source on his own at the application server (global) or client tool (local) level. This is a matter of
internal security at your organization and is beyond the scope of Pentaho software.
• Access to metadata models: Pentaho metadata models have fine-grained options for restricting user access.
Metadata models are most commonly used as data sources in Interactive Reporting and Dashboard Designer,
though Report Designer and PDI can access them as well. You can add access restrictions with Pentaho Metadata
Editor; afterward, you must publish the model to the BA Server in order for your changes to take effect.
• Access to ROLAP (Mondrian) schemas: ROLAP schemas created with Schema Workbench and published to the
BA Server can restrict access to part or all of a schema based on user roles. These are Mondrian roles, however,
and are by default not connected in any way to the BA Server. In order to use BA Server roles in a Mondrian
schema, you must configure one of three methods of role mapping. ROLAP schemas are used as data sources in
Analyzer and Dashboard Designer, but can also be accessed by Report Designer and PDI.
| Supported Technologies | 7
Supported Technologies
The Pentaho BI Platform uses the Spring Security infrastructure, which can work with several common security
backends:
• Flat file
• Active Directory, LDAP, or other directory server
• RDBMS (security tables in an existing database)
Pentaho's default security backend is an RDBMS, and its Hibernate-based security data access object is referred to
as Pentaho. The security tables and access control lists are installed by default with the BI Platform, and can be easily
configured through the Pentaho Enterprise Console's graphical user interface. This is a tested, reasonably secure
method of managing resource authorization and user authentication, so there should be no reason to change to another
security backend unless you've already deployed one.
Note: Switching to a non-default security backend means that you will have to hand-edit some BI Platform
configuration files in order to change the security data access object. It also means that you will be unable to use
the Pentaho Enterprise Console to manage users and roles.
| Security Implementation Checklist | 8
Pentaho (Default)
The Pentaho security data access object is a custom Hibernate-based user/password DAO that reads and writes
usernames, passwords, and roles to a relational database via Hibernate object-relational mapping.
You do not have to do anything to initialize the Pentaho data access object; it is enabled by default. However, you will
almost certainly need to establish roles and users to match your organizational structure. Instructions for creating and
modifying roles and users are in the Authorization subsection below.
Note: While Pentaho's default security system is good for evaluation and small production deployments (less
than 100 users), Pentaho recommends a dedicated authentication provider such as LDAP or MSAD for large
production environments.
Switching to LDAP
You must have a working directory server with an established configuration before continuing.
Follow the below instructions to switch the BA Server's authentication backend from the Pentaho data access object to
LDAP.
Note: Replace the pentahoAdmins and pentahoUsers references in the examples below with the appropriate
roles from your LDAP configuration.
3. Save and close the file, then edit the /pentaho-solutions/system/data-access/settings.xml file and
modify the user and role settings to match your LDAP configuration:
4. Save and close the file, then edit the following files in the /pentaho/server/biserver-ee/pentaho-solutions/system/
directory and change all instances of the Admin and Authenticated role values to match the appropriate roles in your
LDAP configuration: pentaho.xml applicationContext-spring-security.xml
| BA Server User Authentication | 10
• pentaho.xml
• repository.spring.xml (DI Server Only)
• applicationContext-spring-security.xml
5. Using the command line or your preferred database administration tool, drop the hibernate.pro_files and
hibernate.pro_acls_list tables from the hibernate database in your Pentaho solution repository database.
6. Delete the /tomcat/work/ and /tomcat/temp/ directories.
7. Start the BA Server and Pentaho Enterprise Console.
8. Log into the Pentaho Enterprise Console.
9. Configure the Pentaho LDAP connection as explained in LDAP Properties.
10.Go to Configuration > Web Settings.
11.Under Authentication select LDAP Based from the drop-down list and click Submit.
The BA Server should restart automatically.
The BA Server is now configured to authenticate users against your directory server.
Binding
MSAD allows you to uniquely specify users in two ways, in addition to the standard DN. If the standard DN is not
working, try one of the two below. Each of the following examples is shown in the context of the userDn property of the
Spring Security DefaultSpringSecurityContextSource bean.
Note: The examples in this section use DefaultSpringSecurityContextSource. Be aware that you may need
to use the same notation (Kerberos or Windows domain) in all of your DN patterns.
contextSource.providerUrl=ldap\://mycompany\:389
[email protected]
contextSource.password=omitted
contextSource.providerUrl=ldap\://mycompany\:389
contextSource.userDn=MYCOMPANY\pentahoadmin
contextSource.password=omitted
Referrals
If more than one Active Directory instance is serving directory information, it may be necessary to enable referral
following. This is accomplished by modifying the DefaultSpringSecurityContextSource bean.
<bean id="contextSource"
class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<constructor-arg value="${contextSource.providerUrl}"/>
<property name="userDn" value="${contextSource.userDn}"/>
<property name="password" value="${contextSource.password}"/>
<property name="referral" value="follow" />
</bean>
| BA Server User Authentication | 11
User DN Patterns vs. User Searches
In the LdapAuthenticator implementations provided by Spring Security (BindAuthenticator for instance), you must
either specify a userDnPatterns, or a userSearch, or both. If you're using the Kerberos or Windows domain notation,
you should use userDnPatterns exclusively in your LdapAuthenticator.
Note: The reason for suggesting userDnPatterns when using Kerberos or Windows domain notation is that
the LdapUserSearch implementations do not give the control over the DN that userDnPatterns does. (The
LdapUserSearch implementations try to derive the DN in the standard format, which might not work in Active
Directory.)
Note, however, that LdapUserDetailsService requires an LdapUserSearch for its constructor.
User DN Pattern example:
<bean id="authenticator"
class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator">
<constructor-arg>
<ref local="contextSource"/>
</constructor-arg>
<propertyname="userDnPatterns">
<list>
<value>{0}@mycompany.com
</value> <!-- and/or -->
<value>domain\{0}</value>
</list>
</property>
</bean>
In user searches, the sAMAccountName attribute should be used as the username. The searchSubtree property
(which influences the SearchControls) should most likely be true. Otherwise, it searches the specified base plus one
level down.
User Search example:
<bean id="userSearch"
class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
<constructor-arg index="0" value="DC=mycompany,DC=com" />
<constructor-arg index="1">
<value>(sAMAccountName={0})</value>
</constructor-arg> <constructor-arg index="2">
<ref local="contextSource" />
</constructor-arg>
<property name="searchSubtree" value="true"/>
</bean>
Nested Groups
You can remove nested or transitive groups out of Active Directory. In the LDAP popular group filter, enter the following
LDAP filter for MSAD nested groups:
(member:1.2.840.113556.1.4.1941:={0})
The Pentaho Enterprise Console has an LDAP section in the Utilities category. The fields in this screen should be
relatively intuitive, but are explained below in more detail in case there are options that you are not familiar with.
You can view property values and operate on them; specific operations are exposed that allow you execute a "dry run"
of a proposed security configuration. For each of the four property groups, there are two operations provided: test and
save. Test allows you to test the property values in a property group without saving them. Save writes the property
values in a property group to permanent storage.
| BA Server User Authentication | 12
Test and Save Operations
Testing does not rely on the BA Server; however, even though test operations do not test "live" objects, the test
environment mimics the runtime environment as closely as possible. While save operations write property values to
permanent storage, those property values are not visible to a running BA Server, so you must restart it after each save.
A successful test operation should produce a small dialogue with the query results in it:
<property name="userDetailsContextMapper">
<ref local="ldapContextMapper" />
</property>
4. After the </bean> tag for daoAuthenticationProvider, add the following bean definition, changing the
ldapUsernameAttribute from samAccountName to the value that matches your environment:
<bean id="ldapContextMapper"
class="org.pentaho.platform.engine.security.UseridAttributeLdapContextMapper">
<property name="ldapUsernameAttribute" value="samAccountName" />
</bean>
Switching to JDBC
You must have existing security tables in a relational database in order to proceed with this task.
Follow the below process to switch from the Pentaho data access object to the JDBC DAO that will allow you to use
your own security tables.
Note: If you choose to switch to a JDBC security data access object, you will no longer be able to use the role
and user administration settings in the Pentaho Enterprise Console.
4. Remove or comment out the userDetailsService bean, then save and close the file.
| BA Server User Authentication | 14
5. Edit the /pentaho-solutions/system/applicationContext-pentaho-security-jdbc.xml file and add
the following two bean definitions, changing the connection and JDBC driver details to match your security database:
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url" value="jdbc:hsqldb:hsql://localhost:9002/userdb" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
<bean id="userDetailsService"
class="org.springframework.security.userdetails.jdbc.JdbcDaoImpl">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="authoritiesByUsernameQuery">
<value> <![CDATA[SELECT username, authority FROM
granted_authorities WHERE username = ?]]></value>
</property>
<property name="usersByUsernameQuery">
<value> <![CDATA[SELECT username,
password, enabled FROM users WHERE username = ?]]>
</value>
</property>
</bean>
6. Edit the /pentaho-solutions/system/data-access/settings.xml file and modify the user and role
settings to match your LDAP configuration:
1. After the Pentaho WAR or EAR has been built and deployed, navigate to the /biserver-manual-ee/ build-
resources/pentaho-sso/ directory.
2. If your BI Platform or Pentaho Enterprise Console servers are currently running, stop them with the stop-pentaho
and stop-pec scripts, respectively.
3. Edit the sso-replacements.properties file and change the default options to match your CAS configuration.
Refer to the CAS properties reference below if you have any trouble figuring out what each propery does.
4. Use Ant to run the sso-replacements script with the sso-pentaho switch, as in the following example:
5. Start the BI Platform and Pentaho Enterprise Console servers with the start-pentaho and start-pec scripts,
respectively.
The BI Platform is now configured to authenticate users against your central authentication server.
CAS Properties
These properties mostly refer to CAS services:
Pentaho Properties
These are service URLs that serve as callbacks from the CAS server into the BI Platform:
| BA Server User Authentication | 16
tomcatAuthentication="false"
| BA Server User Authentication | 18
7. Save and close the file, then edit /pentaho-solutions/system/applicationContext-spring-
security.xml. Find the filterChainProxy filters line, and in it, add preAuthenticatedProcessingFilter after
logoutFilter, separated by a comma.
8. Add the following two bean definitions:
Note: This is still in the applicationContext-spring-security.xml file, as are the next few steps.
<bean id="preAuthenticatedProcessingFilter"
class="org.pentaho.platform.web.http.security.
WindowsPreAuthenticatedProcessingFilter">
<property name="authenticationManager">
<ref local="authenticationManager" />
</property>
</bean>
<bean id="preAuthAuthenticationProvider"
class=org.springframework.security.providers.preauth.
PreAuthenticatedAuthenticationProvider">
<property name="preAuthenticatedUserDetailsService">
<bean id="userDetailsServiceWrapper"
class="org.springframework.security.userdetails.UserDetailsByNameServiceWrapper">
<property name="userDetailsService" ref="userDetailsService"/>
</bean>
</property>
</bean>
9. Find the authenticationManager providers list and add this line to the beginning of it:
<bean id="preAuthenticatedProcessingFilterEntryPoint"
class="org.springframework.security.ui.preauth.PreAuthenticatedProcessingFilterEntryPoint
>
11.Find the exceptionTranslationFilter bean and replace its authenticationEntryPoint ref with:
12.Ensure that you have configured Active Directory integration properly. Refer to your Active Directory documentation
and Microsoft Active Directory Configuration on page 10 for more information.
13.Save and close the server.xml file.
14.Configure Internet Explorer such that your IIS server is in the local intranet security zone.
15.Start the BA Server.
16.Access the BA Server through Internet Explorer and ensure that it automatically logs in with the local user account.
Your system should now be configured to sign into the BA Server using local user account credentials.
Permissions Settings
Permission Effect
All Permissions Assigns all permissions (explained below) to the specified
user or role
Create Allows a user or role to create reports, analysis views, and
dashboards
Update Allows a user or role to modify an existing report, analysis
view, or dashboard
Execute Allows a user or role to execute or run any content in the
solution repository (reports, analysis views, dashboards,
but may also include links or other executable content)
Delete Allows a user or role to delete content from the solution
repository
Grant Permission Allows a user or role to share content with other Pentaho
User Console users; essentially, this enables the Share
tab in the Properties dialogue as shown in the screen shot
below
Schedule If a user or role has been given access to scheduling
functions through the Pentaho Enterprise Console, then
this setting in the Pentaho User Console will enable that
user or role to arrange for reports or analysis views to be
executed at given intervals
Inheritance
When assigned to a directory, all of the properties listed above will apply to files contained in that directory, including
any subdirectories.
| BA Server Content Authorization | 20
Adding Users
You must be logged into the Pentaho Enterprise Console as an administrator user.
To add users in the Pentaho Enterprise Console, follow the directions below.
1. In the Pentaho Enterprise Console, go to the Administration section, then click the Users & Roles tab.
2. Click the Users icon to switch to Users mode.
3. Click the plus sign (+) next to Users.
The Add Users dialog box appears.
4. In the Add Users dialog box, enter the new user's User Name, Password, Password Confirmation (the same
password typed in a second time), and Description.
5. Click OK.
The specified user account is active, and will appear in the user list.
Deleting Users
You must be logged into the Pentaho Enterprise Console as an administrator user.
To delete in the Pentaho Enterprise Console, follow the directions below.
1. In the Pentaho Enterprise Console, go to the Administration section, then click on the Users & Roles tab.
2. Select the user or users you want to delete from the Users list.
Note: The user list Filter allows you to find specific users in the list. To find a user, type in the first few letters
of the user's name in the text box, and a list of names matching your entry appears.
3. Click (Remove) next to Users.
The Delete Users confirmation dialog box appears.
4. Click OK to delete the user(s) and refresh the user list
The specified user accounts are now deleted.
| BA Server Content Authorization | 21
Adding Roles
You must be logged into the Pentaho Enterprise Console as an administrator user.
To add roles in the Pentaho Enterprise Console, follow the directions below.
1. In the Pentaho Enterprise Console, go to the Administration section, then click the Users & Roles tab.
2. Click the Roles icon to switch to Roles mode.
3. Click the plus sign (+) next to Roles.
The Add Role dialog box appears.
4. In the Add Role dialog box, enter the Role Name and Description.
5. Click OK
The new role name appears in the list of roles.
The specified role has been created and is ready to be associated with user accounts.
Editing Roles
You must be logged into the Pentaho Enterprise Console as an administrator user.
To edit roles in the Pentaho Enterprise Console, follow the directions below.
1. In the Pentaho Enterprise Console, go to the Administration section, then click the Users & Roles tab.
2. Select the role you want to edit.
Note: The user list Filter allows you to find specific users in the list. To find a user, type in the first few letters
of the user's name in the text box, and a list of names matching your entry appears.
3. In the right pane of the Roles page, edit the role Description as needed.
4. Click Update.
The changes have been applied to the specified role, and will be applied to each user in the group upon their next login.
Deleting Roles
You must be logged into the Pentaho Enterprise Console as an administrator user.
To delete roles in the Pentaho Enterprise Console, follow the directions below.
1. In the Pentaho Enterprise Console, go to the Administration section, then click the Users & Roles tab.
2. Click the Roles icon if you are not in Roles mode.
3. Select the role or roles you want to delete from the Users list.
Note: The user list Filter allows you to find specific users in the list. To find a user, type in the first few letters
of the user's name in the text box, and a list of names matching your entry appears.
4. Click (Remove) next to Roles.
The Delete Roles confirmation dialog box appears.
5. Click OK to delete the role(s) and refresh the roles list.
The specified role has been deleted, and any user accounts that had been associated with it will no longer list this role.
<admin-role>NewAdmin</admin-role>
3. Find the <acl-publisher> element, and appropriately replace all instances of Admin in the properties inside of the
<default-acls> and <overrides> elements.
<property name="objectDefinitionSource">
<value>
<![CDATA[
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
...
\A/admin.*\Z=NewAdmin
...
]]>
</value>
</property>
sh /usr/local/pentaho/server/biserver-ee/stop-pentaho.sh
6. Save the file, close your text editor, and start the BA Server.
sh /usr/local/pentaho/server/biserver-ee/start-pentaho.sh
The BI Platform can now efficiently handle nested roles with LDAP or Active Directory authentication.
This password utility takes a plain text password as input and returns obfuscated and encrypted versions of the
password using various algorithms.
3. Replace {username} with the user name you want to create or change.
4. Replace {password} with the password you want to generate for the user name that was just created or changed
In the example below the user name is admin and the password that is being generated is password. Notice that
the utility provides you with three different types of encrypted password options: OBF, MD5 and CRYPT. Use one of
the options in the next step.
| BA Server Content Authorization | 24
Below is a description of the line in the login.properties file ({username}: {Encryption Type}:{password},{role1}):
• {username}: the user name used in the password utility in Step 2
• {Encryption Type}: the encryption type you are using for your password (OBF, MD5 or CRYPT}
• {password}: the encrypted password that was generated using the utlity
• {role}: the role you want the user to have; there is single role, admin, and all users must be granted the admin
role.
1. Ensure that the BI Platform is not currently running; if it is, run the stop-pentaho script.
2. Open a terminal or command prompt window and navigate to the .../pentaho-solutions/system/ directory.
3. Edit the applicationContext-spring-security.xml file with a text editor.
4. Find and examine the following property: <property name="objectDefinitionSource">
5. Modify the regex patterns to include your roles.
The objectDefinitionSource property associates URL patterns with roles. RoleVoter specifies that if any role on
the right hand side of the equals sign is granted to the user, the user may view any page that matches that URL
pattern. The default roles in this file are not required; you can replace, delete, or change them in any way that suits
you.
You should now have coarse-grained permissions established for user roles.
Note: Domain object authorization is only available for database-based solution repositories; file-based solution
repositories (an uncommon situation) cannot have this level of fine-grained authorization control.
Note: ACLs are stored in the PRO_ACL_FILES table in the solution database, and have no presence in the
filesystem. There is, however, a third type of domain object that does not store ACLs in that table -- a metadata
model. Metadata models store access controls inline in the metadata model's XMI file. You can define other file
extensions to control with access lists by editing the <acl-files> entry in the /pentaho-solutions/system/
pentaho.xml configuration file. See also, Assigning Permissions in the Pentaho User Console.
The default ACL will likely not meet your needs, so you may choose to reapply a different default ACL to solution
repository objects. To do this, follow the steps below but understand that these steps will remove any ACL management
that has been applied in the Pentaho User Console (image on the right).
Follow the process below to reapply the default ACL in the Pentaho Enterprise Console.
1. Log into the Pentaho Enterprise Console.
2. Go to the Administration tab.
3. Click Services.
4. In the Solution Repository tab, click Restore.
The access control list will be reapplied with default values you specified.
Note: Values are separated by commas, with no spaces between user names.
Adding Users
You must be logged into the Enterprise Repository as an administrative user.
To add users in the Enterprise Repository, follow the directions below.
1. In Spoon, go to Tools -> Repository -> Explore.
The Repository Explorer opens.
2. Click the Security tab.
Note: The Users radio button is selected by default.
5. If you have available roles that can be assigned to the new user, under Member, select a role and click (Add).
| Managing Users and Roles in the Pentaho Enterprise Repository | 29
The role you assigned to the user appears in the right pane under Assigned.
6. Click OK to save your new user account and exit the Add Users dialog box.
The name of the user you added appears in the list of Available users.
3. Select the user whose details you want to edit from the list of available users.
4.
Click (Edit)
The Edit User dialog box appears.
5. Make the appropriate changes to the user information.
6. Click OK to save changes and exit the Edit User dialog box.
Deleting Users
You must be logged into the Enterprise Repository as an administrative user. Refer to Best Practices for Deleting Users
and Roles in the Pentaho Enterprise Repository before you delete a user or role.
Follow the instructions below to delete a user account:
1. In Spoon, go to Tools -> Repository -> Explore.
The Repository Explorer opens.
2. Click the Security tab.
3. Select the user you want to delete from the list of available users.
4. Next to Users, click (Remove).
A confirmation message appears.
5. Click Yes to delete the user.
The specified user account is deleted.
Best Practices for Deleting Users and Roles in the Pentaho Enterprise Repository
If a user or role is deleted in the Pentaho Enterprise Repository, (currently used by Pentaho Data Integration), content
that refers to the deleted user (either by way of owning the content or having an ACL that mentions the user or role) is
left unchanged; therefore, it is possible that you may create a new user or role, at a later date, using an identical name.
In this scenario, content ownership and access control entries referring to the deleted user or role now apply to the new
user or role.
To avoid this problem, Pentaho recommends that you disable a user or role instead of deleting it. This prevents a user
or role with an identical name from ever being created again. The departmental solution (also referred to as Hibernate
or the Pentaho Security back-end), does not have disable functionality. For this back-end, Pentaho recommends that
you use the following alternatives rather than deleting the user or role:
IF THEN
You are dealing with a role Unassign all current members associated with the role
You are dealing with a user Reset the password to a password that is so cryptic that it
is impossible to guess and is unknown to any users
| Managing Users and Roles in the Pentaho Enterprise Repository | 30
Adding Roles
You must be logged into the Enterprise Repository as an administrative user.
To add roles in the Enterprise Repository, follow the directions below:
1. In Spoon, go to Tools -> Repository -> Explore.
The Repository Explorer opens.
2. Click the Security tab.
3. Click the Roles radio button.
The list of available roles appear.
4. Click (Add)
The Add Role dialog box appears.
5. Enter the Role Name in the appropriate field.
Note: An entry in the Description field is optional.
6. If you have users to assign to the new role, select them (using the <SHIFT> or <CTRL> keys) from the list of
available users and click (Add).
The user(s) assigned to your new role appear in the right pane.
7. Click OK to save your entries and exit the Add Role dialog box.
The specified role is created and is ready to be assigned to user accounts.
Editing Roles
You must be logged into the Enterprise Repository as an administrative user.
To edit roles in the Enterprise Repository, follow the directions below.
1. In Spoon, go to Tools -> Repository -> Explore.
The Repository Explorer opens.
2. Click the Security tab.
3. Click the Roles radio button.
The list of available roles appear.
4.
Select the role you want to edit and click (Edit)
The Edit Role dialog box appears.
5. Make the appropriate changes.
6. Click OK to save your changes and exit the Edit Role dialog box.
Deleting Roles
You must be logged into the Enterprise Repository as an administrative user. Refer to Best Practices for Deleting Users
and Roles in the Pentaho Enterprise Repository before you delete a user or role.
Follow the instructions below to delete a role:
1. In Spoon, go to Tools -> Repository -> Explore.
The Repository Explorer opens.
2. Click the Security tab.
3. Select the role you want to delete from the list of available roles.
4. Click (Remove).
A confirmation message appears.
5. Click Yes to delete the role.
The specified role is deleted.
| Managing Users and Roles in the Pentaho Enterprise Repository | 31
<util:map id="immutableRoleBindingMap">
<entry key="yourAdminRole">
<util:list>
<value>org.pentaho.di.reader</value>
<value>org.pentaho.di.creator</value>
<value>org.pentaho.di.securityAdministrator</value>
</util:list>
</entry>
</util:map>
6. Click Apply.
The permissions you enabled for the role will take effect the next time the specified user(s) log into the Pentaho
Enterprise Console.
Permissions Settings
Permission Effect
Read Content Allows a user or role to examine contents (for example,
transformations, jobs, and database connections) in the
repository
Administrate Assigns all permissions to the specified user or role
Create Content Allows a user or role to create content in the repository
Note: Important! The Anonymous system role is not being used at this time.
Follow the steps below to change permissions for the Authenticated system role.
1. In Spoon, go to Tools -> Repository -> Explore.
The Repository Explorer opens
2. Click the Security tab.
3. Click the System Roles radio button.
The list of available system roles appear.
Note: The Anonymous role is not functional.
cd ~
keytool -export -alias tomcat -file tomcat.cer -storepass pass -keypass pass2 -
keystore .keystore
cd $PENTAHO_JAVA_HOME/jre/lib/security/
The PENTAHO_JAVA_HOME variable was established during your production installation procedure. If you
are on Windows, environment variables are surrounded by percent signs, as in: cd %PENTAHO_JAVA_HOME%
\jre\lib\security\. If you get an error about this path not being valid, then use JAVA_HOME instead of
PENTAHO_JAVA_HOME.
4. Execute the following command, changing the alias (tomcat in the example), the file path to the certificate (the
current user's home directory in the example), and the storepass (pass in the example) accordingly:
keytool -import -alias tomcat -file ~/tomcat.cer -keystore cacerts -storepass pass
| Securing the Pentaho Enterprise Console and BA Server | 36
Note: If the path to your certificate involves spaces, you must either escape the spaces (on Linux, Unix, and
OS X), or put double quotes around the path (on Windows) in order for the command to work properly.
5. Execute the following command and make note of the MD5 sum for the tomcat entry:
6. Change back to the home directory of the user account that starts the BA Server and Pentaho Enterprise Console,
and run this command:
7. Compare the tomcat entry's MD5 sum to the one you generated previously and ensure that they match.
If these sums do not match, you've made a mistake someplace in the certificate trust process. Go through the steps
again and ensure that you're working with the right user accounts and directories.
The BA Server is now configured to allow access via SSL.
If you'd like to also enable SSL in the Pentaho Enterprise Console, continue on to Enabling SSL in the Pentaho
Enterprise Console on page 36.
/etc/init.d/pentaho stop
vim ./web.xml
4. Locate the element and replace its value to match your new SSL-enabled port number.
<context-param>
<param-name>base-url</param-name>
<param-value>http://localhost:18443/pentaho/</param-value>
</context-param>
/etc/init.d/pentaho start
> cd enterprise-console
> java -cp lib/jetty.jar org.mortbay.jetty.security.Password
Usage - java org.mortbay.util.Password [<user>] <password>
> java -cp lib/jetty.jar org.mortbay.jetty.security.Password me you
you
OBF:20771x1b206z
| Securing the Pentaho Enterprise Console and BA Server | 38
MD5:639bae9ac6b3e1a84cebb7b403297b79
CRYPT:me/ks90E221EY
JDBCLoginModule
The JDBCLoginModule stores user passwords and roles in a database that are accessed through JDBC calls. You can
configure the JDBC connection information, as well as the names of the table and columns storing the user name and
credentials, and the name of the table and columns storing the roles.
Below is an example login module configuration file entry for an HSQLDB driver:
jdbc {
org.mortbay.jetty.plus.jaas.spi.JDBCLoginModule required
debug="true"
dbUrl="jdbc:hsqldb:."
dbUserName="sa"
dbDriver="org.hsqldb.jdbcDriver"
userTable="myusers"
userField="myuser"
credentialField="mypassword"
userRoleTable="myuserroles"
userRoleUserField="myuser"
userRoleRoleField="myrole";
};
There is no particular schema required for the database tables storing the authentication and role information. The
properties userTable, userField, credentialField, userRoleTable, userRoleUserField, userRoleRoleField configure the
names of the tables and the columns within them that are used to format the following queries:
Credential and role information is read from the database when a previously unauthenticated user requests
authentication. Note that this information is only cached for the length of the authenticated session. When the user logs
out or the session expires, the information is flushed from memory.
Note: Passwords can be stored in the database in plain text or encoded formats, using the
org.mortbay.jetty.security.Password class.
PropertyFileLoginModule
With this login module implementation, the authentication and role information is read from a property file:
props {
org.mortbay.jetty.plus.jaas.spi.PropertyFileLoginModule required
debug="true"
file="/somewhere/somefile.props";
};
The file parameter is the location of a properties file of the same format as the etc/realm.properties example file as
shown below:
Below is an example:
admin: OBF:1xmk1w261u9r1w1c1xmq,user,admin
superadmin: changeme,user,developer
master: MD5:164c88b302622e17050af52c89945d44,user
: CRYPT:adpexzg3FUZAk,admin
The contents of the file are read and cached in memory the first time a user requests authentication.
| Securing the Pentaho Enterprise Console and BA Server | 39
Editing Security Settings
Security settings configuration are stored in the security section of console.properties file:
$ cd enterprise-console
$ java -cp lib/jetty-6.1.2rc1.jar:lib/jetty-util-6.1.2rc1.jar
org.mortbay.jetty.security.Password username password
password
OBF:1v2j1uum1xtv1zej1zer1xtn1uvk1v1v
MD5:5f4dcc3b5aa765d61d8327deb882cf99
CRYPT:usjRS48E8ZADM
$ cd enterprise-console
$ java -cp lib/jetty-6.1.2rc1.jar;lib/jetty-util-6.1.2rc1.jar
org.mortbay.jetty.security.Password username password
| Securing the Pentaho Enterprise Console and BA Server | 40
2. Go to ...\enterprise-console\resource\config and open the login.properties file.
3. Edit the file using the following format:
<username>: OBF:<obfuscated_password>,<role1>,<role2>,<role3>,...
7. Save and close the file, then edit /conf/extra/httpd-ssl.conf and properly define the locations for your SSL
certificate and key:
SSLCertificateFile "conf/ssl/mycert.cert"
SSLCertificateKeyFile "conf/ssl/mycert.key"
10.Save and close the file, then create a workers.properties file in your Apache conf directory. If it already exists,
merge it with the example configuration in the next step.
11.Copy the following text into the new workers.properties file, changing the location of Tomcat and Java, and the port
numbers and IP addresses to match your configuration:
Note: Remove the workers.tomcat_home setting if you are using JBoss.
workers.tomcat_home=/home/pentaho/pentaho/server/biserver-ee/tomcat/
workers.java_home=/home/pentaho/pentaho/java/
worker.list=tomcat_pentaho
worker.tomcat_pentaho.type=ajp13
Apache httpd is now configured to securely and efficiently handle static content for Tomcat. You should now start
Tomcat and httpd, then navigate to your domain name or hostname and verify that you can access the Pentaho Web
application.
| Removing Security | 43
Removing Security
You cannot remove the security mechanisms built into the BI Platform, but you can bypass them by giving
all permissions to anonymous users. The BA Server automatically assigns all unauthenticated users to the
anonymousUser account and the Anonymous role. The procedure below will grant full BA Server access to the
Anonymous role, thereby never requiring a login.
Danger: This process is irreversible! While you can simply back out any configuration file changes you
may make, you cannot restore custom ACLs once they've been wiped out; the best you can do is restore the
default ACLs and make all of your custom authorization changes by hand again. Before performing the below
procedure, you should have a very good reason for bypassing security.
1. Stop the BA Server.
<bean id="anonymousProcessingFilter"
class="org.springframework.security.providers.anonymous.AnonymousProcessingFilter">
<!-- omitted -->
<property name="userAttribute" value="anonymousUser,Anonymous" />
</bean>
3. Now find the filterSecurityInterceptor bean in the same file, and the objectDefinitionSource property inside of it,
and match its contents to the example below:
This step allows Pentaho client tools to publish to the BI Platform without having to supply a username and
password.
<bean id="filterInvocationInterceptor"
class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
<property name="authenticationManager">
<ref local="authenticationManager" />
</property>
<property name="accessDecisionManager">
<ref local="httpRequestAccessDecisionManager" />
</property>
<property name="objectDefinitionSource">
<value>
<![CDATA[ CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON\A/.*
\Z=Anonymous,Authenticated ]]> </value>
</property>
</bean>
<beans>
<!-- omitted -->
<bean id="IAclVoter" class="org.pentaho.platform.engine.security.acls
.voter.PentahoAllowAnonymousAclVoter" scope="singleton" />
<!-- omitted -->
</beans>
<pentaho-system>
<!-- omitted -->
<anonymous-authentication>
<anonymous-user>anonymousUser</anonymous-user>
| Removing Security | 44
<anonymous-role>Anonymous</anonymous-role>
</anonymous-authentication> <!-- omitted -->
</pentaho-system>
8. Using the same anonymous user and role from before, adjust the ACLs accordingly and remove all ACL overrides.
<pentaho-system>
<!-- omitted -->
<acl-publisher>
<default-acls>
<acl-entry role="Anonymous" acl="ADMIN_ALL" />
<acl-entry role="Authenticated" acl="ADMIN_ALL" /> </default-acls>
<!-- remove any active overrides entries -->
</acl-publisher>
<!-- omitted -->
</pentaho-system>
9. Adjust the <acl-voter> properties such that the new anonymous user has administrator privileges.
3. Comment out the IMetadataDomainRepository line, and uncomment the similar line below it.
Alternatively, you can switch the value of IMetadataDomainRepository from
org.pentaho.platform.plugin.services.metadata.SecurityAwareMetadataDomainRepository to
org.pentaho.platform.plugin.services.metadata.MetadataDomainRepository.
Metadata Security
Most of the security configuration explained thus far has involved using features that are built into the Pentaho User
Console or Pentaho Enterprise Console, or involve configuration changes of some kind. However, if you need to restrict
access to certain portions of a metadata model that you are using as a data source, the only way to do it is to edit the
model with Metadata Editor and add restrictions. The Pentaho metadata model offers table-, column-, and row-level
authorization control, so if you need to prevent certain users or roles from accessing it, you can change (and republish)
the model accordingly.
sh /pentaho/design-tools/metadata-editor/metaeditor.sh
http://localhost:8080/pentaho/ServiceAction
4. Next, select the level of detailed security information you want: All, Users or Roles.
If you have hundreds of users in your system, you probably only want to return the roles, and use roles for security
information properties. The access control lists are returned with all three options.
5. In the Username and Password fields, type in the login credentials for an administrator-level account.
6. Click Test.
A popup window with the returned XML should appear. If it does not, check that the information you typed into the fields
mentioned above is correct.
OR
AND
LIKE
LIKE([BT_CUSTOMERS.BC_CUSTOMERS_CUSTOMERNAME]; "%SMITH%")
IN
NOW
NOW()
DATE
DATE(2008;4;15)
DATEVALUE
DATEVALUE("2008-04-15")
CASE
COALESCE
COALESCE( [BT_CUSTOMERS.BC_CUSTOMERS_CUSTOMERNAME];
[BT_CUSTOMERS.BC_CUSTOMERS_CUSTOMERID]; "Customer is
Null" )
| Metadata Security | 49
DATEMATH
DATEMATH("0:ME -1:DS")
This expression represents 00:00:00.000 on the day before the last day of the current month.
[table.column] = "row"
The table and column are defined as part of a metadata business model. Here is an example that isolates access to
data from the Sales department:
[BT_OFFICE.BC_DEPARTMENT]="Sales"
It's also possible to give or deny access to an entire role, or a single user, by selecting that user or role, then using a
boolean for a constraint:
TRUE()
Or:
FALSE()
| Metadata Security | 50
1. Start Metadata Editor and open the metadata model you want to restrict.
2. Right-click on the business model, then select Edit from the context menu.
The Business Model Properties window will appear.
3. Click the round green + icon to add a new custom property.
The Add New Property window will appear.
4. Click Add a custom property, then type visible in the ID field and select String from the Type drop-down box, then
click OK.
You'll return to the Business Model Properties window.
5. Scroll down to the bottom of the window to see the Value field. Type in one or more of the following restriction
values, separated by commas, then click OK:
• adhoc: removes the model from the list in ad hoc reporting
• dashboard-filters: prevents this model from appearing in dashboard filters that use metadata queries
• dashboard-content: prevents this model from being used in dashboard panels
• interactive-reporting: removes the model from the list in Interactive Reporting
• manage: removes this model from the "manage data sources" feature of the Pentaho User Console
Note: If you leave the Value field blank, the published model will not appear in any Pentaho User Console
tools.
6. Re-publish this model to the BA Server.
7. If the BA Server is currently running, restart it.
The restrictions you defined should now be in place.
| Analysis Schema Security | 51
The access attribute can be "all", meaning all members are visible; "none", meaning the hierarchy's very existence
is hidden from the user; and "custom". With custom access, you can use the topLevel attribute to define the highest
visible level (preventing users from seeing too much of the 'big picture,' such as viewing revenues rolled up to the Store
or Country level); or use the bottomLevel attribute to define the lowest visible level (preventing users from looking at
an individual customer's details); or control which sets of members a user can see by defining nested <MemberGrant>
elements.
You can only define a <MemberGrant> element if its enclosing <HierarchyGrant> has access="custom". Member
grants give (or remove) access to a given member and all of its children. Here are the rules:
1. Members inherit access from their parents. If you deny access to California, you won't be able to see San
Francisco.
2. Grants are order-dependent. If you grant access to USA, then deny access to Oregon, then you won't be able to
see Oregon or Portland. But if you were to deny access to Oregon, then grant access to USA, you can effectively
see everything.
3. A member is visible if any of its children are visible. Suppose you deny access to USA, then grant access to
California. You will be able to see USA, and California, but none of the other states. The totals against USA will still
reflect all states, however.
4. Member grants don't override the hierarchy grant's top- and bottom-levels. If you set topLevel="[Store].[Store
State]", and grant access to California, you won't be able to see USA.
| Analysis Schema Security | 52
<bean id="Mondrian-UserRoleMapper"
name="Mondrian-One-To-One-UserRoleMapper"
class="org.pentaho.platform.plugin.action.mondrian.mapper
.MondrianOneToOneUserRoleListMapper"
scope="singleton" />
<bean id="Mondrian-UserRoleMapper"
name="Mondrian-SampleLookupMap-UserRoleMapper"
class="org.pentaho.platform.plugin.action.mondrian.mapper.
MondrianLookupMapUserRoleListMapper"
scope="singleton">
<property name="lookupMap">
<map>
<entry key="ceo" value="California manager" />
<entry key="cto" value="M_CTO" />
<entry key="dev" value="M_DEV" />
</map>
</property>
</bean>
<bean id="Mondrian-UserRoleMapper"
name="Mondrian-SampleUserSession-UserRoleMapper"
class="org.pentaho.platform.plugin.action.mondrian.mapper.
MondrianUserSessionUserRoleListMapper"
scope="singleton">
<property name="sessionProperty" value="MondrianUserRoles" />
</bean>
| Analysis Schema Security | 53
<Catalog name="Suzy">
<DataSourceInfo>Provider=mondrian;DataSource=SampleData</DataSourceInfo>
<Definition>solution:suzy/suzy.mondrian.xml</Definition>
</Catalog>
<Catalog name="Tiffany">
<DataSourceInfo>Provider=mondrian;DataSource=SampleData</DataSourceInfo>
<Definition>solution:tiffany/tiffany.mondrian.xml</Definition>
</Catalog>
<acl-files>xaction,url,prpt,xdash,xcdf,xanalyzer,xanalyzer,xml</acl-files>
<inputs>
<someInput type="string">
<sources>
<request>someInput</request>
</sources>
</someInput>
</inputs>
In the above example, the input (called someInput) can be found by looking at the request (HttpServletRequest,
PortletRequest, etc.) for a variable called someInput. Then, throughout the rest of the action sequence, specific actions
can reference that input. The Pentaho BI Platform extends the inputs to provide a unique type of input: The security
input. This input presently supports the following input names:
The following input section will get the list of the user's roles, and make it available to all the actions
in the action sequence:
<inputs>
<principalRoles type="string-list">
<sources>
<security>principalRoles</security>
</sources>
</principalRoles>
</inputs>
| Troubleshooting | 55
Troubleshooting
Adjusting authorization and authentication settings will often involve making multiple configuration changes without the
benefit of testing each of them individually. Your first attempt at implementing a different security DAO or performing
intensive user and role modifications will probably not work perfectly. Below are some tips for adjusting log file output,
and examining logs for signs of configuration errors.
sh /usr/local/pentaho/server/biserver-ee/stop-pentaho.sh
<root>
<priority value="DEBUG" />
<appender-ref ref="PENTAHOCONSOLE"/>
<appender-ref ref="PENTAHOFILE"/>
</root>
6. Save and close the file, then edit the Spring Security configuration file that corresponds with your security backend in
the /pentaho/server/biserver-ee/pentaho-solutions/system/ directory.
The file will be one of:
• applicationContext-spring-security-memory.xml
• applicationContext-spring-security-jdbc.xml
• applicationContext-spring-security-ldap.xml
| Troubleshooting | 56
7. Find the daoAuthenticationProvider bean definition, and add the following property anywhere inside of it (before
the </bean> tag):
sh /usr/local/pentaho/server/biserver-ee/start-pentaho.sh
BI Platform security logging is now globally set to DEBUG, which is sufficiently verbose for debugging security
configuration problems. All BI Platform messages will be collected in the /pentaho/server/biserver-ee/logs/
pentaho.log file.
Note: When you are finished configuring and testing the BI Platform, you should adjust the log levels down to a
less verbose level, such as ERROR, to prevent pentaho.log from growing too large.
sh /usr/local/pentaho/server/biserver-ee/stop-pentaho.sh
<constructor-arg>
<ref bean="ldapAuthenticatorProxy" />
</constructor-arg>
4. Save the file, then create a new file called applicationContext-logging.xml in the same directory.
5. Copy the following text into the new file:
sh /usr/local/pentaho/server/biserver-ee/start-pentaho.sh
You will now have verbose LDAP-specific log messages in pentaho.log that include login credentials for every user
that tries to log in.
When the username and/or password doesn't match what's stored in the backend, you should see a log message like
this:
When the username and password match, you should see a log message that looks like the example below. After the
InteractiveAuthenticationSuccessEvent, one of the filters will show the roles fetched for the authenticated user.
Compare these roles to the page-role mapping found in the filterInvocationInterceptor bean in applicationContext-
spring-security.xml.
org.springframework.security.providers.UsernamePasswordAuthenticationToken@2b86afeb:
Username:
org.springframework.security.userdetails.ldap.LdapUserDetailsImpl@d7f51e;
Password: [PROTECTED];
Authenticated: true; Details:
org.springframework.security.ui.WebAuthenticationDetails@fffd148a:
RemoteIpAddress: 127.0.0.1; SessionId: 976C95033136070E0200D6DA26CB0277;
Granted
Authorities: ROLE_CTO, ROLE_IS, ROLE_AUTHENTICATED'
| Troubleshooting | 58
If you are troubleshooting LDAP problems, look for log output similar to this:
org.springframework.security.providers.ldap.LdapUserInfo@1f31c64[dn=uid=suzy,ou=users,
ou=system,attributes={mail=mail:
[email protected], uid=uid: suzy, userpassword=userpassword:
[B@e17c9c,
businesscategory=businesscategory: cn=cto,ou=roles,ou=system,
cn=is,ou=roles,ou=system,
objectclass=objectClass: organizationalPerson, person, groupOfUniqueNames,
inetOrgPerson, top, uniquemember=uniquemember: cn=cto, ou=roles, cn = is ,
ou = roles,
sn=sn: Pentaho, cn=cn: suzy}]
to:
and:
to:
LDAP incorrectly authenticates user IDs that don't match letter case
Some LDAP implementations are case-insensitive, most notably Microsoft Active Directory. When using one of these
LDAP distributions as a BA Server authentication backend, you might run into an issue where a valid username with
invalid letter cases will improperly validate. For instance, if Bill is the valid user ID, and someone types in bILL at the
Pentaho User Console login screen, that name will authenticate, but it might have improper access to parts of the BA
Server.
The fix for this is documented: Forcing Case-Sensitivity in LDAP on page 12.