Jump to content
We've recently updated our Privacy Statement, available here ×

Problem with configuration LDAP autentication for JasperReports Server Community Project 5.5.0 Release


raffaele.milan

Recommended Posts

After I have copied and renamed the file sample-applicationContext-externalAuth-LDAP.xml (renamed without prefix sample), I write the external.ldapUrl property like this :

<bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">
        <constructor-arg value="ldap://hostname-ldap-db:389/o=System CC,c=It"/>

After restarting  the Jasper Server, the error Apache Tomcat 404 occurs, are ther any problem with my base DN (o=System CC,c=I)?

The users properties by query ldap are : ou=users,o=System CC,c=It

Thank you for your help in advance

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hy All,

In the catalina.out I've found this error:

2014-09-02 09:17:14,931 ERROR ContextLoader,localhost-startStop-1:307 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'proxyAuthenticationProcessingFilter' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Cannot resolve reference to bean 'ldapAuthenticationManager' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapAuthenticationManager' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Cannot resolve reference to bean 'ldapAuthenticationProvider' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapAuthenticationProvider' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Cannot create inner bean 'org.springframework.security.providers.ldap.authenticator.BindAuthenticator#17c916d' of type [org.springframework.security.providers.ldap.authenticator.BindAuthenticator] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.providers.ldap.authenticator.BindAuthenticator#17c916d' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Cannot resolve reference to bean 'ldapContextSource' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapContextSource' defined in ServletContext resource [/WEB-INF/applicationContext-externalAuth-LDAP.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Root DNs must be the same when using multiple URLs

I hope can be help for the solution

Regards
 

 

Link to comment
Share on other sites

  • 1 month later...

I had the same problem. I found the solution in this post: https://communities.coverity.com/thread/1947 .

You must replace the blanks in the DN of the URL of the ldap-server in the bean "ldapContextSource" in your applicationContext-externalAuth-LDAP.xml. So it looks like this: 

 <bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">


        <constructor-arg value="ldap://<server>:389/dc=<example>,dc=de"/>


        <property name="userDn" value="cn=<user>,ou=<usergroup>,dc=<example>,dc=de"/>


        <property name="password" value="<password>"/>


    </bean>

 

I hope this helps you.

Link to comment
Share on other sites

  • 1 month later...

Hi,

      I had the same problem,But I configured it.There's a simple solution.change the bean class to default class.

change 

 <bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">

to

<bean id="ldapContextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
Tell me If you need more assistance.
 
Regards,
Chinthaka. 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...