title: Zeppelin Shiro LDAP Configuration
body: <p>I am attempting to restrict access to zeppelin based on an AD group or organizational unit.  However, I am unsuccessful with my configuration.</p>
  
  <p>I have an active directory implemented using Simple AD in AWS and the domain is called corp.example.com</p>
  
  <p>I created three users, two groups, one organizational unit.</p>
  
  <p>The groups are called Access and NoAccess
  The users are called AccessUser1, NoAccessUser1, AccessOrgUser1
  The organizational unit is called AccessOrg</p>
  
  <p>AccessUser1 is a memberOf Access
  NoAccessUser1 is a memberOf NoAccess
  AccessOrgUser1 is created under the OU AccessOrg</p>
  
  <p>I am able to log in using any user with the following configuration:</p>
  
  <pre><code>### A sample for configuring LDAP Directory Realm
  ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
  ldapRealm.contextFactory.url = ldap://&lt;UrlHere&gt;
  ldapRealm.contextFactory.authenticationMechanism = simple
  </code></pre>
  
  <p>I am unable to log in using any user with the following configuration:</p>
  
  <pre><code>### A sample for configuring LDAP Directory Realm
  ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
  ## search base for ldap groups (only relevant for LdapGroupRealm):
  ldapRealm.contextFactory.environment[ldap.searchBase] = ou=Users,dc=CORP,dc=EXAMPLE,dc=COM
  ldapRealm.contextFactory.url = ldap://&lt;UrlHere&gt;
  ldapRealm.userDnTemplate = uid={0},ou=Users,dc=CORP,dc=EXAMPLE,dc=COM
  ldapRealm.contextFactory.authenticationMechanism = simple
  </code></pre>