Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-14100

kimIdentityDelegateService bean definition in KIMLdapSpringBeans.xml is broken

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.2, 2.5.1
    • Fix Version/s: 2.6
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Similar issues:
      KULRICE-7693expressions in nested bean definitions not processed
      KULRICE-819The DocTypeVO bean structure is broken across webservices.
      KULRICE-10373Create group bean definitions for Bootstrap panel and well
      KULRICE-12875LookupView definitions need improvements
      KULRICE-5324When multiple components have same bean definition in dictionary they get the same id assigned
      KULRICE-10371Provide base message bean definitions for Bootstrap labels and badges
      KULRICE-7527Remove non-common default bean definitions to reduce initialize view size
      KULRICE-8441Move UIF nested beans out to top level beans
      KULRICE-3973Spring 3.0.1 and module beans
      KULRICE-6707Add additional Maintenance specific bean defs to add hooks to make changes later
    • Rice Module:
      KIM
    • KRAD Feature Area:
      KIM Integration
    • Sprint:
      Middleware 2.5.2 Sprint 5, Rice Sprint 2015-02-18
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      5

      Description

      The bean "kimIdentityDelegateService" is improperly defined in KIMLdapSpringBeans.xml

      <bean id="kimIdentityDelegateService" class="org.kuali.rice.kim.service.impl.LdapIdentityDelegateServiceImpl"
      p:businessObjectService-ref="rice.kim.import.businessObjectService"
      p:criteriaLookupService-ref="rice.kim.import.criteriaLookupService">
      <property name="principalDao" ref="ldapPrincipalDao" />
      </bean>

      Two problems here.

      • the property businessObjectService was changed to dataObjectService in Rice 2.4.
      • the property criteriaLookupService is obsolete

      I think the bean definition should be changed to:

      <bean id="kimIdentityDelegateService" class="org.kuali.rice.kim.service.impl.LdapIdentityDelegateServiceImpl"
      p:dataObjectService-ref="dataObjectService">
      <property name="principalDao" ref="ldapPrincipalDao" />
      </bean>

      The startup error when attempting to boot when using an ldap integration:

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kimConfigurer' defined in class path resource [org/kuali/rice/config/RiceServiceSpringBeans.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kimIdentityDelegateService' defined in class path resource [org/kuali/rice/kim/config/KIMLdapSpringBeans.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'businessObjectService' of bean class [org.kuali.rice.kim.service.impl.LdapIdentityDelegateServiceImpl]: Bean property 'businessObjectService' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)

        Activity

        Hide
        Eric Westfall added a comment -

        It sounds to me like this the kim ldap support is pretty much broken until this is fixed.

        As a requirement of this, an integration test suite should be written which verifies the KIM ldap module functionality so we can ensure it never again just outright breaks like this without us knowing.

        Show
        Eric Westfall added a comment - It sounds to me like this the kim ldap support is pretty much broken until this is fixed. As a requirement of this, an integration test suite should be written which verifies the KIM ldap module functionality so we can ensure it never again just outright breaks like this without us knowing.
        Hide
        Sona Sona (Inactive) added a comment - - edited

        Changed KIMLdapSpringBeans.xml to have

         <bean id="kimIdentityDelegateService" class="org.kuali.rice.kim.service.impl.LdapIdentityDelegateServiceImpl">
              <property name="principalDao" ref="ldapPrincipalDao" />
            </bean>
        

        I had to add the following to sample-app-config.xml to enable LDAP and to test that there aren't any startup server errors and I can get to the login page. I cannot test anything else on the app since we do not have a LDAP server running.

        <param name="rice.ldap.username">uid=user,ou=Ldap Users,dc=localhost</param>
              <param name="rice.ldap.password">secret</param>
              <param name="rice.ldap.url">ldaps://localhost:636</param>
          <param name="rice.ldap.base">ou=People,dc=localhost</param>
            <param name="rice.kim.additionalSpringFiles">classpath:org/kuali/rice/kim/config/KIMLdapSpringBeans.xml</param>
        

        There is however an existing integration test LDAPIdentityServiceImplTest which uses LdapTestUtils to start and stop a test server and tests for basic operations.

        I also had to add the kim-ldap dependency to sample-app pom.

        <dependency>
              <groupId>org.kuali.rice</groupId>
              <version>${project.version}</version>
              <artifactId>rice-kim-ldap</artifactId>
         <dependency>
        
        Show
        Sona Sona (Inactive) added a comment - - edited Changed KIMLdapSpringBeans.xml to have <bean id= "kimIdentityDelegateService" class= "org.kuali.rice.kim.service.impl.LdapIdentityDelegateServiceImpl" > <property name= "principalDao" ref= "ldapPrincipalDao" /> </bean> I had to add the following to sample-app-config.xml to enable LDAP and to test that there aren't any startup server errors and I can get to the login page. I cannot test anything else on the app since we do not have a LDAP server running. <param name= "rice.ldap.username" >uid=user,ou=Ldap Users,dc=localhost</param> <param name= "rice.ldap.password" >secret</param> <param name= "rice.ldap.url" >ldaps: //localhost:636</param> <param name= "rice.ldap.base" >ou=People,dc=localhost</param> <param name= "rice.kim.additionalSpringFiles" >classpath:org/kuali/rice/kim/config/KIMLdapSpringBeans.xml</param> There is however an existing integration test LDAPIdentityServiceImplTest which uses LdapTestUtils to start and stop a test server and tests for basic operations. I also had to add the kim-ldap dependency to sample-app pom. <dependency> <groupId>org.kuali.rice</groupId> <version>${project.version}</version> <artifactId>rice-kim-ldap</artifactId> <dependency>
        Hide
        Claus Niesen added a comment -

        Please add this change to the 2.5 branch as well. Thanks.

        Show
        Claus Niesen added a comment - Please add this change to the 2.5 branch as well. Thanks.
        Hide
        Claus Niesen added a comment -

        Commit was rolled back in the 2.5 branch.

        Show
        Claus Niesen added a comment - Commit was rolled back in the 2.5 branch.

          People

          • Assignee:
            Sona Sona (Inactive)
            Reporter:
            Daniel Seibert (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Agile

                Structure Helper Panel