<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HOW CAN I RETRIEVE LDAP GROUP FOR ZEPPELIN 0.8 ? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/286045#M85251</link>
    <description>&lt;P&gt;This resolved my problem:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;As per the source code it pulls group's cn based on these values. Also comment out below if there is no group inside groups."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Instead of putting full DN name, simply put cn name. Thanks. This should be the accepted answer for zeppelin 0.8.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Zeppelin version: 0.8; HDP version: HDP 3.1.4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2019 21:00:27 GMT</pubDate>
    <dc:creator>dwang7</dc:creator>
    <dc:date>2019-12-19T21:00:27Z</dc:date>
    <item>
      <title>HOW CAN I RETRIEVE LDAP GROUP FOR ZEPPELIN 0.8 ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/237867#M85247</link>
      <description>&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;I've been trying to find out if we can give to LDAP groups some roles ( admin and user ) but without succes.&lt;/P&gt;&lt;P&gt;I'm puting down below my shiro config. It's working but when I'm logged in zeppelin as member of an admin group, the web UI &lt;/P&gt;&lt;P&gt;is telling me that i don't have permission on the interpreter, credential, etc ...  page.&lt;/P&gt;&lt;P&gt;Anyone have a clue ? &lt;/P&gt;&lt;PRE&gt;[users]
# List of users with their password allowed to access Zeppelin.
# To use a different strategy (LDAP / Database / ...) check the shiro doc at &lt;A href="http://shiro.apache.org/configuration.html#Configuration-INISections" target="_blank"&gt;http://shiro.apache.org/configuration.html#Configuration-INISections&lt;/A&gt;
# To enable admin user, uncomment the following line and set an appropriate password.
#admin = password1, admin
#user1 = password2, role1, role2
#user2 = password3, role3
#user3 = password4, role2


[main]


ldapRealm=org.apache.zeppelin.realm.LdapRealm
ldapRealm.contextFactory.systemUsername=cn=UserBind,ou=Services,dc=domain,dc=company
ldapRealm.contextFactory.systemPassword=PassWord
ldapRealm.contextFactory.authenticationMechanism=simple
ldapRealm.contextFactory.url=ldap://ldap-server:389
ldapRealm.userDnTemplate =uid={0},ou=Users,dc=domain,dc=company


# Ability to set ldap paging Size if needed; default is 100
ldapRealm.pagingSize=200
ldapRealm.authorizationEnabled=true
ldapRealm.searchBase=dc=domain,dc=company
ldapRealm.userSearchBase=dc=domain,dc=company
ldapRealm.groupSearchBase=ou=Groups,dc=domain,dc=company
ldapRealm.userObjectClass=posixAccount
ldapRealm.groupObjectClass=posixGroup
ldapRealm.userSearchFilter = (&amp;amp;(objectclass=posixAccount)(uid={0}))
ldapRealm.memberAttribute=memberOf
ldapRealm.userSearchAttributeName = uid
ldapRealm.groupIdAttribute=cn
ldapRealm.userLowerCase = true
# ability set searchScopes subtree (default), one, base
ldapRealm.userSearchScope = subtree;
ldapRealm.groupSearchScope = subtree;
ldapRealm.groupSearchFilter = (&amp;amp;(objectclass=posixGroup)(memberOf={0}))
# Format to parse &amp;amp; search group member values in 'memberAttribute'
ldapRealm.memberAttributeValueTemplate=uid={0},ou=Groups,dc=domain,dc=company


# Map from physical AD groups to logical application roles
#ldapRealm.allowedRolesForAuthentication = admin_role,user_role
ldapRealm.rolesByGroup = "cn=Group-admin,dc=domain,dc=company":"admin_role", "cn=Group-user,dc=domain,dc=company":"user_role"
ldapRealm.permissionsByRole= admin_role:"*", user_role:"*:ToDoItemsJdo:*:*, *:ToDoItem:*:*"
ldapRealm.groupSearchEnableMatchingRuleInChain = true
# Force usernames returned from ldap to lowercase, useful for AD
#ldapRealm.userLowerCase = true


sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
securityManager.sessionMode=native
securityManager.sessionManager.globalSessionTimeout = 86400000
securityManager.sessionManager = $sessionManager


##########################################
### 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


### Enables 'HttpOnly' flag in Zeppelin cookies
cookie = org.apache.shiro.web.servlet.SimpleCookie
cookie.name = JSESSIONID
cookie.httpOnly = true
### Uncomment the below line only when Zeppelin is running over HTTPS
#cookie.secure = true
sessionManager.sessionIdCookie = $cookie


#securityManager.sessionManager = $sessionManager
# 86,400,000 milliseconds = 24 hour
#securityManager.sessionManager.globalSessionTimeout = 86400000
shiro.loginUrl = /api/login


[roles]
#admin_role = *
#user_role = *:ToDoItemsJdo:*:*,*:ToDoItem:*:*
#role1 = *
#role2 = *
#role3 = *
#admin = *


[urls]
# This section is used for url-based security. For details see the shiro.ini documentation.
#
# 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.
# authc means form based auth Security.
#
# IMPORTANT: Order matters: URL path expressions are evaluated against an incoming request
# in the order they are defined and the FIRST MATCH WINS.
#
# To allow anonymous access to all but the stated urls,
# uncomment the line second last line (/** = anon) and comment the last line (/** = authc)
#
#/api/version = anon
# Allow all authenticated users to restart interpreters on a notebook page.
# Comment out the following line if you would like to authorize only admin users to restart interpreters.
#/api/interpreter/setting/restart/** = authc
/api/interpreter/** = authc, roles[admin_role,user_role]
/api/configurations/** = authc, roles[admin_role]
/api/credential/** = authc, roles[admin_role]
#/** = anon
/** = authc


&lt;/PRE&gt;&lt;P&gt;this is the log i get when i'm logging in, as you can see the roles part is blank &lt;/P&gt;&lt;PRE&gt;/api/security/ticket} SecurityRestApi.java[ticket]:88) - {"status":"OK","message":"","body":{"principal":"user","ticket":"22faec60-d905-4757-899e-2a62b6ec7463","roles":"[]"}&lt;/PRE&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;
Toky&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 23:02:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/237867#M85247</guid>
      <dc:creator>raobelina_toky_</dc:creator>
      <dc:date>2018-11-28T23:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: HOW CAN I RETRIEVE LDAP GROUP FOR ZEPPELIN 0.8 ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/237868#M85248</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11506/raobelinatokytahiry.html" nodeid="11506"&gt;@Toky Raobelina&lt;/A&gt;&lt;P&gt; In url section  I see you have configured &lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;/api/interpreter/** = authc, roles[admin_role,user_role] &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;It should be anyofroles instead of roles. Refer below article to configure correctly &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/content/supportkb/208060/unable-to-configure-multiple-groups-mapped-by-role.html" target="_blank"&gt;https://community.hortonworks.com/content/supportkb/208060/unable-to-configure-multiple-groups-mapped-by-role.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please accept this answer if it helps you&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 01:03:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/237868#M85248</guid>
      <dc:creator>Scharan</dc:creator>
      <dc:date>2018-11-29T01:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: HOW CAN I RETRIEVE LDAP GROUP FOR ZEPPELIN 0.8 ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/237869#M85249</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/15463/scharan.html" nodeid="15463"&gt;@scharan&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;thanks for your help, i really appreciate it. I've tried this two configuration &lt;/P&gt;&lt;P&gt;the first one : &lt;/P&gt;&lt;PRE&gt;[main] 

anyofroles = org.apache.zeppelin.utils.AnyOfRolesAuthorizationFilter  

ldapRealm.rolesByGroup = "cn=Group-admin,dc=domain,dc=company":"admin_role", "cn=Group-user,dc=domain,dc=company":"user_role"

[urls] 

/api/interpreter/** = authc, anyofroles[admin_role, user_role]&lt;/PRE&gt;&lt;P&gt;the second one: &lt;/P&gt;&lt;PRE&gt;[main] 

anyofrolesuser = org.apache.zeppelin.utils.AnyOfRolesUserAuthorizationFilter

ldapRealm.rolesByGroup = "cn=Group-admin,dc=domain,dc=company":"admin_role", "cn=Group-user,dc=domain,dc=company":"user_role"

[urls] 

/api/interpreter/** = authc, anyofrolesuser[admin_role, user_role]&lt;/PRE&gt;&lt;P&gt;but none of them changed anything, i still don't have any permission and any roles .&lt;/P&gt;&lt;PRE&gt;/api/security/ticket} SecurityRestApi.java[ticket]:88) - {"status":"OK","message":"","body":{"principal":"user","ticket":"39f0b948-0f6d-4556-b447-c021ca34c8f6","roles":"[]"}}&lt;/PRE&gt;&lt;P&gt; I've added my user on both LDAP group but didn't change anything either. But i think i'm close &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best reagrds, &lt;/P&gt;&lt;P&gt;Toky&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 22:19:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/237869#M85249</guid>
      <dc:creator>raobelina_toky_</dc:creator>
      <dc:date>2018-11-29T22:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: HOW CAN I RETRIEVE LDAP GROUP FOR ZEPPELIN 0.8 ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/269408#M85250</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/53384"&gt;@raobelina_toky_&lt;/a&gt;&amp;nbsp;Is this setup done?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Else Please try out below steps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step1:&lt;/P&gt;&lt;P&gt;In rolesByGroup please specify only the group's cn and not the full. Change&amp;nbsp;"cn=Group-admin,dc=domain,dc=company": to Group-admin:admin_role&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step2:&lt;/P&gt;&lt;P&gt;Validate your group search base path&amp;nbsp;ldapRealm.groupSearchBase and group Object class name and&amp;nbsp;memberAttribute.&lt;/P&gt;&lt;P&gt;For instance if your&amp;nbsp;&lt;/P&gt;&lt;P&gt;ldapRealm.groupSearchBase = dc=domain, dc=company&lt;/P&gt;&lt;P&gt;ldapRealm.groupObjectClass = posixGroup&lt;/P&gt;&lt;P&gt;ldapRealm.memberAttribute = member&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per the source code it pulls group's cn based on these values. Also comment out below if there is no group inside groups.&lt;/P&gt;&lt;P&gt;# Enable support for nested groups using the LDAP_MATCHING_RULE_IN_CHAIN operator&lt;BR /&gt;#ldapRealm.groupSearchEnableMatchingRuleInChain = true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To cross verify your settings try using ldapsearch this comes as part of ldap-utils package.&lt;/P&gt;&lt;P&gt;Replace the values in &amp;lt;&amp;gt; and try search.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ldapsearch -h &amp;lt;ldapHost&amp;gt; -p &amp;lt;ldapport&amp;gt; -D &amp;lt;ldapRealm.contextFactory.systemUsername&amp;gt; -w &amp;lt;bind user password&amp;gt; -b &amp;lt;groupSearchBase&amp;gt; -s sub "(objectclass=&amp;lt;groupObjectClass&amp;gt;)"&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 05:04:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/269408#M85250</guid>
      <dc:creator>ElephantAdmin</dc:creator>
      <dc:date>2019-08-30T05:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: HOW CAN I RETRIEVE LDAP GROUP FOR ZEPPELIN 0.8 ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/286045#M85251</link>
      <description>&lt;P&gt;This resolved my problem:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;As per the source code it pulls group's cn based on these values. Also comment out below if there is no group inside groups."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Instead of putting full DN name, simply put cn name. Thanks. This should be the accepted answer for zeppelin 0.8.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Zeppelin version: 0.8; HDP version: HDP 3.1.4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 21:00:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HOW-CAN-I-RETRIEVE-LDAP-GROUP-FOR-ZEPPELIN-0-8/m-p/286045#M85251</guid>
      <dc:creator>dwang7</dc:creator>
      <dc:date>2019-12-19T21:00:27Z</dc:date>
    </item>
  </channel>
</rss>

