> ## Documentation Index
> Fetch the complete documentation index at: https://klef.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Splunk User Provisioning & Deprovisioning

> Automate Splunk user provisioning and deprovisioning from your HRIS. Klef creates, updates, and deactivates accounts when HR makes a change.

![](https://mintcdn.com/klef/O1Sswmcb_uCGkmIf/images/connectors/splunk.svg?fit=max\&auto=format\&n=O1Sswmcb_uCGkmIf\&q=85\&s=8baa21e36e665bcbbb0aaab4dcfeaa59)

# Splunk

## Connection

### Setup

Klef reaches Splunk's management port, 8089, with an authentication token.

**Step 1**

Turn on token authentication, if it is off: in Splunk Web, go to **Settings**, then **Tokens**, and choose **Enable Token Authentication**.

**Step 2**

Choose **New Token**, and make it for a user whose role holds the `edit_user` and `list_users` capabilities, such as admin. Set an expiry you will remember to renew.

**Step 3**

Copy the token into Klef, with your management URL, such as `https://splunk.acme.com:8089`. On Splunk Cloud Platform, the URL is `https://<stack>.splunkcloud.com:8089`, and Klef's addresses must be on the stack's allow list for the management port.

The management port's certificate must be one a browser trusts. Klef refuses Splunk's default self-signed certificate.

Klef manages the users an admin or LDAP already made, since Splunk needs a password to make a user. Splunk has no disabled user, so switching a user off deletes them.

SAML users are not Splunk users, so Klef does not list them. Their roles come from your identity provider's groups.

### Settings

| Setting | Required | Description |
| - | - | - |
| Management URL | Yes | Address of your Splunk management port, such as [https://splunk.acme.com:8089](https://splunk.acme.com:8089) or [https://acme.splunkcloud.com:8089](https://acme.splunkcloud.com:8089). Its certificate must be trusted. |
| Token | Yes | An authentication token of a Splunk user who holds the edit\_user and list\_users capabilities. |

## splunk.user

### Fields

| Field | Type | Required | Description |
| - | - | - | - |
| `name` (Username) | string | Yes | Splunk username of a user an admin or LDAP already made. The connector does not change it. Never changed once the account exists. |
| `realName` (Full name) | string | | Full name. |
| `email` | string | | Email address. Never changed once the account exists. |
| `roles` | entitlements | | Roles the user holds. Splunk needs every user to hold at least one. One row grants one role. |
| `roles[]` | string | | Role name. |
| `status` | enum | | Whether the person can sign in, the account is kept switched off, or the account is gone. Values: `removed` (Removed). |

### Default Account Matching Rules

When Klef [adopts](https://klef.ai/docs/adoption.md) an account that already exists in Splunk, it works out whose it is by trying these in order. A connection can override them.

| Account field | Worker field |
| - | - |
| `email` | `worker.business_email` |

## Examples

### Splunk users

Keeps each engineer's Splunk user named and emailed, and deletes it when they leave.

```hcl theme={null}
stage active {
  target splunk.user {
    name     = worker.business_email
    realName = worker.display_name
    email    = worker.business_email
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.