[ 
https://issues.apache.org/jira/browse/OFBIZ-811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrian Crum updated OFBIZ-811:
------------------------------

    Attachment: ldap_authentication.patch

Updated ldap_authentication.patch file. I built it out some more to address the 
comments made in this issue.

1. The ldap.synchronize.passwords property in 
framework/security/config/jndiLdap.properties controls if the user's OFBiz 
password is synchronized with the user's LDAP password. If your objective is to 
keep user logins and passwords the same, then this should be set to true.

2. The security.ldap.fail.login property in 
framework/security/config/jndiLdap.properties controls if the login process 
fails if LDAP authentication fails. The process is no longer "all or nothing" - 
a user can still log into OFBiz if LDAP authentication fails.

3. Each user login name can have their own Distingiushed Name. I added an 
entity called UserLdapDn that can be used to give each user their own DN. There 
is no UI for it, so for now you'll have to manually enter values through the 
webtools component - 
https://localhost:8443/webtools/control/FindGeneric?entityName=UserLdapDn&find=true.

If the UserLdapDn entity is used, you can still set up the ldap.dn.template 
property in the framework/security/config/jndiLdap.properties file as a 
default. This would be useful in cases where most users share a common DN, but 
some users are exceptions.

By the way, I created the entity instead of just adding a field to the existing 
UserLogin entity because I don't know if we'll need to store additional 
information for each user. If not, then I'll probably just add the field to the 
UserLogin entity when I commit it.

I'm satisfied with this implementation. If all goes well with testing, I'd like 
to get it committed to the project.

Comments are welcome.


> Authentication using LDAP
> -------------------------
>
>                 Key: OFBIZ-811
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-811
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>         Environment: all
>            Reporter: Mohamed Amine AZZI
>            Priority: Trivial
>         Attachments: ldap_authentication.patch, ldap_authentication.patch, 
> LoginServices.java, LoginServices.java.diff, security.properties.diff
>
>
> this feature, would enable Ofbiz users to authenticate their users using an 
> LDAP. I developed that change in response to a customer request who wanted 
> his employees to use the same passwords they use when openning a windows 
> session.
> the solution was to recreate the same usernames in the Party manager with an 
> unused password. and redirect the authentication to the LDAP when needed. The 
> choice is made in the security.properties file. all parameters needed to 
> connect to the LDAP are there also.
> After authentication all authorizations are taken out from the Party manager. 
>  This would give the same feature used by SharePoint, which is called cross 
> privileges
> the change is minor as you would see, but very helpfull for people needing 
> the same feature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to