LDAP for authentication and authorization in Playframework 2.0

I am developing a small website using Playframework with Scala and I need to add authentication and authorization to my website. My professor told me to check LDAP . So I checked, and I did not find anything interesting other than the discussion in the Google groups here .

I also found this module https://github.com/t2v/play20-auth , but I could not understand its code well.

So I ask: Is it possible to use LDAP with Playframework and Scala ? If there is a tutorial that can help me get started?

+7
source share
1 answer

LDAP can be used to access directory services. The directory / directory can be used as a repository for usernames and passwords, but it can probably be redundant if you just save usernames and passwords, as they are best suited for the enterprise and have many other functions. The most common use case that I know is not authenticated directly with LDAP (although this is completely possible), but uses it for authorization to get roles for the user, for example. Active Directory combined with SSO (e.g. kerberos / ntlm authentication).

To use it, you must check the ldap client library (e.g. http://www.springsource.org/ldap ) in your authentication and / or authorization code.

You mentioned that this is a "small website" and I think that LDAP may be redundant for your business. If this is a small site, you should use a ready-made module, as you mentioned, and save it in a database with hashed and salted passwords. If you want to use LDAP, you should check OpenDJ ( http://forgerock.com/what-we-offer/open-identity-stack/opendj/ ) if you are looking for a clean and simple LDAP directory service.

+5
source

All Articles