- HDP 2.6
- LDAP bind details (guide is for Active Directory but can be altered for other LDAP servers).
Securely store LDAP credentials on Zeppelin host(s):
## Do this as a hadoop superuser or the `hdfs` user
## - Below shows authenticating to and then executing as `hdfs` user. Alter to your user:
cluster=sroberts100
sudo -u hdfs kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs-"${cluster,,}"
sudo -u hdfs hadoop credential create activeDirectoryRealm.systemPassword -provider jceks:///etc/zeppelin/conf/credentials.jceks
- Configure 'proxyuser' rights for Zeppelin:
- DO NOT use
*
change to the appropriate hosts and groups! - Ambari: HDFS -> Configs -> Custom core-site:
- DO NOT use
hadoop.proxyuser.zeppelin.hosts=*
hadoop.proxyuser.zeppelin.groups=*
- Update Zeppelin config with configuration below.
- From Ambari: Zeppelin -> Advanced zeppelin-env -> "shiro_ini_content"
- Restart affected services
- Test: Login to Zeppelin as AD user.
Review notes in each config and update where appropriate, such as LDAP details.
[users]
# List of users with their password allowed to access Zeppelin.
# To use a different strategy (LDAP / Database / ...) check the shiro doc at http://shiro.apache.org/configuration.html#Configuration-INISections
#admin = admin, admin
#user1 = user1, role1, role2
#user2 = user2, role3
#user3 = user3, role2
# Sample LDAP configuration, for user Authentication, currently tested for single Realm
[main]
### A sample for configuring Active Directory Realm
activeDirectoryRealm = org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
activeDirectoryRealm.systemUsername = [email protected]
#use either systemPassword or hadoopSecurityCredentialPath, more details in http://zeppelin.apache.org/docs/latest/security/shiroauthentication.html
#activeDirectoryRealm.systemPassword = ""
activeDirectoryRealm.hadoopSecurityCredentialPath = jceks:///etc/zeppelin/conf/credentials.jceks
activeDirectoryRealm.searchBase = DC=company,DC=com
activeDirectoryRealm.url = ldaps://company.com
activeDirectoryRealm.principalSuffix = @company.COM
activeDirectoryRealm.groupRolesMap = "CN=hadoop_admins,OU=hadoop,DC=company,DC=com":"admin"
activeDirectoryRealm.authorizationCachingEnabled = false
### 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] = dc=COMPANY,dc=COM
#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
#ldapRealm.contextFactory.authenticationMechanism = SIMPLE
### A sample PAM configuration
#pamRealm=org.apache.zeppelin.realm.PamRealm
#pamRealm.service=sshd
sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
### If caching of user is required then uncomment below lines
#cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
#securityManager.cacheManager = $cacheManager
securityManager.sessionManager = $sessionManager
# 86,400,000 milliseconds = 24 hour
securityManager.sessionManager.globalSessionTimeout = 86400000
shiro.loginUrl = /api/login
#[roles]
#role1 = *
#role2 = *
#role3 = *
#admin = *
[urls]
# This section is used for url-based security.
# You can secure interpreter, configuration and credential information by urls. Comment or uncomment the below urls that you want to hide.
# anon means the access is anonymous.
# authcBasic means Basic Auth Security
/api/version = anon
#/api/interpreter/** = authc, anyofroles[admin]
#/api/configurations/** = authc, anyofroles[admin]
#/api/credential/** = authc, anyofroles[admin]
#/api/notebookRepos/** = authc, anyofroles[admin]
#/api/helium/** = authc, anyofroles[admin]
# To enfore security, comment the line below and uncomment the next one
#/** = anon
/** = authc