This document provides instructions on how to configure support for Just-in-Time (JIT) accounts using the Executions module and PAM Core. This process allows an ephemeral local account to be created via Ansible using Kerberos authentication, and automatically removed after the session ends.
When configured in Credential creation and deletion mode, multiple users can use the same credential simultaneously. In this case, each user receives their own independent ephemeral account, with no shared state between sessions.
Requirements
- Permission to create new credentials in the Segura® Platform.
- Windows target devices joined to a domain.
- A domain credential with permission to authenticate the creation.
Step 1: Create automation templates
You will need two distinct templates in the Executions module to manage the account lifecycle.
Creation template
- In the Segura® Platform, in the navigation bar, hover over the Products menu and select Executions.
- In the side menu, select Template control > Templates.
- Click Add and complete the following fields:
- Name*: enter the template name (e.g.,
Windows JIT Kerberos - Create). - Status: keep enabled to activate the template.
- Executor: select
Ansible. - Execution type: select
New user. - Playbook: select
Windows Kerberos create local user. - Inventory: select
Windows-PSRP-Kerberos.
- Name*: enter the template name (e.g.,
- Click Save.
If your environment uses the Network Connector to reach the target device, select the SNC Windows Kerberos create local user playbook and the SNC-Windows-PSRP-Kerberos inventory.
Deletion template
- Still on the Templates screen, click Add to create the deletion template and complete the following fields:
- Name*: enter the template name (e.g.,
Windows JIT Kerberos - Delete). - Status: keep enabled to activate the template.
- Executor: select
Ansible. - Execution type: select
User delete. - Playbook: select
Windows Kerberos delete local user. - Inventory: select
Windows-PSRP-Kerberos.
- Name*: enter the template name (e.g.,
- Click Save.
As before, if your environment uses the Network Connector to reach the target device, select the SNC Windows Kerberos delete local user playbook and the SNC-Windows-PSRP-Kerberos inventory.
Step 2: Configure authentication and JIT in PAM Core
- In the Segura® Platform, in the navigation bar, hover over the Products menu and select PAM Core.
- In the side menu, select Credentials > All credentials.
- In the upper-right corner, click Add.
- On the Credential registration screen, access the Information tab and complete the following fields:
- Username: enter the username (e.g.,
jit-kerberos-windows). - Password type: select
Local User. - Device: select the device where the account will be created.
- Domain: select the domain filled entirely in uppercase letters.
- Additional Information: enter the KDC hostname in the format
{"KDC": "hostname"}.
- Username: enter the username (e.g.,
- Access the Additional Settings tab and complete the following fields:
- Additional authentication fields: click Add.
- Name: fill with
USE_KERBEROS. - Value: fill with
true.
- Access the JIT Settings tab and complete the following fields:
- Just In Time setting: select
Enabled. - Just In Time type: select
Credential creation and deletion. In this mode, multiple users can have simultaneous active grants for the same credential. Each grant generates an independent ephemeral account with its own expiration time.AttentionThe same user cannot have 2 simultaneous active JIT grants for the same credential. The second request will be denied while the first one is still active.
- Authentication setting: uncheck the
Use own credential to connectoption. - Authentication credential: select the domain credential that will authenticate the account creation and deletion. The credential selected must have explicit permission to manage local users on the target. Since authentication uses Kerberos, this account will be validated directly at the KDC.
- Just In Time setting: select
- Navigate to the Credential creation and deletion section and complete the following fields:
- Credential creation plugin: select
Ansible. - Credential creation template: select the template configured in step 1.
- Credential removal plugin: select
Ansible. - Credential removal template: select the template configured in step 1.
- Credential creation plugin: select
- Click Continue or go directly to the Review tab and click Save at the bottom of the page.
Although the machines are in a domain context to allow Kerberos authentication, the users created by the playbook will always be local to the target device.
Step 3: Validate the operation
- In the credential list, identify the newly created credential, click the Actions menu and select Start session.
- Wait for the user to be created in the Windows environment. This is a standard process inherent to the operating system, required for initial profile configuration.
- Check Executions > Password operations > All operations to confirm the creation process was performed and that the deletion status is
Waiting approval. When multiple simultaneous grants are created for the same credential, each grant displays its own requester, status, and expiration time, and is handled independently by the system. - After the session ends, confirm that the deletion process was successfully executed, ensuring the ephemeral credential was removed.
If account creation takes too long or returns an error, you can check the detailed Ansible log in Executions > Operations automation > Executions. Locate the task, click the Details icon, and check the Standard output (stdout) tab to identify which task the automation was interrupted.