gitblit/gitblit — pull request #8 by jcrygier (2012-03-27 21:16:38+00:00)
Title: LDAP Implementation

Hello-

I've finished most of the LDAP implementation as a new class "com.gitblit.LdapUserService", and it's extending the existing ConfigUserService (so I only had to write read / write / authenticate). Due to this, I had to expose a few methods / variables as protected instead of private. Hope this is okay with you.

The implementation is quite configurable, as you will likely notice with the abundance of added properties. I hope the documentation on them is good enough, but if you want me to write an HTML page for the gh-pages, I can do that when I get some free time.

The basic design allows for configuration of where to get ALL data for the models (TeamModel / UserModel) as well as the attributes on those models. When I say "where to get data", I mean that it's possible for any of these things to come from LDAP or users.conf. I did this because we aren't going to store all of this information in LDAP, so I backed onto your implementation. Also, it allows you to specify where to get the links between the three models (TeamModel / UserModel / Repository).

Things not implemented:
- Writes to LDAP. I'm not sure this would be a good use case, as most corporations are going to want to maintain LDAP entries via another mechanism.
- Getting Team / User --> Repository link from LDAP. Doing so breaks the ability to add a new repository, unless writes to LDAP are implemented.

I hope this works well for you, and welcome any feedback.