Search code examples
spring-roo

Spring roo ldap authentication and database authorization


I have a Sping roo applicaiton and I want to apply authentication through LDAP and authorization on (e.g. read only/ admin) screens through database tables User/UserRole. Can someone point me to a sample application ?

I have gone through documentation on http://docs.spring.io/spring-roo/reference/html/beginning.html for Securing the Application. However I am looking for ldap and database together.

Thanks Amber


Solution

  • There's a tutorial with the LDAP piece here

    For the Authorization piece, you can solve that by implementing a UserDetailService (the piece that looks up a users authorization in a database and assigns it, allowing you to put fences around pieces of your application), and adding it to your authentication provider

    Here's another (probably better) example of LDAP authentication