<?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>topic Re: Splunk LDAP authentication, wrong filter? in Security</title>
    <link>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93101#M3043</link>
    <description>&lt;P&gt;Within your group definitions, does &lt;CODE&gt;memberUid&lt;/CODE&gt; refer to a WHOLE DN, or just the 'short name'?  &lt;/P&gt;

&lt;P&gt;Your examples suggest that the members of groups are referred to by just the &lt;CODE&gt;uid=lkamenov&lt;/CODE&gt; attribute and not the entire &lt;CODE&gt;uid=lkamenov,ou=people,dc=my,dc=example,dc=com&lt;/CODE&gt;.  &lt;/P&gt;

&lt;P&gt;Based on your examples, I would suggest setting&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;groupMappingAttribute = uid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your authentication.conf.  This (should) make Splunk use the "simple" &lt;CODE&gt;uid&lt;/CODE&gt; attribute instead of the whole DN for purposes of group matching.&lt;/P&gt;

&lt;P&gt;Note, however, that this makes group memebership ambiguous when the same uid exists in multiple OU's.  ( Meaning &lt;CODE&gt;uid=lkamenov,ou=people,dc=my,dc=domain,dc=com&lt;/CODE&gt; and &lt;CODE&gt;uid=lkamenov,ou=otherpeople,dc=my,dc=domain,dc=com&lt;/CODE&gt; would both match the group membership attribute of &lt;CODE&gt;uid=lkamenov&lt;/CODE&gt;)&lt;/P&gt;</description>
    <pubDate>Sat, 07 Jul 2012 01:41:08 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2012-07-07T01:41:08Z</dc:date>
    <item>
      <title>Splunk LDAP authentication, wrong filter?</title>
      <link>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93100#M3042</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;

&lt;P&gt;I have been trying to figure out why Splunk can't authenticate against my OpenLDAP server. Current configuration looks like this:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
SSLEnabled = 1&lt;BR /&gt;
anonymous_referrals = 0&lt;BR /&gt;
bindDN = cn=admin,ou=meta,dc=my,dc=example,dc=com&lt;BR /&gt;
bindDNpassword = &lt;BIND password=""&gt;&lt;BR /&gt;
charset = utf8&lt;BR /&gt;
groupBaseDN = ou=Group,dc=my,dc=example,dc=com&lt;BR /&gt;
groupBaseFilter = (|(cn=GROUP1)(cn=GROUP2))&lt;BR /&gt;
groupMappingAttribute = dn&lt;BR /&gt;
groupMemberAttribute = memberuid&lt;BR /&gt;
groupNameAttribute = cn&lt;BR /&gt;
host = my.example.com&lt;BR /&gt;
nestedGroups = 0&lt;BR /&gt;
network_timeout = -1&lt;BR /&gt;
port = 636&lt;BR /&gt;
realNameAttribute = cn&lt;BR /&gt;
sizelimit = 10000&lt;BR /&gt;
timelimit = 29&lt;BR /&gt;
userBaseDN = ou=People,dc=my,dc=example,dc=com&lt;BR /&gt;
userBaseFilter = (objectClass=posixAccount)&lt;BR /&gt;
userNameAttribute = uid&lt;BR /&gt;
&lt;/BIND&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Groups are mapped correctly (GROUP1 and GROUP2), but the users within these groups cannot authenticate. I have been looking at the LDAP logs and I can see these filters:&lt;/P&gt;

&lt;P&gt;This specific ones, successfully gets the user data.&lt;/P&gt;

&lt;PRE&gt;conn=379662 op=1 SRCH base="ou=People,dc=my,dc=example,dc=com" scope=2 deref=0 filter="(&amp;amp;(uid=USERNAME)(objectClass=posixAccount)(cn=*))"&lt;/PRE&gt;

&lt;P&gt;Now this one is generated to look for the groups that this specific user is a member of:&lt;/P&gt;

&lt;PRE&gt;conn=379662 op=2 SRCH base="ou=Group,dc=my,dc=example,dc=com" scope=2 deref=0 filter="(&amp;amp;(memberUid=uid=USERNAME,ou=people,dc=my,dc=example,dc=com)(|(cn=GROUP1)(cn=GROUP2))(cn=*))"&lt;/PRE&gt;

&lt;P&gt;But it returns nothing, so user is not logged in, so essentially the filter does not work.&lt;/P&gt;

&lt;P&gt;However this filter works: &lt;PRE&gt;(&amp;amp;(memberUid=lkamenov)(|(cn=GROUP1)(cn=GROUP2))(cn=*))&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Anyone have an idea what could be going wrong exactly? Would appreciate any help!&lt;/P&gt;

&lt;P&gt;Thank you&lt;BR /&gt;
Lou&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:02:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93100#M3042</guid>
      <dc:creator>lkamenov</dc:creator>
      <dc:date>2020-09-28T12:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk LDAP authentication, wrong filter?</title>
      <link>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93101#M3043</link>
      <description>&lt;P&gt;Within your group definitions, does &lt;CODE&gt;memberUid&lt;/CODE&gt; refer to a WHOLE DN, or just the 'short name'?  &lt;/P&gt;

&lt;P&gt;Your examples suggest that the members of groups are referred to by just the &lt;CODE&gt;uid=lkamenov&lt;/CODE&gt; attribute and not the entire &lt;CODE&gt;uid=lkamenov,ou=people,dc=my,dc=example,dc=com&lt;/CODE&gt;.  &lt;/P&gt;

&lt;P&gt;Based on your examples, I would suggest setting&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;groupMappingAttribute = uid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your authentication.conf.  This (should) make Splunk use the "simple" &lt;CODE&gt;uid&lt;/CODE&gt; attribute instead of the whole DN for purposes of group matching.&lt;/P&gt;

&lt;P&gt;Note, however, that this makes group memebership ambiguous when the same uid exists in multiple OU's.  ( Meaning &lt;CODE&gt;uid=lkamenov,ou=people,dc=my,dc=domain,dc=com&lt;/CODE&gt; and &lt;CODE&gt;uid=lkamenov,ou=otherpeople,dc=my,dc=domain,dc=com&lt;/CODE&gt; would both match the group membership attribute of &lt;CODE&gt;uid=lkamenov&lt;/CODE&gt;)&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2012 01:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93101#M3043</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-07-07T01:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk LDAP authentication, wrong filter?</title>
      <link>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93102#M3044</link>
      <description>&lt;P&gt;Did this solve your issue?  An update would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2012 15:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93102#M3044</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-07-16T15:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk LDAP authentication, wrong filter?</title>
      <link>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93103#M3045</link>
      <description>&lt;P&gt;I used the full DN and that worked nicely. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2012 22:52:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/Splunk-LDAP-authentication-wrong-filter/m-p/93103#M3045</guid>
      <dc:creator>lkamenov</dc:creator>
      <dc:date>2012-07-17T22:52:24Z</dc:date>
    </item>
  </channel>
</rss>

