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.
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.
Removal 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
The credential selected to authenticate the creation must be a domain user and have explicit permission to manage local users on the target. Since authentication uses Kerberos, this account will be validated directly at the KDC.
- 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: fill in the domain 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 the
Enabledoption. - Just In Time type: select the
Credential creation and deletionoption. - Authentication setting: uncheck the
Use own credential to connectoption. - Authentication credential: select the domain credential that will authenticate the account creation and deletion.
- Just In Time setting: select the
- 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 and click Start session in the actions menu located on the right.
- Wait for the user to be created in the Windows environment.
- Check Executions > Password operations > All operations to confirm the creation process was performed and that the deletion status is
Waiting approval. - After the session ends, confirm that the deletion process was successfully executed, ensuring the ephemeral credential was destroyed.
Windows user creation may take a few minutes. This is a standard process inherent to the operating system, required for initial profile configuration.