Skip to content

Stubbed Grails Project to connect to Active Directory via spring security ldap plugin

Notifications You must be signed in to change notification settings

javazquez/Grails-Active-Directory-LDAP-example

Repository files navigation

The http://grails.org/plugin/spring-security-ldap has great documentation. I put together a working example (at least in my environment) to complement the docs. When I was tasked with integrating our grails apps with Active Directory I remember there being a scarcity of examples.. so I hope this will save you some time in getting ldap working with Active Directory in your grails environment.

Important files

grails-app/conf/Config.groovy
src/groovy/com/javazquez/ldapexample/MyUserDetailsContextMapper.groovy
src/groovy/com/javazquez/ldapexample/MyUserDetails.groovy
grails-app/conf/spring/resources.groovy

once you have your Active Directory configurations entered (grails-app/conf/Config.groovy), fire up your app and test it out by logging in via the login controller.

Notes

  • This uses Grails 2.X and likely won't work with 3.X
  • You may have to update MyUserDetailsContextMapper.groovy as my Active Directory environment may differ from yours.
  • You may also want to update MyUserDetails.groovy to hold more or less info than my config.

About

Stubbed Grails Project to connect to Active Directory via spring security ldap plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published