---
title: Kerberos connector
description: The Kerberos connector is an implementation of the SSH connector, and is based on Java Secure Channel (JSch) and the Java implementation of the Expect library (Expect4j).
component: openicf
page_id: openicf:connector-reference:kerberos
canonical_url: https://docs.pingidentity.com/openicf/connector-reference/kerberos.html
section_ids:
  ssh-kerberos-schema: Kerberos connector schema
  install_the_kerberos_connector: Install the Kerberos connector
  ssh-kerberos-config: Configure the Kerberos connector
  kerberos_remote_connector: Kerberos remote connector
  config-connection-pooling-kerberos: Configure connection pooling
  implemented-interfaces-org-forgerock-openicf-connectors-kerberos-KerberosConnector-1.5.20.31: OpenICF Interfaces Implemented by the Kerberos Connector
  config-properties-org-forgerock-openicf-connectors-kerberos-KerberosConnector-1.5.20.31: Kerberos Connector Configuration
  basic-configuration-properties-org-forgerock-openicf-connectors-kerberos-KerberosConnector-1.5.20.31: Basic Configuration Properties
  groovy-engine-configuration-org-forgerock-openicf-connectors-kerberos-KerberosConnector-1.5.20.31: Groovy Engine configuration
  operation-script-files-org-forgerock-openicf-connectors-kerberos-KerberosConnector-1.5.20.31: Operation Script Files
---

# Kerberos connector

The Kerberos connector is an implementation of the SSH connector, and is based on Java Secure Channel (JSch) and the Java implementation of the Expect library (Expect4j).

The Kerberos connector lets you manage Kerberos user principals from IDM. The connector bundles a number of Groovy scripts, to interact with a Kerberos admin server. You should not edit the bundled Groovy scripts. The scripts use the `kadmin` utility to communicate with the Kerberos server.

The Kerberos connector lets you perform the following operations on Kerberos user principals:

* List the existing principals.

* Display the details of a principal.

* Add a user principal.

* Change the password of a user principal and unlock the principal.

* Delete a user principal.

## Kerberos connector schema

The Kerberos connector can only be used to manage the Kerberos `principal` object type (which maps to the ICF `__ACCOUNT__` object). The following attributes are supported in the schema:

* `principal` - (maps to `__NAME__` and `__UID__`)

* `__PASSWORD__` - updatable, required when an object is created

* `__LOCK_OUT__` - updatable only; unlock an account by setting this attribute to `false`

* `policy` - the password policy used by the principal

* `expirationDate` - the date that the user principal expires

* `passwordExpiration` - the date that the password expires

* `maximumTicketLife` - the maximum ticket life for the principal. At the end of the ticket lifetime, the ticket can no longer be used. However, if the renewable lifetime (`maximumRenewableLife`) is longer than the ticket lifetime, the ticket holder can present the ticket to the KDC and request a new ticket.

* `maximumRenewableLife` - the period during which the ticket can be renewed. A renewed ticket usually has a new ticket lifetime, dating from the time that it was renewed, that is constrained by the renewable ticket lifetime.

In addition, the following read-only attributes are supported:

* `lastPasswordChange`

* `lastModified`

* `lastSuccessfulAuthentication`

* `lastFailedAuthentication`

* `failedPasswordAttempts`

## Install the Kerberos connector

|   |                                                                                                                                                                                                                                                                                                 |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | To check for an Advanced Identity Cloud application for this connector, refer to:- [Application management](https://docs.pingidentity.com/pingoneaic/latest/app-management/applications.html)

- [App catalog](https://docs.pingidentity.com/pingoneaic/latest/app-management/app-catalog.html) |

You can download any connector from [Backstage](https://backstage.forgerock.com/downloads/browse/idm/featured/connectors), but some are included in the default deployment for Advanced Identity Cloud, IDM, or RCS. When using an included connector, you can skip installing it and move directly to configuration.

**Connector included in default deployment**

| Connector                 | IDM                      | RCS                      |
| ------------------------- | ------------------------ | ------------------------ |
| [Kerberos](kerberos.html) | [icon: check, set=fa]Yes | [icon: check, set=fa]Yes |

Download the connector .jar file from [Backstage](https://backstage.forgerock.com/downloads/browse/idm/featured/connectors).

* If you're running the connector locally, place it in the `/path/to/openidm/connectors` directory, for example:

  ```
  mv ~/Downloads/kerberos-connector-1.5.20.31.jar /path/to/openidm/connectors/
  ```

* If you're using a remote connector server (RCS), place it in the `/path/to/openicf/connectors` directory on the RCS.

## Configure the Kerberos connector

Create a connector configuration using the IDM admin UI:

1. From the navigation bar, click Configure > Connectors.

2. On the Connectors page, click New Connector.

3. On the New Connector page, type a Connector Name.

4. From the Connector Type list, select Kerberos Connector - 1.5.20.31.

5. Complete the Base Connector Details and any applicable Additional Options.

   |   |                                                                                                                        |
   | - | ---------------------------------------------------------------------------------------------------------------------- |
   |   | For a list of all configuration properties, refer to [Kerberos Connector Configuration](#kerberos-config-prop-ezLink). |

6. Click Save.

When your connector is configured correctly, the connector displays as Active in the admin UI.

Refer to [this procedure](configure-connector.html#connector-wiz-REST) to create a connector configuration over REST.

Alternatively, configure the connector with a configuration file. A sample connector configuration (`provisioner.openicf-kerberos.json`) is provided in the `/path/to/openidm/samples/sync-with-kerberos/conf/` directory with IDM. Copy the sample connector configuration to your project's `conf/` directory, and adjust it to match your Kerberos environment.

1. Set the authentication properties, as described in [Configure Authentication to the SSH Server](ssh.html#ssh-authentication). In addition, set at least the following properties:

   * `customConfiguration`

     Specify the details of the user principal and the default realm here. The sample connector configuration is as follows:

     ```json
     "customConfiguration" : "kadmin {
         cmd = '/usr/sbin/kadmin.local';
         user = '<KADMIN USERNAME>';
         default_realm = '<REALM, e.g. EXAMPLE.COM>'
     }"
     ```

     A complete custom configuration will look something like this:

     ```json
     "customConfiguration" : "kadmin {
         cmd = '/usr/sbin/kadmin.local';
         user = 'openidm/admin';
         default_realm = 'EXAMPLE.COM'
     }"
     ```

   - `customSensitiveConfiguration`

     Set the password for the user principal here. The sample connector configuration is as follows:

     ```json
     "customSensitiveConfiguration" : "kadmin {password = '<KADMIN PASSWORD>'}"
     ```

     Change this to reflect your user principal password, for example:

     ```json
     "customSensitiveConfiguration" : "kadmin {password = 'Passw0rd'}"
     ```

> **Collapse: Basic Kerberos Connector Configuration**
>
> This list describes the basic Kerberos connector configuration properties. For a list of all configuration properties, refer to [Kerberos Connector Configuration](#kerberos-config-prop-ezLink):
>
> * `host`
>
>   The host name or IP address of the SSH server on which the `kadmin` command is run.
>
> * `port`
>
>   The port number on which the SSH server listens.
>
>   Default: `22` (the default SSH port)
>
> * `user`
>
>   The username of the account that is used to connect to the SSH server.
>
>   This is *not* the same as your Kerberos user principal. This account must be able to `ssh` into the server on which Kerberos is running, with the password provided in the next parameter.
>
>   If you use the `root` user, the `sudo` command in the Test script will never get the `'pass::'` prompt. Instead of using the `root` user, create a regular user and add that user to the group that has `sudo` privileges. Alternatively, modify the Test script so that it does not use `sudo`.
>
> * `password`
>
>   The password of the account that is used to connect to the SSH server.
>
> * `prompt`
>
>   A string representing the remote SSH session prompt. This must be the exact prompt string, in the format `username@target:`, for example `root@localhost:~$`.
>
>   If the prompt includes a trailing space, you must include the space in the value of this property.
>
>   Consider customizing your Linux prompt with the `PS1` and `PS2` variables, to set a *safe* prompt. For information about customizing prompts, refer to [this article](https://help.ubuntu.com/community/CustomizingBashPrompt).
>
> * `sudoCommand`
>
>   A string that shows the full path to the `sudo` command; for example `/usr/bin/sudo`.
>
> * `echoOff`
>
>   If set to `true` (the default), the input command echo is disabled. If set to `false`, every character that is sent to the server is sent back to the client in the `expect()` call.
>
> * `terminalType`
>
>   Sets the terminal type to use for the session. The list of supported types is determined by your Linux/UNIX system. For more information, refer to the `terminfo` manual page (`man terminfo`).
>
>   Default: `vt102`
>
> * `setLocale`
>
>   If set to `true`, indicates that the default environment locale should be changed to the value of the `locale` property.
>
>   Default: `false`
>
> * `locale`
>
>   Sets the locale for LC\_ALL, LANG, and LANGUAGE environment variables, if `setLocale` is set to `true`.
>
>   Default: `en_US.utf8`
>
> * `connectionTimeout`
>
>   Specifies the connection timeout to the remote server, in milliseconds.
>
>   Default: `5000`
>
> * `expectTimeout`
>
>   Specifies the timeout used by the `expect()` calls in scripts, in milliseconds.
>
>   Default: `5000`
>
> * `authenticationType`
>
>   Sets the authentication type, either `PASSWORD` or `PUBKEY`. For more information, refer to [connector-reference:ssh.adoc#ssh-authentication](ssh.html#ssh-authentication).
>
>   Default: `PASSWORD`
>
> * `throwOperationTimeoutException`
>
>   If `true`, the connector throws an exception when the timeout is reached for an operation. Otherwise, the operation fails silently.
>
>   Default: `true`
>
> * `scriptRoots`
>
>   The path to the Groovy scripts that perform the ICF operations, relative to your installation directory. For the Kerberos connector, the scripts are bundled in the connector .jar file, so the sample connector configuration uses the path `jar:file:connectors/kerberos-connector-1.5.20.31.jar!/scripts/kerberos/`.
>
> * `classpath`
>
>   The directory in which the compiler should look for compiled classes. The default classpath, if not is specified, is `install-dir/lib`.
>
> * `ScriptFileName`
>
>   The script that is used for each ICF operation. Do not change these script names in the bundled Kerberos connector.

### Kerberos remote connector

If you want to run this connector outside of PingOne Advanced Identity Cloud or IDM, you can configure the Kerberos connector as a remote connector. Java Connectors installed remotely on a Java Connector Server function identically to those bundled locally within PingOne Advanced Identity Cloud or installed locally on IDM.

You can download the Kerberos connector [from here](https://backstage.forgerock.com/downloads/browse/idm/all/productId:idm-connectors).

Refer to [Remote connectors](remote-connector.html) for configuring the Kerberos remote connector.

### Configure connection pooling

The Kerberos connector uses [ICF pooling](pooling.html#icf-pooling) to manage connections. Learn more about the different pooling mechanisms in [Connectors by pooling mechanism](pooling.html#pooling-table).

## OpenICF Interfaces Implemented by the Kerberos Connector

The Kerberos Connector implements the following OpenICF interfaces. For additional details, see [ICF interfaces](interfaces.html):

* Authenticate

  Provides simple authentication with two parameters, presumed to be a user name and password.

* Create

  Creates an object and its `uid`.

* Delete

  Deletes an object, referenced by its `uid`.

* Resolve Username

  Resolves an object by its username and returns the `uid` of the object.

* Schema

  Describes the object types, operations, and options that the connector supports.

* Script on Connector

  Enables an application to run a script in the context of the connector.

  Any script that runs on the connector has the following characteristics:

  * The script runs in the same execution environment as the connector and has access to all the classes to which the connector has access.

  * The script has access to a `connector` variable that is equivalent to an initialized instance of the connector. At a minimum, the script can access the connector configuration.

  * The script has access to any script arguments passed in by the application.

* Script on Resource

  Runs a script on the target resource that is managed by this connector.

* Search

  Searches the target resource for all objects that match the specified object class and filter.

* Sync

  Polls the target resource for synchronization events, that is, native changes to objects on the target resource.

* Test

  Tests the connector configuration.

  Testing a configuration checks all elements of the environment that are referred to by the configuration are available. For example, the connector might make a physical connection to a host that is specified in the configuration to verify that it exists and that the credentials that are specified in the configuration are valid.

  This operation might need to connect to a resource, and, as such, might take some time. Do not invoke this operation too often, such as before every provisioning operation. The test operation is not intended to check that the connector is alive (that is, that its physical connection to the resource has not timed out).

  You can invoke the test operation before a connector configuration has been validated.

* Update

  Updates (modifies or replaces) objects on a target resource.

[]()

## Kerberos Connector Configuration

The Kerberos Connector has the following configurable properties:

### Basic Configuration Properties

| Property                                                                                         | Type            | Default                | Encrypted(1)             | Required(2)               |
| ------------------------------------------------------------------------------------------------ | --------------- | ---------------------- | ------------------------ | ------------------------- |
| `host`                                                                                           | `String`        | `null`                 |                          | [icon: check, set=fas]Yes |
| The hostname to connect to.                                                                      |                 |                        |                          |                           |
| `port`                                                                                           | `int`           | `22`                   |                          | [icon: check, set=fas]Yes |
| TCP port to use.                                                                                 |                 |                        |                          |                           |
| `user`                                                                                           | `String`        | `null`                 |                          | [icon: check, set=fas]Yes |
| The user name used to login to remote server.                                                    |                 |                        |                          |                           |
| `password`                                                                                       | `GuardedString` | `null`                 | [icon: lock, set=fas]Yes | [icon: times, set=fas]No  |
| The password used to login to remote server.                                                     |                 |                        |                          |                           |
| `passphrase`                                                                                     | `GuardedString` | `null`                 | [icon: lock, set=fas]Yes | [icon: times, set=fas]No  |
| The passphrase used to read the private key when using Public Key authentication.                |                 |                        |                          |                           |
| `privateKey`                                                                                     | `String[]`      | `[]`                   | [icon: lock, set=fas]Yes | [icon: times, set=fas]No  |
| The base 64 encoded value (PEM) of the private key used for Public Key authentication.           |                 |                        |                          |                           |
| `authenticationType`                                                                             | `String`        | `PASSWORD`             |                          | [icon: check, set=fas]Yes |
| Defines which authentication type should be use: PASSWORD or PUBKEY.                             |                 |                        |                          |                           |
| `prompt`                                                                                         | `String`        | \`root\@localhost:# \` |                          | [icon: check, set=fas]Yes |
| A string representing the remote SSH session prompt.                                             |                 |                        |                          |                           |
| `sudoCommand`                                                                                    | `String`        | `/usr/bin/sudo`        |                          | [icon: check, set=fas]Yes |
| A string representing the sudo command.                                                          |                 |                        |                          |                           |
| `echoOff`                                                                                        | `boolean`       | `true`                 |                          | [icon: check, set=fas]Yes |
| Disable the input command echo.                                                                  |                 |                        |                          |                           |
| `terminalType`                                                                                   | `String`        | `vt102`                |                          | [icon: check, set=fas]Yes |
| Defines the terminal type to use for the session.                                                |                 |                        |                          |                           |
| `locale`                                                                                         | `String`        | `en_US.utf8`           |                          | [icon: check, set=fas]Yes |
| Define the locale for LC\_ALL, LANG and LANGUAGE environment variables to use if setLocale=true. |                 |                        |                          |                           |
| `setLocale`                                                                                      | `boolean`       | `false`                |                          | [icon: check, set=fas]Yes |
| Defines if the default environment locale should be changed with the value provided for locale.  |                 |                        |                          |                           |
| `connectionTimeout`                                                                              | `int`           | `5000`                 |                          | [icon: check, set=fas]Yes |
| Defines the connection timeout to the remote server in milliseconds.                             |                 |                        |                          |                           |
| `expectTimeout`                                                                                  | `long`          | `5000`                 |                          | [icon: check, set=fas]Yes |
| Defines the timeout used by the expect() calls in the scripts in milliseconds.                   |                 |                        |                          |                           |
| `throwOperationTimeoutException`                                                                 | `boolean`       | `true`                 |                          | [icon: check, set=fas]Yes |
| Defines if an OperationTimeoutException should be thrown if any call to expect times out.        |                 |                        |                          |                           |
| `promptReadyTimeout`                                                                             | `long`          | `20`                   |                          | [icon: times, set=fas]No  |
| Defines the "prompt ready" timeout for the promptReady() command in milliseconds.                |                 |                        |                          |                           |

(1) Whether the property value is considered confidential, and is therefore encrypted in IDM.

(2) A list of operations in this column indicates that the property is required for those operations.

### Groovy Engine configuration

| Property                                                                                                                                                                                       | Type            | Default                                                                                                          | Encrypted(1)             | Required(2)               |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------ | ------------------------- |
| `scriptRoots`                                                                                                                                                                                  | `String[]`      | `['!/scripts/kerberos/']`                                                                                        |                          | [icon: check, set=fas]Yes |
| The root folder to load the scripts from. If the value is null or empty the classpath value is used.                                                                                           |                 |                                                                                                                  |                          |                           |
| `classpath`                                                                                                                                                                                    | `String[]`      | `[]`                                                                                                             |                          | [icon: times, set=fas]No  |
| Classpath for use during compilation.                                                                                                                                                          |                 |                                                                                                                  |                          |                           |
| `debug`                                                                                                                                                                                        | `boolean`       | `false`                                                                                                          |                          | [icon: times, set=fas]No  |
| If true, debugging code should be activated.                                                                                                                                                   |                 |                                                                                                                  |                          |                           |
| `disabledGlobalASTTransformations`                                                                                                                                                             | `String[]`      | `null`                                                                                                           |                          | [icon: times, set=fas]No  |
| Sets a list of global AST transformations which should not be loaded even if they are defined in META-INF/org.codehaus.groovy.transform.ASTTransformation files. By default, none is disabled. |                 |                                                                                                                  |                          |                           |
| `minimumRecompilationInterval`                                                                                                                                                                 | `int`           | `100`                                                                                                            |                          | [icon: times, set=fas]No  |
| Sets the minimum of time after a script can be recompiled.                                                                                                                                     |                 |                                                                                                                  |                          |                           |
| `recompileGroovySource`                                                                                                                                                                        | `boolean`       | `false`                                                                                                          |                          | [icon: times, set=fas]No  |
| If set to true recompilation is enabled.                                                                                                                                                       |                 |                                                                                                                  |                          |                           |
| `scriptBaseClass`                                                                                                                                                                              | `String`        | `null`                                                                                                           |                          | [icon: times, set=fas]No  |
| Base class name for scripts (must derive from Script).                                                                                                                                         |                 |                                                                                                                  |                          |                           |
| `scriptExtensions`                                                                                                                                                                             | `String[]`      | `['groovy']`                                                                                                     |                          | [icon: times, set=fas]No  |
| Gets the extensions used to find groovy files.                                                                                                                                                 |                 |                                                                                                                  |                          |                           |
| `sourceEncoding`                                                                                                                                                                               | `String`        | `UTF-8`                                                                                                          |                          | [icon: times, set=fas]No  |
| Encoding for source files.                                                                                                                                                                     |                 |                                                                                                                  |                          |                           |
| `targetDirectory`                                                                                                                                                                              | `File`          | `null`                                                                                                           |                          | [icon: times, set=fas]No  |
| Directory into which to write classes.                                                                                                                                                         |                 |                                                                                                                  |                          |                           |
| `tolerance`                                                                                                                                                                                    | `int`           | `10`                                                                                                             |                          | [icon: times, set=fas]No  |
| The error tolerance, which is the number of non-fatal errors (per unit) that should be tolerated before compilation is aborted.                                                                |                 |                                                                                                                  |                          |                           |
| `verbose`                                                                                                                                                                                      | `boolean`       | `false`                                                                                                          |                          | [icon: times, set=fas]No  |
| If true, the compiler should produce action information.                                                                                                                                       |                 |                                                                                                                  |                          |                           |
| `warningLevel`                                                                                                                                                                                 | `int`           | `1`                                                                                                              |                          | [icon: times, set=fas]No  |
| Warning Level of the compiler.                                                                                                                                                                 |                 |                                                                                                                  |                          |                           |
| `customConfiguration`                                                                                                                                                                          | `String`        | `kadmin { cmd = '/usr/sbin/kadmin.local'; user='<KADMIN USERNAME>'; default_realm='<REALM, e.g. EXAMPLE.COM>' }` |                          | [icon: times, set=fas]No  |
| Custom Configuration script for Groovy ConfigSlurper.                                                                                                                                          |                 |                                                                                                                  |                          |                           |
| `customSensitiveConfiguration`                                                                                                                                                                 | `GuardedString` | `null`                                                                                                           | [icon: lock, set=fas]Yes | [icon: times, set=fas]No  |
| Custom Sensitive Configuration script for Groovy ConfigSlurper.                                                                                                                                |                 |                                                                                                                  |                          |                           |

(1) Whether the property value is considered confidential, and is therefore encrypted in IDM.

(2) A list of operations in this column indicates that the property is required for those operations.

### Operation Script Files

| Property                                                                                              | Type     | Default                           | Encrypted(1) | Required(2)                                                                                     |
| ----------------------------------------------------------------------------------------------------- | -------- | --------------------------------- | ------------ | ----------------------------------------------------------------------------------------------- |
| `authenticateScriptFileName`                                                                          | `String` | `null`                            |              | * [Authenticate](interfaces.html#interface-AuthenticationApiOp)                                 |
| The name of the file used to perform the AUTHENTICATE operation.                                      |          |                                   |              |                                                                                                 |
| `createScriptFileName`                                                                                | `String` | `CreateKerberos.groovy`           |              | - [Create](interfaces.html#interface-CreateApiOp)                                               |
| The name of the file used to perform the CREATE operation.                                            |          |                                   |              |                                                                                                 |
| `customizerScriptFileName`                                                                            | `String` | `null`                            |              | [icon: times, set=fas]No                                                                        |
| The script used to customize some function of the connector. Read the documentation for more details. |          |                                   |              |                                                                                                 |
| `deleteScriptFileName`                                                                                | `String` | `DeleteKerberos.groovy`           |              | * [Delete](interfaces.html#interface-DeleteApiOp)                                               |
| The name of the file used to perform the DELETE operation.                                            |          |                                   |              |                                                                                                 |
| `resolveUsernameScriptFileName`                                                                       | `String` | `null`                            |              | - [Resolve Username](interfaces.html#interface-ResolveUsernameApiOp)                            |
| The name of the file used to perform the RESOLVE\_USERNAME operation.                                 |          |                                   |              |                                                                                                 |
| `schemaScriptFileName`                                                                                | `String` | `SchemaKerberos.groovy`           |              | * [Schema](interfaces.html#interface-SchemaApiOp)                                               |
| The name of the file used to perform the SCHEMA operation.                                            |          |                                   |              |                                                                                                 |
| `scriptOnResourceScriptFileName`                                                                      | `String` | `ScriptOnResourceKerberos.groovy` |              | - [Script on Resource](interfaces.html#interface-ScriptOnResourceApiOp)                         |
| The name of the file used to perform the RUNSCRIPTONRESOURCE operation.                               |          |                                   |              |                                                                                                 |
| `searchScriptFileName`                                                                                | `String` | `SearchKerberos.groovy`           |              | * [Read](interfaces.html#interface-GetApiOp)

* [Search](interfaces.html#interface-SearchApiOp) |
| The name of the file used to perform the SEARCH operation.                                            |          |                                   |              |                                                                                                 |
| `syncScriptFileName`                                                                                  | `String` | `null`                            |              | - [Sync](interfaces.html#interface-SyncApiOp)                                                   |
| The name of the file used to perform the SYNC operation.                                              |          |                                   |              |                                                                                                 |
| `testScriptFileName`                                                                                  | `String` | `TestKerberos.groovy`             |              | * [Test](interfaces.html#interface-TestApiOp)                                                   |
| The name of the file used to perform the TEST operation.                                              |          |                                   |              |                                                                                                 |
| `updateScriptFileName`                                                                                | `String` | `UpdateKerberos.groovy`           |              | - [Update](interfaces.html#interface-UpdateApiOp)                                               |
| The name of the file used to perform the UPDATE operation.                                            |          |                                   |              |                                                                                                 |

(1) Whether the property value is considered confidential, and is therefore encrypted in IDM.

(2) A list of operations in this column indicates that the property is required for those operations.
