Splunk ships with support for three authentication systems: Splunk's built-in system, LDAP and a new scripted authentication API. The scripted authentication system allows you to set up Splunk to interface with an authentication system you already have in place. Set up authentication using authentication.conf.
For the most up-to-date information on scripted authentication, see the README file in $SPLUNK_HOME/share/splunk/authScriptSamples/. There are sample scripts in this directory for PAM and RADIUS, as well as a sample authentication.conf for each auth system.
Note: These scripts are samples, and must be edited to work in your specific environment.
Add the following settings to authentication.conf in $SPLUNK_HOME/etc/system/local/ (or your custom app directory) to enable your specific script. You can also copy the sample authentication.conf from $SPLUNK_HOME/share/splunk/authScriptSamples/.
Specify scripted as your authentication type under the [authentication] stanza heading:
[authentication] authType = Scripted authSettings = script
Set script variables under the [script] stanza heading:
[script] scriptPath = $SPLUNK_HOME/bin/python $SPLUNK_HOME/share/splunk/authScriptSamples/<scriptname> scriptSearchFilters = 1
Set scriptSearchFilters to 1 if you want to enable search filters for roles mapped to users. Set to 0 to disable.
Optionally, add a [cacheTiming] stanza if needed for your script. Use these settings to adjust the frequency at which Splunk calls your application. Each call has its own timeout specified in seconds. Caching does not occur if not specified.
[cacheTiming] userLoginTTL = 1 searchFilterTTL = 1 getUserInfoTTL = 1 getUserTypeTTL = 1 getUsersTTL = 1
Scripted authentication includes the following commands to use in your script. Here is a descriptive list of these commands, including their inputs and outputs.
Supplemental calls:
Advanced calls:
Every out starts with a <status_bit> which is one of the following:
Comments
@michael.crispino: thanks for the clarification!
Posted by rachel on Sep 23 2008, 9:44am
The example for getUsers above is misleading. I took it to literally mean that the output had to be a string of --userInfo1 --userInfo2 --userInfo3 etc., which does not work.
A string of --userInfo --userInfo --userInfo works however
Posted by michael.crispino on Sep 22 2008, 7:02pm