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

elvermg
Go to solution Solved by elvermg,

Recommended Posts

I´m triying to connect to MS AD with JR 5.5.  I don´t get any error on catalina or jasperserver logs. This is my applicationContext-externalAuth-LDAP.xml file and the AD directory view:

 


    <bean id="ldapAuthenticationManager" class="org.springframework.security.providers.ProviderManager">
        <property name="providers">
            <list>
                <ref local="ldapAuthenticationProvider"/>
                <ref bean="${bean.daoAuthenticationProvider}"/>
                <!-- anonymousAuthenticationProvider only needed if filterInvocationInterceptor.alwaysReauthenticate is set to true
                <ref bean="anonymousAuthenticationProvider"/>-->
            </list>
        </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},ou=Users</value>
                    </list>
                </property>
            </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=MyGroups,dc=elver,dc=com</value></constructor-arg>
                <property name="groupRoleAttribute"><value>cn</value></property>
                <property name="groupSearchFilter"><value>(&(objectClass=group)(member={0}))</value></property>                
                <property name="searchSubtree"><value>true</value></property>
                <property name="defaultRole" value="ROLE_LDAP"/>
                <!-- Can setup additional external default roles here  <property name="defaultRole" value="LDAP"/> -->
            </bean>
        </constructor-arg>
    </bean>

    <bean id="userSearch"
          class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
        <constructor-arg index="0"><value></value></constructor-arg>
        <constructor-arg index="1"><value>(&(objectClass=user)(sAMAaccountName={0})</value></constructor-arg>
        <constructor-arg index="2"><ref local="ldapContextSource" /></constructor-arg>
        <property name="searchSubtree"><value>true</value></property>
        
    </bean>

    <bean id="ldapContextSource" class="com.jaspersoft.jasperserver.api.security.externalAuth.ldap.JSLdapContextSource">
        <constructor-arg value="ldap://10.10.30.1:389/dc=elver,dc=com"/>
        <!-- manager user name and password (may not be needed)  -->
        <property name="userDn"><value>cn=Administrator,dc=elver,dc=com</value></property>

<property name="password"><value>password</value></property>
    </bean>WindowsServer2008R2x64-2014-06-11-12-40-16.png.3f092c85412a0fb796997be27d8ba603.png
      

 

Thanks in advance.

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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...