billchen198318 / bamboobsc

next version move to https://github.com/billchen198318/hillfog, bambooBSC is an opensource Balanced Scorecard (BSC) Business Intelligence (BI) Web platform. BSC's Vision, Perspectives, Objectives of strategy, Key Performance Indicators (KPIs), Strategy Map, and SWOT, PDCA & PDCA report, Time Series Analysis.
Apache License 2.0
227 stars 109 forks source link

LDAP login support. #13

Closed billchen198318 closed 8 years ago

billchen198318 commented 8 years ago

bamboobsc-login

Apache shiro configure file location: webapps/core-web/WEB-INF/classes/applicationContext/core/

A. Default login mode. copy applicationContext-shiro-default-sample.xml overwrite applicationContext-shiro.xml

B. LDAP login mode. copy applicationContext-shiro-ldap-sample.xml overwrite applicationContext-shiro.xml and need settings success LDAP server address with DN value.

example:

<bean id="ldapContextFactory" class="org.apache.shiro.realm.ldap.JndiLdapContextFactory">
    <property name="url" value="ldap://192.168.1.200:389" />       
</bean>

<bean id="greenStepBaseAuthorizingLdapRealm" class="com.netsteadfast.greenstep.sys.GreenStepBaseAuthorizingLdapRealm">
    <property name="userRoleService" ref="core.service.UserRoleService"/>
    <property name="rolePermissionService" ref="core.service.RolePermissionService"/>
    <property name="cacheManager" ref="shiroCacheManager"/> 
    <property name="contextFactory" ref="ldapContextFactory" />
    <property name="userDnTemplate" value="CN={0},OU=people,DC=netsteadfast,DC=com" />
</bean> 
rakesh1084 commented 7 years ago

Hi,

I used your hint and followed. LDAP Authentication not working. :-(

    <bean id="ldapContextFactory" class="org.apache.shiro.realm.ldap.JndiLdapContextFactory">
        <property name="url" value="ldap://192.168.1.200:389" />       
    </bean>
    <bean id="greenStepBaseAuthorizingLdapRealm" class="com.netsteadfast.greenstep.sys.GreenStepBaseAuthorizingLdapRealm">
        <property name="userRoleService" ref="core.service.UserRoleService"/>
        <property name="rolePermissionService" ref="core.service.RolePermissionService"/>   
        <property name="cacheManager" ref="shiroCacheManager"/>
        <property name="contextFactory" ref="ldapContextFactory" />
        <property name="userDnTemplate" value="CN={MYORG},OU=Users,DC=ALL,DC=COM" />        
    </bean>     

Note:- Other applications like mantisBT is working with the same property. One thing missing I see in bambooBSC is username and password. I give username and password in mantisBT config file and LDAP login work good. in bambooBSC how and where (which config file ) I give username and password.

Please guide.

billchen198318 commented 7 years ago

My LDAP environment test is normal, I have no other resources and environment can to test, sorry