Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Zeppelin 0.8 on HDP 3.1.0.0 class org.apache.zeppelin.server.LdapRealm not instantiate

avatar
Cloudera Employee

Error: Unable to instantiate class [org.apache.zeppelin.server.LdapRealm] for object named 'ldapRealm'.  The same is true for 'ldapGroupRealm'

Zeppelin 0.8 on HDP 3.1.0.0

 

Configuration:

# authentication settings
ldapRealm = org.apache.zeppelin.server.LdapRealm
ldapRealm.contextFactory.environment[ldap.searchBase] = DC=tantor,DC=net
ldapRealm.userDnTemplate = uid={0},OU=users,DC=tantor,DC=net
ldapRealm.contextFactory.url = ldap://infra01.tantor.net:389
ldapRealm.contextFactory.authenticationMechanism = SIMPLE

# general settings
sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
securityManager.cacheManager = $cacheManager
securityManager.sessionManager = $sessionManager
securityManager.sessionManager.globalSessionTimeout = 86400000

shiro.loginUrl = /api/login

 

Exception: 

ERROR [2019-11-06 12:49:24,565] ({main} EnvironmentLoader.java[initEnvironment]:146) - Shiro environment initialization failed
org.apache.shiro.config.ConfigurationException: Unable to instantiate class [org.apache.zeppelin.server.LdapRealm] for object named 'ldapRealm'. Please ensure you've specified the fully qualified class name correctly.
at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:309)

NOTE: I have tried both LdapRealm and LdapGroupRealm with the same results

 

Additional Information:

http://mail-archives.apache.org/mod_mbox/zeppelin-users/201611.mbox/%3CCAPyZXSRUtGx9A_QB9BZN6H8mkk1g...

1 ACCEPTED SOLUTION

avatar
Master Collaborator

@wdailey  Use "ldapRealm=org.apache.zeppelin.realm.LdapRealm"

Below is the template for your reference

ldapRealm=org.apache.zeppelin.realm.LdapRealm 
ldapRealm.contextFactory.systemUsername =cn=manager,dc=charan,dc=com
ldapRealm.contextFactory.systemPassword =admin 
ldapRealm.contextFactory.authenticationMechanism=simple 
ldapRealm.contextFactory.url=ldap://test1:389 
ldapRealm.authorizationEnabled=true 
#ldapRealm.pagingSize = 20000 
ldapRealm.searchBase=
ldapRealm.userSearchBase=
ldapRealm.groupSearchBase=
ldapRealm.userObjectClass=
ldapRealm.userSearchAttributeName = uid 
ldapRealm.userSearchScope = subtree 
ldapRealm.groupSearchScope = subtree 
ldapRealm.userSearchFilter= 
ldapRealm.memberAttribute = member 
ldapRealm.memberAttributeValueTemplate=(name={0})

View solution in original post

1 REPLY 1

avatar
Master Collaborator

@wdailey  Use "ldapRealm=org.apache.zeppelin.realm.LdapRealm"

Below is the template for your reference

ldapRealm=org.apache.zeppelin.realm.LdapRealm 
ldapRealm.contextFactory.systemUsername =cn=manager,dc=charan,dc=com
ldapRealm.contextFactory.systemPassword =admin 
ldapRealm.contextFactory.authenticationMechanism=simple 
ldapRealm.contextFactory.url=ldap://test1:389 
ldapRealm.authorizationEnabled=true 
#ldapRealm.pagingSize = 20000 
ldapRealm.searchBase=
ldapRealm.userSearchBase=
ldapRealm.groupSearchBase=
ldapRealm.userObjectClass=
ldapRealm.userSearchAttributeName = uid 
ldapRealm.userSearchScope = subtree 
ldapRealm.groupSearchScope = subtree 
ldapRealm.userSearchFilter= 
ldapRealm.memberAttribute = member 
ldapRealm.memberAttributeValueTemplate=(name={0})