Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Unable to render {include} The included page could not be found.

The security features of the Pentaho BI Platform cannot be removed. However, they can be effectively removed using the following steps. Essentially, the idea is to create a single user and role and give system-wide access to that user. The anonymous processing filter provides a nice way of guaranteeing that even unauthenticated users have a username and role.

  1. Define the anonymous role. Note that this is already defined by default. If you must change it, change it here. Note also that the username assigned by the anonymous processing filter is not relevant to Pentaho security code that runs later in the request. Only the anonymous role is relevant. In this example, the anonymous username is anonymousUser and the anonymous role is Anonymous. Note where the role Anonymous occurs in subsequent examples. Note finally that role names are case-sensitive.
    applicationContext-acegi-security.xml
    <bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
      <!-- omitted -->
      <property name="userAttribute" value="anonymousUser,Anonymous" />
    </bean>
    
  2. Allow anonymous access to all web resources by editing the objectDefinitionSource on the FilterSecurityInterceptor to look like the example below.
    applicationContext-acegi-security.xml
    <bean id="filterInvocationInterceptor"
      class="org.acegisecurity.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
          ]]>
        </value>
      </property>
    </bean>
    
  3. Use PentahoAllowAnonymousAclVoter as your IAclVoter implementation. See 03. pentaho.xml for a description of how to configure this voter. When configuring this voter, you will define the anonymous user and role. That user and/or role should be used when assigning ACLs.
    pentaho.xml
    <pentaho-system>
    
      <!-- omitted -->
    
      <objects>
        <IAclVoter scope="global">com.pentaho.security.acls.voter.PentahoAllowAnonymousAclVoter</IAclVoter>
        <!-- omitted -->
      </objects>
    
      <!-- omitted -->
    
      <anonymous-authentication>
        <anonymous-user>anonymous</anonymous-user>
        <anonymous-role>Anonymous</anonymous-role>
      </anonymous-authentication>
    
      <!-- omitted -->
    
    </pentaho-system>
    
  4. Assign ACLs using the user and role defined in the previous step. Use these steps along with the settings below.
    pentaho.xml
    <pentaho-system>
    
      <!-- omitted -->
    
      <acl-publisher>
        <default-acls>
          <acl-entry role="Anonymous" acl="ADMIN_ALL" />
        </default-acls>
    
        <!-- remove any active overrides entries -->
      </acl-publisher>
    
      <!-- omitted -->
    </pentaho-system>
    
  5. Finally, tell Pentaho the role that should be treated as the Pentaho administrator. In this case, it's the anonymous role mentioned earlier.
    pentaho.xml
    <pentaho-system>
    
      <!-- omitted -->
    
      <acl-voter>
        <admin-role>Anonymous</admin-role>
      </acl-voter>
    
      <!-- omitted -->
    
    </pentaho-system>
    
  6. If you use global system actions, then you'll need to execute a few extra steps.
    1. Compile and deploy the attached GlobalSystemActionsFilter.java.
    2. Add the filter to applicationContext-acegi-security.xml.
      applicationContext-acegi-security.xml
      <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
        <property name="filterInvocationDefinitionSource">
          <value>
          <![CDATA[CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
          PATTERN_TYPE_APACHE_ANT
          /**=...,globalSystemActionsFilter,pentahoSecurityStartupFilter,...]]>
          </value>
        </property>
      </bean>
      
      <bean id="globalSystemActionsFilter" class="com.pentaho.security.GlobalSystemActionsFilter" />
      
    3. Define your global system actions in pentaho.xml.
      pentaho.xml
      <system-actions>
        <org.pentaho.core.session.StandaloneSession scope="global">samples/getting-started/HelloWorld.xaction</org.pentaho.core.session.StandaloneSession>
      </system-actions>
      
  • No labels