# PAM Directory

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FaEHM1ja8afZHkaJRCpav%2FKeeperPAM%20Directory.jpg?alt=media&#x26;token=b99c8c27-4852-4e17-a09f-94527b83370e" alt=""><figcaption></figcaption></figure>

## Overview

A PAM Directory record is a type of KeeperPAM resource that represents an Active Directory or OpenLDAP service, either on-prem or hosted in the cloud.

<table><thead><tr><th width="215">PAM Record Type</th><th>Supported Assets</th></tr></thead><tbody><tr><td>PAM Directory</td><td>Active Directory, OpenLDAP</td></tr></tbody></table>

## Features Available

The PAM Machine resource supports the following features:

* Password rotation using either LDAP, LDAPS or WinRM
* Connections using RDP
* TCP Tunnels over any protocol
* Session recording and playback
* Sharing access without sharing credentials

{% hint style="info" %}
Connecting to the PAM Directory requires only that the Keeper Gateway has access to the target directory service. The Keeper Vault operates independently and does not require direct connectivity to the service, leveraging Keeper's zero-trust network access model to securely manage access through the Gateway. See the [network architecture diagram](https://docs.keeper.io/en/keeperpam/privileged-access-manager/getting-started/architecture/system-architecture) for more details.
{% endhint %}

## Creating a PAM Directory

Prior to creating a PAM Directory Record type, make sure you have already created a PAM Configuration. The PAM Configuration contains information of your target infrastructure while the PAM Directory contains information of an asset, such as a Active Directory server, within that target infrastructure.

To create a PAM Directory:

* Click on **Create New**
* Depending on your use case, click on "Rotation", "Tunnel", or "Connection"
* On the prompted window:
  * Select "**New Record**"
  * Select the Shared Folder you want the record to be created in
  * Specify the Title
  * Select "**Directory**" for the Target
* Click "**Next**" and complete all of the required information.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2Fbgi1mXTZeZNiLFj5n0yt%2FScreenshot%202024-12-28%20at%207.15.08%E2%80%AFPM.png?alt=media&#x26;token=496715e6-b203-4db3-b1df-bdc0b5f89d7d" alt=""><figcaption><p>Creating a PAM Directory</p></figcaption></figure>

## PAM **Directory** Record Type Fields

The following table lists all the configurable fields on the PAM Directory Record Type:

<table><thead><tr><th width="168">Field</th><th width="251">Description</th><th>Notes</th></tr></thead><tbody><tr><td>Hostname or IP Address</td><td>Address of the directory resource</td><td><strong>Required</strong></td></tr><tr><td>Port</td><td>Port to connect on</td><td><strong>Required</strong><br>Typically <strong>389</strong> or <strong>636</strong> (LDAP/LDAPS)<br><br>Active Directory only supports 636</td></tr><tr><td>Use SSL</td><td>Use SSL when connecting</td><td>Required for Active Directory</td></tr><tr><td>Alternative IPs</td><td>List of failover IPs for the directory, used for Discovery</td><td>Newline separated</td></tr><tr><td>Directory ID</td><td>Instance ID for AD resource in Azure and AWS hosted environments</td><td><strong>Required</strong> if Azure Active Directory or AWS Directory Service<br>AWS Example: "d-9a423d0d3b'</td></tr><tr><td>Directory Type</td><td>Directory type, used for formatting of messaging</td><td><strong>Required</strong><br>Must be <strong>Active Directory</strong> or <strong>OpenLDAP</strong></td></tr><tr><td>User Match</td><td>Match on OU to filter found users during Discovery</td><td><p><strong>Optional</strong><br>Either match the right side of the DN or surround with slashes for a regular expression.<br>Example: <code>OU=Users,DC=company,DC=com</code></p><p>Example: <code>/OU=Users/</code><br><br><br></p></td></tr><tr><td>Domain Name</td><td>domain managed by the directory</td><td><strong>Required</strong><br>Example: <code>some.company.com</code></td></tr><tr><td>Provider Group</td><td>Provider Group for directories hosted in Azure</td><td><strong>Required</strong> for directories hosted in Azure</td></tr><tr><td>Provider Region</td><td>AWS region of hosted directory</td><td><strong>Required</strong> for directories hosted in AWS<br>Example: <code>us-east-2</code></td></tr></tbody></table>

## PAM Settings and Administrative Credentials

On the "PAM Settings" section of the vault record, you can configure the KeeperPAM Connection and Tunnel settings and link a PAM User credential for performing rotations and connections. Tunnels do not require a linked credential.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2Fo90ZxGpSTinflyYmV0kq%2FScreenshot%202025-01-14%20at%209.18.43%E2%80%AFAM.png?alt=media&#x26;token=b0f52b45-5050-40d4-8c14-4cd89c755259" alt=""><figcaption><p>PAM Settings</p></figcaption></figure>

### PAM Settings

<table><thead><tr><th>Field</th><th width="235">Description</th><th>Required</th></tr></thead><tbody><tr><td>PAM Configuration</td><td>Associated PAM Configuration record which defines the environment</td><td><strong>Required</strong></td></tr><tr><td>Administrative Credential Record</td><td>Linked PAM User credential used for connection and administrative operations</td><td><strong>Required</strong></td></tr><tr><td>Protocol</td><td>Native protocol used for connecting the session from the Gateway to the target</td><td><strong>Required</strong></td></tr><tr><td>Session Recording</td><td>Options for recording sessions and typescripts</td><td>See <a href="https://github.com/Keeper-Security/gitbook-secrets-manager/blob/master/privileged-access-manager/session-recording-and-playback/README.md">session recording</a></td></tr><tr><td>Connection Parameters<br>(multiple)</td><td>Connection-specific protocol settings which can vary based on the protocol type</td><td>Depends on protocol. We recommend specifying the <strong>Connection Port</strong> at a minimum.</td></tr></tbody></table>

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FkmMyMNsM7zliUNYrl7Rc%2FScreenshot%202025-01-14%20at%209.25.01%E2%80%AFAM.png?alt=media&#x26;token=26d66869-50b0-4cdf-89d3-fc1b6c0d2fb0" alt=""><figcaption><p>PAM Settings</p></figcaption></figure>

Note: PAM User is only required to successfully configure connections and rotation, and not required for Tunnels.

**Configuration Steps:**

1. On the PAM Database record, navigate to the PAM Settings section
2. Select the PAM Configuration and Administrative Credential Record
3. To configure Keeper Connections and Keeper Tunnels settings, visit the following page:
   1. [Keeper Connections](https://docs.keeper.io/en/keeperpam/privileged-access-manager/connections)
   2. [Keeper Tunnels](https://docs.keeper.io/en/keeperpam/privileged-access-manager/tunnels)

The following screenshot is a PAM Directory Record with LDAPS rotation, RDP connections and LDAPS tunnels enabled:

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FN889gw5Jl0rhnS1MqRsI%2FScreenshot%202025-01-14%20at%209.15.20%E2%80%AFAM.png?alt=media&#x26;token=f56979d9-6e19-4fc3-a1c6-15936bb6c512" alt=""><figcaption><p>PAM Directory with Connection, Rotation and Tunnel Enabled</p></figcaption></figure>
