Admin Manual

 


How Splunk Works

Set up LDAP

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.

Set up LDAP

Splunk supports authentication via its internal authentication services or your existing LDAP server.


Note: You must add a CA when connecting to AD via secure LDAP. Read the section below entitled Import your CA for more information.


Configure LDAP

Configure LDAP through Splunk Web or via authentication.conf.


Determine your User and Group Base DN

Before you map your LDAP settings in Splunk, figure out your user and groupbase DN, or distinguished name. The DN is the location in the directory where authentication information is stored. If all information is contained in each user's entry, then these DNs must be the same. If group membership information for users is kept in a separate entry, enter a separate DN identifying the subtree in the directory where the group information is stored.


Set up LDAP via Splunk Web

First, set LDAP as your authentication strategy.


Next, fill in your LDAP settings.


Import your CA

To configure Splunk's LDAP to work with your own CA, follow these steps:


TLS_CACERT $SPLUNK_HOME/etc/openldap/certs/$YOUR_CERT_NAME
TLS_CACERTDIR $SPLUNK_HOME/etc/openldap/certs

Map existing LDAP groups to Splunk roles

Once you have configured Splunk to authenticate via your LDAP server, map your existing LDAP groups to any roles you have created. If you do not use groups, you can map users individually. NOTE: You can either map users or map groups but not both. If you are using groups, all the users you wish to have access to Splunk must be members of an appropriate group. Groups inherit capabilities from the highest level role they're a member of.


All users and groups are visible under the Users tab in the Splunk Web Admin section. Click the Edit link next to the appropriate user or group to define User Roles.


Test your LDAP configuration

If you find that your Splunk install is not able to successfully connect to your LDAP server, try these troubleshooting steps:


ldapsearch -h "<host>" -p "<port>" -b "<userBaseDN>" -x -D "<bindDN>" -w "<bindDNpassword>"
ldapsearch -h "<host>" -p "<port>" -b "<groupBaseDN>" -x -D "<bindDN>" -w "<bindDNpassword>"

Example

This example steps you through obtaining LDIFs and setting up authentication.conf. You can also enter these settings in Splunk Web, as described above.


Note: The particulars of your LDAP server may be different. Check your LDAP server settings and adapt authentication.conf attributes to your environment.


Get LDIFs

You should have both the user and group LDIFs to set up authentication.conf.


User LDIF

Get the user LDIF by running the following command (use your own ou and dc):


# ldapsearch -h ldaphost -p 389 -x -b "ou=People,dc=splunk,dc=com" -D "cn=Directory Manager" -w password

This returns:


# splunkadmin, People, splunk.com
dn: uid=splunkadmin,ou=People, dc=splunk,dc=com
uid: splunkadmin
givenName: Splunk
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
sn: Admin
cn: Splunk Admin

Group LDIF

Get the group LDIF by running the following command (use your own ou and dc):


# ldapsearch -h ldaphost -p 389 -x -b "ou=groups,dc=splunk,dc=com" -D "cn=Directory Manager" -w password

This returns:


# SplunkAdmins, Groups, splunk.com
dn: cn=SplunkAdmins,ou=Groups, dc=splunk,dc=com
description: Splunk Admins
objectClass: top
objectClass: groupofuniquenames
cn: SplunkAdmins
uniqueMember: uid=splunkadmin,ou=People, dc=splunk,dc=com

configure authentication.conf

Use the following instructions to set up authentication.conf. To set up LDAP via Splunk Web, see the instructions above.


set authentication type

By default, Splunk uses its own authentication type. Change that in the [authentication] stanza.


[authentication]
authType = LDAP
authSettings = ldaphost

map to LDAP server entries

Now, map your LDIFs to the attribute/values in authentication.conf.


[ldaphost]
host = ldaphost.domain.com
pageSize = 0
port = 389
SSLEnabled = 0
failsafeLogin = failsafe
failsafePassword = fail
bindDN = cn=Directory Manager
bindDNpassword = password
groupBaseDN = ou=Groups,dc=splunk,dc=com;
groupBaseFilter = (objectclass=*)
groupMappingAttribute = dn
groupMemberAttribute = uniqueMember
groupNameAttribute = cn
realNameAttribute = givenName
userBaseDN = ou=People,dc=splunk,dc=com;
userBaseFilter = (objectclass=*)
userNameAttribute = uid

map roles

You can also set a stanza to map roles you have created in authorize.conf to users you have enabled in authentication.conf.


[roleMap]
Admin = SplunkAdmins;

Known issues with LDAP

When configuring Splunk to work with your LDAP instance, note the following:


This documentation applies to the following versions of Splunk: 3.2 , 3.2.1 , 3.2.2 , 3.2.3 , 3.2.4 , 3.2.5 , 3.2.6 View the Article History for its revisions.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.

Feedback submitted, thanks!