title: Suggestion/Guidance to Implementing LDAP (Active Directory) authentication
body: <p><strong>Problem Statement:</strong></p>
  
  <p>I am trying to build a custom management system which would require authentication and authorization both. 
  The system needs to have capabilities to manage/create/update/delete users, roles, permissions and groups. </p>
  
  <p><strong>My Design Solution</strong></p>
  
  <p>I am planing to implement this in-house from scratch and would provide authentication and authorization as follows.</p>
  
  <p>Authentication : user would provide their credentials and the system would authenticate if the user is valid or not.</p>
  
  <p>Authorization: once the user is authenticated, based on the user groups and the permissions they could access the requested pages on the site. </p>
  
  <p><strong>Question:</strong></p>
  
  <p>Now, my question is that suppose I have this application built successfully and in future my application requires LDAP (active directory) authentication would it be possible to plug in LDAP related features keeping my existing application intact or I would have to re-write the entire or most application using LDAP API's.</p>
  
  <p>I have had a look at at apache shiro and spring security which
  provides LDAP functionality and they also provide capabilities to manage/create/update/delete users.</p>
  
  <p>As of now I have not yet decided if I would go with either of them or write my own. </p>
  
  <p>Would appreciate if I could get a detailed reponse about how to go about things.</p>
  
  <p><strong>Note:</strong> 
  I am a complete newbie to LDAP so please excuse me if I have used some wrong terminology with regards to LDAP. </p>