Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Ldap authentication & role Authenticated

  1. #1
    Join Date
    Jan 2006
    Posts
    313

    Default Ldap authentication & role Authenticated

    I have configured ldap to authenticate against our Microsoft AD server.
    I configured pentaho.xml as follows:
    Code:
    <!-- 
    These acls are used when publishing from the file system. Every folder
    gets these ACLS. Authenticated is a "default" role that everyone
    gets when they're authenticated (be sure to setup your bean xml properly
    for this to work).
    -->
    <default-acls>
    <acl-entry role="GG Pentaho administrators (BE)" acl="ADMIN_ALL"/> <!-- Admin users get all authorities -->
    
    <!--<acl-entry role="Admin" acl="ADMIN_ALL" /> <!-- Admin users get all authorities --> <!-- <acl-entry role="cto" acl="ADMIN_ALL" /> <!-- CTO gets everything --> <!-- <acl-entry role="dev" acl="EXECUTE_SUBSCRIBE" /> <!-- Dev gets execute/subscribe -->
    <!-- <acl-entry role="Authenticated" acl="EXECUTE" /> <!-- Authenticated users get execute only -->
    <acl-entry role="GG Pentaho users (BE)" acl="EXECUTE"/> <!-- Authenticated users get execute only --> </default-acls>
    I replaced the role names, with the roles defined in AD. This is logical for the first role ADMIN_ALL.
    Initially i left the default role as is (Authenticated), but i did receive acess denies messages wen trying to open the index.jsp and later on the main page.
    To fix this behaviour, i changed the role to "GG Pentaho users (BE)". The bad thing to this is, that you have to assign this default role to the user. If you forget to do so, the user will be authenticated, and then get an ugly "access denied" screen. The comment "be sure to setup your bean xml properly for this to work" let me suspect, i am doing something wrong. Problably there is an other way to get rid of this "access denied" screen. Can someone point me to the solution??????

  2. #2
    Join Date
    Oct 2006
    Posts
    817

    Default

    I'm not sure I fully understand your setup. But let me list some possible problems.

    • You mention a "default role." Are you talking about the defaultRole property in DefaultLdapAuthoritiesPopulator? By default, the platform defines no defaultRole in DefaultLdapAuthoritiesPopulator.
    • When you edit default-acls, you must update the solution repository.
    • When you want to introduce your organization-specific roles, you must add them to both pentaho.xml and applicationContext-acegi-security.xml. The former addresses domain object authorization while the latter addresses web resource authorization.

  3. #3
    Join Date
    Jan 2006
    Posts
    313

    Default

    I was refering to the role="Authenticated" in pentaho.xml

    In applicationContext-acegi-security.xml you define :
    Code:
    <!-- Note the order that entries are placed against the objectDefinitionSource is critical. The FilterSecurityInterceptor will work from the top of the list down to the FIRST pattern that matches the request URL. Accordingly, you should place MOST SPECIFIC (ie a/b/c/d.*) expressions first, with LEAST SPECIFIC (ie a/.*) expressions last -->
    <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/login.*\Z=Anonymous,Authenticated \A/j_acegi_security_check.*\Z=Anonymous,Authenticated \A/getmondrianmodel.*\Z=Anonymous,Authenticated \A/getimage.*\Z=Anonymous,Authenticated \A/getresource.*\Z=Anonymous,Authenticated \A/admin.*\Z=Admin \A/auditreport.*\Z=Admin \A/auditreportlist.*\Z=Admin \A/versioncontrol.*\Z=Admin \A/propertieseditor.*\Z=Admin \A/propertiespanel.*\Z=Admin \A/subscriptionadmin.*\Z=Admin \A/resetrepository.*\Z=Admin \A/viewaction.*solution.admin.*\Z=Admin \A/scheduleradmin.*\Z=Admin \A/publish.*\Z=Admin \A/logout.*\Z=Anonymous \A/.*\Z=Authenticated
    ]]>
    </value>
    </property>
    </bean>
    Where "\A/.*\Z=Authenticated" gives you access to http://localhost/pentaho/login.jsp or http://localhost/pentaho/home
    To get it working i replaced "Authenticated" with a role "pentaho_user" i defined in Active directory. This is not convenient. All users defined in AD will pass the authentication phrase, but will get an ugly "access denied error" because they are not member of the role "pentaho_user". So i thought there might be a relation between the fact the users are authenticated and the role definition "Authenticated" as specified above. In otehr words, if you are authenticated by ldap, you have the role "Authenticated" assigned

  4. #4
    Join Date
    Oct 2006
    Posts
    817

    Default

    I believe what you are requesting can be accomplished using the defaultRole property of DefaultLdapAuthoritiesPopulator, which is defined in applicationContext-acegi-security-ldap.xml. The defaultRole property "will be assigned to all authenticated users."

    Code:
    <bean id="populator" class="org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator">
      <!-- omitted -->
      <property name="defaultRole" value="Authenticated" />
      <!-- omitted -->
    </bean>
    The default role needs to exist in the LDAP directory if you plan on using the Permissions UI to assign permissions that reference the default role. If you're not going to use the Permissions UI, and instead just use the default-acls in pentaho.xml, you can safely define a default role that does not exist in the LDAP directory.

  5. #5
    Join Date
    Oct 2006
    Posts
    817

    Default

    The last post in this thread might also help you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.