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: pass 2
Sheen Capadngan894996fef3d7
diff --git a/docs/cli/commands/pam.mdx b/docs/cli/commands/pam.mdxindex 1a962da67e..8557a30a98 100644--- a/docs/cli/commands/pam.mdx+++ b/docs/cli/commands/pam.mdx@@ -1,432 +1,222 @@---title: "infisical pam"-description: "Access databases, SSH servers, Kubernetes clusters, and Redis instances through Infisical's Privileged Access Management"+description: "Access databases, SSH servers, Kubernetes clusters, AWS IAM roles, and Windows servers through Infisical's Privileged Access Management"---```bash-infisical pam <resource-type> <subcommand> [flags]+infisical pam access <path> [flags]```## Description-The `infisical pam` command provides privileged access management capabilities for securely accessing databases, SSH servers, Kubernetes clusters, and Redis instances through Infisical's Gateway.+The `infisical pam` command provides privileged access management capabilities for securely accessing databases, SSH servers, Kubernetes clusters, AWS IAM roles, and Windows/RDP servers through Infisical's Gateway.-All PAM commands require the user to be logged in via `infisical login`.+All PAM commands require:+- The user to be logged in via `infisical login`+- An [Infisical Gateway](/documentation/platform/pam/gateway-deployment) running in the target network### Command Structure```infisical pam-├── db-│ └── access (start local database proxy)-├── ssh-│ ├── access (start interactive SSH session)-│ ├── exec (execute single command over SSH)-│ └── proxy (start SSH proxy for SCP/SFTP/rsync)-├── kubernetes (alias: k8s)-│ └── access (start local Kubernetes proxy)-└── redis- └── access (start local Redis proxy)+└── access <path> # unified, path-based access to all PAM resources```-## Subcommands & flags+## infisical pam access-<Accordion title="infisical pam db" defaultOpen="true">- Access PAM database accounts. Starts a local database proxy server that you can use to connect to databases directly (PostgreSQL, MySQL, MS SQL Server).+Access PAM-managed resources through Infisical's Gateway. This unified command handles all resource types — databases, SSH servers, Kubernetes clusters, AWS IAM roles, and Windows/RDP servers. The account type is determined by the template assigned to the account.```bash-$ infisical pam db access --resource <resource-name> --account <account-name> [flags]--# Example-$ infisical pam db access --resource infisical-shared-cloud-instances --account infisical --project-id <project-uuid> --duration 4h+infisical pam access <path> [flags]```-### Flags-- <Accordion title="--resource">- Name of the PAM resource to access.-- ```bash- # Example- infisical pam db access --resource=my-database-resource --account=admin- ```+### Arguments- </Accordion>+| Argument | Description |+|----------|-------------|+| `<path>` | **Required.** Path to the PAM account in format `folder/account-name` |- <Accordion title="--account">- Name of the account within the resource.+### Flags- ```bash- # Example- infisical pam db access --resource=my-database-resource --account=admin- ```+<Accordion title="--duration">+ Session duration. Supports Go duration format (e.g., `1h`, `30m`, `2h30m`).- </Accordion>+ Default value: `1h`- <Accordion title="--project-id">- Project ID of the account to access. If not provided, uses the project from `.infisical.json` (run `infisical init` to configure).+ ```bash+ # Example+ infisical pam access production/postgres-main --duration 4h+ ```+</Accordion>- ```bash- # Example- infisical pam db access --resource=my-database-resource --account=admin --project-id=<project-uuid>- ```+<Accordion title="--reason">+ Audit reason for access. Required by some policies; prompts interactively if TTY available.- </Accordion>+ ```bash+ # Example+ infisical pam access production/database --reason "Investigating incident INC-1234"+ ```+</Accordion>- <Accordion title="--duration">- Duration for database access session. Supports Go duration format (e.g., `1h`, `30m`, `2h30m`).+<Accordion title="--port">+ Local proxy port. Use `0` for auto-assign.- Default value: `1h`+ Default value: `0`- ```bash- # Example- infisical pam db access --resource=my-database-resource --account=admin --duration=4h- ```+ ```bash+ # Example+ infisical pam access staging/mysql-replica --port 3306+ ```+</Accordion>- </Accordion>+<Accordion title="--target">+ Target host for multi-host accounts (e.g., Windows AD environments).- <Accordion title="--port">- Port for the local database proxy server. Use `0` for auto-assign.+ ```bash+ # Example+ infisical pam access windows/domain-admin --target dc01.corp.local+ ```+</Accordion>- Default value: `0`+<Accordion title="--domain">+ Domain of your self-hosted Infisical instance. If not specified, defaults to Infisical Cloud.- ```bash- # Example- infisical pam db access --resource=my-database-resource --account=admin --port=5432- ```+ ```bash+ # Example+ infisical pam access production/database --domain https://your-infisical-instance.com+ ```+</Accordion>- </Accordion>+## Account Types and Behavior- <Accordion title="--domain">- Domain of your self-hosted Infisical instance. If not specified, defaults to Infisical Cloud.+Based on the account's template, the CLI starts the appropriate local proxy or credential helper.- ```bash- # Example- infisical pam db access --resource=my-database-resource --account=admin --domain=https://your-infisical-instance.com- ```+### Databases (PostgreSQL, MySQL, SQL Server, MongoDB)- </Accordion>+Starts a local database proxy on `127.0.0.1`. Connect using standard database clients — no password required as authentication is handled by the proxy.-### Output+```bash+# Example+infisical pam access production/postgres-main --duration 2h+```-The command displays a connection string based on the database type:+The output includes connection details and CLI examples:| Database Type | Connection String Format ||--------------|-------------------------|-| PostgreSQL | `postgres://<username>@localhost:<port>/<database>` |-| MySQL | `mysql://<username>@localhost:<port>/<database>` |-| MS SQL Server | `sqlserver://<username>@localhost:<port>?database=<database>&encrypt=false&trustServerCertificate=true` |+| PostgreSQL | `postgres://<username>@127.0.0.1:<port>/<database>` |+| MySQL | `mysql://<username>@127.0.0.1:<port>/<database>` |+| SQL Server | `sqlserver://<username>@127.0.0.1:<port>?database=<database>` |+| MongoDB | `mongodb://127.0.0.1:<port>/<database>` |-</Accordion>+### SSH-<Accordion title="infisical pam ssh">- Access PAM SSH accounts. Provides interactive sessions, single command execution, and proxy mode for file transfers.+Starts a local SSH proxy. Use standard SSH/SCP/SFTP/rsync commands to connect.```bash-$ infisical pam ssh <subcommand> --resource <resource-name> --account <account-name> [flags]+# Start the proxy+infisical pam access servers/prod-bastion```-### Subcommands-- <Accordion title="access">- Start an interactive SSH session to a PAM-managed SSH account. This command automatically launches an SSH client connected through the Infisical Gateway.-- ```bash- $ infisical pam ssh access --resource <resource-name> --account <account-name> [flags]-- # Example- $ infisical pam ssh access --resource prod-servers --account root --project-id <project-uuid> --duration 1h- ```-- </Accordion>-- <Accordion title="exec">- Execute a single command on a PAM-managed SSH account and return the output. This is useful for CI/CD pipelines and scripting where interactive sessions are not needed.-- ```bash- $ infisical pam ssh exec "<command>" --resource <resource-name> --account <account-name> [flags]-- # Example- $ infisical pam ssh exec "ls -la /var/log" --resource prod-servers --account root --project-id <project-uuid>-- # Use in a script to capture output- $ OUTPUT=$(infisical pam ssh exec "cat /etc/hostname" --resource prod-servers --account root --project-id <project-uuid>)- ```-- <Info>- The exit code from the remote command is propagated to the CLI exit code, making this suitable for scripts that check command success.- </Info>-- | Argument | Description |- |----------|-------------|- | `command` | The command to execute on the remote server (passed as first argument) |-- </Accordion>-- <Accordion title="proxy">- Start an SSH proxy without launching an interactive session. This is useful for file transfers using SCP, SFTP, rsync, or other SSH-based tools. The proxy prints connection details and waits until terminated with Ctrl+C.-- ```bash- $ infisical pam ssh proxy --resource <resource-name> --account <account-name> [flags]-- # Example- $ infisical pam ssh proxy --resource prod-servers --account root --project-id <project-uuid>- # Output:- # SSH proxy listening on 127.0.0.1:53619- # Username: root- # Session expires: 2026-04-02T09:25:08+08:00- #- # Use this proxy with SSH, SCP, SFTP, or rsync:- # ssh -p 53619 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected]- # scp -P 53619 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null <local-file> [email protected]:<remote-path>- #- # Press Ctrl+C to stop the proxy.- ```-- #### Using the Proxy-- In another terminal, use the proxy for file transfers:-- ```bash- # SCP file transfer- scp -P <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null local-file.txt [email protected]:/remote/path/-- # rsync- rsync -e "ssh -p <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" local-dir/ [email protected]:/remote/path/-- # SFTP- sftp -P <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected]- ```-- </Accordion>--### Flags--All SSH subcommands share the following flags:-- <Accordion title="--resource">- Name of the PAM resource to access.-- ```bash- # Example- infisical pam ssh access --resource=prod-servers --account=root- ```-- </Accordion>-- <Accordion title="--account">- Name of the account within the resource.-- ```bash- # Example- infisical pam ssh access --resource=prod-servers --account=root- ```-- </Accordion>-- <Accordion title="--project-id">- Project ID of the account to access. If not provided, uses the project from `.infisical.json`.-- ```bash- # Example- infisical pam ssh access --resource=prod-servers --account=root --project-id=<project-uuid>- ```-- </Accordion>+Then connect using your SSH client:- <Accordion title="--duration">- Duration for SSH access session. Supports Go duration format (e.g., `1h`, `30m`, `2h30m`).-- Default value: `1h`-- ```bash- # Example- infisical pam ssh access --resource=prod-servers --account=root --duration=2h- ```-- </Accordion>-- <Accordion title="--port">- Port for the local SSH proxy server (only applies to `proxy` subcommand). Use `0` for auto-assign.-- Default value: `0`-- ```bash- # Example- infisical pam ssh proxy --resource=prod-servers --account=root --port=2222- ```-- </Accordion>-- <Accordion title="--domain">- Domain of your self-hosted Infisical instance. If not specified, defaults to Infisical Cloud.-- ```bash- # Example- infisical pam ssh access --resource=prod-servers --account=root --domain=https://your-infisical-instance.com- ```+```bash+# SSH+ssh -p <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected]- </Accordion>+# SCP file transfer+scp -P <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null file.txt [email protected]:/path/-</Accordion>+# rsync+rsync -e "ssh -p <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" local-dir/ [email protected]:/remote/path/+```-<Accordion title="infisical pam kubernetes">- Access Kubernetes via a PAM-managed Kubernetes account. This command automatically launches a proxy connected to your Kubernetes cluster through the Infisical Gateway.+### Kubernetes- **Alias:** `infisical pam k8s`+Starts a local Kubernetes proxy and automatically configures kubectl context.```bash-$ infisical pam kubernetes access --resource <resource-name> --account <account-name> [flags]-# Example-$ infisical pam kubernetes access --resource prod-cluster --account developer --project-id <project-uuid> --duration 4h--# Using the alias-$ infisical pam k8s access --resource prod-cluster --account developer --project-id <project-uuid>+infisical pam access clusters/prod-cluster --duration 4h```-### Flags-- <Accordion title="--resource">- Name of the PAM resource to access.-- ```bash- # Example- infisical pam kubernetes access --resource=prod-cluster --account=developer- ```-- </Accordion>-- <Accordion title="--account">- Name of the account within the resource.-- ```bash- # Example- infisical pam kubernetes access --resource=prod-cluster --account=developer- ```-- </Accordion>-- <Accordion title="--project-id">- Project ID of the account to access. If not provided, uses the project from `.infisical.json`.-- ```bash- # Example- infisical pam kubernetes access --resource=prod-cluster --account=developer --project-id=<project-uuid>- ```-- </Accordion>+kubectl is automatically configured with a context named `infisical-k8s-pam/folder/account-name`. Use kubectl normally:- <Accordion title="--duration">- Duration for Kubernetes access session. Supports Go duration format (e.g., `1h`, `30m`, `2h30m`).-- Default value: `1h`-- ```bash- # Example- infisical pam kubernetes access --resource=prod-cluster --account=developer --duration=4h- ```-- </Accordion>-- <Accordion title="--port">- Port for the local Kubernetes proxy server. Use `0` for auto-assign.-- Default value: `0`-- ```bash- # Example- infisical pam kubernetes access --resource=prod-cluster --account=developer --port=8080- ```-- </Accordion>-- <Accordion title="--domain">- Domain of your self-hosted Infisical instance. If not specified, defaults to Infisical Cloud.-- ```bash- # Example- infisical pam kubernetes access --resource=prod-cluster --account=developer --domain=https://your-infisical-instance.com- ```+```bash+kubectl get pods+kubectl get namespaces+```- </Accordion>+The original kubeconfig context is restored when the session ends.-</Accordion>+### AWS IAM-<Accordion title="infisical pam redis">- Access PAM Redis accounts. Starts a local Redis proxy server that you can use to connect to Redis directly.+Writes temporary STS credentials to your AWS credentials file (`~/.aws/credentials` or wherever `AWS_SHARED_CREDENTIALS_FILE` points).```bash-$ infisical pam redis access --resource <resource-name> --account <account-name> [flags]-# Example-$ infisical pam redis access --resource my-redis-resource --account redis-admin --duration 4h --port 6379 --project-id <project-uuid>+infisical pam access aws/production-role```-### Flags-- <Accordion title="--resource">- Name of the PAM resource to access.+The credentials are written as a named profile: `infisical-pam/folder/account-name`- ```bash- # Example- infisical pam redis access --resource=my-redis-resource --account=redis-admin- ```+Use with the AWS CLI:- </Accordion>-- <Accordion title="--account">- Name of the account within the resource.+```bash+# Use --profile flag+aws s3 ls --profile "infisical-pam/aws/production-role"- ```bash- # Example- infisical pam redis access --resource=my-redis-resource --account=redis-admin- ```+# Or export the profile+export AWS_PROFILE="infisical-pam/aws/production-role"+aws s3 ls+```- </Accordion>+The session blocks until `Ctrl+C` or credential expiry. When the session ends, the profile is removed from the credentials file.- <Accordion title="--project-id">- Project ID of the account to access. If not provided, uses the project from `.infisical.json`.+### Windows / RDP- ```bash- # Example- infisical pam redis access --resource=my-redis-resource --account=redis-admin --project-id=<project-uuid>- ```+Starts a local RDP proxy. Connect your RDP client to `127.0.0.1` on the assigned port.- </Accordion>+```bash+# Single-server Windows account+infisical pam access windows/admin-server- <Accordion title="--duration">- Duration for Redis access session. Supports Go duration format (e.g., `1h`, `30m`, `2h30m`).+# Windows AD with multiple targets+infisical pam access windows/domain-admin --target dc01.corp.local+```- Default value: `1h`+Connect using your preferred RDP client (e.g., Microsoft Remote Desktop, xfreerdp, Remmina).- ```bash- # Example- infisical pam redis access --resource=my-redis-resource --account=redis-admin --duration=4h- ```+## MFA Support- </Accordion>+If your organization requires MFA for PAM access:- <Accordion title="--port">- Port for the local Redis proxy server. Use `0` for auto-assign.+1. CLI detects `SESSION_MFA_REQUIRED` response+2. Browser opens to MFA verification page+3. CLI polls for up to 5 minutes for completion+4. Access continues automatically after MFA verification- Default value: `0`+## Reason Prompting- ```bash- # Example- infisical pam redis access --resource=my-redis-resource --account=redis-admin --port=6379- ```+Some PAM policies require an audit reason. Behavior:- </Accordion>+| Scenario | Behavior |+|----------|----------|+| With `--reason` flag | Uses provided reason |+| Interactive terminal (TTY) | Prompts for reason if required |+| Non-interactive (CI/CD) | Fails with error if reason required but not provided |- <Accordion title="--domain">- Domain of your self-hosted Infisical instance. If not specified, defaults to Infisical Cloud.+```bash+# Provide reason via flag+infisical pam access production/database --reason "Investigating incident INC-1234"+```- ```bash- # Example- infisical pam redis access --resource=my-redis-resource --account=redis-admin --domain=https://your-infisical-instance.com- ```+## Error Messages- </Accordion>+| Error | Cause | Solution |+|-------|-------|----------|+| `Invalid duration format` | Malformed `--duration` value | Use formats like `1h`, `30m`, `2h30m` |+| `a reason is required to access this account` | Policy requires reason, no TTY | Pass `--reason` flag |+| `Gateway does not support '{type}' PAM accounts` | Gateway version too old | Upgrade Infisical Gateway |+| `PAM response metadata is missing` | API response incomplete | Contact support |-</Accordion>diff --git a/docs/docs.json b/docs/docs.jsonindex 4a708543a5..e2d9a0431b 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -984,7 +984,14 @@"pages": ["documentation/platform/pam/accounts/overview","documentation/platform/pam/accounts/postgresql",- "documentation/platform/pam/accounts/ssh"+ "documentation/platform/pam/accounts/mysql",+ "documentation/platform/pam/accounts/mssql",+ "documentation/platform/pam/accounts/mongodb",+ "documentation/platform/pam/accounts/ssh",+ "documentation/platform/pam/accounts/kubernetes",+ "documentation/platform/pam/accounts/aws-iam",+ "documentation/platform/pam/accounts/windows",+ "documentation/platform/pam/accounts/windows-ad"]},{diff --git a/docs/documentation/platform/pam/accounts/aws-iam.mdx b/docs/documentation/platform/pam/accounts/aws-iam.mdxnew file mode 100644index 0000000000..f901355c0f--- /dev/null+++ b/docs/documentation/platform/pam/accounts/aws-iam.mdx@@ -0,0 +1,92 @@+---+title: "AWS IAM Accounts"+sidebarTitle: "AWS IAM"+description: "Add and connect to AWS accounts via IAM role assumption."+---++AWS IAM accounts let you manage access to AWS through IAM role assumption. Users can open the AWS console directly or use the CLI to get temporary credentials, and every access is logged.++<Note>+AWS IAM accounts do not require a Gateway — Infisical connects directly to AWS.+</Note>++## Creating an Account++<Steps>+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.+ </Step>+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select an AWS IAM [template](/documentation/platform/pam/templates/overview).+ </Step>+ <Step title="Enter connection details">+ | Field | Description |+ |-------|-------------|+ | **Name** | A descriptive name (e.g., `prod-admin-access`) |+ | **PAM Role ARN** | The ARN of the IAM role that Infisical assumes to broker access |+ </Step>+ <Step title="Enter credentials">+ | Field | Description |+ |-------|-------------|+ | **Target Role ARN** | The ARN of the IAM role the user will assume |+ </Step>+ <Step title="Save">+ Click **Create**.+ </Step>+</Steps>++## How It Works++When a user accesses an AWS IAM account:++1. Infisical assumes the **PAM Role** (configured at the account level)+2. Using that role, Infisical assumes the **Target Role** on behalf of the user+3. The user receives temporary AWS credentials for the target role++This lets you centralize access control through Infisical while using standard AWS IAM roles.++## Connecting++<Tabs>+ <Tab title="AWS Console">+ 1. Go to **Privileged Access Management → My Access**+ 2. Find the account and click **Launch → Open in Browser**+ 3. You'll be taken directly to the AWS console, logged in with the target role+ </Tab>+ <Tab title="CLI">+ The CLI writes temporary credentials to your AWS credentials file as a named profile:++ ```bash+ infisical pam access my-folder/prod-admin-access+ ```++ This creates a profile named `infisical-pam/my-folder/prod-admin-access` in `~/.aws/credentials`. Use it with the AWS CLI:++ ```bash+ aws s3 ls --profile "infisical-pam/my-folder/prod-admin-access"+ ```++ Or set the `AWS_PROFILE` environment variable:++ ```bash+ export AWS_PROFILE="infisical-pam/my-folder/prod-admin-access"+ aws sts get-caller-identity+ ```++ Press **Ctrl+C** to stop and remove the credentials profile.++ **Flags:**+ - `--reason <reason>` — provide an access reason (if required by template)+ </Tab>+</Tabs>++## Next Steps++<CardGroup cols={2}>+ <Card title="Kubernetes Accounts" icon="dharmachakra" href="/documentation/platform/pam/accounts/kubernetes">+ Add Kubernetes cluster accounts.+ </Card>+ <Card title="Sessions" icon="display" href="/documentation/platform/pam/sessions/overview">+ View and manage sessions.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/kubernetes.mdx b/docs/documentation/platform/pam/accounts/kubernetes.mdxnew file mode 100644index 0000000000..dc666f1157--- /dev/null+++ b/docs/documentation/platform/pam/accounts/kubernetes.mdx@@ -0,0 +1,75 @@+---+title: "Kubernetes Accounts"+sidebarTitle: "Kubernetes"+description: "Add and connect to Kubernetes clusters."+---++Kubernetes accounts let you manage access to your Kubernetes clusters. Users connect through the CLI to get a kubeconfig, and every [session](/documentation/platform/pam/sessions/overview) is recorded.++## Creating an Account++<Steps>+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.+ </Step>+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select a Kubernetes [template](/documentation/platform/pam/templates/overview).+ </Step>+ <Step title="Enter connection details">+ | Field | Description |+ |-------|-------------|+ | **Name** | A descriptive name (e.g., `prod-cluster`) |+ | **Kubernetes API URL** | The cluster API server URL |+ | **Reject Unauthorized** | Reject connections with invalid certificates |+ | **SSL Certificate** | Custom CA certificate (optional) |+ </Step>+ <Step title="Choose authentication method">+ <Tabs>+ <Tab title="Service Account Token">+ Use an existing service account token.++ | Field | Description |+ |-------|-------------|+ | **Service Account Token** | The token for authentication |+ </Tab>+ <Tab title="Gateway Kubernetes Auth">+ Let the Gateway authenticate using its own service account.++ | Field | Description |+ |-------|-------------|+ | **Namespace** | The namespace of the service account |+ | **Service Account Name** | The name of the service account |+ </Tab>+ </Tabs>+ </Step>+ <Step title="Save">+ Click **Create**.+ </Step>+</Steps>++## Connecting++The CLI retrieves credentials and outputs a kubeconfig you can use with `kubectl`.++```bash+infisical pam access my-folder/prod-cluster+```++Then use `kubectl` as normal:+```bash+kubectl get pods+```++**Flags:**+- `--reason <reason>` — provide an access reason (if required by template)++## Next Steps++<CardGroup cols={2}>+ <Card title="SSH Accounts" icon="terminal" href="/documentation/platform/pam/accounts/ssh">+ Add SSH server accounts.+ </Card>+ <Card title="Sessions" icon="display" href="/documentation/platform/pam/sessions/overview">+ View and manage sessions.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/mongodb.mdx b/docs/documentation/platform/pam/accounts/mongodb.mdxnew file mode 100644index 0000000000..3a39f63145--- /dev/null+++ b/docs/documentation/platform/pam/accounts/mongodb.mdx@@ -0,0 +1,71 @@+---+title: "MongoDB Accounts"+sidebarTitle: "MongoDB"+description: "Add and connect to MongoDB databases."+---++MongoDB accounts let you manage access to your MongoDB databases. Users connect through the CLI (a local proxy), and every [session](/documentation/platform/pam/sessions/overview) is recorded.++## Creating an Account++<Steps>+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.+ </Step>+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select a MongoDB [template](/documentation/platform/pam/templates/overview).+ </Step>+ <Step title="Enter connection details">+ | Field | Description |+ |-------|-------------|+ | **Name** | A descriptive name (e.g., `users-db`) |+ | **Connection String** | MongoDB URI (see below) |+ | **Database** | Database name (default: admin) |+ | **SSL Enabled** | Enable SSL for the connection |+ | **Reject Unauthorized** | Reject connections with invalid certificates (only if SSL enabled) |+ | **SSL Certificate** | Custom CA certificate (only if SSL enabled) |++ The connection string supports both `mongodb://` and `mongodb+srv://` URIs. Do not include credentials or database name in the URI — use the separate fields instead.++ Example: `mongodb://mongo.example.com:27017` or `mongodb+srv://cluster.example.com`+ </Step>+ <Step title="Enter credentials">+ | Field | Description |+ |-------|-------------|+ | **Username** | MongoDB username |+ | **Password** | MongoDB password |+ </Step>+ <Step title="Save">+ Click **Create**.+ </Step>+</Steps>++## Connecting++The CLI starts a local proxy that you connect to with your preferred MongoDB client.++```bash+infisical pam access my-folder/users-db+```++The command outputs the local port to connect to. Then use `mongosh` or any MongoDB client:+```bash+mongosh "mongodb://localhost:<port>/users"+```++No password needed since the proxy handles authentication.++**Flags:**+- `--port <port>` — use a specific local port (otherwise one is assigned automatically)+- `--reason <reason>` — provide an access reason (if required by template)++## Next Steps++<CardGroup cols={2}>+ <Card title="PostgreSQL Accounts" icon="database" href="/documentation/platform/pam/accounts/postgresql">+ Add PostgreSQL database accounts.+ </Card>+ <Card title="Sessions" icon="display" href="/documentation/platform/pam/sessions/overview">+ View and manage sessions.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/mssql.mdx b/docs/documentation/platform/pam/accounts/mssql.mdxnew file mode 100644index 0000000000..68f4d0fb25--- /dev/null+++ b/docs/documentation/platform/pam/accounts/mssql.mdx@@ -0,0 +1,96 @@+---+title: "Microsoft SQL Server Accounts"+sidebarTitle: "MS SQL"+description: "Add and connect to Microsoft SQL Server databases."+---++MS SQL accounts let you manage access to your Microsoft SQL Server databases. Users connect through the CLI (a local proxy), and every [session](/documentation/platform/pam/sessions/overview) is recorded.++## Creating an Account++<Steps>+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.+ </Step>+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select an MS SQL [template](/documentation/platform/pam/templates/overview).+ </Step>+ <Step title="Enter connection details">+ | Field | Description |+ |-------|-------------|+ | **Name** | A descriptive name (e.g., `analytics-db`) |+ | **Host** | Database hostname or IP |+ | **Port** | SQL Server port (default: 1433) |+ | **Database** | Database name (default: master) |+ | **SSL Enabled** | Enable SSL for the connection |+ | **Reject Unauthorized** | Reject connections with invalid certificates (only if SSL enabled) |+ | **SSL Certificate** | Custom CA certificate (only if SSL enabled) |+ </Step>+ <Step title="Choose authentication method">+ MS SQL supports three authentication methods:++ <Tabs>+ <Tab title="SQL Server Authentication">+ Standard SQL Server login with username and password.++ | Field | Description |+ |-------|-------------|+ | **Username** | SQL Server username |+ | **Password** | SQL Server password |+ </Tab>+ <Tab title="Windows Authentication (NTLM)">+ Windows domain authentication using NTLM.++ | Field | Description |+ |-------|-------------|+ | **Username** | Windows username |+ | **Password** | Windows password |+ | **Domain** | Windows domain name |+ </Tab>+ <Tab title="Windows Authentication (Kerberos)">+ Windows domain authentication using Kerberos.++ | Field | Description |+ |-------|-------------|+ | **Username** | Windows username |+ | **Password** | Windows password |+ | **Realm** | Kerberos realm (uppercase) |+ | **KDC Address** | Key Distribution Center address (optional) |+ | **SPN** | Service Principal Name |+ </Tab>+ </Tabs>+ </Step>+ <Step title="Save">+ Click **Create**.+ </Step>+</Steps>++## Connecting++The CLI starts a local proxy that you connect to with your preferred SQL Server client.++```bash+infisical pam access my-folder/analytics-db+```++The command outputs the local port to connect to. Then use `sqlcmd`, Azure Data Studio, or any SQL Server client:+```bash+sqlcmd -S localhost,<port> -d analytics+```++No password needed since the proxy handles authentication.++**Flags:**+- `--port <port>` — use a specific local port (otherwise one is assigned automatically)+- `--reason <reason>` — provide an access reason (if required by template)++## Next Steps++<CardGroup cols={2}>+ <Card title="PostgreSQL Accounts" icon="database" href="/documentation/platform/pam/accounts/postgresql">+ Add PostgreSQL database accounts.+ </Card>+ <Card title="Sessions" icon="display" href="/documentation/platform/pam/sessions/overview">+ View and manage sessions.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/mysql.mdx b/docs/documentation/platform/pam/accounts/mysql.mdxnew file mode 100644index 0000000000..d403ac3890--- /dev/null+++ b/docs/documentation/platform/pam/accounts/mysql.mdx@@ -0,0 +1,83 @@+---+title: "MySQL Accounts"+sidebarTitle: "MySQL"+description: "Add and connect to MySQL databases."+---++MySQL accounts let you manage access to your MySQL databases. Users connect through Web Access (a browser-based interface) or CLI (a local proxy), and every [session](/documentation/platform/pam/sessions/overview) is recorded.++## Creating an Account++<Steps>+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.+ </Step>+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select a MySQL [template](/documentation/platform/pam/templates/overview).+ </Step>+ <Step title="Enter connection details">+ | Field | Description |+ |-------|-------------|+ | **Name** | A descriptive name (e.g., `orders-db-readonly`) |+ | **Host** | Database hostname or IP |+ | **Port** | MySQL port (default: 3306) |+ | **Database** | Database name |+ | **SSL Enabled** | Enable SSL for the connection |+ | **Reject Unauthorized** | Reject connections with invalid certificates (only if SSL enabled) |+ | **SSL Certificate** | Custom CA certificate (only if SSL enabled) |+ </Step>+ <Step title="Enter credentials">+ | Field | Description |+ |-------|-------------|+ | **Username** | MySQL username |+ | **Password** | MySQL password |+ </Step>+ <Step title="Save">+ Click **Create**.+ </Step>+</Steps>++## Connecting++<Tabs>+ <Tab title="Web Access">+ Web Access provides a browser-based interface with two tools:++ - **Data Explorer** — browse tables, view data, filter and sort, edit rows, export to CSV/JSON+ - **SQL Editor** — write and run SQL queries++ To connect:+ 1. Go to **Privileged Access Management → My Access**+ 2. Find the account and click **Launch → Connect in Browser**++ </Tab>+ <Tab title="CLI">+ The CLI starts a local proxy that you connect to with your preferred MySQL client.++ ```bash+ infisical pam access my-folder/orders-db+ ```++ The command outputs the local port to connect to. Then use your MySQL client:+ ```bash+ mysql -h 127.0.0.1 -P <port> -u root orders+ ```++ No password needed since the proxy handles authentication.++ **Flags:**+ - `--port <port>` — use a specific local port (otherwise one is assigned automatically)+ - `--reason <reason>` — provide an access reason (if required by template)+ </Tab>+</Tabs>++## Next Steps++<CardGroup cols={2}>+ <Card title="PostgreSQL Accounts" icon="database" href="/documentation/platform/pam/accounts/postgresql">+ Add PostgreSQL database accounts.+ </Card>+ <Card title="Sessions" icon="display" href="/documentation/platform/pam/sessions/overview">+ View and manage sessions.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/overview.mdx b/docs/documentation/platform/pam/accounts/overview.mdxindex 56af2b0e31..c528a094a4 100644--- a/docs/documentation/platform/pam/accounts/overview.mdx+++ b/docs/documentation/platform/pam/accounts/overview.mdx@@ -8,31 +8,34 @@ Accounts are the databases and servers you want to manage through PAM. Each accoWhen users connect to an account, they never see the actual credentials. The connection is proxied, credentials are injected automatically, and everything is recorded.-<Tip>-**Two pages, two purposes:** The **Accounts** page is where admins create and configure accounts. The **My Access** page is where users go to launch sessions and connect.-</Tip>-## Account Types-PAM currently supports two account types:+PAM supports the following account types:-| Type | What it connects to |-|------|---------------------|-| [**PostgreSQL**](/documentation/platform/pam/accounts/postgresql) | PostgreSQL databases |-| [**SSH**](/documentation/platform/pam/accounts/ssh) | Linux/Unix servers |+| Type | What it connects to | Web Access |+|------|---------------------|------------|+| [**PostgreSQL**](/documentation/platform/pam/accounts/postgresql) | PostgreSQL databases | ✓ |+| [**MySQL**](/documentation/platform/pam/accounts/mysql) | MySQL databases | ✓ |+| [**MS SQL**](/documentation/platform/pam/accounts/mssql) | Microsoft SQL Server | |+| [**MongoDB**](/documentation/platform/pam/accounts/mongodb) | MongoDB databases | |+| [**SSH**](/documentation/platform/pam/accounts/ssh) | Linux/Unix servers | ✓ |+| [**Kubernetes**](/documentation/platform/pam/accounts/kubernetes) | Kubernetes clusters | |+| [**AWS IAM**](/documentation/platform/pam/accounts/aws-iam) | AWS IAM roles | ✓ |+| [**Windows**](/documentation/platform/pam/accounts/windows) | Windows servers (RDP) | ✓ |+| [**Windows AD**](/documentation/platform/pam/accounts/windows-ad) | Windows via Active Directory | ✓ |-Each type has specific connection details — PostgreSQL accounts need a database name, SSH accounts need an authentication method. See the type-specific pages for details.+Each type has specific connection details. See the type-specific pages for details.## Adding an AccountAccounts live inside [folders](/documentation/platform/pam/folders/overview). To add one:<Steps>- <Step title="Open the folder">- Go to **Privileged Access Management → Accounts** and click on the folder where you want to add the account.+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.</Step>- <Step title="Add account and select a template">- Click **Add Account** and select a [template](/documentation/platform/pam/templates/overview). The template determines the account type (PostgreSQL or SSH) and session rules (duration, MFA, recording).+ <Step title="Select a folder and template">+ Choose which folder to add the account to, then select a [template](/documentation/platform/pam/templates/overview). The template determines the account type and all the rules that apply.</Step><Step title="Enter connection details">Provide the hostname, port, and other connection information.@@ -61,16 +64,16 @@ Go to **Privileged Access Management → My Access**, find the account, and clicRun the CLI command to start a local proxy:```bash-infisical pam access /<folder>/<account>+infisical pam access <folder>/<account>```-Then connect with your preferred client (psql, pgAdmin, ssh) against `localhost`. The proxy handles authentication automatically.+The command outputs the local port to connect to. Then connect with your preferred client (psql, pgAdmin, ssh, etc.) against `localhost` using that port. The proxy handles authentication automatically.**Flags:**| Flag | What it does ||------|--------------|-| `--port` | Specify the local port |+| `--port` | Use a specific local port (otherwise one is assigned automatically) || `--reason` | Provide a reason (if required by the template) |## Direct Account Memberships@@ -88,13 +91,4 @@ Direct memberships are for exceptions — a contractor who needs one specific da## Next Steps-For detailed instructions on creating and connecting to specific account types:--<CardGroup cols={2}>- <Card title="PostgreSQL Accounts" icon="database" href="/documentation/platform/pam/accounts/postgresql">- Database connection details and Web Access features.- </Card>- <Card title="SSH Accounts" icon="terminal" href="/documentation/platform/pam/accounts/ssh">- Authentication methods and certificate setup.- </Card>-</CardGroup>+For detailed instructions on creating and connecting to specific account types, see the type-specific pages in the sidebar.diff --git a/docs/documentation/platform/pam/accounts/postgresql.mdx b/docs/documentation/platform/pam/accounts/postgresql.mdxindex 73bbaaab1c..9b9ee1c03e 100644--- a/docs/documentation/platform/pam/accounts/postgresql.mdx+++ b/docs/documentation/platform/pam/accounts/postgresql.mdx@@ -9,11 +9,11 @@ PostgreSQL accounts let you manage access to your PostgreSQL databases. Users co## Creating an Account<Steps>- <Step title="Open the folder">- Go to **Privileged Access Management → Accounts** and click on the [folder](/documentation/platform/pam/folders/overview) where you want to add the account.+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.</Step>- <Step title="Add account and select a template">- Click **Add Account** and select a PostgreSQL [template](/documentation/platform/pam/templates/overview) (e.g., the default `postgres` or a custom one). The template determines session rules like duration, MFA, and recording.+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select a PostgreSQL [template](/documentation/platform/pam/templates/overview) (e.g., the default `postgres` or a custom one).</Step><Step title="Enter connection details">| Field | Description |@@ -22,7 +22,9 @@ PostgreSQL accounts let you manage access to your PostgreSQL databases. Users co| **Host** | Database hostname or IP || **Port** | PostgreSQL port (default: 5432) || **Database** | Database name |- | **SSL Mode** | Connection security (`disable`, `require`, `verify-ca`, `verify-full`) |+ | **SSL Enabled** | Enable SSL for the connection |+ | **Reject Unauthorized** | Reject connections with invalid certificates (only if SSL enabled) |+ | **SSL Certificate** | Custom CA certificate (only if SSL enabled) |</Step><Step title="Enter credentials">| Field | Description |@@ -53,18 +55,18 @@ PostgreSQL accounts let you manage access to your PostgreSQL databases. Users coThe CLI starts a local proxy that you connect to with your preferred PostgreSQL client.```bash- infisical pam access /backend-team/orders-db+ infisical pam access backend-team/orders-db```- Then connect:+ The command outputs the local port to connect to. Then use your PostgreSQL client:```bash- psql "postgresql://localhost:5432/orders"+ psql "postgresql://localhost:<port>/orders"```No password needed since the proxy handles authentication.**Flags:**- - `--port <port>` — use a specific local port+ - `--port <port>` — use a specific local port (otherwise one is assigned automatically)- `--reason <reason>` — provide an access reason (if required by template)</Tab></Tabs>diff --git a/docs/documentation/platform/pam/accounts/ssh.mdx b/docs/documentation/platform/pam/accounts/ssh.mdxindex e85288b823..f9b9b4dbc9 100644--- a/docs/documentation/platform/pam/accounts/ssh.mdx+++ b/docs/documentation/platform/pam/accounts/ssh.mdx@@ -11,11 +11,11 @@ SSH accounts support three authentication methods: password, public key, and cer## Creating an Account<Steps>- <Step title="Open the folder">- Go to **Privileged Access Management → Accounts** and click on the [folder](/documentation/platform/pam/folders/overview) where you want to add the account.+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.</Step>- <Step title="Add account and select a template">- Click **Add Account** and select an SSH [template](/documentation/platform/pam/templates/overview) (e.g., the default `ssh` or a custom one). The template determines session rules like duration, MFA, and recording.+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select an SSH [template](/documentation/platform/pam/templates/overview) (e.g., the default `ssh` or a custom one).</Step><Step title="Enter connection details">| Field | Description |@@ -71,18 +71,18 @@ SSH accounts support three authentication methods: password, public key, and cerThe CLI starts a local proxy that you connect to with your SSH client.```bash- infisical pam access /prod-servers/web-01+ infisical pam access prod-servers/web-01```- Then connect:+ The command outputs the local port to connect to. Then use your SSH client:```bash- ssh deploy@localhost -p 2222+ ssh deploy@localhost -p <port>```No password or key needed since the proxy handles authentication.**Flags:**- - `--port <port>` — use a specific local port+ - `--port <port>` — use a specific local port (otherwise one is assigned automatically)- `--reason <reason>` — provide an access reason (if required by template)</Tab></Tabs>diff --git a/docs/documentation/platform/pam/accounts/windows-ad.mdx b/docs/documentation/platform/pam/accounts/windows-ad.mdxnew file mode 100644index 0000000000..25441504a6--- /dev/null+++ b/docs/documentation/platform/pam/accounts/windows-ad.mdx@@ -0,0 +1,98 @@+---+title: "Windows Active Directory Accounts"+sidebarTitle: "Windows AD"+description: "Add and connect to Windows servers through Active Directory."+---++Windows AD accounts let you manage access to Windows servers using Active Directory domain credentials. Users connect through Web Access (a browser-based RDP client) or CLI (using your own RDP client) to any allowed host, and every [session](/documentation/platform/pam/sessions/overview) is recorded.++<Note>+Windows AD accounts require session recordings to be stored in an external S3 bucket. Configure this in the [template](/documentation/platform/pam/templates/overview) before creating Windows AD accounts.+</Note>++## Creating an Account++<Steps>+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.+ </Step>+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select a Windows AD [template](/documentation/platform/pam/templates/overview).+ </Step>+ <Step title="Enter connection details">+ | Field | Description |+ |-------|-------------|+ | **Name** | A descriptive name (e.g., `domain-admin`) |+ | **FQDN** | Fully qualified domain name (e.g., `corp.example.com`) |+ | **DC Address** | Domain controller hostname or IP for LDAP |+ | **Allowed Hosts** | Hostnames or IPs this account can connect to (one per line) |+ | **LDAP Port** | LDAP port (default: 389) |+ | **RDP Port** | RDP port (default: 3389) |+ | **Use LDAPS** | Enable LDAP over SSL |+ </Step>+ <Step title="Enter credentials">+ | Field | Description |+ |-------|-------------|+ | **Username** | Domain username in `DOMAIN\username` format (e.g., `CORP\Administrator`) |+ | **Password** | Domain password |+ </Step>+ <Step title="Save">+ Click **Create**.+ </Step>+</Steps>++## Connecting++<Tabs>+ <Tab title="Web Access">+ Web Access provides a browser-based RDP client:++ 1. Go to **Privileged Access Management → My Access**+ 2. Find the account and click **Launch**+ 3. If the account has multiple allowed hosts, select which host to connect to+ 4. Click **Connect in Browser**+ 5. A remote desktop session opens in a new tab++ You get a full Windows desktop. To disconnect, log out or close the tab.+ </Tab>+ <Tab title="CLI">+ The CLI starts a local proxy that you connect to with your own RDP client:++ ```bash+ infisical pam access <folder>/<account>+ ```++ If the account has multiple allowed hosts, you'll be prompted to select one.++ The command prints the local port. Connect your RDP client to `localhost` on that port:++ ```bash+ # Example using xfreerdp+ xfreerdp /v:localhost:53306+ ```++ <Tip>+ The port is dynamically assigned. Use the `--port` flag if you need a specific port:+ `infisical pam access <folder>/<account> --port 13389`+ </Tip>++ Press `Ctrl+C` to end the session and close the proxy.+ </Tab>+</Tabs>++## Allowed Hosts++Unlike single-server Windows accounts, Windows AD accounts can connect to multiple hosts. When you create the account, you define the list of allowed hosts. Users choose which host to connect to when launching a session.++This is useful for domain admin accounts that need access to multiple servers — you can manage a single account with one set of credentials while controlling which servers it can access.++## Next Steps++<CardGroup cols={2}>+ <Card title="Windows Accounts" icon="windows" href="/documentation/platform/pam/accounts/windows">+ Add single-server Windows accounts.+ </Card>+ <Card title="Sessions" icon="display" href="/documentation/platform/pam/sessions/overview">+ View and manage sessions.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/windows.mdx b/docs/documentation/platform/pam/accounts/windows.mdxnew file mode 100644index 0000000000..d448bd62cc--- /dev/null+++ b/docs/documentation/platform/pam/accounts/windows.mdx@@ -0,0 +1,84 @@+---+title: "Windows Accounts"+sidebarTitle: "Windows"+description: "Add and connect to Windows servers via RDP."+---++Windows accounts let you manage access to Windows servers via Remote Desktop Protocol (RDP). Users connect through Web Access (a browser-based RDP client) or CLI (using your own RDP client), and every [session](/documentation/platform/pam/sessions/overview) is recorded.++<Note>+Windows accounts require session recordings to be stored in an external S3 bucket. Configure this in the [template](/documentation/platform/pam/templates/overview) before creating Windows accounts.+</Note>++## Creating an Account++<Steps>+ <Step title="Start adding an account">+ Go to **Privileged Access Management → Accounts** and click **Add Account**.+ </Step>+ <Step title="Select a folder and template">+ Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select a Windows [template](/documentation/platform/pam/templates/overview).+ </Step>+ <Step title="Enter connection details">+ | Field | Description |+ |-------|-------------|+ | **Name** | A descriptive name (e.g., `prod-app-server`) |+ | **Host** | Server hostname or IP |+ | **Port** | RDP port (default: 3389) |+ </Step>+ <Step title="Enter credentials">+ | Field | Description |+ |-------|-------------|+ | **Username** | Windows username |+ | **Password** | Windows password |+ </Step>+ <Step title="Save">+ Click **Create**.+ </Step>+</Steps>++## Connecting++<Tabs>+ <Tab title="Web Access">+ Web Access provides a browser-based RDP client:++ 1. Go to **Privileged Access Management → My Access**+ 2. Find the account and click **Launch → Connect in Browser**+ 3. A remote desktop session opens in a new tab++ You get a full Windows desktop. To disconnect, log out or close the tab.+ </Tab>+ <Tab title="CLI">+ The CLI starts a local proxy that you connect to with your own RDP client:++ ```bash+ infisical pam access <folder>/<account>+ ```++ The command prints the local port. Connect your RDP client to `localhost` on that port:++ ```bash+ # Example using xfreerdp+ xfreerdp /v:localhost:53306+ ```++ <Tip>+ The port is dynamically assigned. Use the `--port` flag if you need a specific port:+ `infisical pam access <folder>/<account> --port 13389`+ </Tip>++ Press `Ctrl+C` to end the session and close the proxy.+ </Tab>+</Tabs>++## Next Steps++<CardGroup cols={2}>+ <Card title="Windows AD Accounts" icon="windows" href="/documentation/platform/pam/accounts/windows-ad">+ Add Windows Active Directory accounts.+ </Card>+ <Card title="Sessions" icon="display" href="/documentation/platform/pam/sessions/overview">+ View and manage sessions.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/auditing.mdx b/docs/documentation/platform/pam/auditing.mdxindex 0735d400a3..f8ab1db8e0 100644--- a/docs/documentation/platform/pam/auditing.mdx+++ b/docs/documentation/platform/pam/auditing.mdx@@ -39,15 +39,6 @@ These are complementary:For a complete picture, you need both. The audit log tells you Alice accessed the orders-db at 2pm; the session recording shows you exactly what queries she ran.-## Who Can See Audit Logs--| Role | Access |-|------|--------|-| **Product Admin** | All audit logs |-| **Admin** (on a folder) | Logs for accounts in that folder |-| **Auditor** (on a folder) | Logs for accounts in that folder |-| **Connector** | Can only see their own session events |-## RetentionAudit logs are retained according to your organization's policy. Events are immutable — they can't be modified or deleted.diff --git a/docs/documentation/platform/pam/concepts/pam-components.mdx b/docs/documentation/platform/pam/concepts/pam-components.mdxindex e464d25747..3e4cba9480 100644--- a/docs/documentation/platform/pam/concepts/pam-components.mdx+++ b/docs/documentation/platform/pam/concepts/pam-components.mdx@@ -10,7 +10,7 @@ Infisical PAM is built around four core components: accounts, folders, account tAn **account** represents a single database or server you want to manage. You provide the connection details (host, port, database) and credentials (username, password), and Infisical stores them securely. Users connect through Infisical without ever seeing the underlying credentials.-Infisical currently supports PostgreSQL databases and SSH servers.+Infisical supports databases (PostgreSQL, MySQL, MS SQL, MongoDB), servers (SSH, Windows), Kubernetes clusters, and AWS IAM roles.[Learn more about Accounts →](/documentation/platform/pam/accounts/overview)@@ -32,9 +32,9 @@ Permissions are set at the folder level, so everyone with access to a folder can- Whether a reason is required- Whether MFA is required-Templates are specific to an account type (PostgreSQL or SSH). This allows for type-specific policies — for example, command restrictions for SSH or query restrictions for databases in future releases.+Templates are specific to an account type. This allows for type-specific policies — for example, command restrictions for SSH or query restrictions for databases in future releases.-Every account uses a template of the same type. Infisical provides default templates (`postgres`, `ssh`) with sensible settings, so you can start creating accounts immediately. Create custom templates when you need different rules for different environments or compliance requirements.+Every account uses a template of the same type. Infisical provides default templates for each account type with sensible settings, so you can start creating accounts immediately. Create custom templates when you need different rules for different environments or compliance requirements.**Templates define rules, folders define access.** Accounts in the same folder can use different templates (different rules, same team access), and accounts in different folders can use the same template (same rules, different team access).diff --git a/docs/documentation/platform/pam/guides/ssh-certificate-auth.mdx b/docs/documentation/platform/pam/guides/ssh-certificate-auth.mdxindex f930bf35a5..639e010ee1 100644--- a/docs/documentation/platform/pam/guides/ssh-certificate-auth.mdx+++ b/docs/documentation/platform/pam/guides/ssh-certificate-auth.mdx@@ -16,12 +16,11 @@ This guide walks through setting up SSH certificate authentication. Instead of m<Steps><Step title="Create the SSH Account">- 1. Open the folder where you want to add the account- 2. Click **Add Account**- 3. Select an SSH [template](/documentation/platform/pam/templates/overview)- 4. Fill in the connection details (host, port, username)- 5. Set **Authentication Method** to **Certificate**- 6. Click **Create**+ 1. Go to **Privileged Access Management → Accounts** and click **Add Account**+ 2. Select your folder and an SSH [template](/documentation/platform/pam/templates/overview)+ 3. Fill in the connection details (host, port, username)+ 4. Set **Authentication Method** to **Certificate**+ 5. Click **Create**</Step><Step title="Configure the Server">Open the account you just created. You'll see a **CA Setup** section.diff --git a/docs/documentation/platform/pam/guides/team-access.mdx b/docs/documentation/platform/pam/guides/team-access.mdxindex 2a0d971045..6e9009feef 100644--- a/docs/documentation/platform/pam/guides/team-access.mdx+++ b/docs/documentation/platform/pam/guides/team-access.mdx@@ -31,11 +31,10 @@ This guide walks through giving your team secure access to a production PostgreS3. Click **Create**</Step><Step title="Add the Database Account">- 1. Open your folder- 2. Click **Add Account**- 3. Select your template- 4. Fill in your database connection details and credentials- 5. Click **Create**+ 1. Click **Add Account**+ 2. Select your folder and template+ 3. Fill in your database connection details and credentials+ 4. Click **Create**</Step><Step title="Grant Your Team Access">1. Open your folderdiff --git a/docs/documentation/platform/pam/quick-starts/launch-first-session.mdx b/docs/documentation/platform/pam/quick-starts/launch-first-session.mdxindex 7399a575b8..90b4dd677d 100644--- a/docs/documentation/platform/pam/quick-starts/launch-first-session.mdx+++ b/docs/documentation/platform/pam/quick-starts/launch-first-session.mdx@@ -28,8 +28,8 @@ This quickstart walks you through connecting to a PostgreSQL database via PAM. Y4. Click **Create**</Step><Step title="Add a Database Account">- 1. Open the folder you just created- 2. Click **Add Account**+ 1. Click **Add Account**+ 2. Select the folder you just created3. Select the `postgres` [template](/documentation/platform/pam/templates/overview)4. Fill in your database connection details (host, port, credentials)5. Click **Create**diff --git a/docs/documentation/platform/pam/sessions/external-storage.mdx b/docs/documentation/platform/pam/sessions/external-storage.mdxindex 6592e23e18..5e1dbfef6c 100644--- a/docs/documentation/platform/pam/sessions/external-storage.mdx+++ b/docs/documentation/platform/pam/sessions/external-storage.mdx@@ -71,7 +71,7 @@ For session playback to work in the browser, your bucket needs a CORS policy:]```-Replace `https://app.infisical.com` with your Infisical URL if self-hosted.+Replace `https://app.infisical.com` with your Infisical URL if you have a custom domain.To configure:1. Open the bucket in AWS Consolediff --git a/docs/documentation/platform/pam/sessions/overview.mdx b/docs/documentation/platform/pam/sessions/overview.mdxindex bd39837af3..f372a64bec 100644--- a/docs/documentation/platform/pam/sessions/overview.mdx+++ b/docs/documentation/platform/pam/sessions/overview.mdx@@ -58,15 +58,6 @@ If someone shouldn't be connected — security incident, policy violation, or thThe user is immediately disconnected. Use this for emergencies; normal sessions should end naturally.</Warning>-## Who Can See What--| Role | What they can see |-|------|-------------------|-| **Product Admin** | All sessions across PAM |-| **Admin** (on a folder) | All sessions for accounts in that folder |-| **Connector** (on a folder) | Their own sessions for accounts in that folder |-| **Auditor** (on a folder) | All sessions for accounts in that folder (read-only) |-## Next StepsTo understand how session recordings work and where they're stored:diff --git a/docs/documentation/platform/pam/sessions/session-recording.mdx b/docs/documentation/platform/pam/sessions/session-recording.mdxindex 4fe0e53d4e..54a3920ede 100644--- a/docs/documentation/platform/pam/sessions/session-recording.mdx+++ b/docs/documentation/platform/pam/sessions/session-recording.mdx@@ -12,7 +12,7 @@ The content depends on the account type:**PostgreSQL sessions:**- All SQL queries executed-- Query results and responses+- Query responses and result summaries (not full result data)- Timestamps for each action**SSH sessions:**@@ -22,19 +22,7 @@ The content depends on the account type:Both Web Access and CLI sessions are recorded the same way.-## How Recording Works--Recording happens at the [Gateway](/documentation/platform/gateways/overview) level:--1. Traffic flows through the Gateway-2. The Gateway captures and encrypts session events-3. Events upload to Infisical in real-time-4. Recordings are available immediately — even for active sessions--This architecture means:-- **No data loss** — if connectivity drops, the Gateway caches locally and syncs when restored-- **Near real-time** — admins can see what's happening in active sessions-- **Always encrypted** — recordings are encrypted before upload+Recording happens at the [Gateway](/documentation/platform/gateways/overview) level — events are captured, encrypted, and uploaded in real-time. See [Architecture](/documentation/platform/pam/architecture) for details on how this works.## Storage Options@@ -55,10 +43,6 @@ For most cases, internal storage works fine. Use [External Storage](/documentatiRecordings are available in real-time for both active and completed sessions.-## Best Practices--**Use external S3 for regulated environments.** If you have data residency or retention requirements, store recordings in your own bucket where you control the data lifecycle.-## Next Steps<CardGroup cols={2}>diff --git a/docs/documentation/platform/pam/templates/overview.mdx b/docs/documentation/platform/pam/templates/overview.mdxindex 947ac84d29..87f05193f8 100644--- a/docs/documentation/platform/pam/templates/overview.mdx+++ b/docs/documentation/platform/pam/templates/overview.mdx@@ -4,22 +4,17 @@ sidebarTitle: "Account Templates"description: "Define the rules that apply when users connect to accounts."----Templates control what happens when someone connects to an [account](/documentation/platform/pam/accounts/overview). How long can they stay connected? Do they need MFA? Should the [session](/documentation/platform/pam/sessions/overview) be recorded? These rules are defined in a template, and every account uses one.+Templates define how [accounts](/documentation/platform/pam/accounts/overview) behave when someone connects — session duration limits, MFA requirements, which [Gateway](/documentation/platform/gateways/overview) to use, where to store [session recordings](/documentation/platform/pam/sessions/session-recording), and more.-Templates are **type-specific** — a PostgreSQL template can only be used with PostgreSQL accounts, and an SSH template can only be used with SSH accounts. This allows for type-specific policies like command restrictions or query filtering in future releases.+**Every account requires a template.** When you create an account, you select a template, and the account inherits everything from it. Change the template later, and every account using it updates automatically.-Infisical provides **default templates** (`postgres`, `ssh`) with sensible settings, so you can start adding accounts right away. Create custom templates when you need different rules — for example, stricter settings for production databases.+Infisical provides **default templates** for each account type with sensible defaults, so you can start adding accounts right away. Create custom templates when you need different rules — for example, stricter session limits for production or a specific Gateway for a network segment.## Default Templates-When you first use PAM, these templates are already available:+When you first use PAM, default templates are available for each account type (PostgreSQL, MySQL, MS SQL, MongoDB, SSH, Kubernetes, AWS IAM, Windows, Windows AD). Each has sensible defaults like 1-hour session duration.-| Template | Type | Default Settings |-|----------|------|------------------|-| `postgres` | PostgreSQL | 1-hour sessions |-| `ssh` | SSH | 1-hour sessions |--These defaults work for many cases. If they fit your needs, you can skip straight to [adding accounts](/documentation/platform/pam/accounts/overview).+If the defaults work for you, you can skip straight to [adding accounts](/documentation/platform/pam/accounts/overview).## Creating a Custom Template@@ -33,25 +28,23 @@ If you need different rules — say, 4-hour sessions with MFA for production —| Field | Description ||-------|-------------|| **Name** | A descriptive name (e.g., `prod-postgres`) |- | **Type** | PostgreSQL or SSH |+ | **Type** | The account type (PostgreSQL, MySQL, SSH, etc.) || **Description** | Optional context about when to use this template |</Step>- <Step title="Configure access policy">- These rules control the user experience when connecting:-- | Setting | What it does |- |---------|--------------|- | **Max Session Duration** | How long can someone stay connected |- | **Require Reason** | Must they explain why they need access |- | **Require MFA** | Must they verify their identity first |+ <Step title="Configure policies">+ | Option | What it does |+ |--------|--------------|+ | **Require MFA** | Users must re-authenticate with MFA before connecting |+ | **Require Reason** | Users must provide a reason before connecting |+ | **Max Session Duration** | How long someone can stay connected (in seconds) |+ | **Command Blocking** | Regex patterns for commands to reject (one per line) |</Step><Step title="Configure system settings">- These settings control how the system behaves:-- | Setting | What it does |- |---------|--------------|- | **Recording Storage** | Where to store recordings (internal or your S3 bucket) |- | **Password Constraints** | Minimum complexity for account passwords |+ | Option | What it does |+ |--------|--------------|+ | **Gateway** | Default Gateway for connections (can be overridden per account) |+ | **Storage Backend** | Where to store session recordings (internal or your S3 bucket) |+ | **Session Log Masking** | Regex patterns for content to mask in recordings (one per line) |</Step><Step title="Save">Click **Create**. The template is now available when adding accounts.@@ -60,13 +53,15 @@ If you need different rules — say, 4-hour sessions with MFA for production —## How Templates Work with Accounts-Every account references a template. When you create an account, you select which template it should use. The account then inherits all the rules from that template.+Every account references a template. The account inherits everything from that template — session limits, MFA requirements, Gateway, recording storage, and so on.This means you can:- Apply the same rules to many accounts by having them use the same template- Change rules for all those accounts at once by editing the template- Have different accounts in the same folder use different templates (if they need different rules)+Some options like Gateway can be overridden at the account level when needed.+## Next StepsWith templates set up, you're ready to add accounts to your [folders](/documentation/platform/pam/folders/overview).