Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
docs: pam windows discovery docs
x0322050a9c3ccb971e
diff --git a/docs/docs.json b/docs/docs.jsonindex b19b838239..67a9106e89 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -826,6 +826,13 @@"documentation/platform/pam/getting-started/accounts"]},+ {+ "group": "Discovery",+ "pages": [+ "documentation/platform/pam/discovery/overview",+ "documentation/platform/pam/discovery/active-directory"+ ]+ },"documentation/platform/pam/architecture"]},diff --git a/docs/documentation/platform/pam/discovery/active-directory.mdx b/docs/documentation/platform/pam/discovery/active-directory.mdxnew file mode 100644index 0000000000..4b30ec1345--- /dev/null+++ b/docs/documentation/platform/pam/discovery/active-directory.mdx@@ -0,0 +1,160 @@+---+title: "Active Directory Discovery"+sidebarTitle: "Active Directory"+description: "Automatically discover Windows servers, domain accounts, local accounts, and service dependencies across your Active Directory environment."+---++Active Directory Discovery connects to your domain controller via LDAP, enumerates all computers and user accounts in the domain, and then scans each machine for service dependencies via WinRM.++## What Gets Discovered++### Resources++Every computer object in Active Directory is imported as a **Windows Server** PAM Resource. For each machine, Discovery resolves the DNS hostname to an IP address and captures:++- Computer name and DNS hostname+- Operating system and version+- Object GUID++### Accounts++Discovery imports two categories of accounts:++**Domain Accounts** — User objects from Active Directory, associated with the AD Server resource. Each account includes:+- Username and User Principal Name (UPN)+- Account type (User or Service) — detected by the presence of Service Principal Names (SPNs) or naming conventions like `svc-*`+- AD GUID, last logon time, and password last set date++**Local Accounts** — User accounts local to each Windows machine, discovered via WinRM. Each account includes:+- Username and SID+- Enabled/disabled status+- Last logon time and password last set date++### Dependencies++For each Windows machine reachable via WinRM, Discovery enumerates:++| Dependency Type | What's Captured |+|-----------------|-----------------|+| **Windows Services** | Service name, display name, state, start mode, path, and the account it runs as |+| **Scheduled Tasks** | Task name, path, logon type, run level, triggers, actions, last/next run time, and the account it runs as |+| **IIS App Pools** | Pool name, runtime version, pipeline mode, auto-start setting, identity type, and the account it runs as |++Each dependency is automatically linked to the PAM Account whose credentials it uses. Discovery resolves account references in multiple formats including `DOMAIN\user`, `[email protected]`, UPN, and local account names.++## Prerequisites++1. **Infisical Gateway** — Deployed in your network with access to the domain controller and Windows machines+2. **LDAP access** — The domain controller must be reachable on the LDAP port (default: 389)+3. **AD credentials** — A domain account with read access to query computer and user objects via LDAP+4. **WinRM access** (optional, for dependency scanning) — Target Windows machines should have WinRM enabled on port 5985++<Warning>+ Machines without WinRM enabled will be skipped during the dependency scan phase. This is expected for domain controllers and machines not configured for remote management. These are reported as machine-level errors in the run details.+</Warning>++## Setup++<Steps>+ <Step title="Ensure Gateway is Running">+ Deploy an [Infisical Gateway](/documentation/platform/gateways/overview) in your network with connectivity to your domain controller (LDAP port) and Windows machines (WinRM port 5985).+ </Step>++ <Step title="Create a Discovery Source">+ 1. Navigate to your PAM project and go to the **Discovery** tab+ 2. Click **Add Discovery Source** and select **Active Directory**+ 3. Fill in the configuration:++ <ParamField path="Name" type="string" required>+ A friendly name for this discovery source (e.g., `corp-ad-discovery`)+ </ParamField>++ <ParamField path="Gateway" type="string" required>+ Select the Gateway that has network access to your domain controller and Windows machines+ </ParamField>++ <ParamField path="Domain FQDN" type="string" required>+ The fully-qualified domain name (e.g., `corp.example.com`)+ </ParamField>++ <ParamField path="DC Address" type="string" required>+ The hostname or IP address of the domain controller (e.g., `10.0.1.10`)+ </ParamField>++ <ParamField path="Port" type="number" required>+ The LDAP port (default: `389`)+ </ParamField>++ <ParamField path="Username" type="string" required>+ An Active Directory account with read access to query the directory+ </ParamField>++ <ParamField path="Password" type="string" required>+ The password for the AD account+ </ParamField>++ <ParamField path="Schedule" type="string">+ How often to run discovery automatically:+ - **Manual** — Only runs when triggered+ - **Daily** — Runs once per day+ - **Weekly** — Runs once per week+ </ParamField>++ Clicking **Create** will validate the LDAP connection through the Gateway before saving.+ </Step>++ <Step title="Run a Discovery Scan">+ After creating the source, click **Trigger Scan** to start the first discovery run. You can monitor progress in real-time from the **Runs** tab.+ </Step>+</Steps>++## Scan Phases++Each discovery scan executes two phases sequentially:++### Phase 1: AD Enumeration++Connects to the domain controller via LDAP through the Gateway and:++1. Queries all **computer objects** — creates or updates a Windows Server PAM Resource for each+2. Queries all **user objects** — creates or updates PAM Accounts, classifying each as a User or Service account+3. Marks resources and accounts not found in this scan as **Stale**++### Phase 2: Dependency Scan++For each discovered Windows machine, connects via WinRM through the Gateway and:++1. Runs PowerShell commands to enumerate Windows Services, Scheduled Tasks, and IIS App Pools+2. Discovers **local user accounts** on each machine+3. Resolves each dependency's run-as account to link it to the correct PAM Account+4. Reports per-machine errors for machines that are unreachable or don't have WinRM enabled++## Reviewing Results++After a scan completes, review the results from the discovery source detail page:++- **Runs tab** — Shows scan history with status, duration, and counts of discovered/new/stale items. Expand a run to see per-phase progress and any machine-level errors.+- **Resources tab** — Lists all discovered Windows servers with OS version, dependency count, and stale/active status. Click a resource to navigate to its detail page.+- **Accounts tab** — Lists all discovered accounts with their resource, account type, dependency count, last logon, and stale/active status. Click an account to navigate to its detail page.++### Viewing Dependencies++From an account's detail page, select the **Dependencies** tab to see all services, tasks, and app pools that run under that account's credentials. Each dependency shows:++- Name and type (Service, Task, or App Pool)+- The resource (machine) it runs on+- Current state (e.g., Running, Stopped)+- Whether it's enabled for credential rotation++### Enabling Dependencies for Rotation++Dependencies are discovered with rotation **disabled** by default. To include a dependency in credential rotation:++1. Navigate to the account's **Dependencies** tab+2. Click the menu on a dependency and select **Enable**++When the account's password is rotated, Infisical will automatically update the credentials for all enabled dependencies.++<Info>+ The enabled/disabled state of a dependency is never overwritten by subsequent discovery scans. Your configuration is always preserved.+</Info>diff --git a/docs/documentation/platform/pam/discovery/overview.mdx b/docs/documentation/platform/pam/discovery/overview.mdxnew file mode 100644index 0000000000..e750f7c26f--- /dev/null+++ b/docs/documentation/platform/pam/discovery/overview.mdx@@ -0,0 +1,98 @@+---+title: "Discovery"+sidebarTitle: "Overview"+description: "Automatically discover privileged accounts, resources, and service dependencies across your infrastructure."+---++Infisical PAM Discovery automates the process of finding and cataloging privileged accounts, resources, and service dependencies in your environment. Instead of manually enumerating every server, account, and service, Discovery scans your infrastructure and builds a complete inventory automatically.++## How It Works++Discovery operates in phases that vary by source type. A typical scan includes:++```mermaid+flowchart LR+ DS[Discovery Source] --> P1[Phase 1<br/>Infrastructure Scan]+ P1 --> R[Resources]+ P1 --> A[Accounts]+ P1 --> P2[Phase 2<br/>Dependency Scan]+ P2 --> D[Dependencies]+```++1. **Infrastructure Scan** — Connects to your environment and enumerates machines and accounts. Each machine becomes a PAM Resource, and each account becomes a PAM Account.++2. **Dependency Scan** — Connects to each discovered machine and enumerates services and tasks that run under specific accounts. These are stored as **Dependencies** linked to the account whose credentials they use.++All network traffic flows through your [Infisical Gateway](/documentation/platform/gateways/overview), so no inbound firewall rules are needed.++## Core Concepts++<CardGroup cols={3}>+ <Card title="Discovery Source" icon="radar">+ A configured scan target that defines where and how to discover resources and accounts in your environment.+ </Card>+ <Card title="Discovery Run" icon="play">+ A single execution of a scan. Runs can be triggered manually or on a schedule.+ </Card>+ <Card title="Dependency" icon="link">+ A service, task, or application that runs under a discovered account's credentials.+ </Card>+</CardGroup>++### Discovery Sources++A Discovery Source is the configuration that tells Infisical what to scan. It includes:++- **Connection details** — How to reach the target environment (addresses, ports, protocols)+- **Credentials** — An account with the necessary access to perform the scan (encrypted at rest)+- **Gateway** — The Infisical Gateway that routes scan traffic into your network+- **Schedule** — Manual, daily, or weekly++### Discovery Runs++Each scan creates a Run record that tracks:++- **Status** — Running, completed, or failed+- **Phase progress** — Per-phase status with machine-level error details+- **Discovery counts** — How many resources, accounts, and dependencies were found, including counts of newly discovered and stale items++### Staleness Tracking++Resources and accounts that were present in a previous run but not found in the current run are marked as **Stale**. Stale items are never automatically deleted — they remain visible with a "Stale" badge so you can investigate why a previously-discovered item is no longer responding.++### Dependencies++Dependencies represent services and tasks that rely on a specific account's credentials. Discovery currently detects three types:++| Type | Description |+|------|-------------|+| **Windows Service** | A Windows service configured to run under a specific account |+| **Scheduled Task** | A Windows scheduled task that runs under a specific account |+| **IIS App Pool** | An IIS application pool configured with a specific identity |++Each dependency has an **Enabled** toggle that defaults to off. When enabled, Infisical will automatically update the dependency's credentials after rotating the linked account's password during [credential rotation](/documentation/platform/pam/product-reference/credential-rotation).++<Info>+ Dependencies discovered by a scan will never have their **Enabled** status overwritten by subsequent scans. Your explicit enable/disable decisions are always preserved.+</Info>++## Supported Discovery Types++<CardGroup cols={2}>+ <Card title="Active Directory" icon="windows" href="/documentation/platform/pam/discovery/active-directory">+ Discover domain-joined Windows servers, domain and local user accounts, and service dependencies across your AD environment.+ </Card>+</CardGroup>++## Prerequisites++Prerequisites vary by discovery type, but all sources require:++1. **Infisical Gateway** — A Gateway deployed in your network with access to the target infrastructure+2. **Scan credentials** — An account with the necessary permissions to enumerate your environment (encrypted at rest)++Refer to the specific discovery type documentation for detailed prerequisites.++<Warning>+ Discovery requires an Infisical Gateway. All scan traffic is routed through the Gateway. No direct connectivity from Infisical to your infrastructure is needed.+</Warning>diff --git a/docs/documentation/platform/pam/overview.mdx b/docs/documentation/platform/pam/overview.mdxindex 50075402a2..6c9cc7adc3 100644--- a/docs/documentation/platform/pam/overview.mdx+++ b/docs/documentation/platform/pam/overview.mdx@@ -89,6 +89,7 @@ Infisical PAM supports a variety of resource types:## Core Capabilities+- **[Discovery](/documentation/platform/pam/discovery/overview)**: Automatically discover resources, accounts, and service dependencies across your infrastructure.- **[Access Policies](/documentation/platform/pam/product-reference/access-policies)**: Configure approval policies for PAM account access using resource and account name matching.- **[Auditing](/documentation/platform/pam/product-reference/auditing)**: Track and review a comprehensive log of all user actions and system events.- **[Session Recording](/documentation/platform/pam/product-reference/session-recording)**: Record and playback user sessions for security reviews, compliance, and troubleshooting.