Announcement Announcement Module
Collapse
No announcement yet.
Jasper3.7.1 Spring Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Jasper3.7.1 Spring

    Hello All,
    I'm following all the threads and topics on google but still cannot find a solution to get this working ...
    I have a jasperserver 3.7.1 and a microsoft AD.

    the applicationContext-security.xml looks like below
    Code:
    <bean id="ldapContextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
         <constructor-arg value="ldap://NLVENLDC01.na.intranet.msd:389/DC=na,DC=intranet,DC=msd"/>
         <property name="userDn"><value>CN=cmnjasper,OU=Users,OU=Netherlands,OU=company,DC=na,DC=intranet,DC=msd</value></property>
         <property name="password"><value>pass</value></property>
       </bean>
       
       
       <bean id="userSearch"
                class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
         <constructor-arg index="0">
           <value></value>
         </constructor-arg>
         <constructor-arg index="1">
           <value>CN={0},OU=Users,OU=Netherlands,OU=company</value>
         </constructor-arg>
         <constructor-arg index="2">
           <ref local="ldapContextSource" />
         </constructor-arg>            
         <property name="searchSubtree">
           <value>true</value>
         </property>            
       </bean>            
       
       
       <bean id="ldapAuthenticationProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider">
         <constructor-arg>
           <bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator">
              <constructor-arg><ref local="ldapContextSource"/></constructor-arg>
              <property name="userDnPatterns"><list><value>CN={0},OU=Users,OU=Netherlands,OU=company,DC=na,DC=intranet,DC=msd</value></list></property>
              <property name="userSearch" ref="userSearch"/>
           </bean>
         </constructor-arg>
         <constructor-arg>
           <bean class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator">
              <constructor-arg index="0"><ref local="ldapContextSource"/></constructor-arg>
              <constructor-arg index="1"><value>OU=Groups,OU=Netherlands,OU=company,DC=na,DC=intranet,DC=msd</value></constructor-arg>
    			<property name="groupRoleAttribute"><value>cn</value></property>
    			<property name="groupSearchFilter"><value>((member={1})(cn=*))</value></property>
    			<property name="searchSubtree"><value>true</value></property>
    			<property name="rolePrefix"><value></value></property>
    			<property name="defaultRole"><value>ROLE_ANONYMOUS</value></property>
    			<property name="convertToUpperCase"><value>true</value></property>
              </bean>
         </constructor-arg>
       </bean>
    When i login on the webpase it says "bad credentials"

    The "jasperserver.log" tells me this:
    Code:
    011-02-18 15:12:10,760  INFO DefaultSpringSecurityContextSource,main:56 -  URL 'ldap://NLVENLDC01.na.intranet.msd:389/OU=Company,DC=na,DC=intranet,DC=msd', root DN is 'OU=Company,DC=na,DC=intranet,DC=msd'
    2011-02-18 15:12:10,760  INFO DefaultSpringSecurityContextSource,main:56 -  URL 'ldap://NLVENLDC01.na.intranet.msd:389/OU=Company,DC=na,DC=intranet,DC=msd', root DN is 'OU=Company,DC=na,DC=intranet,DC=msd'
    2011-02-18 15:12:10,838  INFO FilterBasedLdapUserSearch,main:91 - SearchBase not set. Searches will be performed from the root: ou=Company,dc=na,dc=intranet,dc=msd
    2011-02-18 15:12:10,838  INFO FilterBasedLdapUserSearch,main:91 - SearchBase not set. Searches will be performed from the root: ou=Company,dc=na,dc=intranet,dc=msd
    2011-02-18 15:12:11,729  WARN PermissionsListProtectionDomainProvider,main:61 - A security manager has not been configured for the JVM. The protection domain set for the reports will NOT be effective.
    I checked with a LDAP browser and the LDIFF file says:
    Code:
    dn: CN=cmnjasper,OU=Users,OU=Netherlands,OU=company,DC=na,DC=intranet,DC=msd
    objectClass: top
    objectClass: person
    objectClass: organizationalPerson
    objectClass: user
    cn: CMNJasper
    sAMAccountName: CMNJasper
    I have no clue why im getting all these errors, I tried to read as much threads but still i'm completely lost in this case.

    Appreciate some help from more experienced users.

    thanks

  • #2
    Help AD Connection for JasperServer

    Could you resolve it? I've got the same problem:

    Here is my XML-File:
    Code:
       <bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
            <property name="providers">
                <list>
                    <ref local="ldapAuthenticationProvider"/>
                    <ref bean="${bean.daoAuthenticationProvider}"/>
                    <!-- <ref bean="anonymousAuthenticationProvider"/>
                    <ref local="jaasAuthenticationProvider"/> -->
                </list>
            </property>
        </bean>
    
       <bean id="ldapContextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
         <constructor-arg value="ldap://wind-dc05:389/DC=zli,DC=local"/>    
         <property name="userDn"><value>CN=sombody,OU=Users,OU=ZLI,DC=zli,DC=local</value></property>
         <property name="password"><value>something</value></property>
       </bean>
    
       <bean id="userSearch"
                class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
         <constructor-arg index="0"><value>cn=Users</value>
         </constructor-arg>
         <constructor-arg index="1">value>(sAMAccountName={0})</value>
         </constructor-arg>
         <constructor-arg index="2"><ref local="ldapContextSource" />
         </constructor-arg>            
         <property name="searchSubtree"><value>true</value>
         </property>            
       </bean>
    
       <bean id="ldapAuthenticationProvider" class="org.springframework.security.providers.ldap.LdapAuthenticationProvider">
         <constructor-arg>
           <bean class="org.springframework.security.providers.ldap.authenticator.BindAuthenticator">
              <constructor-arg><ref local="ldapContextSource"/></constructor-arg>
              <!-- property name="userDnPatterns"><list><value>uid={0}</value></list></property -->
              <property name="userSearch" ref="userSearch"/>
           </bean>
         </constructor-arg>
         <constructor-arg>
           <bean class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator">
              <constructor-arg index="0"><ref local="ldapContextSource"/></constructor-arg>
              <constructor-arg index="1"><value>OU=Groups,OU=ILZ,DC=zli,DC=local</value></constructor-arg>
    			<property name="groupRoleAttribute"><value>cn</value></property>
    			<property name="groupSearchFilter"><value>((member={1})(cn=*))</value></property>
    			<property name="searchSubtree"><value>true</value></property>
    			<property name="rolePrefix"><value></value></property>
    			<property name="defaultRole"><value>ROLE_ANONYMOUS</value></property>
    			<property name="convertToUpperCase"><value>true</value></property>           
           </bean>
         </constructor-arg>
       </bean>
    And my Log
    2011-03-09 14:35:48,953 WARN SingletonEhCacheProvider,Thread-1:92 - Could not find a specific ehcache configuration for cache named [org.hibernate.cache.UpdateTimestampsCache]; using defaults.
    2011-03-09 14:35:48,968 WARN SingletonEhCacheProvider,Thread-1:92 - Could not find a specific ehcache configuration for cache named [org.hibernate.cache.StandardQueryCache]; using defaults.
    2011-03-09 14:35:49,656 WARN PermissionsListProtectionDomainProvider,Thread-1:61 - A security manager has not been configured for the JVM. The protection domain set for the reports will NOT be effective.
    2011-03-09 14:35:51,093 WARN ChainedTilesRequestContextFactory,Thread-1:105 - Cannot find TilesRequestContextFactory class org.apache.tiles.portlet.context.PortletTilesReque stContextFactory
    2011-03-09 14:36:14,265 WARN LoggerListener,http-8080-5:60 - Authentication event AuthenticationFailureBadCredentialsEvent: ilz32; details: org.springframework.security.ui.WebAuthenticationD etails@fffdaa08: RemoteIpAddress: 127.0.0.1; SessionId: 9E32283CE90BAC8FCFEB61AF26114BCC; exception: Bad credentials
    It would be awesome, if somebody could post hi applicationContext-security.xml file .

    thanks

    Comment

    Working...
    X