Skip to main content
Pentaho Documentation

Remove Security by Enabling Anonymous Access

You can bypass the built-in security on the Pentaho Server by giving all permissions to anonymous users. An "anonymousUser" is any user, either existing or newly created, that you specify as an all-permissions, no-login user, and to whom you grant the Anonymous role.

The procedure below will grant full Pentaho Server access to the Anonymous role and never require a login.

All of the files you will be using are located in the /pentaho/server/pentaho-server/pentaho-solutions/system directory. Before you begin, stop the Pentaho Server.

Modify Application Security

  1. Open the applicationContext-spring-security.xml file with any text editor.
  2. Make sure that a default anonymous role is defined. Match your bean definition and property value to the code shown in the following example:

    <bean id="anonymousProcessingFilter" class="">
      <constructor-arg value="foobar" />
      <constructor-arg value="anonymousUser" />
          <bean class="">
            <constructor-arg value="Anonymous" />

These next steps permit Pentaho client tools to publish to the Pentaho Server without having to supply a user name and password.

  1. Find these two beans in the same file from the previous step.
    • filterInvocationInterceptor
    • filterInvocationInterceptorForWS
  2. Locate the securityMetadataSource properties inside the beans and match the contents to the code shown in the following example:
    <bean id="filterInvocationInterceptor" class="">
      <property name="authenticationManager" ref="authenticationManager" />
      <property name="accessDecisionManager" ref="httpRequestAccessDecisionManager" />
      <property name="securityMetadataSource">
        <sec:filter-security-metadata-source request-matcher="ciRegex" use-expressions="false">
          <!-- all patterns have Anonymous role access -->
          <sec:intercept-url pattern="\A/.*\Z" access="Anonymous,Authenticated" />
  3. Save and close the applicationContext-spring-security.xml file.

Modify Pentaho Configuration

  1. Open the pentaho.xml file with the text editor.
  2. Find the anonymous-authentication lines of the pentaho-system section, and define the anonymous user and role as shown in the following code example:
    <!-- omitted -->
      </anonymous-authentication> <!-- omitted -->
  3. Save and close the pentaho.xml file.

Modify Repository Properties

  1. Open the file with the text editor.
  2. Find the singleTenantAdminAuthorityName and replace the value with Anonymous.
  3. Find the singleTenantAdminUserName and replace the value with the name <your anonymous user>.
  4. Save and close the file.

Map the Appropriate Role

  1. Find all references to the bean id="Mondrian-UserRoleMapper" and make sure that the only mapper uncommented (active) is the one shown in the following code example:
    <bean id="Mondrian-UserRoleMapper" name="Mondrian-SampleUserSession-UserRoleMapper" class="org.pentaho.platform.plugin.action.mondrian.mapper.MondrianUserSessionUserRoleListMapper" scope="singleton">
      <property name="sessionProperty" value="MondrianUserRoles" />
  2. If you have made any changes to pentahoObjects.spring.xml, save and close the file.

You have now effectively worked around the security features of the Pentaho Server. If you are using the relational metadata database model, refer to Remove Security from Metadata Domain Repository for the next few steps.