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): overhaul section (#8798)
Adrian Kahali33c44795d364
diff --git a/docs/cli/reference.mdx b/docs/cli/reference.mdxindex 1b172589fc..8afee1685c 100644--- a/docs/cli/reference.mdx+++ b/docs/cli/reference.mdx@@ -724,7 +724,7 @@ Open a session for one PAM account. The command runs as the user you logged in aSSH accounts connect you to a shell on the target. Pass a command after `--` to run only that command, or `--proxy` to start a local proxy instead. If no terminal is attached, the CLI starts the proxy instead of a shell.-For database, Redis, Snowflake, Kubernetes, GCP, Azure, and Windows accounts, the CLI starts a local proxy on `127.0.0.1` and prints how to connect to it. For AWS IAM accounts, the CLI writes temporary credentials to your AWS credentials file instead. The page for each [account type](/documentation/platform/pam/accounts/overview#account-types) describes how to connect. A proxy runs until you press `Ctrl+C` or the session expires, and the CLI then restores anything it changed, such as your kubeconfig.+For database, Redis, Snowflake, Kubernetes, GCP, Azure, and Windows accounts, the CLI starts a local proxy on `127.0.0.1` and prints how to connect to it. For AWS IAM accounts, the CLI writes temporary credentials to your AWS credentials file instead. The page for each [account type](/documentation/platform/pam/accounts/account-types) describes how to connect. A proxy runs until you press `Ctrl+C` or the session expires, and the CLI then restores anything it changed, such as your kubeconfig.If the account requires approval, the CLI offers to submit an access request in an interactive terminal. If it requires MFA, the CLI has you complete MFA in your browser before it continues.@@ -776,9 +776,9 @@ Run AI agents against PAM accounts. The agent reaches each account through a locStart a local proxy for each PAM account you can launch, then start an AI agent with instructions for reaching them. Everything after `--` is the command that starts the agent. The `--` is required when that command has flags of its own.-The CLI gives each account its own port on `127.0.0.1`, and the agent connects through those ports without ever holding a credential. The CLI skips accounts that require MFA and accounts of [types agentic access doesn't support](/documentation/platform/pam/ai-agents/overview#supported-account-types), and lists each skipped account with the reason. To open a skipped account, use [infisical pam access](/cli/reference#pam-access).+The CLI gives each account its own port on `127.0.0.1`, and the agent connects through those ports without ever holding a credential. The CLI skips accounts that require MFA and accounts of [types agentic access doesn't support](/documentation/platform/pam/ai-agents/run#supported-account-types), and lists each skipped account with the reason. To open a skipped account, use [infisical pam access](/cli/reference#pam-access).-The CLI [adds instructions for reaching the accounts](/documentation/platform/pam/ai-agents/overview#how-the-agent-is-told) to the agent's system prompt or to a file such as `AGENTS.md`, depending on the agent. It runs the agent in an [OS sandbox](/documentation/platform/pam/ai-agents/overview#the-sandbox), which stops the agent from reading your Infisical login. On a host without a sandbox, the command fails unless you pass `--no-sandbox`.+The CLI [adds instructions for reaching the accounts](/documentation/platform/pam/ai-agents/instructions) to the agent's system prompt or to a file such as `AGENTS.md`, depending on the agent. It runs the agent in an [OS sandbox](/documentation/platform/pam/ai-agents/run#sandbox), which stops the agent from reading your Infisical login. On a host without a sandbox, the command fails unless you pass `--no-sandbox`.The run authenticates with `--token` when one is set, then as a machine identity when `--auth-method` is set, and otherwise as the user you logged in as with [infisical login](/cli/reference#login).diff --git a/docs/docs.json b/docs/docs.jsonindex c8492ac7d5..b614089eea 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -580,40 +580,26 @@"pages": ["documentation/platform/pam/overview",{- "group": "Privileged access manager",+ "group": "Get started","pages": [- {- "group": "Quickstarts",- "pages": [- "documentation/platform/pam/quick-starts/launch-first-session"- ]- },- {- "group": "Concepts",- "pages": [- "documentation/platform/pam/concepts/pam-components",- "documentation/platform/pam/concepts/session-lifecycle",- "documentation/platform/pam/concepts/access-control"- ]- },- {- "group": "Guides",- "pages": [- "documentation/platform/pam/guides/team-access",- "documentation/platform/pam/guides/ssh-certificate-auth"- ]- }+ "documentation/platform/pam/quick-starts/launch-first-session",+ "documentation/platform/pam/concepts/overview",+ "documentation/platform/pam/concepts/session-lifecycle",+ "documentation/platform/pam/architecture"]},{- "group": "Product reference",+ "group": "Accounts","pages": [- "documentation/platform/pam/folders/overview",- "documentation/platform/pam/templates/overview",+ "documentation/platform/pam/accounts/overview",+ "documentation/platform/pam/accounts/add",+ "documentation/platform/pam/accounts/connect",+ "documentation/platform/pam/accounts/view-credentials",+ "documentation/platform/pam/accounts/manage",{- "group": "Accounts",+ "group": "Account types",+ "root": "documentation/platform/pam/accounts/account-types","pages": [- "documentation/platform/pam/accounts/overview","documentation/platform/pam/accounts/postgresql","documentation/platform/pam/accounts/mysql","documentation/platform/pam/accounts/mssql",@@ -622,7 +608,13 @@"documentation/platform/pam/accounts/redis","documentation/platform/pam/accounts/snowflake","documentation/platform/pam/accounts/clickhouse",- "documentation/platform/pam/accounts/ssh",+ {+ "group": "SSH",+ "root": "documentation/platform/pam/accounts/ssh",+ "pages": [+ "documentation/platform/pam/guides/ssh-certificate-auth"+ ]+ },"documentation/platform/pam/accounts/kubernetes","documentation/platform/pam/accounts/aws-iam","documentation/platform/pam/accounts/gcp-service-account",@@ -630,47 +622,63 @@"documentation/platform/pam/accounts/windows","documentation/platform/pam/accounts/windows-ad"]- },+ }+ ]+ },+ {+ "group": "Access control",+ "pages": [+ "documentation/platform/pam/concepts/access-control",+ "documentation/platform/pam/folders/overview",+ "documentation/platform/pam/templates/overview","documentation/platform/pam/access-requests/overview",+ "documentation/platform/pam/access-requests/break-glass"+ ]+ },+ {+ "group": "AI agents",+ "pages": ["documentation/platform/pam/ai-agents/overview",+ "documentation/platform/pam/ai-agents/run",+ "documentation/platform/pam/ai-agents/instructions",+ "documentation/platform/pam/ai-agents/unattended",+ "documentation/platform/pam/ai-agents/review"+ ]+ },+ {+ "group": "Credential rotation",+ "pages": [+ "documentation/platform/pam/credential-rotation/overview",+ "documentation/platform/pam/credential-rotation/postgresql",+ "documentation/platform/pam/credential-rotation/mysql",+ "documentation/platform/pam/credential-rotation/mssql",+ "documentation/platform/pam/credential-rotation/oracledb",+ "documentation/platform/pam/credential-rotation/windows"+ ]+ },+ {+ "group": "Monitoring",+ "pages": [{- "group": "Credential rotation",+ "group": "Sessions",+ "root": "documentation/platform/pam/sessions/overview","pages": [- "documentation/platform/pam/product-reference/credential-rotation/overview",- "documentation/platform/pam/product-reference/credential-rotation/postgresql",- "documentation/platform/pam/product-reference/credential-rotation/mysql",- "documentation/platform/pam/product-reference/credential-rotation/mssql",- "documentation/platform/pam/product-reference/credential-rotation/oracledb",- "documentation/platform/pam/product-reference/credential-rotation/windows"+ "documentation/platform/pam/sessions/session-recording",+ "documentation/platform/pam/sessions/external-storage"]},- "documentation/platform/pam/product-reference/credential-health/overview",+ "documentation/platform/pam/auditing",+ "documentation/platform/pam/credential-health/overview",{"group": "Discovery",+ "root": "documentation/platform/pam/discovery/overview","pages": [- "documentation/platform/pam/discovery/overview","documentation/platform/pam/discovery/active-directory","documentation/platform/pam/discovery/unix","documentation/platform/pam/discovery/postgres","documentation/platform/pam/discovery/mssql"]- },- {- "group": "Dependencies",- "pages": [- "documentation/platform/pam/dependencies/overview"- ]- },- {- "group": "Sessions",- "pages": [- "documentation/platform/pam/sessions/overview",- "documentation/platform/pam/sessions/session-recording",- "documentation/platform/pam/sessions/external-storage"- ]- },- "documentation/platform/pam/auditing",- "documentation/platform/pam/architecture"+ }]}]@@ -5229,7 +5237,35 @@},{"source": "/documentation/platform/pam/product-reference/credential-rotation",- "destination": "/documentation/platform/pam/product-reference/credential-rotation/overview"+ "destination": "/documentation/platform/pam/credential-rotation/overview"+ },+ {+ "source": "/documentation/platform/pam/product-reference/credential-rotation/:slug*",+ "destination": "/documentation/platform/pam/credential-rotation/:slug*"+ },+ {+ "source": "/documentation/platform/pam/product-reference/credential-health/overview",+ "destination": "/documentation/platform/pam/credential-health/overview"+ },+ {+ "source": "/documentation/platform/pam/concepts/pam-components",+ "destination": "/documentation/platform/pam/concepts/overview"+ },+ {+ "source": "/documentation/platform/pam/guides/team-access",+ "destination": "/documentation/platform/pam/quick-starts/launch-first-session"+ },+ {+ "source": "/documentation/platform/pam/ai-agents/sandbox",+ "destination": "/documentation/platform/pam/ai-agents/run#sandbox"+ },+ {+ "source": "/documentation/platform/pam/dependencies/overview",+ "destination": "/documentation/platform/pam/credential-rotation/windows#dependencies"+ },+ {+ "source": "/documentation/platform/pam/recording-storage",+ "destination": "/documentation/platform/pam/sessions/external-storage"},{"source": "/documentation/platform/pki/guides/applications/k8s-cert-manager",diff --git a/docs/documentation/getting-started/choose-a-product/pam.mdx b/docs/documentation/getting-started/choose-a-product/pam.mdxindex f75b0335b4..d4f1e73f91 100644--- a/docs/documentation/getting-started/choose-a-product/pam.mdx+++ b/docs/documentation/getting-started/choose-a-product/pam.mdx@@ -16,13 +16,13 @@ Infisical Privileged Access Management (PAM) brokers connections to systems such<Card title="Broker access to a database" icon="database" href="/documentation/platform/pam/quick-starts/launch-first-session">Allow users to connect to PostgreSQL, MySQL, and other databases without providing them with the credential.</Card>- <Card title="Broker access to a server" icon="server" href="/documentation/platform/pam/quick-starts/launch-first-session">+ <Card title="Broker access to a server" icon="server" href="/documentation/platform/pam/accounts/ssh">Allow users to open SSH sessions to jump boxes and production servers under policy-gated, recorded sessions.</Card><Card title="Give AI agents scoped access" icon="bot" href="/documentation/platform/pam/ai-agents/overview">Allow an AI agent to access infrastructure under the identity of the user who started it, or as its own machine identity.</Card>- <Card title="Record and replay sessions" icon="film" href="/documentation/platform/pam/overview">+ <Card title="Record and replay sessions" icon="film" href="/documentation/platform/pam/sessions/session-recording">Attribute every action to the identity that opened the session, and replay the session for later review.</Card></CardGroup>@@ -39,6 +39,6 @@ When access is brokered instead, the credential is stored in a single location a## How Infisical does it-Infisical PAM organizes credentials into three types of resources: templates, folders, and accounts. A template defines the structure of a type of credential, a folder groups related credentials, and an account is a specific credential that can be used to access a system. To access a system, a user requests a session against an account they have been granted access to. Infisical opens a connection to the target system through a [Gateway](/documentation/platform/gateways/overview), and the account's credential is applied within that connection. The credential isn't sent to the user's client. Sessions are recorded and can be replayed for later review.+Infisical PAM organizes credentials into three types of resources: templates, folders, and accounts. A template sets the rules for connecting with a type of credential, a folder groups related credentials, and an account is a specific credential that can be used to access a system. To access a system, a user requests a session against an account they have been granted access to. Infisical opens a connection to the target system through a [Gateway](/documentation/platform/gateways/overview), and the account's credential is applied within that connection. The credential isn't sent to the user's client. Sessions are recorded and can be replayed for later review.PAM sessions can be requested by users or by AI agents. A user connects through a browser or through the CLI. An [AI agent](/documentation/platform/pam/ai-agents/overview) can be configured to act as the user who started it, or to act as its own [machine identity](/documentation/platform/identities/machine-identities) with a distinct set of permissions. In both configurations, the credential is stored in Infisical, and every action is recorded in the audit log.diff --git a/docs/documentation/platform/identities/overview.mdx b/docs/documentation/platform/identities/overview.mdxindex a4a379b6db..035e3685dd 100644--- a/docs/documentation/platform/identities/overview.mdx+++ b/docs/documentation/platform/identities/overview.mdx@@ -129,7 +129,7 @@ Agents follow the same rule as any other workload: **identities are permission-b</Note><Tip>- A scoped machine identity can be narrower than the person operating the agent, which is why PAM recommends [running a sensitive or untrusted agent as its own identity](/documentation/platform/pam/ai-agents/overview#running-unattended) even when someone is watching it. That isolation is a deliberate least-privilege choice, and every identity you create for it counts.+ A scoped machine identity can be narrower than the person operating the agent, which is why PAM recommends [running a sensitive or untrusted agent as its own identity](/documentation/platform/pam/ai-agents/unattended) even when someone is watching it. That isolation is a deliberate least-privilege choice, and every identity you create for it counts.</Tip>#### Scoping agent identitiesdiff --git a/docs/documentation/platform/pam/access-requests/break-glass.mdx b/docs/documentation/platform/pam/access-requests/break-glass.mdxnew file mode 100644index 0000000000..cd759041f1--- /dev/null+++ b/docs/documentation/platform/pam/access-requests/break-glass.mdx@@ -0,0 +1,95 @@+---+title: "Break-glass access"+sidebarTitle: "Break-glass access"+description: "Let named responders grant themselves access in an emergency."+---++Break-glass access lets a named responder approve their own [access request](/documentation/platform/pam/access-requests/overview) when no approver is available, such as during an incident. Infisical notifies every approver that the responder skipped.++Break-glass access doesn't give anyone permanent access. The responder still files a request with a reason, and still gets access only for the duration they requested. The only difference is that no approver approves the request.++## Set up break-glass access++A responder can only use break-glass access if two settings are turned on, and a different admin owns each one:++- **On the account template:** A Product Admin turns on **Allow Break-Glass**, which decides which accounts allow break-glass access+- **On the folder:** An Admin of the folder adds responders under **Break-Glass Users**, which decides who can use break-glass access++If either setting is off, nobody can use break-glass access on the account.++Before you start, [set up approval](/documentation/platform/pam/access-requests/overview#set-up-approval) on the account. The template must have **Require Approval** turned on, and the folder must have at least one approver.++<Steps>+ <Step>+ As a [Product Admin](/documentation/platform/pam/concepts/access-control#product-membership), go to **Privileged Access Management** > **Account Templates**, open the template, and turn on **Allow Break-Glass**.+ </Step>+ <Step>+ As an Admin of the folder, open the folder's **Approvals** tab and add users or groups under **Break-Glass Users**.+ </Step>+ <Step>+ Select **Save Changes**.+ </Step>+</Steps>++Break-glass users must already be members of the folder. Only users and groups can be break-glass users, so a machine identity or an [AI agent](/documentation/platform/pam/ai-agents/overview) can't use break-glass access.++<Tip>+ Add only your on-call responders as break-glass users, not everyone who uses the folder's accounts.+</Tip>++## Use break-glass access++Break-glass access needs a reason of at least 10 characters that explains why the request can't wait for an approver. Infisical sends the reason to the approvers you skip and records it in the audit log.++You can use break-glass access when you file a request, or later while the request is pending.++<Tabs>+ <Tab title="When you file the request">+ <Steps>+ <Step>+ On the **Accounts** page, select the key icon on the account's row.+ </Step>+ <Step>+ Turn on **Break glass**, then enter the **Reason** and the duration.+ </Step>+ <Step>+ Select **Break glass**.+ </Step>+ </Steps>+ </Tab>+ <Tab title="While the request is pending">+ <Steps>+ <Step>+ On the **Accounts** page, select the clock icon on the account's row.+ </Step>+ <Step>+ Under **Break glass**, enter the **Reason** and select **Break glass**.+ </Step>+ </Steps>+ </Tab>+</Tabs>++You get the access that the request asked for. If you used break-glass access on a session request, you can launch sessions, and if you used it on a credential request, you can view the credential. The access expires at the end of the requested duration, an Admin of the folder can [revoke it](/documentation/platform/pam/access-requests/overview#revoke-access), and Infisical records your sessions like any other session.++## What Infisical records++Each time someone uses break-glass access, Infisical does the following:++- Emails each approver who was skipped, with the reason+- Notifies the skipped approvers in Infisical+- Sends the folder's **Break-Glass Used** [alert](/documentation/platform/pam/access-requests/overview#alerts), if the folder has one+- Adds a **PAM Access Policy Bypassed** event to the [audit log](/documentation/platform/pam/auditing) with the reason, the account, the folder, and the number of approvers skipped+- Shows a **Break-glass** badge on the request in the folder's **Access Requests** list++To review every use of break-glass access, filter the audit log for **PAM Access Policy Bypassed**.++## Frequently asked questions++<AccordionGroup>+ <Accordion title="Can I use break-glass access on someone else's request?">+ No. Break-glass access only approves your own pending request.+ </Accordion>+ <Accordion title="What happens if I'm removed from the folder while my request is pending?">+ If you're removed from the folder or from its **Break-Glass Users**, you can't use break-glass access on the request.+ </Accordion>+</AccordionGroup>diff --git a/docs/documentation/platform/pam/access-requests/overview.mdx b/docs/documentation/platform/pam/access-requests/overview.mdxindex e4ee0a427d..19cabddf17 100644--- a/docs/documentation/platform/pam/access-requests/overview.mdx+++ b/docs/documentation/platform/pam/access-requests/overview.mdx@@ -4,243 +4,157 @@ sidebarTitle: "Access requests"description: "Require approval before a member can use a sensitive account."----Some [accounts](/documentation/platform/pam/accounts/overview) are sensitive enough that simply having access to them shouldn't be enough to use them. A production database or a domain admin account should be reachable only by people who are already trusted, but even for them, each individual use should clear an extra checkpoint. Access requests add that checkpoint: before a member can [launch a session](/documentation/platform/pam/sessions/overview) on a gated account, their access has to be approved.+Access requests add an approval step to sensitive [accounts](/documentation/platform/pam/accounts/overview), such as a production database or a domain admin account. If an account requires approval, a member who already has access to it must request access and wait for an approver each time they need the account.-The template's **Require Approval** policy gates two things, and each is requested separately: launching a session, and [viewing the account's credentials](/documentation/platform/pam/accounts/overview#viewing-credentials). Everything below applies to both. An approved session request never reveals the credential, and an approved credential request never launches a session, so a member who needs both files both.+The same rule applies to [AI agents](/documentation/platform/pam/ai-agents/overview). An agent requests access as whoever started it, a person or a [machine identity](/documentation/platform/identities/machine-identities), and waits for an approver.-The same checkpoint applies to [AI agents](/documentation/platform/pam/ai-agents/overview). An agent requests access as whoever started it, a person or a [machine identity](/documentation/platform/identities/machine-identities), and waits for an approver either way.+## How approval works-## How it works+Approval adds to the access that a member already has. To use an account that requires approval, a member needs both of the following:-Approval sits on top of the access a member already holds. Two layers apply to a gated account:+- **A role on the account:** The Admin, Operator, or Connector [role](/documentation/platform/pam/concepts/access-control) on the account or its [folder](/documentation/platform/pam/folders/overview), which decides who can use the account at all+- **An approved request:** A request that an approver has approved, which gives the member access for the duration they asked for-- **Membership** grants use access, the right to launch a session and connect to the account. This comes from the [Admin, Operator, or Connector role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) or account, and it's the record of who can ever get in. Credential access needs the Operator or Admin role specifically.-- **Approval** decides whether a member is cleared to use that access right now.+A member can only request access to an account they already have a role on. When the duration ends, the member loses access until they file another request.-A gated account needs both. A member requests access on an account they can already use, an approver signs off, and the member's access opens for the duration they asked for. When the duration runs out, the access closes again.+### Session and credential requests-<Note>- A member can only request access on an account where they already hold use access. If they can't already launch a session on the account, there is nothing for them to request.-</Note>--## How an account becomes gated--Whether an account is gated comes down to the [template](/documentation/platform/pam/templates/overview) it uses.+Members request two kinds of access separately:-- The **[Product Admin](/documentation/platform/pam/concepts/access-control#product-membership)** builds the templates and turns on **Require Approval** for the ones meant to be secure.-- The **[Folder Admin](/documentation/platform/pam/concepts/access-control#folder-and-account-memberships)** gates an account by onboarding it with one of those templates. The account inherits the requirement from its template.-- The **Folder Admin** then seats the approvers on the folder's **Approvals** tab, since the template says approval is required but not who gives it.+- **Session access:** Launch [sessions](/documentation/platform/pam/sessions/overview) on the account+- **Credential access:** [View the account's credentials](/documentation/platform/pam/accounts/view-credentials), which needs the Operator or Admin role-```mermaid-graph TD- P["Product Admin<br/>builds a template with<br/>Require Approval enabled"]- O["Folder Admin<br/>onboards the account<br/>with that template"]- S["Folder Admin<br/>seats approvers on the<br/>folder's Approvals tab"]- G["Gated account"]+An approved session request doesn't reveal the credential, and an approved credential request doesn't let the member launch a session. A member who needs both files two requests.- P --> O --> G- S --> G-```+## Set up approval-## Setting up an access gate+An account requires approval when its [account template](/documentation/platform/pam/templates/overview) has **Require Approval** turned on. The approvers are set on the account's folder, so a Product Admin and an Admin of the folder each do part of the setup.<Steps>- <Step title="Prepare a secure template (Product Admin)">- Go to **Privileged Access Management → Account Templates**, open (or create) a template for the account type, and turn on **Require Approval**.-- See [Account Templates](/documentation/platform/pam/templates/overview) for the full list of template settings.+ <Step>+ As a [Product Admin](/documentation/platform/pam/concepts/access-control#product-membership), go to **Privileged Access Management** > **Account Templates**, open the template for the account type, and turn on **Require Approval**.</Step>- <Step title="Onboard the account with that template (Folder Admin)">- When you add the account to your folder, choose the template that requires approval. The account is now gated.+ <Step>+ As an Admin of the folder, add the account to the folder with that template. If the account already exists, a Product Admin must [change its template](/documentation/platform/pam/accounts/manage#change-the-template) instead.</Step>- <Step title="Seat approvers in the folder (Folder Admin)">- Open the folder and go to its **Approvals** tab. Add the users or groups who can approve requests for the folder's gated accounts.-- Approvers must be members of the folder, so the picker only offers people who already belong to it. An approver does not need use access to the account: approving is a governance action, not an access action.-- Only users and groups can be seated. Approving is a human sign-off, so a machine identity is never an approver, even one with Admin on the folder.+ <Step>+ Open the folder's **Approvals** tab, add the users or groups who can approve requests under **Approvers**, and select **Save Changes**.</Step></Steps>-<Warning>- A gated account with no approvers seated has no one who can clear its requests, so it stays locked until a Folder Admin adds approvers on the folder's **Approvals** tab.-</Warning>--## Requesting and granting access--### Filing a request--From the **Accounts** page, a member sees every account they can reach. Gated accounts show a **key icon** instead of the rocket (launch) button — select the key or select **Request Access** from the menu to start a request.--To request, the member provides a **reason** and a **duration**, both fixed at submission. The account then shows **Pending Approval** until it clears.+Approvers must already be members of the folder, which you add on the folder's **Permissions** tab. An approver doesn't need a role that lets them use the account.-Once approved, the key icon switches to the rocket icon and the member can launch sessions until the grant expires.+Only users and groups can be approvers. A machine identity can't approve a request, even if it has the Admin role on the folder.-### Reviewing a request--Approvers are notified by email and in the app when a request needs them. From **Approval Requests**, an approver sees the requests waiting on them, each showing the requester, account, folder, reason, and duration. A credential request carries a **Credentials** badge, so an approver can tell at a glance that approving hands over the raw password rather than opening a recorded session.--They **approve** or **reject** the request. A single approval from any one of the folder's seated approvers clears it; it doesn't have to come from a specific person.--### The request lifecycle--Every request carries the reason and duration set by the requester and moves through a small set of states.--| State | What it means |-|-------|---------------|-| **Pending Approval** | Filed and waiting on an approver. |-| **Approved** | An approver signed off. The access it asked for is now active and the member can launch sessions. |-| **Expired** | The requested duration ran out and the access closed on its own. |-| **Rejected** | An approver declined the request. No access was granted. |-| **Revoked** | Active access was ended early by a Folder Admin before its duration ran out. |--```mermaid-graph LR- P["Pending Review"] -->|approved| A["Approved / Active"]- P -->|declined| R["Rejected"]- A -->|duration ends| E["Expired"]- A -->|ended early| V["Revoked"]-```--Rejected, expired, and revoked requests stay in the list so the audit trail stays complete.--## Break-glass access--Break-glass access lets a named responder clear their own pending request without an approver. Every approver who was skipped is notified immediately.--It grants no standing access. The responder still files a request, still gives a reason, and still gets a time-boxed grant. The only thing that changes is who signs it off.--### The two switches+<Warning>+ Members can't request access to an account that requires approval until its folder has at least one approver.+</Warning>-Break-glass needs two switches on, and a different person owns each one:+## Request access-- The **Product Admin** turns on **Allow Break-Glass** on the [template](/documentation/platform/pam/templates/overview). This sets which accounts can ever be broken into.-- The **Folder Admin** names the break-glass users on the folder's **Approvals** tab. This sets who can do it.+On the **Accounts** page, an account that requires approval shows a key icon instead of the launch icon.-An empty break-glass list means nobody, not everybody, so the template policy on its own changes nothing until a Folder Admin names someone.+<Steps>+ <Step>+ Select the key icon on the account's row. To request the credential instead of a session, open the account's menu and select **Request Credentials**.+ </Step>+ <Step>+ Enter a **Reason**, which approvers see and the audit log records. The reason is required if the template has **Require Reason** turned on.+ </Step>+ <Step>+ Choose how long you need access, from 15 minutes to 1 week, and select **Request session access** or **Request credentials**.+ </Step>+</Steps>-<Note>- **Allow Break-Glass** does nothing without **Require Approval** on the same template. Break-glass skips an approval, so an account that never needed one has nothing to skip.-</Note>+While the request waits for an approver, the account shows a clock icon. After an approver approves the request, the account shows the launch icon until the access expires.-```mermaid-graph TD- T["Product Admin<br/>turns on Allow Break-Glass<br/>on the template"]- F["Folder Admin<br/>names break-glass users<br/>on the Approvals tab"]- B["Responder can break glass"]+You can't change the reason or the duration after you submit the request. To change either one, ask an approver to deny the request, then file a new one.- T --> B- F --> B-```+## Review a request-### Setting it up+When a member requests access, Infisical notifies the folder's approvers by email and in Infisical.<Steps>- <Step title="Turn on the template policy (Product Admin)">- Go to **Privileged Access Management → Account Templates**, open the template, and turn on **Allow Break-Glass** alongside **Require Approval**.+ <Step>+ Go to **Privileged Access Management** > **Approval Requests** and select the request.</Step>- <Step title="Name the responders (Folder Admin)">- Open the folder, go to its **Approvals** tab, and add users or groups under **Break-Glass Users**.-- Break-glass users must be members of the folder, same as ordinary approvers, so the picker only offers people who already belong to it. Keep the list to your on-call responders rather than everyone who might need the account.+ <Step>+ Check the requester, the account, the reason, and the duration. If the request is for credential access, approving it lets the requester read the password or key outside a recorded session.+ </Step>+ <Step>+ Optionally, enter an **Approval comment** for the requester, then select **Approve** or **Deny**.</Step></Steps>-### Breaking glass--There are two ways in, and both need a reason of at least 10 characters explaining why this can't wait for an approver. The reason is recorded in the audit log and sent to the approvers who were skipped.+One approval from any of the folder's approvers is enough. You can't approve a request that you filed yourself.-If you already know nobody is available to approve, turn on **Break glass** in the request form before you submit. The request is raised and granted in one step, and the reason you gave doubles as the bypass reason.+## Request statuses-If you filed a request and then decided not to wait, reopen the account from the **Accounts** page while the request is pending. The sheet offers **Break glass** below the approval workflow.+| Status | Meaning |+|--------|---------|+| **Pending Review** | The request is waiting for an approver |+| **Approved** | An approver approved the request, and the access is active |+| **Rejected** | An approver denied the request |+| **Expired** | The requested duration ended |+| **Revoked** | An Admin of the folder ended the access before the duration ended |-Either way, the grant is the one the request asked for. It expires on the same clock, a Folder Admin can revoke it the same way, and sessions on it are recorded like any other. Breaking glass on a credential request grants a credential reveal, not a session.+The duration starts when an approver approves the request, not when the member files it, so the member always gets the full duration they asked for.-### What happens next+To see every request for a folder's accounts, open the folder's **Approvals** tab and go to **Access Requests**.-Every use of break-glass:+## Revoke access-- Emails every approver who was skipped, with the reason given-- Notifies them in the app-- Notifies the channels on the folder's **Break-Glass Used** [alert](#alerts), if the folder has one-- Writes a **PAM Access Policy Bypassed** entry to the [audit log](/documentation/platform/pam/auditing) with the reason, the account, the folder, and how many approvers were skipped-- Marks the request with a **Break-glass** badge in the folder's request history+An Admin of the folder can end an approved request before its duration ends. On the folder's **Approvals** tab, go to **Access Requests** and select **Revoke access** on the request's row.-The badge and the audit entry are permanent.+If you revoke a session request, Infisical ends the member's active sessions on the account immediately. If you revoke a credential request, the member can't reveal the credential again, but a credential they already copied stays valid until you [rotate](/documentation/platform/pam/credential-rotation/overview) the account.## Alerts-An alert notifies your team about access requests in a folder through email, Slack, a webhook, or PagerDuty. Each alert watches one event:+An alert notifies your team about access requests in a folder through email, Slack, a webhook, or PagerDuty. Each alert watches one of the following events:-| Event | When it fires |-|-------|---------------|-| **Access Requested** | Someone requests access to an account in the folder |+| Event | When the alert fires |+|-------|----------------------|+| **Access Requested** | A member requests access to an account in the folder || **Request Approved** | An approver approves a request |-| **Request Denied** | An approver rejects a request |-| **Break-Glass Used** | Someone uses [break-glass](#break-glass-access) to get access without an approver |+| **Request Denied** | An approver denies a request |+| **Break-Glass Used** | A member uses [break-glass access](/documentation/platform/pam/access-requests/break-glass) to skip the approvers |++To add an alert, open the folder's **Approvals** tab, select **Alerts**, and select **Add Alert**. A folder can have one alert for each event.-A Folder Admin adds and manages alerts by selecting **Alerts** on the folder's **Approvals** tab. A folder can have one alert per event, and Slack, webhook, and PagerDuty channels need an Enterprise plan.+<Note>+ Slack, webhook, and PagerDuty channels need the Enterprise plan. Email channels are available on every plan.+</Note>## Requests from AI agents-An agent requests access on the same terms as a person, but from the [CLI](/cli/reference#pam-agentic-access) instead of the dashboard. A request from an agent running as a machine identity shows the identity's name in place of a requester's email; one from an agent you started yourself is filed under your own name.+An AI agent requests access through the [CLI](/cli/reference#pam-agentic-access). If the agent runs as you, the request is filed under your name. If the agent runs as a machine identity, the request shows the identity's name.-When an agent reaches for a gated account, the request is filed for it automatically, and the account starts working on the agent's next attempt after you approve.+The first time an agent connects to an account that requires approval, the CLI files a request for the agent. After an approver approves the request, the agent's next connection to the account works.<Warning>- Approving a request from an agent's identity means approving whatever that agent does with the access for the duration you grant. Keep those identities scoped to the accounts they need, and review the [session recordings](/documentation/platform/pam/sessions/session-recording).+ When you approve a request from an agent, you approve everything the agent does with the access for the duration you grant. Give an agent's machine identity a role on only the accounts it needs, and review its [session recordings](/documentation/platform/pam/sessions/session-recording).</Warning>## Frequently asked questions<AccordionGroup>- <Accordion title="When does the duration clock start, at filing or at approval?">- At approval. The countdown begins the moment access becomes active, not when the request was filed, so the requester gets the full duration they asked for regardless of how long approval took. A four-hour request that sits pending for three hours still grants four hours of access once it clears. Time spent waiting on approvers never eats into the granted duration.- </Accordion>- <Accordion title="Can an approver approve their own request?">- No. An approver who files a request can't approve it. That separation of duties stops any one person from clearing their own access.- </Accordion>- <Accordion title="Can an approver change the requested reason or duration?">- No. The reason and duration are fixed by the requester when they file, and an approver can only approve or reject. If the duration looks wrong, the approver rejects the request and the requester files a new one. What gets approved is always exactly what was requested.- </Accordion>- <Accordion title="Does an approver need use access to the account?">- No. An approver has to be a member of the folder, but approving is a governance action rather than an access action, so they don't need to be able to use the gated account themselves.- </Accordion>- <Accordion title="Who can revoke access once it is granted?">- A Folder Admin. Revoking ends an active request right away and cuts off access before its duration runs out. Any active session using that access is terminated immediately.+ <Accordion title="What happens if the account moves while a request is pending?">+ If the account is deleted, Infisical cancels the request.- Revoking a credential request is weaker: it stops further reveals, but a credential already copied is outside Infisical and stays valid until the account is rotated. It also leaves live sessions alone, since those are authorized by their own grant.+ If the account moves to another folder, Infisical won't approve the request, and the member can't file a new one while it's pending. An approver of the old folder must deny the old request first. The member can then file a new request, which goes to the approvers of the account's current folder.</Accordion>- <Accordion title="Can a machine identity or an AI agent break glass?">- No. Only a person can break glass, whether they're named directly or belong to a group that is, the same rule that keeps a machine identity from being an ordinary approver.- </Accordion>- <Accordion title="Can someone break glass on another person's request?">- No. Break-glass clears your own pending request and nothing else.- </Accordion>- <Accordion title="Does break-glass give longer or wider access than an approval?">- No. The grant is the one the request asked for: same duration, same account, same expiry. A Folder Admin can revoke it early, and sessions on it are recorded like any other. The only difference is that no approver signed it off.- </Accordion>- <Accordion title="What happens if the account moves or the folder's policy changes mid-request?">- Infisical runs the same checks it runs for an approval, and refuses rather than granting access under a folder's old rules. That covers an account that moved to another folder or was removed, and a folder whose approvers were cleared. You'll also lose the ability to break glass if you're dropped from the folder, or from its break-glass list, while your request is pending.- </Accordion>- <Accordion title="Do changes to a folder's approvers apply to requests already in flight?">- Removing an approver takes effect right away: someone dropped from the folder's approvers can no longer act on a request that is still pending. Adding an approver doesn't reach back into requests already in flight, so a pending request can only be cleared by the approvers it had when it was created. An approved request is already granted and keeps its access until it expires or is revoked, whatever changes afterward.+ <Accordion title="Do changes to a folder's approvers apply to pending requests?">+ If you remove an approver, they can't act on pending requests from that point on. If you add an approver, they can only act on requests filed after you added them. An approved request keeps its access until it expires or an Admin of the folder revokes it.</Accordion></AccordionGroup>## Next steps<CardGroup cols={2}>- <Card title="Account Templates" icon="layers" href="/documentation/platform/pam/templates/overview">- Turn on Require Approval for sensitive account types.- </Card>- <Card title="Folders" icon="folder-tree" href="/documentation/platform/pam/folders/overview">- Seat approvers on the folder's Approvals tab.- </Card>- <Card title="Access Control" icon="shield-half" href="/documentation/platform/pam/concepts/access-control">- Understand the roles that grant use access in the first place.+ <Card title="Break-glass access" icon="shield-alert" href="/documentation/platform/pam/access-requests/break-glass">+ Let named responders grant themselves access in an emergency.</Card>- <Card title="Accounts" icon="user-lock" href="/documentation/platform/pam/accounts/overview">- Add the databases and servers you want to gate.+ <Card title="Account templates" icon="layers" href="/documentation/platform/pam/templates/overview">+ Set the rules for connecting to the accounts that use a template.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/account-types.mdx b/docs/documentation/platform/pam/accounts/account-types.mdxnew file mode 100644index 0000000000..47f292f229--- /dev/null+++ b/docs/documentation/platform/pam/accounts/account-types.mdx@@ -0,0 +1,18 @@+---+title: "Account types"+sidebarTitle: "Account types"+description: "Find the setup guide for each database, server, cluster, and cloud provider that PAM supports."+---++import { CatalogBrowser } from "/snippets/CatalogBrowser.jsx";+import { pamAccountTypes, pamAccountTypeCategories, pamAccountTypeBadges } from "/snippets/catalogs/pam-account-types.jsx";++Each account type has a page that describes its connection details, its credentials, and how to connect to it. You can [connect](/documentation/platform/pam/accounts/connect) to every account type with the Infisical CLI, and the cards show which account types also open in the browser.++<CatalogBrowser+ id="pam-account-types"+ items={pamAccountTypes}+ categories={pamAccountTypeCategories}+ noun="account type"+ badges={pamAccountTypeBadges}+/>diff --git a/docs/documentation/platform/pam/accounts/add.mdx b/docs/documentation/platform/pam/accounts/add.mdxnew file mode 100644index 0000000000..2c07b7fc82--- /dev/null+++ b/docs/documentation/platform/pam/accounts/add.mdx@@ -0,0 +1,43 @@+---+title: "Add an account"+sidebarTitle: "Add an account"+description: "Store the connection details and credentials for a database or server in PAM."+---++When you add an [account](/documentation/platform/pam/accounts/overview), you choose a [folder](/documentation/platform/pam/folders/overview) and an [account template](/documentation/platform/pam/templates/overview) for it. Everyone with a role on the folder gets access to the account, and the template sets the account type and the rules for its sessions. Then you enter the details Infisical needs to reach the database or server, and the credential it signs in with.++## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the folder that the account goes in+- An [account template](/documentation/platform/pam/templates/overview) for the account type+- A [gateway](/documentation/platform/gateways/overview) that can reach the database or server (AWS IAM accounts don't need one)++## Add the account++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **Add Account**.+ </Step>+ <Step>+ Select the **Folder** and the **Account Template**, then select **Next**. The template sets the account type.+ </Step>+ <Step>+ Enter a **Name** and the connection details. If the template doesn't set a gateway, select a **Gateway**.++ The page for each [account type](/documentation/platform/pam/accounts/account-types) describes its fields.+ </Step>+ <Step>+ Enter the credentials, then select **Create**.+ </Step>+</Steps>++## Next steps++<CardGroup cols={2}>+ <Card title="Connect to an account" icon="plug" href="/documentation/platform/pam/accounts/connect">+ Open a session on an account from your browser or the Infisical CLI.+ </Card>+ <Card title="Manage an account" icon="sliders-horizontal" href="/documentation/platform/pam/accounts/manage">+ Change an account's details, access, and settings after you add it.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/aws-iam.mdx b/docs/documentation/platform/pam/accounts/aws-iam.mdxindex 96fa172d4d..652a07ac60 100644--- a/docs/documentation/platform/pam/accounts/aws-iam.mdx+++ b/docs/documentation/platform/pam/accounts/aws-iam.mdx@@ -1,45 +1,26 @@---title: "AWS IAM accounts"sidebarTitle: "AWS IAM"-description: "Add and connect to AWS accounts via IAM role assumption."+description: "Give people temporary access to AWS through an IAM role."----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.+An AWS IAM account lets people work in AWS as an IAM role without holding long-lived access keys. When someone launches a session, Infisical assumes the role through AWS STS and gives them temporary credentials. They can open the AWS Management Console in the browser or use the credentials with the AWS CLI.-Infisical assumes the IAM role you configure directly, then returns short-lived STS credentials. Those credentials work with the AWS CLI and can also be exchanged for a federated AWS Management Console sign-in URL.+AWS IAM accounts don't use a [Gateway](/documentation/platform/gateways/overview), because Infisical calls AWS STS directly.-<Note>-AWS IAM accounts don't require a Gateway. Infisical communicates directly with the AWS STS API.-</Note>--## How it works+## Prerequisites-When a user accesses an AWS IAM account, Infisical assumes the account's IAM role using AWS STS and returns the temporary credentials:+- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- Permission to create IAM roles in the AWS account+- Your Infisical organization ID, which you can copy from **Organization ID** in your organization's settings-```mermaid-sequenceDiagram- participant User- participant Infisical- participant Role as IAM Role<br/>(Your AWS Account)- participant Console as AWS Console- User->>Infisical: Request AWS access- Infisical->>Role: AssumeRole (with ExternalId = Org ID)- Role-->>Infisical: Temporary credentials- Infisical-->>User: Return credentials (CLI)- Infisical->>Console: Exchange for federation URL (Console)- Console-->>Infisical: Signed console URL- Infisical-->>User: Return console URL-```+## Create an IAM role-There is a single role per account. Its trust policy allows Infisical to assume it, scoped by an **External ID** set to your **Infisical Organization ID**. The External ID prevents [confused deputy attacks](https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html), where another Infisical customer could otherwise trick Infisical into assuming your role.--## Prerequisites--Before adding the account in Infisical, create the IAM role in your AWS account with a trust policy that allows Infisical to assume it.+Each account assumes one IAM role. The role's trust policy lets Infisical assume the role only when Infisical sends your organization ID as the [external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html), so no other Infisical customer can get Infisical to assume it.<Steps>- <Step title="Create the role with a trust policy">- Create an IAM role (e.g., `infisical-pam-readonly`) with the following trust policy. Replace `<INFISICAL_AWS_ACCOUNT_ID>` with the Infisical account ID for your region and `<YOUR_INFISICAL_ORG_ID>` with your Infisical Organization ID.+ <Step>+ In AWS, create an IAM role, such as `infisical-pam-readonly`, with the following trust policy:```json{@@ -47,120 +28,81 @@ Before adding the account in Infisical, create the IAM role in your AWS account"Statement": [{"Effect": "Allow","Principal": {- "AWS": "arn:aws:iam::<INFISICAL_AWS_ACCOUNT_ID>:root"+ "AWS": "arn:aws:iam::<infisical-aws-account-id>:root"},"Action": "sts:AssumeRole","Condition": {"StringEquals": {- "sts:ExternalId": "<YOUR_INFISICAL_ORG_ID>"+ "sts:ExternalId": "<your-infisical-organization-id>"}}}]}```- <Warning>- Always include the External ID condition. Without it, another Infisical customer could potentially trick Infisical into assuming your role.- </Warning>-- **Infisical AWS Account IDs:**-- | Region | Account ID |- |--------|------------|- | US | `381492033652` |- | EU | `345594589636` |-- <Note>- **For Dedicated Instances**: Your AWS account ID differs from the ones listed above. Contact Infisical support to obtain your dedicated AWS account ID.- </Note>- <Note>- **For Self-Hosted Instances**: Use the AWS account ID where your Infisical instance is deployed. This is the account that hosts your Infisical infrastructure and will be assuming the role.- </Note>+ Replace `<infisical-aws-account-id>` with the AWS account that Infisical runs in:- You can find your Infisical Organization ID under **Organization Settings**.+ | Infisical instance | AWS account ID |+ |--------------------|----------------|+ | Infisical Cloud (US) | `381492033652` |+ | Infisical Cloud (EU) | `345594589636` |+ | Dedicated instance | Ask Infisical support for your instance's account ID |+ | Self-hosted | The AWS account your Infisical instance runs in |</Step>- <Step title="Attach permissions to the role">- Attach whatever permissions policies define what this role can do in AWS. These are the permissions users receive when they access this account through Infisical.+ <Step>+ Attach permission policies to the role. People who access the account get exactly these permissions in AWS.+ </Step>+ <Step>+ Set the role's **Maximum session duration** to cover the longest session you'll allow, as described in [Session duration](#session-duration).</Step></Steps>-## Creating an account+## Create an account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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>+ Select the **Folder** to add the account to and an AWS IAM **Account Template**, such as the default `aws-iam` [template](/documentation/platform/pam/templates/overview), then select **Next**.</Step>- <Step title="Enter connection details">- | Field | Description |- |-------|-------------|- | **Name** | A descriptive name (e.g., `prod-admin-access`) |- | **Role ARN** | The ARN of the IAM role Infisical assumes for this account (e.g., `arn:aws:iam::123456789012:role/infisical-pam-readonly`) |+ <Step>+ Enter a **Name** for the account and the **Role ARN** of the role you created, such as `arn:aws:iam::123456789012:role/infisical-pam-readonly`.</Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>-<Note>- To expose the same role in more than one folder, add an account in each folder pointing at the same **Role ARN**. Each account is a distinct entry that references the same underlying IAM role.-</Note>+To offer the same role in more than one folder, create an account with the same **Role ARN** in each folder.## Session duration-Sessions use short-lived STS credentials. The duration is bounded by the target role's **maximum session duration** in AWS (`MaxSessionDuration`), with a minimum of 15 minutes. Requesting longer than the role allows will cause AWS to reject the request, so set the role's `MaxSessionDuration` to cover the session lengths you expect.--<Info>- AWS Console sessions can't be terminated early. Once a federated URL is generated, the session remains valid until it expires. You can [revoke active sessions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_revoke-sessions.html) by modifying the role's trust policy.-</Info>+A session lasts for the template's maximum session duration, unless the person requests a shorter one. AWS rejects a session that's shorter than 15 minutes or longer than the role's maximum session duration, so make sure both limits allow the sessions you expect.-All actions performed with the credentials are logged in [AWS CloudTrail](https://console.aws.amazon.com/cloudtrail). The session is identified by the `RoleSessionName`, which includes the user's email for attribution.+<Warning>+ You can't end an AWS Management Console session early. Terminating the session in Infisical doesn't sign the person out of the console, which stays signed in until the session expires. To cut off access sooner, [revoke the role's active sessions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_revoke-sessions.html) in AWS.+</Warning>-## Connecting+## Connect-<Tabs>- <Tab title="AWS Console">- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and select the rocket icon (or select **Launch Session** from the menu)- 3. Select **Connect in Browser**- 4. You'll be taken directly to the AWS console, logged in with the role- </Tab>- <Tab title="CLI">- The CLI writes temporary credentials to your AWS credentials file as a named profile:+To learn how to launch a session, see [Connect to an account](/documentation/platform/pam/accounts/connect). In the browser, the session opens the AWS Management Console, signed in as the role.- ```bash- infisical pam access my-folder/prod-admin-access- ```+The CLI writes temporary credentials to `~/.aws/credentials` as a profile named `infisical-pam/<folder>/<account>`:- 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+infisical pam access <folder>/<account>+```- ```bash- export AWS_PROFILE="infisical-pam/my-folder/prod-admin-access"- aws sts get-caller-identity- ```+Pass the profile to the AWS CLI, or set `AWS_PROFILE` to use it for every command:- Press **Ctrl+C** to stop and remove the credentials profile.+```bash+export AWS_PROFILE="infisical-pam/<folder>/<account>"+aws sts get-caller-identity+```- **Flags:**- - `--reason <reason>`: provide an access reason (if required by template)- </Tab>-</Tabs>+Press `Ctrl+C` to end the session. The CLI then removes the profile.-## Next steps+## Track activity in AWS-<CardGroup cols={2}>- <Card title="Kubernetes Accounts" icon="settings" href="/documentation/platform/pam/accounts/kubernetes">- Add Kubernetes cluster accounts.- </Card>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.- </Card>-</CardGroup>+Infisical names each STS session after the email of the person who launched it, or after the name of the [machine identity](/documentation/platform/identities/machine-identities). In [AWS CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html), the session name shows who made each call.diff --git a/docs/documentation/platform/pam/accounts/azure-cli.mdx b/docs/documentation/platform/pam/accounts/azure-cli.mdxindex dbad4c9809..0a4d98b6c9 100644--- a/docs/documentation/platform/pam/accounts/azure-cli.mdx+++ b/docs/documentation/platform/pam/accounts/azure-cli.mdx@@ -1,90 +1,76 @@---title: "Azure CLI accounts"sidebarTitle: "Azure CLI"-description: "Add and connect to Azure via a brokered service principal, using the Azure CLI."+description: "Give people Azure CLI access to Azure as a service principal."----Azure CLI accounts let you broker credential-less access to Azure. Instead of handing out a service principal's client secret, users request access through Infisical and run `az` commands as the target service principal through a [Gateway](/documentation/platform/gateways/overview), with every command logged. The secret never leaves Infisical.+An Azure CLI account lets people run `az` commands as a Microsoft Entra ID service principal without handing out its client secret. When someone launches a session, Infisical gets short-lived access tokens for the service principal. Their `az` requests go through a [Gateway](/documentation/platform/gateways/overview), which adds the right token to each request. Azure CLI accounts only support the CLI, not browser access.-<Note>-Azure CLI accounts are available through the **CLI and API only**. There is no in-browser (web) access.-</Note>+Infisical records each request's method, URL, and response body. It leaves out the bodies of Azure Key Vault requests and responses, because they can contain secret values.-## How it works+## Prerequisites-Each account points at a single Microsoft Entra ID service principal, identified by its tenant ID and client ID, with a client secret stored encrypted. When a user starts a session:+- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A Gateway that can reach the following hosts on port `443`: `login.microsoftonline.com`, `management.azure.com`, `graph.microsoft.com`, `*.vault.azure.net`, and `*.core.windows.net`+- Permission to register applications in Microsoft Entra ID and to assign roles on the Azure resources the account should reach+- The [Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli) on the machine of each person who connects-1. Infisical obtains short-lived access tokens for the service principal (via the OAuth 2.0 client-credentials grant), one per supported Azure plane: Resource Manager, Microsoft Graph, Key Vault, and Storage.-2. The user's `az` traffic is routed through a local proxy to the Infisical **Gateway**, which reaches Azure on their behalf.-3. The Gateway injects the token for the plane each request targets before forwarding it, so the user never handles a real credential. To `az`, the local login only ever holds a placeholder token.+## Create a service principal-A plane is only usable if the service principal has permission for it (RBAC for Resource Manager, Key Vault, and Storage; application permissions with admin consent for Microsoft Graph). Planes the principal can't get a token for are simply not brokered.+<Steps>+ <Step>+ In the Azure portal, go to **Microsoft Entra ID** > **App registrations** and select **New registration**. Enter a name, such as `infisical-pam`, and register the app.+ </Step>+ <Step>+ On the app's **Overview** page, copy the **Application (client) ID** and the **Directory (tenant) ID**.+ </Step>+ <Step>+ Go to **Certificates & secrets** and select **New client secret**. Copy the secret's **Value**, not its **Secret ID**. Azure only shows the value once.+ </Step>+ <Step>+ Open the subscription or resource group the account should reach, go to **Access control (IAM)**, and select **Add role assignment**. Choose a role, such as **Reader**, and on the **Members** tab select the app you registered.+ </Step>+</Steps>-## Creating an account+People can only reach the Azure services that the service principal has access to. Azure Resource Manager, Key Vault, and Storage need an Azure role assignment. Microsoft Graph needs application permissions with admin consent.-Before adding the account, create a service principal in Azure and give it access.+## Create an account<Steps>- <Step title="Create a service principal">- In the Azure Portal, go to **Microsoft Entra ID → App registrations → New registration**, give it a name (e.g., `infisical-pam`), and register it. From the app's **Overview**, record the **Application (client) ID** and **Directory (tenant) ID**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **Add Account**.</Step>- <Step title="Create a client secret">- In the app, go to **Certificates & secrets → New client secret**, then copy the secret **Value** immediately (it's shown only once). This is the secret you paste into Infisical, not the Secret ID.+ <Step>+ Select the **Folder** to add the account to and an Azure CLI **Account Template**, such as the default `azure-cli` [template](/documentation/platform/pam/templates/overview), then select **Next**.</Step>- <Step title="Grant the service principal access">- RBAC role assignments are made on the resource, not on the app. Open the subscription (or a resource group) you want to grant access to, go to **Access control (IAM) → Add role assignment**, pick a role (for example **Reader**), and on the **Members** tab select your app registration. Assign a more privileged role only if the session needs write access.- </Step>- <Step title="Start adding the account in Infisical">- Go to **Privileged Access Management → Accounts** and select **Add Account**. Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select an Azure CLI [template](/documentation/platform/pam/templates/overview).+ <Step>+ Enter a **Name** for the account and the service principal's details:- The template (or the account) must be assigned a [Gateway](/documentation/platform/gateways/overview): Azure traffic is proxied through it, so the Gateway needs outbound access on port `443` to `login.microsoftonline.com`, `management.azure.com`, `graph.microsoft.com`, `*.vault.azure.net`, and `*.core.windows.net`.- </Step>- <Step title="Enter connection details and credentials">| Field | Description ||-------|-------------|- | **Name** | A descriptive name (e.g., `prod-reader`) |- | **Tenant ID** | The directory (tenant) ID, a GUID or a domain such as `contoso.onmicrosoft.com` |- | **Subscription ID** | Optional. The subscription the CLI session defaults to |- | **Client ID** | The application (client) ID of the service principal (a GUID) |- | **Client Secret** | A client secret for the service principal. Stored encrypted and never returned to clients |+ | **Tenant ID** | The directory (tenant) ID, or a domain such as `contoso.onmicrosoft.com` |+ | **Subscription ID** | The subscription that `az` uses by default during a session (optional) |+ | **Gateway** | The Gateway that connects to Azure (only shown if the template doesn't set one) |+ | **Client ID** | The application (client) ID |+ | **Client Secret** | The client secret value |</Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>-## Connecting+## Connect-Use the CLI to start a session. This requires the [Azure CLI (`az`)](https://learn.microsoft.com/cli/azure/install-azure-cli) to be installed locally.+To learn how to launch a session, see [Connect to an account](/documentation/platform/pam/accounts/connect). The CLI command for the account is:```bash-infisical pam access my-folder/prod-reader+infisical pam access <folder>/<account>```-The command starts an isolated, authenticated shell for the session. It doesn't touch your own `az` login. Run `az` commands as normal:+The CLI opens a new shell that's signed in to Azure as the service principal. Your own `az` login isn't changed. Run `az` commands in that shell:```bash-az account showaz group list```-Type `exit` to end the session (or press **Ctrl+C**, or wait for it to expire). The isolated session state is wiped when the session ends.--**Flags:**-- `--reason <reason>`: provide an access reason (if required by the template)-- `--duration <duration>`: request a session duration (e.g., `30m`), capped at the template maximum--<Note>-An Azure session recording is a log of the HTTP requests and responses made to Azure during the session: each request's method and URL, and its response body. Key Vault request and response bodies are redacted in the log, since they carry secret values.-</Note>--## Next steps--<CardGroup cols={2}>- <Card title="GCP Service Account Accounts" icon="google" iconType="brands" href="/documentation/platform/pam/accounts/gcp-service-account">- Add GCP service account accounts.- </Card>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.- </Card>-</CardGroup>+Type `exit` to end the session. The CLI then deletes the session's Azure CLI configuration.diff --git a/docs/documentation/platform/pam/accounts/clickhouse.mdx b/docs/documentation/platform/pam/accounts/clickhouse.mdxindex 264905ea4b..53c78496f9 100644--- a/docs/documentation/platform/pam/accounts/clickhouse.mdx+++ b/docs/documentation/platform/pam/accounts/clickhouse.mdx@@ -1,137 +1,127 @@---title: "ClickHouse accounts"sidebarTitle: "ClickHouse"-description: "Add and connect to ClickHouse databases."+description: "Give people and agents access to a ClickHouse database without sharing its credentials."----ClickHouse accounts let you manage access to a ClickHouse database. Users connect through Web Access or the CLI, and every statement they run is recorded in the [session](/documentation/platform/pam/sessions/overview).+A ClickHouse [account](/documentation/platform/pam/accounts/overview) stores the credentials for one ClickHouse user. Members connect in the browser or through the Infisical CLI, and Infisical records every statement they run.-Sessions can use either of ClickHouse's interfaces: HTTP on port 8123 (8443 with TLS) and the native protocol on port 9000 (9440 with TLS). Each session gets one local port that works with both, and the credential never reaches the client.+ClickHouse has two interfaces, and an account can use either or both:-Set the ports your server serves and leave the other empty. An account needs at least one.+- **HTTP**: port `8123`, or `8443` with TLS (the browser and HTTP clients, such as JDBC tools, `clickhouse-connect`, and `curl`, use this interface)+- **Native protocol**: port `9000`, or `9440` with TLS (`clickhouse-client` and other native drivers use this interface)## Prerequisites-- A ClickHouse user for Infisical to connect as.-- At least one interface enabled on the server. Both are on by default, and ClickHouse Cloud serves both.-- TLS on both interfaces or neither, since **SSL Enabled** applies to both.-- A [gateway](/documentation/platform/gateways/overview) that can reach those ports. A **Native Port** needs a gateway recent enough to support the native protocol.+- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A ClickHouse user for Infisical to sign in as+- TLS turned on for both interfaces or for neither, because **SSL Enabled** applies to both+- A [gateway](/documentation/platform/gateways/overview) that can reach the ports you use (to use the native protocol, the gateway must be recent enough to support it)+- A ClickHouse [account template](/documentation/platform/pam/templates/overview)-## Creating an account+## Grant the user permissions-<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **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 ClickHouse [template](/documentation/platform/pam/templates/overview).- </Step>- <Step title="Enter connection details">- | Field | Description |- |-------|-------------|- | **Name** | A descriptive name (e.g., `analytics-prod`) |- | **Host** | ClickHouse host |- | **HTTP Port** | The HTTP interface port. 8123 for plain HTTP, 8443 for HTTPS. Leave empty if the server only serves the native protocol |- | **Native Port** | The native protocol port. 9000 for plain TCP, 9440 with SSL. Needed by `clickhouse-client` and other native drivers. Leave empty if the server only serves HTTP |- | **Database** | The database sessions open. Web Access lists the tables inside it |- | **SSL Enabled** | Use TLS for the connection. Applies to both interfaces, so pair it with ports 8443 and 9440. Required for ClickHouse Cloud |- | **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** | The ClickHouse user sessions connect as. Use `default` for the built-in user |- | **Password** | The user's password. Leave blank for a user created with `no_password` |- </Step>- <Step title="Save">- Select **Create**. Infisical checks the connection through the gateway before saving, and an error names the port that failed.- </Step>-</Steps>--## Permissions--What a session can do comes from the ClickHouse grants on the account's user, so grant that user only what the people using the account need.+A session can do whatever the ClickHouse user can do, so grant the user only what the account's users need:```sqlCREATE USER pam_service IDENTIFIED WITH sha256_password BY '<password>';GRANT SELECT ON analytics.* TO pam_service;```-Every session opens on the account's **Database**, whatever a client asks for. That is a starting point, not a limit: a session can still read any database the user has a grant on, and Web Access lists them all. Scope the grants, not the **Database** field.+The account's **Database** only sets the database that a session starts in. A session can read every database that the user has a grant on, so limit access with grants instead.-Sessions connect with the user's default roles. To use another role, run `SET ROLE` in the session.+Sessions start with the user's default roles. To switch to another role, run `SET ROLE` in the session.-Command blocking matches the text of each statement, so a statement that builds SQL at runtime can run something a pattern would otherwise reject. Use ClickHouse grants for restrictions that have to hold.+## Create the account++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **Add Account**.+ </Step>+ <Step>+ Select the **Folder** and a ClickHouse **Account Template**, then select **Next**.+ </Step>+ <Step>+ Enter a **Name** and the connection details:-## Connecting+ | Field | Description |+ | --- | --- |+ | **Host** | The server's hostname |+ | **HTTP Port** | The HTTP interface's port (leave it empty if the server only serves the native protocol) |+ | **Native Port** | The native protocol's port (leave it empty if the server only serves HTTP) |+ | **Database** | The database that sessions start in (defaults to `default`) |+ | **SSL Enabled** | Whether to connect over TLS (required for ClickHouse Cloud) |+ | **Reject Unauthorized** | Whether to reject a server certificate that can't be verified (shown when **SSL Enabled** is on) |+ | **SSL Certificate** | The CA certificate that signed the server's certificate (shown when **SSL Enabled** is on) |++ Set at least one of the two ports. If you turn on **SSL Enabled**, use the TLS ports.+ </Step>+ <Step>+ Enter the credentials:-<Tabs>- <Tab title="Web Access">- Web Access provides a browser-based interface with two tools:+ | Field | Description |+ | --- | --- |+ | **Username** | The ClickHouse user (defaults to `default`) |+ | **Password** | The user's password (leave it empty for a user created with `no_password`) |+ </Step>+ <Step>+ Select **Create**. Infisical checks the connection through the gateway before it saves the account, and if the check fails, the error names the port that failed.+ </Step>+</Steps>- - **Data Explorer**: browse tables, view data, filter and sort, export to CSV/JSON- - **SQL Editor**: write and run SQL queries+## Connect- To connect:+To open a session, follow [Connect to an account](/documentation/platform/pam/accounts/connect).- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and select the rocket icon (or select **Launch Session** from the menu)- 3. Select **Connect in Browser**+<Tabs>+ <Tab title="Browser">+ The browser needs the account to have an **HTTP Port**. If the account only has a **Native Port**, use the CLI.- ClickHouse has no schema layer inside a database, so the Data Explorer sidebar lists databases where it lists schemas for other account types.+ The browser session has a table browser and a SQL editor:- Web Access speaks ClickHouse's HTTP interface, so it needs the account to have an **HTTP Port**. On an account with only a native port it is greyed out, and the CLI is the way in.+ - The table browser lists databases where it lists schemas for other account types, because ClickHouse databases don't contain schemas+ - The table browser can't edit rows, because ClickHouse applies row changes in the background; to change rows, run `ALTER TABLE ... UPDATE` or `DELETE FROM` in the SQL editor+ - The table browser shows the first 1,000 rows of a result+ - The browser stops a statement after 30 seconds+ For a long query or a full result set, use the CLI.</Tab><Tab title="CLI">- The CLI starts a local proxy on `127.0.0.1` that serves both interfaces on one port. Connect with TLS off. The username and password a client sends are ignored, since the gateway signs in for you.+ Start the local proxy. It serves both interfaces on one port on `127.0.0.1`, and prints the port and a connection string:```bashinfisical pam access analytics/clickhouse-prod```- The command prints the port and a connection string. Native clients such as `clickhouse-client`, `clickhouse-driver` and `clickhouse-go`, and HTTP clients such as JDBC tools, `clickhouse-connect` and `curl`, all work on that port.+ Connect your client to the port with TLS turned off:```bashclickhouse-client --host 127.0.0.1 --port <port>curl 'http://127.0.0.1:<port>/?query=SELECT+1'```- Native clients need the account to have a **Native Port**.-- **Flags:**- - `--port <port>`: use a specific local port (otherwise one is assigned automatically)- - `--reason <reason>`: provide an access reason (if required by template)-+ The gateway signs in for you, so the proxy ignores the username and password that your client sends. Native clients need the account to have a **Native Port**, and HTTP clients need an **HTTP Port**.</Tab></Tabs>-The Data Explorer shows the first 1,000 rows a statement produces and tells you when there are more, and caps a statement at 30 seconds. Neither limit applies to the CLI, so use it with your own client for a long query or a full result set.--<Note>- ClickHouse applies row changes as asynchronous mutations rather than as statements that take effect when they return, so the Data Explorer grid is read-only for every table. Run `ALTER TABLE ... UPDATE` or `DELETE FROM` from the SQL Editor instead. The column marked as a key in the grid is the table's sorting key, which ClickHouse calls the primary key: it's an index, not a unique constraint.-</Note>--## Recording--Every statement a session runs is recorded, along with the outcome of each one, and appears under **Session Logs** on the session. Web Access and the CLI both reach ClickHouse through the gateway, so recording works the same for either. Recordings are encrypted with a per-session key and written to the storage backend the [template](/documentation/platform/pam/templates/overview) selects, the same as any other account type.+## Recording and command blocking-The template's **Command Blocking** policy applies to ClickHouse as well: a statement matching one of its patterns is rejected before it reaches ClickHouse, and the rejection is recorded. **Session Log Masking** patterns are applied to the recording before it's written.+Infisical records every statement in a session and its outcome. To see them, open the session and go to **Session Logs**.-On an account with command blocking, an HTTP request body over 1 MB is refused, as is one compressed with anything other than `gzip` or `deflate`. Send large inserts in smaller batches.+The template's **Command Blocking** patterns apply to ClickHouse statements. If a statement matches a pattern, Infisical rejects the statement before it reaches ClickHouse and records the rejection. Command blocking only matches the text of each statement, so it can't stop SQL that a statement builds while it runs. For restrictions that must always hold, use ClickHouse grants.-## Servers with HTTP turned off+If the template uses command blocking, Infisical also rejects an HTTP request if:-Set the **Native Port** and leave **HTTP Port** empty. Native clients work as usual. Web Access and HTTP clients such as JDBC tools, `clickhouse-connect` and ODBC need an HTTP port, so Web Access is greyed out on such an account.+- The request body is larger than 1 MB (send large inserts in smaller batches)+- The request body is compressed with anything other than `gzip` or `deflate`## Next steps<CardGroup cols={2}>- <Card title="Sessions" icon="display" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">+ Review and end the connections that people and agents make to your accounts.</Card>- <Card title="Access requests" icon="user-check" href="/documentation/platform/pam/access-requests/overview">- Require approval before a session starts.+ <Card title="Access requests" icon="hand" href="/documentation/platform/pam/access-requests/overview">+ Require approval before a member can use a sensitive account.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/connect.mdx b/docs/documentation/platform/pam/accounts/connect.mdxnew file mode 100644index 0000000000..63a532b86a--- /dev/null+++ b/docs/documentation/platform/pam/accounts/connect.mdx@@ -0,0 +1,89 @@+---+title: "Connect to an account"+sidebarTitle: "Connect to an account"+description: "Open a session on an account from your browser or the Infisical CLI."+---++You can connect to an [account](/documentation/platform/pam/accounts/overview) in your browser or with the Infisical CLI. Either way, Infisical opens a [session](/documentation/platform/pam/sessions/overview), and a [gateway](/documentation/platform/gateways/overview) supplies the account's credential so that you never see it. Infisical records everything you do in the session.++<Tip>+To give an AI agent access to accounts, use [`infisical pam agentic access`](/documentation/platform/pam/ai-agents/overview) instead.+</Tip>++## Prerequisites++- The Admin, Operator, or Connector [role](/documentation/platform/pam/concepts/access-control) on the account or its folder+- An approved [access request](/documentation/platform/pam/access-requests/overview), if the account's template requires approval+- To connect with the CLI, the [Infisical CLI](/cli/overview) installed and logged in with [`infisical login`](/cli/reference#login)++## Launch a session++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts** and find the account.+ </Step>+ <Step>+ Select the rocket icon on the account's row.++ If the row shows a key icon instead, the account requires approval. Select the key icon to [request access](/documentation/platform/pam/access-requests/overview), and launch the session once an approver approves the request.+ </Step>+ <Step>+ Select a launch method, then connect:++ <Tabs>+ <Tab title="Browser">+ Select **Browser**, then select **Connect in Browser**. The session opens in a new tab.++ What the tab shows depends on the account type:++ - **PostgreSQL, MySQL, Snowflake, and ClickHouse**: a table browser and a SQL editor+ - **Redis**: a console for Redis commands+ - **SSH**: a terminal+ - **Windows and Windows AD**: a remote desktop+ - **AWS IAM**: the AWS Management Console++ <Note>+ Only some [account types](/documentation/platform/pam/accounts/account-types) support the browser.+ </Note>+ </Tab>+ <Tab title="CLI">+ Select **CLI**, then copy the command and run it in your terminal. The command has this form:++ ```bash+ infisical pam access <folder>/<account>+ ```++ What happens next depends on the account type:++ - **SSH**: The CLI opens a shell on the server (add `--proxy` to use your own SSH client instead)+ - **AWS IAM**: The CLI writes temporary credentials to your AWS credentials file+ - **Every other account type**: The CLI starts a local proxy on `127.0.0.1` and prints its port++ If the CLI starts a proxy, connect your own client, such as `psql` or `kubectl`, to the printed port. The proxy signs in for you, so the client doesn't need a password.++ The session lasts one hour unless you set `--duration`. For the other flags, see the [CLI reference](/cli/reference#pam-access).+ </Tab>+ </Tabs>+ </Step>+</Steps>++If the account's template requires a reason, Infisical asks for one before the session starts. If the template requires MFA, Infisical asks you to complete MFA in your browser.++## End a session++A session ends when:++- You close the browser tab, or press `Ctrl+C` in the terminal that runs the CLI+- The session reaches the maximum duration set by the account's [template](/documentation/platform/pam/templates/overview)+- Someone with the Admin role on the account or its folder [terminates the session](/documentation/platform/pam/sessions/overview)++## Next steps++<CardGroup cols={2}>+ <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">+ Review and end the connections that people and agents make to your accounts.+ </Card>+ <Card title="View credentials" icon="eye" href="/documentation/platform/pam/accounts/view-credentials">+ Reveal the password or key stored for an account.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/gcp-service-account.mdx b/docs/documentation/platform/pam/accounts/gcp-service-account.mdxindex e7cc5f3d11..87b9eeac31 100644--- a/docs/documentation/platform/pam/accounts/gcp-service-account.mdx+++ b/docs/documentation/platform/pam/accounts/gcp-service-account.mdx@@ -1,126 +1,94 @@---title: "GCP service accounts"sidebarTitle: "GCP service account"-description: "Add and connect to GCP service accounts via impersonation or a static key."+description: "Give people gcloud access to Google Cloud as a service account."----GCP Service Accounts let you broker credential-less access to Google Cloud. Instead of handing out long-lived service account keys, users request access through Infisical and connect to Google Cloud as the target service account through a [Gateway](/documentation/platform/gateways/overview), with every access logged.+A GCP service account lets people use `gcloud` as a service account without handing out a service account key. When someone launches a session, Infisical gets a short-lived access token for the service account. Their Google Cloud requests go through a [Gateway](/documentation/platform/gateways/overview), which adds the token to each request, and Infisical records each request's method, URL, and response status.-<Note>-GCP Service Accounts are available through the **CLI and API only** — there is no in-browser (web) access.-</Note>+GCP service accounts only support the CLI, not browser access.-## How it works+## Prerequisites-Each account points at a single GCP service account (identified by its email). When a user starts a session:+- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A Gateway that can reach `googleapis.com` on port `443`+- The [`gcloud` CLI](https://cloud.google.com/sdk/docs/install) on the machine of each person who connects-1. Infisical obtains a short-lived OAuth 2.0 access token for the target service account (see [authentication methods](#authentication-methods) below).-2. The user's Google Cloud requests are routed through a local proxy to the Infisical **Gateway**, which reaches `googleapis.com` on their behalf.-3. The Gateway injects the access token into each request before forwarding it, so the user never handles the token directly.+## Choose an authentication method-### Authentication methods+The account gets tokens for the target service account in one of two ways:-You pick one of these when creating the account. The setup for each is covered in the steps below.+- **Impersonation (Recommended)**: Infisical [impersonates](https://cloud.google.com/iam/docs/service-account-impersonation) the target service account with its own Google Cloud service account, so no key is created or stored+- **Static Key**: Infisical stores a service account key, either for the target service account or for another service account that's allowed to impersonate it-- **Impersonation (recommended)** — Infisical itself runs under its own Google Cloud service account. Instead of storing any credentials for your target service account, it [impersonates](https://cloud.google.com/iam/docs/service-account-impersonation) that account, asking Google to issue short-lived tokens on demand. This is the cleanest option because no keys for the target service account are ever created or stored.-- **Static Key** — You provide a service account key JSON, which Infisical stores encrypted and uses to obtain tokens. Choose this if you can't (or don't want to) set up impersonation. The key can belong to the target service account itself, or to a separate privileged service account allowed to impersonate it.--## Creating an account+### Set up impersonation<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ In the Google Cloud project of the target service account, enable the IAM Service Account Credentials API (`iamcredentials.googleapis.com`). Without this API, sessions fail when Infisical requests a token.</Step>- <Step title="Select a folder and template">- Choose which [folder](/documentation/platform/pam/folders/overview) to add the account to, then select a GCP Service Account [template](/documentation/platform/pam/templates/overview).+ <Step>+ Find the service account that Infisical impersonates with:++ | Infisical instance | Infisical's service account |+ |--------------------|-----------------------------|+ | Infisical Cloud (US) | `[email protected]` |+ | Infisical Cloud (EU) | `[email protected]` |+ | Self-hosted | The service account in your instance's `INF_APP_CONNECTION_GCP_SERVICE_ACCOUNT_CREDENTIAL` environment variable |- The template (or the account) must be assigned a [Gateway](/documentation/platform/gateways/overview) — GCP traffic is proxied through it, so the Gateway needs outbound access to `googleapis.com` on port `443`.+ If you self-host Infisical and haven't set that variable, follow the self-hosted steps in [GCP connection](/integrations/app-connections/gcp) first.</Step>- <Step title="Enter connection details">- | Field | Description |- |-------|-------------|- | **Name** | A descriptive name (e.g., `prod-deployer`) |- | **Service Account Email** | The email of the target GCP service account (must end in `.iam.gserviceaccount.com`) |+ <Step>+ In the Google Cloud console, go to **IAM & Admin** > **Service Accounts** and select the target service account.</Step>- <Step title="Choose an authentication method">- Pick how Infisical should obtain tokens for the target service account, then follow the matching setup.-- <Tabs>- <Tab title="Impersonation">- There are no credentials to enter — but you need a one-time setup so Infisical can impersonate your target service account.-- **1. Enable the IAM Service Account Credentials API**-- In the target service account's Google Cloud project, enable the IAM Service Account Credentials API (`iamcredentials.googleapis.com`). Without it, the account still saves, but sessions fail with a token-generation error when you try to connect.-- **2. Find Infisical's service account**-- | Environment | Infisical's service account |- |-------------|-----------------------------|- | Infisical Cloud US | `[email protected]` |- | Infisical Cloud EU | `[email protected]` |- | Self-hosted | The service account configured via the `INF_APP_CONNECTION_GCP_SERVICE_ACCOUNT_CREDENTIAL` environment variable |-- **3. Grant it the Token Creator role**-- In the Google Cloud Console, go to **IAM & Admin → Service Accounts**, select your **target** service account, open the **PERMISSIONS** tab, click **Grant Access**, add Infisical's service account (from step 2) as a principal, and assign it the **Service Account Token Creator** (`roles/iam.serviceAccountTokenCreator`) role.-- <Note>- **Self-hosted only:** impersonation first needs a platform GCP service account configured on your instance — a one-time setup covered in [Configuring GCP for a self-hosted instance](/integrations/app-connections/gcp).- </Note>- </Tab>- <Tab title="Static Key">- Provide a service account key JSON. Infisical stores it encrypted and never returns it to clients.+ <Step>+ On the **Permissions** tab, select **Grant access**. Add Infisical's service account as a principal with the **Service Account Token Creator** role (`roles/iam.serviceAccountTokenCreator`).+ </Step>+</Steps>- **1. Create a key**+### Set up a static key- In the Google Cloud Console, go to **IAM & Admin → Service Accounts** and select the service account to use — either the target service account itself, or a privileged one allowed to impersonate it. Open the **KEYS** tab, click **Add Key → Create new key**, and choose **JSON**. The file downloads automatically.+<Steps>+ <Step>+ In the Google Cloud console, go to **IAM & Admin** > **Service Accounts** and select the service account whose key you'll store.+ </Step>+ <Step>+ On the **Keys** tab, select **Add key** > **Create new key**, choose **JSON**, and select **Create**. The key file downloads to your machine.+ </Step>+</Steps>- **2. Paste it into the form**+## Create an account- | Field | Description |- |-------|-------------|- | **Service Account Key JSON** | The full contents of the downloaded JSON key (must contain `client_email` and `private_key`) |- </Tab>- </Tabs>+<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **Add Account**.+ </Step>+ <Step>+ Select the **Folder** to add the account to. Under **Account Template**, select a GCP service account [template](/documentation/platform/pam/templates/overview), such as the default `gcp-service-account` template, then select **Next**.</Step>- <Step title="Save">+ <Step>+ Enter a **Name** for the account and the **Service Account Email** of the target service account, which ends in `.iam.gserviceaccount.com`. If the template doesn't set a Gateway, select one under **Gateway**.+ </Step>+ <Step>+ Select the **Auth Method** you set up. For **Static Key**, paste the contents of the key file into **Service Account Key JSON**.+ </Step>+ <Step>Select **Create**.</Step></Steps>-## Connecting+## Connect-Use the CLI to start a session. This requires the [`gcloud` CLI](https://cloud.google.com/sdk/docs/install) to be installed locally.+To learn how to launch a session, see [Connect to an account](/documentation/platform/pam/accounts/connect). The CLI command for the account is:```bash-infisical pam access my-folder/prod-deployer+infisical pam access <folder>/<account>```-The command **automatically configures `gcloud`** for the session — you don't need to change anything or run any extra commands. Once it's active, use `gcloud` (and other Google Cloud tooling) as normal:+The CLI points `gcloud` at a local proxy for the session, so `gcloud` works without any other setup:```bashgcloud compute instances list-gcloud storage ls```-Press **Ctrl+C** to stop the session (or wait for it to expire). Your `gcloud` configuration is automatically restored when the session ends.--**Flags:**-- `--reason <reason>` — provide an access reason (if required by the template)-- `--duration <duration>` — request a session duration (e.g., `30m`), capped at the template maximum--<Note>-A GCP session recording is a log of the HTTP requests and responses made to Google Cloud during the session — each request's method and URL, and its response status.-</Note>--## Next steps--<CardGroup cols={2}>- <Card title="AWS IAM Accounts" icon="aws" iconType="brands" href="/documentation/platform/pam/accounts/aws-iam">- Add AWS IAM role accounts.- </Card>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.- </Card>-</CardGroup>+Press `Ctrl+C` to end the session. The CLI then restores your `gcloud` configuration.diff --git a/docs/documentation/platform/pam/accounts/kubernetes.mdx b/docs/documentation/platform/pam/accounts/kubernetes.mdxindex add8e7e57f..33b3bcab74 100644--- a/docs/documentation/platform/pam/accounts/kubernetes.mdx+++ b/docs/documentation/platform/pam/accounts/kubernetes.mdx@@ -1,75 +1,65 @@---title: "Kubernetes accounts"sidebarTitle: "Kubernetes"-description: "Add and connect to Kubernetes clusters."+description: "Give people kubectl access 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.+A Kubernetes account lets people run `kubectl` against a cluster without holding a service account token. They connect through the Infisical CLI, and Infisical records each [session](/documentation/platform/pam/sessions/overview). Kubernetes accounts don't support browser access.-## Creating an account+## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [Gateway](/documentation/platform/gateways/overview) that can reach the cluster's API server+- [`kubectl`](https://kubernetes.io/docs/tasks/tools/) on the machine of each person who connects++## Create an account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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>+ Select the **Folder** to add the account to and a Kubernetes **Account Template**, such as the default `kubernetes` [template](/documentation/platform/pam/templates/overview), then select **Next**.</Step>- <Step title="Enter connection details">+ <Step>+ Enter a **Name** for the account and the cluster's 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) |+ | **Kubernetes API URL** | The URL of the cluster's API server |+ | **Reject Unauthorized** | Whether to refuse an API server certificate that the Gateway can't verify |+ | **SSL Certificate** | The CA certificate for the API server, if a public CA didn't issue it |+ | **Gateway** | The Gateway that connects to the cluster (only shown if the template doesn't set one) |</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>+ Select an **Auth Method** and fill in its fields, as described in [Authentication methods](#authentication-methods).</Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>-## Connecting+## Authentication methods++| Method | What you enter | When to use it |+|--------|----------------|----------------|+| **Service Account Token** | A **Service Account Token** for the cluster | The Gateway runs outside the cluster |+| **Gateway Kubernetes Auth** | The **Namespace** and **Service Account Name** of the service account to act as | The Gateway runs as a pod inside the cluster |-The CLI retrieves credentials and outputs a kubeconfig you can use with `kubectl`.+With **Gateway Kubernetes Auth**, the account stores no token. The Gateway authenticates with its own pod's service account and [impersonates](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation) the service account you name. The Gateway's service account needs RBAC permission to `impersonate` that service account.++## Connect++To learn how to launch a session, see [Connect to an account](/documentation/platform/pam/accounts/connect). The CLI command for the account is:```bash-infisical pam access my-folder/prod-cluster+infisical pam access <folder>/<account>```-Then use `kubectl` as normal:+The CLI adds a context named `infisical-k8s-pam/<folder>/<account>` to your kubeconfig and makes it the current context, so `kubectl` works without any other setup:+```bashkubectl 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="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.- </Card>-</CardGroup>+Press `Ctrl+C` to end the session. The CLI then removes the context from your kubeconfig and switches back to the context you were using before.diff --git a/docs/documentation/platform/pam/accounts/manage.mdx b/docs/documentation/platform/pam/accounts/manage.mdxnew file mode 100644index 0000000000..28d036b782--- /dev/null+++ b/docs/documentation/platform/pam/accounts/manage.mdx@@ -0,0 +1,124 @@+---+title: "Manage an account"+sidebarTitle: "Manage an account"+description: "Change an account's details, access, and settings after you add it."+---++After you [add an account](/documentation/platform/pam/accounts/add), you can change its connection details and credentials, move it to another folder, give people access to it, override its template's settings, or delete it.++## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the account or its folder++## Open an account's settings++Go to **Privileged Access Management** > **Accounts**, open the options menu on the account's row, and select **Configure**. Selecting the row itself launches a session or opens an access request.++The account's settings have the following tabs:++| Tab | What you can do there |+| --- | --- |+| **Permissions** | Give users, groups, and machine identities access to this account only |+| **Configuration** | Change the account's name, folder, template, connection details, and credentials |+| **Rotation** | Set the account that rotates this account's password, or rotate the password now (PostgreSQL, MySQL, Microsoft SQL Server, Oracle, Windows, and Windows AD accounts only) |+| **Advanced** | Override the gateway or recording storage that the account's template sets |++## Edit the account++On the **Configuration** tab, change the fields you need, then select **Save Changes**. Infisical keeps the stored password or key unless you enter a new one.++If you change the connection details, credentials, gateway, or template, Infisical tests the connection before it saves the account. If the test fails, Infisical doesn't save the change, and the error says why.++### Move the account to another folder++To move the account, select a different **Folder**. You need the Admin role on the destination folder too.++People who had access through the old folder lose it, and people with a role on the new folder get access.++### Change the template++To change the rules for the account's sessions, select a different **Template** of the same account type. Only product admins can change an account's template.++You can't change an account's type. To use a different type, add a new account.++### Change the host, username, or gateway++If you change the account's host, port, username, authentication method, or gateway, Infisical clears the account's [rotation account](/documentation/platform/pam/credential-rotation/overview), so the account doesn't rotate until you set one again.++Changing the host, port, authentication method, or gateway also has these effects:++- Any other account that used this account as its rotation account loses it+- If you changed the host or gateway and can't view the account's credentials, Infisical [pauses credential health checks](/documentation/platform/pam/credential-health/overview#when-checks-stop) on the account++## Grant access to one account++A role on a folder applies to every account in the folder. To give a user, group, or machine identity access to one account only, assign them a role on the account:++<Steps>+ <Step>+ Open the account's settings and go to the **Permissions** tab.+ </Step>+ <Step>+ Select **Assign Access**.+ </Step>+ <Step>+ Select the **Assignee** and the **Role**. To make the access temporary, select an **Expiry**.+ </Step>+ <Step>+ Select **Assign**.+ </Step>+</Steps>++To change a member's role, open the options menu on their row and select **Edit**. You can't change an expiry, so to change one, remove the member and assign them again.++The **Inherited Permissions** section lists the members who have access through the account's folder. To change their access, go to the [folder's](/documentation/platform/pam/folders/overview) **Permissions** tab.++To learn what each role allows, see [Access control](/documentation/platform/pam/concepts/access-control).++## Override the template's settings++The account's [template](/documentation/platform/pam/templates/overview) sets its gateway and, for Windows and Windows AD accounts, where Infisical stores its session recordings. To use a different setting for this account only, go to the **Advanced** tab and select **Override** next to the setting:++- **Gateway**: Select a different gateway or gateway pool (every account type except AWS IAM)+- **Recording Settings**: Select a different bucket for this account's recordings (Windows and Windows AD accounts only, and only if the template's **Storage backend** is **S3 Bucket**), as described in [External storage](/documentation/platform/pam/sessions/external-storage)++Select **Save Changes**. To go back to the template's setting, select **Remove Override**.++## Delete an account++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts**, open the options menu on the account's row, and select **Delete Account**.+ </Step>+ <Step>+ Enter the account's name to confirm, then select **Delete**.+ </Step>+</Steps>++When you delete an account, Infisical does the following:++- Ends every active session on the account+- Cancels pending [access requests](/documentation/platform/pam/access-requests/overview) for the account, and revokes approved ones+- Removes the account's direct memberships++Infisical keeps the account's past sessions and recordings, but only product admins can view them.++<Warning>+ If the account's recordings are stored in an [S3 bucket](/documentation/platform/pam/sessions/external-storage), you can't play them back in Infisical after you delete the account. This includes every Windows and Windows AD recording.+</Warning>++You can't delete an account in these cases:++- The account is the rotation account of another account (set a different rotation account on the other account first)+- The account is the credential for a [discovery source](/documentation/platform/pam/discovery/overview) (change the source's credential, or delete the source, first)++## Next steps++<CardGroup cols={2}>+ <Card title="Credential rotation" icon="rotate-cw" href="/documentation/platform/pam/credential-rotation/overview">+ Change the passwords of your PAM accounts on a schedule.+ </Card>+ <Card title="Access control" icon="shield-half" href="/documentation/platform/pam/concepts/access-control">+ Control who can manage PAM and who can connect to each account.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/mongodb.mdx b/docs/documentation/platform/pam/accounts/mongodb.mdxindex f85a57c451..069fe365b5 100644--- a/docs/documentation/platform/pam/accounts/mongodb.mdx+++ b/docs/documentation/platform/pam/accounts/mongodb.mdx@@ -1,71 +1,67 @@---title: "MongoDB accounts"sidebarTitle: "MongoDB"-description: "Add and connect to MongoDB databases."+description: "Give people and agents access to a MongoDB database without sharing its credentials."----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.+A MongoDB [account](/documentation/platform/pam/accounts/overview) stores the credentials for one MongoDB user. Members connect to the database through the Infisical CLI, and Infisical records every command they run.-## Creating an account+## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [gateway](/documentation/platform/gateways/overview) that can reach the database+- A MongoDB [account template](/documentation/platform/pam/templates/overview)++## Create the account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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>+ Select the **Folder** and a MongoDB **Account Template**, then select **Next**.</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) |+ <Step>+ Enter a **Name** and the connection details:- 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 |+ | --- | --- |+ | **Connection String** | The database's `mongodb://` or `mongodb+srv://` URI, without a username, password, or database, such as `mongodb+srv://cluster.example.com` |+ | **Database** | The database that sessions connect to (defaults to `admin`) |+ | **SSL Enabled** | Whether to connect over TLS |+ | **Reject Unauthorized** | Whether to reject a server certificate that can't be verified (shown when **SSL Enabled** is on) |+ | **SSL Certificate** | The CA certificate that signed the server's certificate (shown when **SSL Enabled** is on) |</Step>- <Step title="Save">- Select **Create**.+ <Step>+ Enter the **Username** and **Password** of the MongoDB user, then select **Create**.</Step></Steps>-## Connecting+## Connect-The CLI starts a local proxy that you connect to with your preferred MongoDB client.+To open a session, follow [Connect to an account](/documentation/platform/pam/accounts/connect). MongoDB accounts don't support the browser, so use the CLI.++Start the local proxy:```bash-infisical pam access my-folder/users-db+infisical pam access backend-team/users-db```-The command outputs the local port to connect to. Then use `mongosh` or any MongoDB client:+The proxy keeps running in that terminal and prints its port. In a second terminal, connect your MongoDB client, such as `mongosh`, to that port:+```bashmongosh "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)+The proxy signs in for you, so the client doesn't need a password.## 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="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ Review and end the connections that people and agents make to your accounts.+ </Card>+ <Card title="Access requests" icon="hand" href="/documentation/platform/pam/access-requests/overview">+ Require approval before a member can use a sensitive account.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/mssql.mdx b/docs/documentation/platform/pam/accounts/mssql.mdxindex 6cc934b114..cd3d184499 100644--- a/docs/documentation/platform/pam/accounts/mssql.mdx+++ b/docs/documentation/platform/pam/accounts/mssql.mdx@@ -1,96 +1,96 @@---title: "Microsoft SQL Server accounts"-sidebarTitle: "MS SQL"-description: "Add and connect to Microsoft SQL Server databases."+sidebarTitle: "Microsoft SQL Server"+description: "Give people and agents access to a Microsoft SQL Server database without sharing its credentials."----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.+A Microsoft SQL Server [account](/documentation/platform/pam/accounts/overview) stores the credentials for one SQL Server login or Windows user. Members connect to the database through the Infisical CLI, and Infisical records every query they run.-## Creating an account+## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [gateway](/documentation/platform/gateways/overview) that can reach the database+- A Microsoft SQL Server [account template](/documentation/platform/pam/templates/overview)++## Create the account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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>+ Select the **Folder** and a Microsoft SQL Server **Account Template**, then select **Next**.</Step>- <Step title="Enter connection details">+ <Step>+ Enter a **Name** and the 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) |+ | --- | --- |+ | **Host** | The server's hostname or IP address |+ | **Port** | The server's port (defaults to `1433`) |+ | **Database** | The database that sessions connect to (defaults to `master`) |+ | **SSL Enabled** | Whether to connect over TLS |+ | **Reject Unauthorized** | Whether to reject a server certificate that can't be verified (shown when **SSL Enabled** is on) |+ | **SSL Certificate** | The CA certificate that signed the server's certificate (shown when **SSL Enabled** is on) |</Step>- <Step title="Choose authentication method">- MS SQL supports three authentication methods:+ <Step>+ Select the **Auth Method** and enter the credentials:<Tabs><Tab title="SQL Server Authentication">- Standard SQL Server login with username and password.-| Field | Description |- |-------|-------------|- | **Username** | SQL Server username |- | **Password** | SQL Server password |+ | --- | --- |+ | **Username** | The SQL Server login |+ | **Password** | The login's password |</Tab><Tab title="Windows Authentication (NTLM)">- Windows domain authentication using NTLM.-| Field | Description |- |-------|-------------|- | **Username** | Windows username |- | **Password** | Windows password |- | **Domain** | Windows domain name |+ | --- | --- |+ | **Username** | The Windows user |+ | **Password** | The user's password |+ | **Domain** | The user's Windows domain |</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 |+ | --- | --- |+ | **Username** | The Windows user |+ | **Password** | The user's password |+ | **Realm** | The Kerberos realm, such as `CORP.EXAMPLE.COM` |+ | **KDC Address** | The address of the key distribution center (optional) |+ | **SPN** | The service principal name of the SQL Server instance, such as `MSSQLSvc/sql01.corp.example.com:1433` |</Tab></Tabs></Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>-## Connecting+## Connect++To open a session, follow [Connect to an account](/documentation/platform/pam/accounts/connect). Microsoft SQL Server accounts don't support the browser, so use the CLI.-The CLI starts a local proxy that you connect to with your preferred SQL Server client.+Start the local proxy:```bash-infisical pam access my-folder/analytics-db+infisical pam access analytics/reporting-db```-The command outputs the local port to connect to. Then use `sqlcmd`, Azure Data Studio, or any SQL Server client:+The proxy keeps running in that terminal and prints its port. In a second terminal, connect your SQL Server client, such as `sqlcmd` or Azure Data Studio, to that port:+```bashsqlcmd -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)+The proxy signs in for you, so the client doesn't need a password.## Next steps<CardGroup cols={2}>- <Card title="PostgreSQL Accounts" icon="database" href="/documentation/platform/pam/accounts/postgresql">- Add PostgreSQL database accounts.+ <Card title="Microsoft SQL Server credential rotation" icon="refresh-cw" href="/documentation/platform/pam/credential-rotation/mssql">+ Rotate the passwords of Microsoft SQL Server accounts.</Card><Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ Review and end the connections that people and agents make to your accounts.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/mysql.mdx b/docs/documentation/platform/pam/accounts/mysql.mdxindex e397182228..9e4d46817a 100644--- a/docs/documentation/platform/pam/accounts/mysql.mdx+++ b/docs/documentation/platform/pam/accounts/mysql.mdx@@ -1,84 +1,75 @@---title: "MySQL accounts"sidebarTitle: "MySQL"-description: "Add and connect to MySQL databases."+description: "Give people and agents access to a MySQL database without sharing its credentials."----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.+A MySQL [account](/documentation/platform/pam/accounts/overview) stores the credentials for one MySQL database user. Members connect to the database in the browser or through the Infisical CLI, and Infisical records every query they run.-## Creating an account+## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [gateway](/documentation/platform/gateways/overview) that can reach the database+- A MySQL [account template](/documentation/platform/pam/templates/overview)++## Create the account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **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>+ Go to **Privileged Access Management** > **Accounts** and select **Add Account**.</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>+ Select the **Folder** and a MySQL **Account Template**, then select **Next**.</Step>- <Step title="Enter credentials">+ <Step>+ Enter a **Name** and the connection details:+| Field | Description |- |-------|-------------|- | **Username** | MySQL username |- | **Password** | MySQL password |+ | --- | --- |+ | **Host** | The database's hostname or IP address |+ | **Port** | The database's port (defaults to `3306`) |+ | **Database** | The database that sessions connect to |+ | **SSL Enabled** | Whether to connect over TLS |+ | **Reject Unauthorized** | Whether to reject a server certificate that can't be verified (shown when **SSL Enabled** is on) |+ | **SSL Certificate** | The CA certificate that signed the server's certificate (shown when **SSL Enabled** is on) |</Step>- <Step title="Save">- Select **Create**.+ <Step>+ Enter the **Username** and **Password** of the MySQL user, then select **Create**.</Step></Steps>-## Connecting+## Connect-<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 → Accounts**- 2. Find the account and click the rocket icon (or select **Launch Session** from the menu)- 3. Click **Connect in Browser**+To open a session, follow [Connect to an account](/documentation/platform/pam/accounts/connect).+<Tabs>+ <Tab title="Browser">+ The browser session has a table browser, where you can view, filter, edit, and export rows, and a SQL editor for running queries.</Tab><Tab title="CLI">- The CLI starts a local proxy that you connect to with your preferred MySQL client.+ Start the local proxy:```bash- infisical pam access my-folder/orders-db+ infisical pam access backend-team/orders-db```- The command outputs the local port to connect to. Then use your MySQL client:+ The proxy keeps running in that terminal and prints its port. In a second terminal, connect your MySQL client to that port:+```bash- mysql -h 127.0.0.1 -P <port> -u root orders+ mysql -h 127.0.0.1 -P <port> 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)+ The proxy signs in for you, so the client doesn't need a password.</Tab></Tabs>## Next steps<CardGroup cols={2}>- <Card title="PostgreSQL Accounts" icon="database" href="/documentation/platform/pam/accounts/postgresql">- Add PostgreSQL database accounts.+ <Card title="MySQL credential rotation" icon="refresh-cw" href="/documentation/platform/pam/credential-rotation/mysql">+ Rotate the passwords of MySQL accounts.</Card><Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ Review and end the connections that people and agents make to your accounts.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/oracledb.mdx b/docs/documentation/platform/pam/accounts/oracledb.mdxindex 19d6ccde3f..d52e7d782d 100644--- a/docs/documentation/platform/pam/accounts/oracledb.mdx+++ b/docs/documentation/platform/pam/accounts/oracledb.mdx@@ -1,71 +1,77 @@---title: "Oracle accounts"sidebarTitle: "Oracle"-description: "Add and connect to Oracle databases."+description: "Give people and agents access to an Oracle database without sharing its credentials."----Oracle accounts let you manage access to your Oracle databases. Users connect through the CLI, which starts a local proxy, and every [session](/documentation/platform/pam/sessions/overview) is recorded.+An Oracle [account](/documentation/platform/pam/accounts/overview) stores the credentials for one Oracle database user. Members connect to the database through the Infisical CLI, and Infisical records every statement they run.-## Creating an account+## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [gateway](/documentation/platform/gateways/overview) that can reach the database+- An Oracle [account template](/documentation/platform/pam/templates/overview)+- An Oracle password of 30 characters or fewer, because the gateway can't sign in with a longer one++## Create the account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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 Oracle [template](/documentation/platform/pam/templates/overview).+ <Step>+ Select the **Folder** and an Oracle **Account Template**, then select **Next**.</Step>- <Step title="Enter connection details">+ <Step>+ Enter a **Name** and the connection details:+| Field | Description |- |-------|-------------|- | **Name** | A descriptive name (e.g., `billing-db`) |- | **Host** | Database hostname or IP |- | **Port** | Listener port (default: 1521, or 2484 for TCPS) |+ | --- | --- |+ | **Host** | The database's hostname or IP address |+ | **Port** | The listener's port (defaults to `1521`; the TCPS listener usually uses `2484`) || **Service Name** | The Oracle service name, such as `ORCL` or `FREEPDB1` |- | **SSL Enabled** | Connect to the TCPS listener |- | **Reject Unauthorized** | Reject connections with invalid certificates (only if SSL enabled) |- | **SSL Certificate** | Custom CA certificate (only if SSL enabled) |+ | **SSL Enabled** | Whether to connect to the TCPS listener |+ | **Reject Unauthorized** | Whether to reject a server certificate that can't be verified (shown when **SSL Enabled** is on) |+ | **SSL Certificate** | The CA certificate that signed the server's certificate (shown when **SSL Enabled** is on) |</Step>- <Step title="Enter credentials">+ <Step>+ Enter the credentials:+| Field | Description |- |-------|-------------|- | **Username** | The Oracle username, exactly as Oracle stores it. Unquoted names are stored uppercase |- | **Password** | The Oracle password. Maximum 30 characters |+ | --- | --- |+ | **Username** | The Oracle user, exactly as Oracle stores it (Oracle stores unquoted names in uppercase) |+ | **Password** | The user's password |</Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>-Infisical checks it can reach the host before saving, so a wrong host or port fails at **Create**. The username and password are verified by the first [credential health check](/documentation/platform/pam/product-reference/credential-health/overview), which reports **Out of Sync** if Oracle rejects them.+When you select **Create**, Infisical only checks that it can reach the host and port. The first [credential health check](/documentation/platform/pam/credential-health/overview) checks the username and password, and reports **Out of Sync** if Oracle rejects them.-## Connecting+## Connect-The CLI starts a local proxy that you connect to with your preferred Oracle client.+To open a session, follow [Connect to an account](/documentation/platform/pam/accounts/connect). Oracle accounts don't support the browser, so use the CLI.++Start the local proxy. The CLI prints the port, the username, and the service name to connect with:```bash-infisical pam access my-folder/billing-db+infisical pam access finance/billing-db```-The command outputs the local port to connect to, along with the username and service name.--Then use `sqlplus`, SQL Developer, or any Oracle client:+The proxy keeps running in that terminal. In a second terminal, connect your Oracle client, such as `sqlplus` or SQL Developer, to the port:```bashsqlplus <username>/[email protected]:<port>/<service-name>```-**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="Oracle credential rotation" icon="refresh-cw" href="/documentation/platform/pam/product-reference/credential-rotation/oracledb">- Rotate Oracle account passwords on a schedule.+ <Card title="Oracle credential rotation" icon="refresh-cw" href="/documentation/platform/pam/credential-rotation/oracledb">+ Rotate the passwords of Oracle accounts.</Card><Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ Review and end the connections that people and agents make to your accounts.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/overview.mdx b/docs/documentation/platform/pam/accounts/overview.mdxindex 0e53854b38..f901c2c88f 100644--- a/docs/documentation/platform/pam/accounts/overview.mdx+++ b/docs/documentation/platform/pam/accounts/overview.mdx@@ -1,118 +1,27 @@---title: "PAM accounts"sidebarTitle: "Overview"-description: "Manage credentials for databases and servers."+description: "Store the credentials for a database or server that people and agents connect to through Infisical PAM."----Accounts are the databases and servers you want to manage through PAM. Each account stores the connection details and credentials needed to connect — hostname, port, username, password, and so on.--Whoever connects to an account never sees the actual credentials, whether that is a person or an [AI agent](/documentation/platform/pam/ai-agents/overview). The connection is proxied, credentials are injected automatically, and everything is recorded.--## Account types--PAM supports the following account types:--| 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 | |-| [**Oracle**](/documentation/platform/pam/accounts/oracledb) | Oracle databases | |-| [**MongoDB**](/documentation/platform/pam/accounts/mongodb) | MongoDB databases | |-| [**Redis**](/documentation/platform/pam/accounts/redis) | Redis databases | ✓ |-| [**Snowflake**](/documentation/platform/pam/accounts/snowflake) | Snowflake accounts | ✓ |-| [**ClickHouse**](/documentation/platform/pam/accounts/clickhouse) | ClickHouse 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 | ✓ |-| [**GCP Service Account**](/documentation/platform/pam/accounts/gcp-service-account) | GCP service accounts | |-| [**Azure CLI**](/documentation/platform/pam/accounts/azure-cli) | Azure via a service principal | |-| [**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. See the type-specific pages for details.--## Adding an account--Accounts live inside [folders](/documentation/platform/pam/folders/overview). To add one:--<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.- </Step>- <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.- </Step>- <Step title="Enter credentials">- Provide the username and password (or SSH key/certificate settings).- </Step>- <Step title="Save">- Select **Create**.- </Step>-</Steps>---## Connecting to an account--Once an account exists, anyone with access can connect: people in the browser or through the CLI, [machine identities](/documentation/platform/identities/machine-identities) through the CLI.--### Web access--Go to **Privileged Access Management → Accounts**, find the account, and select the rocket icon (or select **Launch Session** from the menu), then select **Connect in Browser**. This opens:-- **PostgreSQL / MySQL** — a Data Explorer for browsing tables and a SQL Editor for running queries-- **SSH** — an interactive terminal-- **AWS IAM** — opens the AWS Console with federated credentials-- **Windows / Windows AD** — an RDP connection to the server--### CLI access--Run the CLI command for the account:--```bash-infisical pam access <folder>/<account>-```--For SSH accounts this connects you straight to a shell on the server. Add `--proxy` if you would rather point your own SSH client at a local port.--Every other account type starts a local proxy and outputs the port to connect to. Then connect with your preferred client (psql, pgAdmin, etc.) against `localhost` using that port. The proxy handles authentication automatically.--**Flags:**--| Flag | What it does |-|------|--------------|-| `--port` | Use a specific local port (otherwise one is assigned automatically) |-| `--reason` | Provide a reason (if required by the template) |--To let an [AI agent](/documentation/platform/pam/ai-agents/overview) reach an account, use [`infisical pam agentic access`](/cli/reference#pam-agentic-access) instead.--### Viewing credentials--Some work needs the password itself, not a session: pasting it into a desktop client Infisical doesn't broker, or configuring an appliance by hand. Select **View Credentials** from the account's menu, give a reason, and the stored fields are shown with secrets masked until revealed.--This needs the **Operator** or **Admin** [role](/documentation/platform/pam/concepts/access-control) on the folder or account, and an approval when the template requires one — the entry reads **Request Credentials** until you hold one. Sessions and credentials are approved separately, so an approved session request never reveals the credential. Accounts whose auth method stores no secret (SSH certificate, AWS IAM, PostgreSQL AWS IAM) have nothing to reveal and say so.--Every reveal writes a **View PAM Account Credentials** entry to the [audit log](/documentation/platform/pam/auditing) with the member, account, and reason.--<Warning>- A revealed credential is outside Infisical: no session recording, no command blocking, and revoking the grant stops further reveals but can't take back a copied password. Prefer a session where one will do, and [rotate](/documentation/platform/pam/accounts/overview) the account after a checkout.-</Warning>--## Direct account memberships--Most access is granted at the folder level — if you have access to the folder, you have access to all accounts in it.--But sometimes you need to grant access to just one account. For that, use direct account memberships:--1. Open the account and go to the **Permissions** tab-2. Select **Assign Access**-3. Select the user, group, or machine identity, then set the role and an optional expiration-4. Select **Add**--Direct memberships are for exceptions: a contractor who needs one specific database, temporary elevated access to a single account, or a job that should reach one account and nothing else.--## Next steps--For detailed instructions on creating and connecting to specific account types, see the type-specific pages in the sidebar.+An account is a privileged identity on a database, server, cluster, or cloud provider, such as a database superuser or a domain admin, that people and [AI agents](/documentation/platform/pam/ai-agents/overview) use through Infisical. Infisical stores the account's credential along with the details it needs to reach the target. When someone connects, a [gateway](/documentation/platform/gateways/overview) supplies the credential, so whoever connects never sees it.++Each account belongs to one [folder](/documentation/platform/pam/folders/overview). A role on the folder gives access to every account in it, and you can also give someone a role on a single account. Each account also uses one [account template](/documentation/platform/pam/templates/overview), which sets the account type and the rules for its sessions.++<CardGroup cols={2}>+ <Card title="Add an account" icon="plus" href="/documentation/platform/pam/accounts/add">+ Store the connection details and credentials for a database or server in PAM.+ </Card>+ <Card title="Connect to an account" icon="plug" href="/documentation/platform/pam/accounts/connect">+ Open a session on an account from your browser or the Infisical CLI.+ </Card>+ <Card title="View credentials" icon="eye" href="/documentation/platform/pam/accounts/view-credentials">+ Reveal the password or key stored for an account.+ </Card>+ <Card title="Manage an account" icon="sliders-horizontal" href="/documentation/platform/pam/accounts/manage">+ Change an account's details, access, and settings after you add it.+ </Card>+ <Card title="Account types" icon="layout-grid" href="/documentation/platform/pam/accounts/account-types">+ Find the setup guide for each database, server, cluster, and cloud provider that PAM supports.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/accounts/postgresql.mdx b/docs/documentation/platform/pam/accounts/postgresql.mdxindex ae2e45ca02..7675cf6d18 100644--- a/docs/documentation/platform/pam/accounts/postgresql.mdx+++ b/docs/documentation/platform/pam/accounts/postgresql.mdx@@ -1,81 +1,88 @@---title: "PostgreSQL accounts"sidebarTitle: "PostgreSQL"-description: "Add and connect to PostgreSQL databases."+description: "Give people and agents access to a PostgreSQL database without sharing its credentials."----PostgreSQL accounts let you manage access to your PostgreSQL databases. Users connect through Web Access (a browser-based interface) or CLI (a local proxy), and every [session](/documentation/platform/pam/sessions/overview) can be recorded.+A PostgreSQL [account](/documentation/platform/pam/accounts/overview) stores the credentials for one PostgreSQL database user. Members connect to the database in the browser or through the Infisical CLI, and Infisical records every query they run.-## Creating an account+The account can sign in with a password, or with [AWS IAM authentication](#aws-iam-authentication) if the database runs on Amazon RDS or Aurora.++## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [gateway](/documentation/platform/gateways/overview) that can reach the database+- A PostgreSQL [account template](/documentation/platform/pam/templates/overview)++## Create the account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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 PostgreSQL [template](/documentation/platform/pam/templates/overview) (e.g., the default `postgres` or a custom one).+ <Step>+ Select the **Folder** and a PostgreSQL **Account Template**, then select **Next**.</Step>- <Step title="Enter connection details">- <Tip>- Already have a connection string? Paste it into the **Host** field and the remaining fields are filled in for you, credentials included. Both `postgresql://user:password@host:5432/database` and `host=... port=... dbname=...` forms work.- </Tip>+ <Step>+ Enter a **Name** and the connection details:| Field | Description |- |-------|-------------|- | **Name** | A descriptive name (e.g., `orders-db-readonly`) |- | **Host** | Database hostname or IP |- | **Port** | PostgreSQL port (default: 5432) |- | **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) |+ | --- | --- |+ | **Host** | The database's hostname or IP address |+ | **Port** | The database's port (defaults to `5432`) |+ | **Database** | The database that sessions connect to |+ | **SSL Enabled** | Whether to connect over TLS |+ | **Reject Unauthorized** | Whether to reject a server certificate that can't be verified (shown when **SSL Enabled** is on) |+ | **SSL Certificate** | The CA certificate that signed the server's certificate (shown when **SSL Enabled** is on) |++ If you have a connection string, such as `postgresql://user:password@host:5432/database`, paste it into **Host**. Infisical fills in the other fields from the connection string, including the credentials.</Step>- <Step title="Choose authentication method">- PostgreSQL supports two authentication methods:+ <Step>+ Select the **Auth Method** and enter the credentials:<Tabs><Tab title="Password">- Standard PostgreSQL login with username and password.-| Field | Description |- |-------|-------------|- | **Username** | PostgreSQL username |- | **Password** | PostgreSQL password |+ | --- | --- |+ | **Username** | The PostgreSQL user |+ | **Password** | The user's password |</Tab>- <Tab title="AWS IAM">- [IAM database authentication](#aws-iam-authentication) for RDS and Aurora. No password is stored.+ <Tab title="AWS IAM (RDS / Aurora)">+ Set up [AWS IAM authentication](#aws-iam-authentication) first.| Field | Description |- |-------|-------------|- | **Username** | Database user granted the `rds_iam` role |- | **AWS Region** | Region of the RDS or Aurora instance |- | **Role ARN** | IAM role Infisical assumes to generate a token |+ | --- | --- |+ | **Username** | The database user that has the `rds_iam` role |+ | **AWS Region** | The region of the RDS instance or Aurora cluster, such as `us-east-1` |+ | **Role ARN** | The IAM role that Infisical assumes to generate an authentication token |</Tab></Tabs></Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>## AWS IAM authentication-RDS and Aurora instances that require IAM database authentication use the **AWS IAM** auth method. No password is stored: Infisical generates a short-lived authentication token for each connection.+With AWS IAM authentication, Infisical doesn't store a password for the database user. Instead, Infisical assumes an IAM role in your AWS account and uses it to generate a short-lived authentication token for each connection.-Set the following up before creating the account.+Set up the database and the IAM role before you create the account:<Steps>- <Step title="Enable IAM authentication on the instance">- Turn on **IAM database authentication** for the RDS instance or Aurora cluster.+ <Step>+ In the RDS console, turn on **IAM database authentication** for the RDS instance or Aurora cluster.</Step>- <Step title="Grant the database user IAM access">+ <Step>+ Create the database user and grant it the `rds_iam` role:+```sqlCREATE USER app_user WITH LOGIN;GRANT rds_iam TO app_user;```</Step>- <Step title="Create the role with a trust policy">- Create the IAM role you'll set as **Role ARN**. Replace `<INFISICAL_AWS_ACCOUNT_ID>` with the Infisical account ID for your region (US `381492033652`, EU `345594589636`) and `<YOUR_INFISICAL_ORG_ID>` with your Infisical Organization ID, found under **Organization Settings**.+ <Step>+ Create an IAM role with the following trust policy:```json{@@ -91,16 +98,15 @@ Set the following up before creating the account.}```- <Warning>- Always include the External ID condition. Without it, another Infisical customer could potentially trick Infisical into assuming your role.- </Warning>+ Replace the placeholders:++ - `<INFISICAL_AWS_ACCOUNT_ID>`: `381492033652` for Infisical Cloud (US), `345594589636` for Infisical Cloud (EU), or the ID of the AWS account that runs your instance if you self-host Infisical+ - `<YOUR_INFISICAL_ORG_ID>`: your organization ID, which the tooltip on the **Role ARN** field shows- <Note>- **For Self-Hosted Instances**: use the AWS account ID where your Infisical instance is deployed, since that is the account assuming the role.- </Note>+ The `sts:ExternalId` condition stops other Infisical organizations from using your role, so don't remove it.</Step>- <Step title="Attach permission to connect">- Attach a policy allowing the role to connect as that database user:+ <Step>+ Attach a policy to the role that lets it connect as the database user:```json{@@ -113,66 +119,52 @@ Set the following up before creating the account.}```- The resource ARN uses the instance's **resource ID** (`db-...`), not its name. Find it under **Configuration** on the instance in the RDS console.+ `<DB_RESOURCE_ID>` is the instance's resource ID, which starts with `db-`, not the instance's name. The RDS console shows the resource ID on the instance's **Configuration** tab.</Step></Steps>-<Note>- Set **Host** to the instance's RDS or Aurora endpoint. Tokens are signed for that exact endpoint, so a CNAME or other alias is rejected.-</Note>+When you create the account, set the following fields:-<Note>- IAM authentication requires an encrypted connection, so **SSL Enabled** is turned on and can't be disabled. To verify the server certificate, turn on **Reject Unauthorized** and paste your region's RDS root certificate into **SSL Certificate**, for example `https://truststore.pki.rds.amazonaws.com/us-east-1/us-east-1-bundle.pem`.-</Note>+- **Host**: the endpoint of the RDS instance or Aurora cluster, not a CNAME or other alias, because AWS signs each token for that exact endpoint+- **SSL Enabled**: always on, because IAM authentication requires TLS+- **SSL Certificate**: to verify the server, turn on **Reject Unauthorized** and paste the RDS certificate bundle for your region, such as `https://truststore.pki.rds.amazonaws.com/us-east-1/us-east-1-bundle.pem`-<Warning>- `PAM authentication failed for user` means AWS rejected the token rather than the database being unreachable. Check that the role's `rds-db:connect` resource ARN uses the instance's current resource ID, region, and the same database user the account connects as.-</Warning>+Accounts that use AWS IAM have no stored password, so [credential rotation](/documentation/platform/pam/credential-rotation/overview) doesn't apply to them.-[Credential rotation](/documentation/platform/pam/product-reference/credential-rotation/overview) doesn't apply to these accounts, since there is no stored password.+If a session fails with `PAM authentication failed for user`, AWS rejected the token. Check that the `rds-db:connect` resource ARN uses the instance's current resource ID, the right region, and the same database user as the account.-## Connecting+## Connect-<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, use transactions-- To connect:- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and click the rocket icon (or select **Launch Session** from the menu)- 3. Click **Connect in Browser**+To open a session, follow [Connect to an account](/documentation/platform/pam/accounts/connect).+<Tabs>+ <Tab title="Browser">+ The browser session has a table browser, where you can view, filter, edit, and export rows, and a SQL editor for running queries.</Tab><Tab title="CLI">- The CLI starts a local proxy that you connect to with your preferred PostgreSQL client.+ Start the local proxy:```bashinfisical pam access backend-team/orders-db```- The command outputs the local port to connect to. Then use your PostgreSQL client:+ The proxy keeps running in that terminal and prints its port. In a second terminal, connect your PostgreSQL client to that port:+```bashpsql "postgresql://localhost:<port>/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)+ The proxy signs in for you, so `psql` doesn't need a password.</Tab></Tabs>## Next steps<CardGroup cols={2}>- <Card title="SSH Accounts" icon="terminal" href="/documentation/platform/pam/accounts/ssh">- Add SSH server accounts.+ <Card title="PostgreSQL credential rotation" icon="refresh-cw" href="/documentation/platform/pam/credential-rotation/postgresql">+ Rotate the passwords of PostgreSQL accounts.</Card><Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ Review and end the connections that people and agents make to your accounts.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/redis.mdx b/docs/documentation/platform/pam/accounts/redis.mdxindex b01899ef58..e4e9f4ef23 100644--- a/docs/documentation/platform/pam/accounts/redis.mdx+++ b/docs/documentation/platform/pam/accounts/redis.mdx@@ -1,84 +1,84 @@---title: "Redis accounts"sidebarTitle: "Redis"-description: "Add and connect to Redis databases."+description: "Give people and agents access to a Redis database without sharing its credentials."----Redis accounts let you manage access to your Redis 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.+A Redis [account](/documentation/platform/pam/accounts/overview) stores the credentials for one Redis user. Members connect to the database in the browser or through the Infisical CLI, and Infisical records every command they run.-## Creating an account+## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [gateway](/documentation/platform/gateways/overview) that can reach the database+- A Redis [account template](/documentation/platform/pam/templates/overview)++## Create the account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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 Redis [template](/documentation/platform/pam/templates/overview).+ <Step>+ Select the **Folder** and a Redis **Account Template**, then select **Next**.</Step>- <Step title="Enter connection details">+ <Step>+ Enter a **Name** and the connection details:+| Field | Description |- |-------|-------------|- | **Name** | A descriptive name (e.g., `cache-primary`) |- | **Host** | Redis host |- | **Port** | Redis port (default: 6379) |- | **SSL Enabled** | Enable SSL/TLS for the connection |- | **Reject Unauthorized** | Reject connections with invalid certificates (only if SSL enabled) |- | **SSL Certificate** | Custom CA certificate (only if SSL enabled) |+ | --- | --- |+ | **Host** | The database's hostname or IP address |+ | **Port** | The database's port (defaults to `6379`) |+ | **SSL Enabled** | Whether to connect over TLS |+ | **Reject Unauthorized** | Whether to reject a server certificate that can't be verified (shown when **SSL Enabled** is on) |+ | **SSL Certificate** | The CA certificate that signed the server's certificate (shown when **SSL Enabled** is on) |</Step>- <Step title="Enter credentials">+ <Step>+ Enter the credentials:+| Field | Description |- |-------|-------------|- | **Username** | Redis ACL username. Use `default` for the default user (also works with a legacy `requirepass` password on Redis 6+) |- | **Password** | Redis password. Optional, leave blank for an unauthenticated Redis server |+ | --- | --- |+ | **Username** | The Redis ACL user (defaults to `default`, which also works with a `requirepass` password on Redis 6 and later) |+ | **Password** | The user's password (leave it empty if the server doesn't require authentication) |</Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>-## Connecting--<Tabs>- <Tab title="Web Access">- Web Access provides a browser-based Redis console where you type commands the same way you would in `redis-cli`.-- To connect:- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and click the rocket icon (or select **Launch Session** from the menu)- 3. Click **Connect in Browser**+## Connect- Type `quit` or `exit` to end the session.+To open a session, follow [Connect to an account](/documentation/platform/pam/accounts/connect).- Web Access is built for interactive use. Very long replies are shortened, and commands that stream results, such as `SUBSCRIBE` and `MONITOR`, are only available through the CLI.+<Tabs>+ <Tab title="Browser">+ The browser session is a console where you type Redis commands, the same way you would in `redis-cli`. To end the session, type `quit` or `exit`.+ The console shortens very long replies, and doesn't support commands that stream results, such as `SUBSCRIBE` and `MONITOR`. To run those commands, use the CLI.</Tab><Tab title="CLI">- The CLI starts a local proxy that you connect to with your preferred Redis client.+ Start the local proxy:```bash- infisical pam access my-folder/cache-primary+ infisical pam access backend-team/cache-primary```- The command outputs the local port to connect to. Then use `redis-cli` or any Redis client:+ The proxy keeps running in that terminal and prints its port. In a second terminal, connect your Redis client to that port:+```bashredis-cli -h 127.0.0.1 -p <port>```- 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)+ The proxy signs in for you, so the client doesn't need a password.</Tab></Tabs>## Next steps<CardGroup cols={2}>- <Card title="MongoDB Accounts" icon="database" href="/documentation/platform/pam/accounts/mongodb">- Add MongoDB database accounts.- </Card><Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ Review and end the connections that people and agents make to your accounts.+ </Card>+ <Card title="Access requests" icon="hand" href="/documentation/platform/pam/access-requests/overview">+ Require approval before a member can use a sensitive account.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/snowflake.mdx b/docs/documentation/platform/pam/accounts/snowflake.mdxindex 53feb0f0fd..0782efcd3a 100644--- a/docs/documentation/platform/pam/accounts/snowflake.mdx+++ b/docs/documentation/platform/pam/accounts/snowflake.mdx@@ -1,86 +1,65 @@---title: "Snowflake accounts"sidebarTitle: "Snowflake"-description: "Add and connect to Snowflake accounts."+description: "Give people and agents access to a Snowflake database without sharing its credentials."----Snowflake accounts let you manage access to a Snowflake database. Users connect through Web Access or the CLI, and every statement they run is recorded in the [session](/documentation/platform/pam/sessions/overview).+A Snowflake [account](/documentation/platform/pam/accounts/overview) stores the credentials for one Snowflake user. Members connect in the browser or through the Infisical CLI, and Infisical records every statement they run.-Every statement runs from the [gateway](/documentation/platform/gateways/overview) in your own network, and the credential never reaches the client. Make sure the gateway can reach your Snowflake account, including over AWS PrivateLink if that's how you expose it.+The [gateway](/documentation/platform/gateways/overview) in your network runs every statement against Snowflake, so the credential never reaches the member's machine.## Prerequisites-- A Snowflake user for Infisical to connect as.-- A warehouse the user's role can use.-- A [gateway](/documentation/platform/gateways/overview) on version 0.43.133 or later that can reach your Snowflake account. Earlier gateways don't support Snowflake and refuse the session. Snowflake returns large results from cloud object storage rather than from the account host, so a gateway behind an egress allowlist needs that storage reachable too.-- A key pair or a programmatic access token for that user. Snowflake blocks single-factor password sign-in for human users, so password authentication only works for a service user whose account policy still permits it.+- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A Snowflake user for Infisical to sign in as, with a role that can use a warehouse+- A key pair or a programmatic access token for that user (Snowflake blocks password sign-in for human users, so a password only works for a service user whose policy allows it)+- A gateway on version 0.43.133 or later that can reach your Snowflake account, including over AWS PrivateLink if you use it+- If the gateway's outbound traffic is restricted, access from the gateway to the cloud storage that Snowflake returns large results from+- A Snowflake [account template](/documentation/platform/pam/templates/overview)-## Creating an account+## Set up the credential-<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **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 Snowflake [template](/documentation/platform/pam/templates/overview).- </Step>- <Step title="Enter connection details">- | Field | Description |- |-------|-------------|- | **Name** | A descriptive name (e.g., `analytics-prod`) |- | **Account Identifier** | The account identifier from your Snowflake URL, without the `snowflakecomputing.com` suffix (e.g., `myorg-myaccount`) |- | **Default Warehouse** | The warehouse a session runs its queries on. Leave blank to use the user's own default |- | **Database** | The database sessions open. Web Access lists the schemas and tables inside it |- | **Default Schema** | The schema a session starts in. A session can switch to another schema the role can reach. Optional |- | **Default Role** | The role a session starts with. A session can switch to another role the user holds |- </Step>- <Step title="Enter credentials">- | Field | Description |- |-------|-------------|- | **Auth Method** | Key Pair, Programmatic Access Token, or Password |- | **Username** | The Snowflake login name |- | **Private Key** | PKCS#8 private key, for key pair authentication |- | **Private Key Passphrase** | Passphrase for an encrypted private key. Optional |- | **Programmatic Access Token** | The token value, for programmatic access token authentication |- | **Password** | The user's password, for password authentication |- </Step>- <Step title="Save">- Select **Create**. Infisical signs in to Snowflake and runs one statement to confirm the credential and the warehouse work before saving the account.- </Step>-</Steps>+Set up a key pair or a programmatic access token for the Snowflake user before you create the account.-## Key pair authentication+### Key pair-Generate a key pair, then assign the public key to the Snowflake user:+<Steps>+ <Step>+ Generate a key pair:-```bash-openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out infisical_key.p8 -nocrypt-openssl rsa -in infisical_key.p8 -pubout -out infisical_key.pub-```+ ```bash+ openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out infisical_key.p8 -nocrypt+ openssl rsa -in infisical_key.p8 -pubout -out infisical_key.pub+ ```+ </Step>+ <Step>+ Assign the public key to the Snowflake user. Paste the contents of `infisical_key.pub` without the header and footer lines:-```sql-ALTER USER pam_service SET RSA_PUBLIC_KEY = '<contents of infisical_key.pub, without the header and footer lines>';-```+ ```sql+ ALTER USER pam_service SET RSA_PUBLIC_KEY = '<public-key>';+ ```+ </Step>+</Steps>-Paste the contents of `infisical_key.p8` into **Private Key**, then delete your local copy. Snowflake keeps two key slots per user, `RSA_PUBLIC_KEY` and `RSA_PUBLIC_KEY_2`, so you can add a new key before removing the old one.+When you create the account, paste the contents of `infisical_key.p8` into **Private Key**, then delete your local copy of the file.-To rotate the key pair on a schedule instead of by hand, use a [Snowflake user key pair rotation](/documentation/platform/secret-rotation/snowflake-user-key-pair).+To replace the key later without downtime, set the new key in `RSA_PUBLIC_KEY_2`, update the account, then remove the old key. To rotate the key pair on a schedule, use a [Snowflake user key pair rotation](/documentation/platform/secret-rotation/snowflake-user-key-pair).-## Programmatic access token authentication+### Programmatic access token-Snowflake only issues a token to a user who is subject to a network policy, and only when the token is restricted to a role:+Snowflake only issues a programmatic access token to a user who has a network policy, and only for a token that's restricted to one role:```sql-ALTER USER pam_service SET NETWORK_POLICY = <your network policy>;+ALTER USER pam_service SET NETWORK_POLICY = <network-policy>;ALTER USER pam_service ADD PROGRAMMATIC ACCESS TOKEN infisicalROLE_RESTRICTION = 'PAM_READER' DAYS_TO_EXPIRY = 90;```-The token value is shown once. Paste it into **Programmatic Access Token**, and give the same role in **Role** so the session activates the one the token allows.+Snowflake shows the token once. When you create the account, paste the token into **Programmatic Access Token**, and enter the same role in **Default Role**.-## Permissions+## Grant the role permissions-What a session can do comes from the role the account activates, so grant that role only what the people using the account need. At minimum it needs `USAGE` on the warehouse and the database, and `USAGE` on each schema whose tables should appear in Web Access:+A session can do whatever the role it uses can do, so grant the role only what the account's users need. To appear in the browser, a table needs the role to have `USAGE` on the warehouse, the database, and the table's schema:```sqlGRANT USAGE ON WAREHOUSE analytics_wh TO ROLE pam_reader;@@ -89,63 +68,78 @@ GRANT USAGE ON SCHEMA analytics.public TO ROLE pam_reader;GRANT SELECT ON ALL TABLES IN SCHEMA analytics.public TO ROLE pam_reader;```-The account's **Role** sets what a session starts with, not a boundary it stays inside: a session can run `USE ROLE` to switch to any other role the credential holds. Grant the credential only the roles the people using the account should reach.+**Default Role** only sets the role that a session starts with. A session can run `USE ROLE` to switch to any other role that the Snowflake user holds, so grant the user only the roles its sessions should use.-Command blocking matches the text of each statement, so a statement that builds SQL at runtime, such as `EXECUTE IMMEDIATE`, can run something a pattern would otherwise reject. Use Snowflake privileges for restrictions that have to hold.+## Create the account-## Connecting+<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **Add Account**.+ </Step>+ <Step>+ Select the **Folder** and a Snowflake **Account Template**, then select **Next**.+ </Step>+ <Step>+ Enter a **Name** and the connection details:-<Tabs>- <Tab title="Web Access">- Web Access provides a browser-based interface with two tools:+ | Field | Description |+ | --- | --- |+ | **Account Identifier** | The account identifier from your Snowflake URL, without `snowflakecomputing.com`, such as `myorg-myaccount` |+ | **Default Warehouse** | The warehouse that sessions run queries on (leave it empty to use the user's default warehouse) |+ | **Database** | The database that sessions open |+ | **Default Schema** | The schema that sessions start in (optional) |+ | **Default Role** | The role that sessions start with (optional) |+ </Step>+ <Step>+ Select the **Auth Method**, enter the Snowflake **Username**, and enter the credential:++ | Auth method | Fields |+ | --- | --- |+ | **Key Pair (Recommended)** | **Private Key** (PKCS#8), and **Private Key Passphrase** if the key is encrypted |+ | **Programmatic Access Token** | **Programmatic Access Token** |+ | **Password** | **Password** |+ </Step>+ <Step>+ Select **Create**. Infisical signs in to Snowflake through the gateway to check the credential and the warehouse before it saves the account.+ </Step>+</Steps>- - **Data Explorer** — browse tables, view data, filter and sort, edit rows, export to CSV/JSON- - **SQL Editor** — write and run SQL queries, use transactions+## Connect- To connect:+To open a session, follow [Connect to an account](/documentation/platform/pam/accounts/connect).- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and select the rocket icon (or select **Launch Session** from the menu)- 3. Select **Connect in Browser**+<Tabs>+ <Tab title="Browser">+ The browser session has a table browser and a SQL editor. The table browser shows the first 1,000 rows of a result.+ Snowflake doesn't enforce primary keys, but the table browser needs a declared primary key to edit a table's rows. If a table has no primary key, edit its rows from the SQL editor.</Tab><Tab title="CLI">- Requires Infisical CLI version 0.43.133 or later.+ The CLI needs to be on version 0.43.133 or later.- The CLI starts a local proxy that snowsql, DBeaver, and the Snowflake drivers connect to. It speaks plain HTTP on `127.0.0.1`, so connect with `ssl=off` and no certificate to trust. The username and password are ignored, since the gateway authenticates for you.+ Start the local proxy:```bashinfisical pam access analytics/snowflake-prod```- The command prints the port and a ready-made connection string for each client.-- **Flags:**- - `--port <port>` — use a specific local port (otherwise one is assigned automatically)- - `--reason <reason>` — provide an access reason (if required by template)-+ The CLI prints the port and a connection string for each supported client, such as SnowSQL, DBeaver, and the Snowflake drivers. The proxy uses plain HTTP on `127.0.0.1`, so connect with `ssl=off`. The gateway signs in for you, so the proxy ignores the username and password that your client sends.</Tab></Tabs>-Infisical caps results at 10,000 rows per statement so a large query can't exhaust the gateway's memory, and the Data Explorer shows the first 1,000 of those and tells you when there are more. Snowflake itself imposes no such limit; use the CLI with your own client to work with a full result set.--<Note>- Snowflake doesn't enforce primary keys, but the Data Explorer still needs one declared on a table before it can edit that table's rows. A table without one is read-only in the grid, and editable from the SQL editor.-</Note>--## Recording+## Recording and command blocking-Every statement a session runs is recorded, along with the outcome of each one, and appears under **Session Logs** on the session. Web Access and the CLI both reach Snowflake through the gateway, so recording works the same for either. Recordings are encrypted with a per-session key and written to the storage backend the [template](/documentation/platform/pam/templates/overview) selects, the same as any other account type.+Infisical records every statement in a session and its outcome. To see them, open the session and go to **Session Logs**.-The template's **Command Blocking** policy applies to Snowflake as well: a statement matching one of its patterns is rejected before it reaches Snowflake, and the rejection is recorded. **Session Log Masking** patterns are applied to the recording before it's written.+The template's **Command Blocking** patterns apply to Snowflake statements. If a statement matches a pattern, Infisical rejects the statement before it reaches Snowflake and records the rejection. Command blocking only matches the text of each statement, so it can't stop SQL that a statement builds while it runs, such as with `EXECUTE IMMEDIATE`. For restrictions that must always hold, use Snowflake privileges.## Next steps<CardGroup cols={2}><Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ Review and end the connections that people and agents make to your accounts.</Card><Card title="Access requests" icon="hand" href="/documentation/platform/pam/access-requests/overview">- Require approval before a session starts.+ Require approval before a member can use a sensitive account.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/ssh.mdx b/docs/documentation/platform/pam/accounts/ssh.mdxindex 4a1e84297f..28a25834b5 100644--- a/docs/documentation/platform/pam/accounts/ssh.mdx+++ b/docs/documentation/platform/pam/accounts/ssh.mdx@@ -1,109 +1,74 @@---title: "SSH accounts"sidebarTitle: "SSH"-description: "Add and connect to SSH servers."+description: "Give people shell access to Linux and Unix servers."----SSH accounts let you manage access to your Linux/Unix servers. Users connect through Web Access (a browser-based terminal) or the CLI, which drops you straight into a shell on the server (a local proxy is available with `--proxy` for your own SSH client). Every [session](/documentation/platform/pam/sessions/overview) can be recorded.+An SSH account lets people open a shell on a Linux or Unix server without seeing the server's password or key. They connect in a browser terminal or through the Infisical CLI, and Infisical records each [session](/documentation/platform/pam/sessions/overview).-SSH accounts support three authentication methods: password, public key, and certificate-based.+## Prerequisites-## Creating an account+- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [Gateway](/documentation/platform/gateways/overview) that can reach the server on its SSH port++## Create an account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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 SSH [template](/documentation/platform/pam/templates/overview) (e.g., the default `ssh` or a custom one).+ <Step>+ Select the **Folder** to add the account to and an SSH **Account Template**, such as the default `ssh` [template](/documentation/platform/pam/templates/overview), then select **Next**.</Step>- <Step title="Enter connection details">+ <Step>+ Enter a **Name** for the account and the server's connection details:+| Field | Description ||-------|-------------|- | **Name** | A descriptive name (e.g., `prod-web-01`) |- | **Host** | Server hostname or IP |- | **Port** | SSH port (default: 22) |- | **Username** | Linux username to connect as |+ | **Host** | The server's hostname or IP address |+ | **Port** | The server's SSH port (defaults to `22`) |+ | **Gateway** | The Gateway that connects to the server (only shown if the template doesn't set one) |</Step>- <Step title="Choose authentication method">- See the section below for each method.+ <Step>+ Select an **Auth Method**, enter the **Username** to log in as, and fill in the fields for that [authentication method](#authentication-methods).</Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>## Authentication methods-<Tabs>- <Tab title="Password">- The simplest option. Provide the username and password.-- The server must have `PasswordAuthentication yes` in sshd_config.- </Tab>- <Tab title="Public Key">- Authenticate with an SSH private key (OpenSSH format).-- The corresponding public key must be in the user's `~/.ssh/authorized_keys` on the server.- </Tab>- <Tab title="Certificate (Recommended)">- The most secure option. Instead of storing static credentials, Infisical mints a short-lived certificate for each session.-- After creating the account, configure the server to trust Infisical's CA. The account detail page provides a setup script.+| Method | What you enter | What the server needs |+|--------|----------------|-----------------------|+| **Certificate** | Only the username | To trust the account's certificate authority (CA), as described in [Set up SSH certificate authentication](/documentation/platform/pam/guides/ssh-certificate-auth) |+| **Public Key** | A **Private Key** in OpenSSH format | The matching public key in the user's `~/.ssh/authorized_keys` file |+| **Password** | The user's **Password** | `PasswordAuthentication yes` in `sshd_config` |- See the [SSH Certificate Auth guide](/documentation/platform/pam/guides/ssh-certificate-auth) for a full walkthrough.- </Tab>-</Tabs>+Use **Certificate** where you can. Infisical issues a short-lived certificate for each session, so the account stores no password or key that could leak.-## Connecting+## Connect-<Tabs>- <Tab title="Web Access">- Web Access provides an interactive terminal in your browser.+People can open a terminal in the browser or connect through the CLI. To learn how to launch a session, see [Connect to an account](/documentation/platform/pam/accounts/connect).- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and click the rocket icon (or select **Launch Session** from the menu)- 3. Click **Connect in Browser**- 4. A terminal opens in a new tab+The CLI opens a shell on the server:- You get a full shell. To disconnect, type `exit` or close the tab.- </Tab>- <Tab title="CLI">- The CLI connects you straight to a shell on the server.+```bash+infisical pam access <folder>/<account>+```- ```bash- infisical pam access prod-servers/web-01- ```+To run one command instead of opening a shell, put the command after `--`:- To disconnect, type `exit` or press `Ctrl+D`.+```bash+infisical pam access <folder>/<account> -- systemctl status nginx+```- To run a single command and exit, put it after `--`:-- ```bash- infisical pam access prod-servers/web-01 -- systemctl status nginx- ```-- For file transfer, port forwarding, or your own SSH client and `~/.ssh/config`, use `--proxy` to- get a local port instead:-- ```bash- infisical pam access prod-servers/web-01 --proxy- ```-- **Flags:**- - `--proxy` — start a local proxy instead of connecting you, for SCP, SFTP, rsync and port forwarding- - `--port <port>` — use a specific local port (requires `--proxy`)- - `--reason <reason>` — provide an access reason (if required by template)- </Tab>-</Tabs>+To use your own SSH client, or to copy files with `scp`, `sftp`, or `rsync`, add `--proxy`. The CLI then starts a local proxy and prints the port to connect to.## Next steps<CardGroup cols={2}>- <Card title="SSH Certificate Auth" icon="key" href="/documentation/platform/pam/guides/ssh-certificate-auth">- Set up certificate-based authentication.- </Card>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ <Card title="SSH certificate auth" icon="key" href="/documentation/platform/pam/guides/ssh-certificate-auth">+ Let people connect to SSH servers with short-lived certificates instead of stored credentials.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/accounts/view-credentials.mdx b/docs/documentation/platform/pam/accounts/view-credentials.mdxnew file mode 100644index 0000000000..1cdf38ab21--- /dev/null+++ b/docs/documentation/platform/pam/accounts/view-credentials.mdx@@ -0,0 +1,42 @@+---+title: "View an account's credentials"+sidebarTitle: "View credentials"+description: "Reveal the password or key stored for an account."+---++Some tasks need the credential itself instead of a [session](/documentation/platform/pam/accounts/connect), such as signing in with a desktop client that Infisical can't connect through, or configuring an appliance by hand. For these tasks, you can reveal the password or key stored for an [account](/documentation/platform/pam/accounts/overview).++<Warning>+ Once you reveal a credential, Infisical can't control how it's used. Infisical doesn't record what you do with the credential or block any commands, and revoking your access doesn't invalidate a copy of it. Use a session when you can, and [rotate the credential](/documentation/platform/pam/credential-rotation/overview) after someone reveals it.+</Warning>++## Prerequisites++- The Admin or Operator [role](/documentation/platform/pam/concepts/access-control) on the account or its folder+- An approved credential request, if the account's template requires approval (see [Request access to the credential](#request-access-to-the-credential))++## Reveal the credential++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts**, then open the options menu on the account's row and select **View Credentials**.+ </Step>+ <Step>+ Enter a **Reason** and select **Reveal**. If the account's template requires MFA, complete MFA in the window that opens.+ </Step>+ <Step>+ To show a masked value, select the eye icon next to it.+ </Step>+</Steps>++If an account's auth method doesn't store a password or key, such as an SSH certificate or AWS IAM, the account has no **View Credentials** option.++## Request access to the credential++If the account's template requires approval, the options menu shows **Request Credentials** instead of **View Credentials**. Select **Request Credentials** to file a request, and reveal the credential after an approver approves it. To learn how requests are reviewed, see [Access requests](/documentation/platform/pam/access-requests/overview).++Infisical approves credential requests and session requests separately. An approved session request doesn't let you reveal the credential, and an approved credential request doesn't let you launch a session.++## Audit log entries++Each time someone reveals a credential, Infisical adds a **View PAM Account Credentials** event to the [audit log](/documentation/platform/pam/auditing). The event names the member, the account, and the reason they gave.diff --git a/docs/documentation/platform/pam/accounts/windows-ad.mdx b/docs/documentation/platform/pam/accounts/windows-ad.mdxindex b5775b02d9..83e4fb9b82 100644--- a/docs/documentation/platform/pam/accounts/windows-ad.mdx+++ b/docs/documentation/platform/pam/accounts/windows-ad.mdx@@ -1,101 +1,70 @@---title: "Windows Active Directory accounts"sidebarTitle: "Windows AD"-description: "Add and connect to Windows servers through Active Directory."+description: "Give people remote desktop access to Windows servers with an Active Directory account."----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.+A Windows AD account lets people open a remote desktop (RDP) session as an Active Directory domain account without seeing its password. One account can sign in to several servers, and you choose which ones in the account's list of allowed hosts. People connect with an RDP client in the browser or with their own RDP client through the Infisical CLI, and Infisical records each [session](/documentation/platform/pam/sessions/overview).-<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>+To sign in to one server with a local Windows account, use a [Windows account](/documentation/platform/pam/accounts/windows) instead.-## Creating an account+<Info>+ Windows AD accounts are available under Infisical's [Enterprise](https://infisical.com/pricing) plan.+</Info>++## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [Gateway](/documentation/platform/gateways/overview) that can reach each allowed host on its RDP port+- A Windows AD [template](/documentation/platform/pam/templates/overview) that stores recordings in [your own S3 bucket](/documentation/platform/pam/sessions/external-storage) (the default Windows AD template stores them in Infisical's database, so a Product Admin must change it or create another template)++## Create an account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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>+ Select the **Folder** to add the account to and a Windows AD **Account Template**, then select **Next**.</Step>- <Step title="Enter connection details">+ <Step>+ Enter a **Name** for the account and the domain's 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 |+ | **FQDN** | The domain's fully qualified domain name, such as `corp.example.com` |+ | **DC Address** | The hostname or IP address of a domain controller |+ | **Allowed Hosts** | The hostnames or IP addresses of the servers people can connect to (one per line) |+ | **LDAP Port** | The domain controller's LDAP port (defaults to `389`) |+ | **RDP Port** | The RDP port of the allowed hosts (defaults to `3389`) |+ | **Use LDAPS** | Whether to connect to the domain controller over LDAPS |+ | **WinRM Port** and **Use WinRM HTTPS** | How to connect to WinRM (defaults to port `5985` over HTTP) |+ | **Gateway** | The Gateway that connects to the hosts (only shown if the template doesn't set one) |++ Infisical uses the domain controller and WinRM settings for [credential rotation](/documentation/platform/pam/credential-rotation/windows), [credential health](/documentation/platform/pam/credential-health/overview) checks, and [dependency](/documentation/platform/pam/credential-rotation/windows#dependencies) detection, not for RDP sessions.</Step>- <Step title="Enter credentials">- | Field | Description |- |-------|-------------|- | **Username** | Domain username in `DOMAIN\username` format (e.g., `CORP\Administrator`) |- | **Password** | Domain password |+ <Step>+ Enter the **Username** in `DOMAIN\username` format, such as `CORP\Administrator`, and the **Password**.</Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>-## Connecting--<Tabs>- <Tab title="Web Access">- Web Access provides a browser-based RDP client:-- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and click the rocket icon (or select **Launch Session** from the menu)- 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, use `--target` to specify which one:- ```bash- infisical pam access <folder>/<account> --target <host>- ```-- 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>+## Connect- Press `Ctrl+C` to end the session and close the proxy.- </Tab>-</Tabs>+People can open a remote desktop in the browser or connect through the CLI. To learn how to launch a session, see [Connect to an account](/documentation/platform/pam/accounts/connect).-## Allowed hosts+If the account has more than one allowed host, select the **Host** to connect to when you launch the session. In the CLI, pass the host with `--target`:-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.+```bash+infisical pam access <folder>/<account> --target <host>+```-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.+The CLI starts a local proxy and prints its port. Point your RDP client at `localhost` on that port, for example:-## Next steps+```bash+xfreerdp /v:localhost:<port>+```-<CardGroup cols={2}>- <Card title="Windows Accounts" icon="windows" iconType="brands" href="/documentation/platform/pam/accounts/windows">- Add single-server Windows accounts.- </Card>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.- </Card>-</CardGroup>+Press `Ctrl+C` to end the session.diff --git a/docs/documentation/platform/pam/accounts/windows.mdx b/docs/documentation/platform/pam/accounts/windows.mdxindex bdfdb9966a..c478245dc6 100644--- a/docs/documentation/platform/pam/accounts/windows.mdx+++ b/docs/documentation/platform/pam/accounts/windows.mdx@@ -1,85 +1,71 @@---title: "Windows accounts"sidebarTitle: "Windows"-description: "Add and connect to Windows servers via RDP."+description: "Give people remote desktop access to a Windows server with a local account."----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.+A Windows account lets people open a remote desktop (RDP) session on one Windows server without seeing the account's password. They connect with an RDP client in the browser or with their own RDP client through the Infisical CLI, and Infisical records each [session](/documentation/platform/pam/sessions/overview).-<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>+To sign in to several servers with one Active Directory account, use a [Windows AD account](/documentation/platform/pam/accounts/windows-ad) instead.-## Creating an account+<Info>+ Windows accounts are available under Infisical's [Enterprise](https://infisical.com/pricing) plan.+</Info>++## Prerequisites++- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- A [Gateway](/documentation/platform/gateways/overview) that can reach the server on its RDP port+- A Windows [template](/documentation/platform/pam/templates/overview) that stores recordings in [your own S3 bucket](/documentation/platform/pam/sessions/external-storage) (the default Windows template stores them in Infisical's database, so a Product Admin must change it or create another template)++## Create an account<Steps>- <Step title="Start adding an account">- Go to **Privileged Access Management → Accounts** and select **Add Account**.+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **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>+ Select the **Folder** to add the account to and a Windows **Account Template**, then select **Next**.</Step>- <Step title="Enter connection details">+ <Step>+ Enter a **Name** for the account and the server's connection details:+| Field | Description ||-------|-------------|- | **Name** | A descriptive name (e.g., `prod-app-server`) |- | **Host** | Server hostname or IP |- | **Port** | RDP port (default: 3389) |+ | **Host** | The server's hostname or IP address |+ | **RDP Port** | The server's RDP port (defaults to `3389`) |+ | **WinRM Port** | The server's WinRM port (defaults to `5985`) |+ | **Use WinRM HTTPS** | Whether to connect to WinRM over HTTPS |+ | **Gateway** | The Gateway that connects to the server (only shown if the template doesn't set one) |++ Infisical uses WinRM for [credential rotation](/documentation/platform/pam/credential-rotation/windows), [credential health](/documentation/platform/pam/credential-health/overview) checks, and [dependency](/documentation/platform/pam/credential-rotation/windows#dependencies) detection, not for RDP sessions.</Step>- <Step title="Enter credentials">- | Field | Description |- |-------|-------------|- | **Username** | Windows username |- | **Password** | Windows password |+ <Step>+ Enter the **Username** and **Password** of the local Windows account.++ <Note>+ Enter the username on its own, such as `svc-backup`, without a `.\` or computer name in front of it.+ </Note></Step>- <Step title="Save">+ <Step>Select **Create**.</Step></Steps>-## Connecting--<Tabs>- <Tab title="Web Access">- Web Access provides a browser-based RDP client:-- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and click the rocket icon (or select **Launch Session** from the menu)- 3. Click **Connect in Browser**- 4. 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>- ```+## Connect- The command prints the local port. Connect your RDP client to `localhost` on that port:+People can open a remote desktop in the browser or connect through the CLI. To learn how to launch a session, see [Connect to an account](/documentation/platform/pam/accounts/connect).- ```bash- # Example using xfreerdp- xfreerdp /v:localhost:53306- ```+The CLI starts a local proxy and prints its port:- <Tip>- The port is dynamically assigned. Use the `--port` flag if you need a specific port:- `infisical pam access <folder>/<account> --port 13389`- </Tip>+```bash+infisical pam access <folder>/<account>+```- Press `Ctrl+C` to end the session and close the proxy.- </Tab>-</Tabs>+Point your RDP client at `localhost` on that port, for example:-## Next steps+```bash+xfreerdp /v:localhost:<port>+```-<CardGroup cols={2}>- <Card title="Windows AD Accounts" icon="windows" iconType="brands" href="/documentation/platform/pam/accounts/windows-ad">- Add Windows Active Directory accounts.- </Card>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.- </Card>-</CardGroup>+Press `Ctrl+C` to end the session.diff --git a/docs/documentation/platform/pam/ai-agents/instructions.mdx b/docs/documentation/platform/pam/ai-agents/instructions.mdxnew file mode 100644index 0000000000..a64914023c--- /dev/null+++ b/docs/documentation/platform/pam/ai-agents/instructions.mdx@@ -0,0 +1,33 @@+---+title: "Agent instructions"+sidebarTitle: "Agent instructions"+description: "Tell an AI agent which PAM accounts it can use and how to reach them."+---++An agent only uses the accounts it knows about. When you [run an agent](/documentation/platform/pam/ai-agents/run), the CLI writes an instruction file for the run. The file lists the accounts the agent can use and tells the agent that it doesn't need credentials, that Infisical records everything it runs, and that it shouldn't connect to anything else.++## Where the instructions go++The CLI delivers the instructions in a format each agent reads:++| Agent | Where the instructions go |+|---|---|+| `claude` | Passed to Claude Code directly, without changing your repository |+| `codex` | A block in `AGENTS.md`, removed when the run ends |+| `gemini` | A block in `GEMINI.md`, removed when the run ends |+| Any other agent | A block in `AGENTS.md`, removed when the run ends |++<Note>+If your agent runs under a wrapper script, the CLI can't recognize it by name. Pass `--agent` with `claude`, `codex`, `gemini`, or `generic` to choose the format.+</Note>++## Agents you build yourself++Every run sets the `INFISICAL_PAM_CONTEXT_FILE` environment variable to the path of the instruction file. To give your own agent the instructions, read the file and add its contents to your agent's system prompt:++```python+import os++with open(os.environ["INFISICAL_PAM_CONTEXT_FILE"]) as file:+ pam_context = file.read() # add this to your agent's system prompt+```diff --git a/docs/documentation/platform/pam/ai-agents/overview.mdx b/docs/documentation/platform/pam/ai-agents/overview.mdxindex ba6bc42ca4..2828a563ab 100644--- a/docs/documentation/platform/pam/ai-agents/overview.mdx+++ b/docs/documentation/platform/pam/ai-agents/overview.mdx@@ -1,22 +1,37 @@---title: "PAM for AI agents"-sidebarTitle: "AI agents"-description: "Give an AI agent brokered access to your databases and servers without handing it a credential."+sidebarTitle: "Overview"+description: "Give an AI agent access to your databases and servers without giving it a credential."----AI agents increasingly do work that needs privileged access: a coding agent tracing a bug through production data, or an agent you built yourself running a nightly task against a database. The usual way to arrange that is a connection string in the agent's environment, which leaves a long-lived credential sitting in a process that reads untrusted input all day.+AI agents often need privileged access; for example, a coding agent that reads production data to trace a bug, or an agent you built that runs a nightly task against a database. If you put a connection string in the agent's environment, the agent holds a long-lived credential while it reads untrusted input.-**Agentic access** brokers that access instead. One command opens the [accounts](/documentation/platform/pam/accounts/overview) an agent is allowed to use, hands it instructions describing them, and starts it inside a sandbox:+Agentic access lets an agent use your PAM [accounts](/documentation/platform/pam/accounts/overview) without ever receiving their credentials. One command opens the accounts the agent can use, gives the agent instructions for reaching them, and starts the agent in a [sandbox](/documentation/platform/pam/ai-agents/run#sandbox):```bashinfisical pam agentic access -- claude```-From there the agent works on its own, and no credential ever reaches it. Any agent can be run this way: Claude Code, Codex, and Gemini are recognized by name and told what they can reach in their own format, and an agent you wrote yourself reads the same instructions from [an environment variable](#agents-you-build-yourself).+You can run any agent this way. The CLI recognizes Claude Code, Codex, and Gemini by name, and an agent you build yourself can read the same instructions from [a file](/documentation/platform/pam/ai-agents/instructions#agents-you-build-yourself).++<CardGroup cols={2}>+ <Card title="Run an agent" icon="play" href="/documentation/platform/pam/ai-agents/run">+ Start an AI agent with access to the PAM accounts its task needs.+ </Card>+ <Card title="Agent instructions" icon="file-text" href="/documentation/platform/pam/ai-agents/instructions">+ Tell an AI agent which PAM accounts it can use and how to reach them.+ </Card>+ <Card title="Run unattended" icon="clock" href="/documentation/platform/pam/ai-agents/unattended">+ Run an AI agent as its own machine identity.+ </Card>+ <Card title="Review and stop an agent" icon="eye" href="/documentation/platform/pam/ai-agents/review">+ Check what an AI agent did with your accounts and remove its access.+ </Card>+</CardGroup>## How it works-Each account the agent may use is opened as a port on `127.0.0.1`. The agent connects to a port the way it would connect to any database or host, and the [Gateway](/documentation/platform/gateways/overview) on the far side supplies the real credential:+The CLI opens one port on `127.0.0.1` for each account the agent can use. The agent connects to a port the same way it connects to any database or server, and the [Gateway](/documentation/platform/gateways/overview) adds the account's credential to the connection:```mermaidflowchart LR@@ -28,7 +43,7 @@ flowchart LRCLI["Infisical CLI<br/>one local port per account"]end- GW["Gateway<br/>adds the real credential"]+ GW["Gateway<br/>adds the credential"]TARGET[("Your databases<br/>and servers")]INF["Infisical<br/>policies, approvals, recordings"]@@ -36,212 +51,21 @@ flowchart LRCLI -->|"encrypted tunnel"| GWGW --> TARGETCLI -.->|"opens the session"| INF- GW -.->|"records it"| INF-```--1. **The ports open first, and nothing is connected.** No [session](/documentation/platform/pam/sessions/overview) exists until the agent actually reaches for an account.-2. **The agent connects when its task calls for it.** That first connection is what opens the session, subject to the usual checks: role, duration, and [approval](/documentation/platform/pam/access-requests/overview).-3. **The Gateway holds the credential.** It injects it on the way to the database or host, so the agent authenticates to nothing and stores nothing.-4. **Everything is recorded**, attributed to whoever the run authenticated as, exactly like a person's session.--## Prerequisites--- The [Infisical CLI](/cli/install) installed, and either `infisical login` completed or a machine identity to authenticate as.-- The Connector or Admin [role](/documentation/platform/pam/concepts/access-control) on the folders or accounts the agent should reach, held by whoever the run authenticates as.-- macOS, or Linux with [bubblewrap](https://github.com/containers/bubblewrap) installed. The sandbox comes from the operating system, so where one is unavailable the command refuses to start unless you [turn the sandbox off](#turning-the-sandbox-off) yourself.--## Who the agent runs as--An agent has no access of its own. It borrows the access of whoever starts the run, and that can be either of two things:--- **You.** Log in with `infisical login` and the agent uses your own access. Its sessions and any access requests are attributed to you, exactly as if you had opened them yourself. This is the normal way to work with a coding agent at your terminal.-- **A [machine identity](/documentation/platform/identities/machine-identities).** For an agent that runs with nobody watching, give it an identity of its own so its sessions and requests belong to it rather than to a person. See [Running unattended](#running-unattended).--Nothing else on this page changes between the two.--## Starting an agent--Everything after `--` is the command that starts your agent. By default it can reach every account you could launch a session on yourself, which is usually more than a single task needs, so narrow it with `--account`:--```bash-infisical pam agentic access --account prod/orders-db --account prod/bastion -- claude+ GW -.->|"records the session"| INF```-<Tip>- Give the agent the accounts the task needs, not everything you have. The instructions tell it to stay on the accounts it was given, but a smaller set is a smaller blast radius.-</Tip>--Before the agent starts, the run prints what it can reach:--```text- Infisical PAM proxies ready for claude-- 127.0.0.1:52431 prod/orders-db (PostgreSQL)- 127.0.0.1:52432 prod/bastion (SSH)- 127.0.0.1:52433 prod/payments-db (PostgreSQL) [awaiting approval]-- Not started:- prod/legacy-db: you don't have permission to launch sessions for this account-- Proxy logs: /Users/you/.infisical/pam-agentic/access.log-```--Anything left out appears under **Not started** with the reason, so no account goes missing silently. One reason worth knowing in advance: an account whose [template](/documentation/platform/pam/templates/overview) requires a reason needs `--reason` on the command line, since the agent owns the terminal and there is nothing to prompt.--Sessions are created lazily, on the agent's first connection to each account, so accounts it never touches produce no sessions at all.--### Supported account types--Agents can reach:--- **Databases** — [PostgreSQL](/documentation/platform/pam/accounts/postgresql), [MySQL](/documentation/platform/pam/accounts/mysql), [SQL Server](/documentation/platform/pam/accounts/mssql), [MongoDB](/documentation/platform/pam/accounts/mongodb), and [Redis](/documentation/platform/pam/accounts/redis)-- **Servers** — [SSH](/documentation/platform/pam/accounts/ssh), and [Windows](/documentation/platform/pam/accounts/windows) over RDP-- **Clusters** — [Kubernetes](/documentation/platform/pam/accounts/kubernetes)--Kubernetes accounts are set up for the agent automatically, so `kubectl` works inside the run without touching your own kubeconfig.+1. The CLI opens the ports and starts the agent+2. When the agent first connects to an account, Infisical checks the role, the duration, and any [approval](/documentation/platform/pam/access-requests/overview) the account requires, then opens a [session](/documentation/platform/pam/sessions/overview)+3. The Gateway adds the credential to the connection before it reaches the database or server, so the agent never receives the credential+4. Infisical records the session under whoever the run authenticated as, the same way it records a person's session<Note>- Accounts whose template requires **MFA** can't be used here yet, whoever the run authenticates as. Reach those with `infisical pam access`, which prompts for MFA in the browser. Support for MFA in agent runs is planned.+If the agent never connects to an account, Infisical doesn't open a session for it.</Note>-## How the agent is told--An agent that doesn't know these accounts exist won't use them, so every run writes an instruction document. It names the accounts the agent can reach, tells it that no credentials are needed because the Gateway supplies them, that everything it runs is recorded, and that it shouldn't connect to anything else.--The document is delivered in whichever way the agent understands, so there is nothing to configure:--| Agent | How it arrives |-|---|---|-| `claude` | Passed to Claude Code directly. Your repo is untouched. |-| `codex` | A block in `AGENTS.md`, removed when the run ends. |-| `gemini` | A block in `GEMINI.md`, removed when the run ends. |-| Anything else | A block in `AGENTS.md`, removed when the run ends. |--Use `--agent` if your agent runs under a wrapper script and isn't recognized by name.--### Agents you build yourself--You aren't limited to the agents above. Every run exports **`INFISICAL_PAM_CONTEXT_FILE`**, the path to that same document, so an agent that follows no convention of its own can still be told what it may reach. Read the file and put it in front of your model:--```python-import os--with open(os.environ["INFISICAL_PAM_CONTEXT_FILE"]) as file:- pam_context = file.read() # add this to your agent's system prompt-```--The variable is set for every run, so a wrapper around one of the agents above can read it too.--## The sandbox--Instructions tell the agent where to go. The sandbox is an additional layer aimed at keeping it away from your Infisical credentials: while your login stays unreadable, an agent can't open sessions beyond the accounts, duration, and approvals the run was started with.--| The agent can | The agent shouldn't be able to |-|---|---|-| Read and write in your working directory | Read your Infisical login or credential store |-| Use its own tools, subprocesses, and state | Open PAM sessions on other accounts |-| Reach the accounts listed when the run started | Use Docker or another container runtime |--Everyday development files such as `~/.aws`, `~/.ssh`, and `~/.kube` stay readable, so ordinary work like `git` over SSH keeps working. The sandbox is aimed at your access to PAM itself, not at every secret on the machine.--### How far the sandbox goes--The sandbox does real work. It closes the paths an agent would actually take to your Infisical credentials, it survives the agent's own subprocesses because the operating system enforces it, and nothing the agent can do from inside lifts it.--<Note>- **It's still defense in depth, not a guarantee.** No operating system sandbox is airtight, and this one isn't an exfiltration control either, since the agent keeps its own network access. An agent built or manipulated into hunting for secrets on the host may well be stopped, and may not be.-</Note>--Underneath it, PAM's own guarantees hold either way: the account's credential is never on the machine at all, every connection is a [session](/documentation/platform/pam/sessions/overview) you can watch and end, and access stays bounded by role, duration, and [approval](/documentation/platform/pam/access-requests/overview). For anything sensitive, [running the agent as its own scoped identity](#running-unattended) is what bounds the worst case.--### Turning the sandbox off--`--no-sandbox` runs the agent with no local boundary at all. Keep the sandbox on wherever your operating system provides one.--## Accounts that need approval--Sensitive accounts can be put behind [approval](/documentation/platform/pam/access-requests/overview), and an agent is held to that gate like anyone else. Such an account is still offered to the agent, marked `[awaiting approval]` in the list above, and stays unusable until a person clears it.--The first time the agent reaches for one, a request is filed and that attempt fails. Once a reviewer approves it, the agent's next attempt works, with nothing to restart. A grant that expires part-way through a long run behaves the same way: the agent waits rather than losing the account.--Pass `--no-approval-request` if you would rather nothing was filed on your behalf.--## Running unattended--Everything so far assumed you at a terminal. An agent that runs on a schedule or on a server should instead run as its own machine identity, so its sessions and access requests belong to it rather than to a person.--This is also the strongest way to run an agent you don't fully trust, watched or not: no human's credentials are part of the run at all, and the identity's scope becomes the ceiling on what the agent can reach.--<Steps>- <Step title="Create the identity">- Go to **Privileged Access Management → Access Control**, open the **Identities** tab, and select **Add Identity**. **Create** makes an identity that belongs to PAM; **Assign** adds one that already exists in your organization. Either way, choose **Product Admin** or **Product Member**, the two roles PAM offers.-- A new identity arrives with [Universal Auth](/documentation/platform/identities/universal-auth) attached, so its page has a **Client ID** and can generate a **Client Secret** right away. Attach a different [auth method](/documentation/platform/identities/machine-identities#authentication-methods) instead if the agent's host can authenticate itself through Kubernetes, AWS, GCP, Azure, OIDC, JWT, or LDAP.- </Step>- <Step title="Grant it access">- Open the [folder](/documentation/platform/pam/folders/overview) the agent needs, go to **Permissions**, select **Assign Access**, and give the identity the **Connector** role on the accounts its task needs and nothing else. Set an expiration if the access is temporary.- </Step>- <Step title="Run the agent as the identity">- Pass the credentials through the environment:-- ```bash- export INFISICAL_AUTH_METHOD=universal-auth- export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<client-id>- export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<client-secret>-- infisical pam agentic access --reason "nightly triage agent" -- python triage_agent.py- ```- </Step>-</Steps>--<Tip>- Use the environment rather than `--client-secret` and friends. A secret on the command line lands in your shell history and is visible to anything that can list processes. The CLI also strips its own variables before the agent starts, so the agent never inherits the credentials the run was authenticated with.-</Tip>--See the [CLI reference](/cli/reference#pam-agentic-access) for the other authentication methods and their variables.--For a sensitive workload, pair that with a **dedicated machine**: an isolated host or container holding nothing else worth taking, so even an agent that gets past every local defense finds only that one narrowly scoped identity. Its access is still bounded by role, duration, and [approval](/documentation/platform/pam/access-requests/overview), and everything it does is on record.--## Reviewing what the agent did--Because every connection is a normal PAM session, reviewing an agent's work is the same job as reviewing a person's. Each account it connected to has a [session](/documentation/platform/pam/sessions/overview) with its queries or commands in the [recording](/documentation/platform/pam/sessions/session-recording), attributed to whoever the run authenticated as. An identity has no email address, so its sessions and [audit log](/documentation/platform/pam/auditing) entries show **Machine Identity** where a person's email would appear.--## Frequently asked questions--<AccordionGroup>- <Accordion title="An account is missing from the list">- Check the **Not started** list, printed with every run, which gives the reason for each account left out. If the account isn't there either, you can't launch sessions on it: check your role on the folder or account.- </Accordion>- <Accordion title="An account stays stuck on awaiting approval">- It's waiting on a person. Check the folder's **Approvals** tab: with no approvers seated there, no one can clear the request. After approval, the agent's next attempt works on its own.- </Accordion>- <Accordion title="Can an agent approve an access request?">- No. Approving stays with people, whoever the agent runs as. It can file a request and wait for a user or group to clear it.- </Accordion>- <Accordion title="What does running as a machine identity change?">- The attribution. Sessions and access requests belong to the identity rather than to you, and its roles decide what the agent can reach.- </Accordion>- <Accordion title="The command will not start on Linux">- The sandbox is unavailable, usually because bubblewrap is missing or user namespaces are restricted on the host. The message says which. The command stops rather than quietly running your agent without a boundary. Fix the host if you can, or pass [`--no-sandbox`](#turning-the-sandbox-off) deliberately.- </Accordion>- <Accordion title="How do I cut an agent off quickly?">- Remove its identity's role on the folder or account to stop it launching anything new, and terminate any live session from the **Sessions** page. For a gated account, revoking its grant on the folder's **Approvals** tab also ends its sessions right away.- </Accordion>-</AccordionGroup>+## Who the agent runs as-## Next steps+An agent has no access of its own. It uses the roles of whoever starts the run, and Infisical attributes its sessions and access requests to that user or machine identity:-<CardGroup cols={2}>- <Card title="Access Requests" icon="hand" href="/documentation/platform/pam/access-requests/overview">- Require approval before an agent can use an account.- </Card>- <Card title="Access Control" icon="shield-half" href="/documentation/platform/pam/concepts/access-control">- The roles you grant an agent's identity.- </Card>- <Card title="Session Recording" icon="video" href="/documentation/platform/pam/sessions/session-recording">- Review exactly what the agent ran.- </Card>- <Card title="CLI Reference" icon="terminal" href="/cli/reference#pam-agentic-access">- Every flag for `pam agentic access`.- </Card>-</CardGroup>+- **You:** Log in with `infisical login` before you start the agent (for a coding agent that you work with in your terminal)+- **A machine identity:** Give the agent its own identity (for an agent that runs on a schedule or on a server), as described in [Run unattended](/documentation/platform/pam/ai-agents/unattended)diff --git a/docs/documentation/platform/pam/ai-agents/review.mdx b/docs/documentation/platform/pam/ai-agents/review.mdxnew file mode 100644index 0000000000..5228d682a5--- /dev/null+++ b/docs/documentation/platform/pam/ai-agents/review.mdx@@ -0,0 +1,26 @@+---+title: "Review and stop an AI agent"+sidebarTitle: "Review and stop an agent"+description: "Check what an AI agent did with your accounts and remove its access."+---++Every connection an AI agent makes is a normal PAM [session](/documentation/platform/pam/sessions/overview), so you review and stop an agent's sessions the same way you review and stop a person's.++## Review what the agent did++To review the agent's work, open its [sessions](/documentation/platform/pam/sessions/overview) and check the queries or commands in each [recording](/documentation/platform/pam/sessions/session-recording). Sessions show whoever the run authenticated as. If that's a machine identity, its sessions and [audit log](/documentation/platform/pam/auditing) events show **Machine Identity** where a person's email would appear.++## Stop an agent++To remove an agent's access right away:++<Steps>+ <Step>+ Remove the role that the run's user or machine identity has on the folder or account, so the agent can't open new sessions.+ </Step>+ <Step>+ [Terminate](/documentation/platform/pam/sessions/overview) the agent's active sessions on the **Sessions** page.+ </Step>+</Steps>++If the account requires approval, [revoking the request](/documentation/platform/pam/access-requests/overview#revoke-access) also ends its sessions.diff --git a/docs/documentation/platform/pam/ai-agents/run.mdx b/docs/documentation/platform/pam/ai-agents/run.mdxnew file mode 100644index 0000000000..715778dfbf--- /dev/null+++ b/docs/documentation/platform/pam/ai-agents/run.mdx@@ -0,0 +1,127 @@+---+title: "Run an AI agent"+sidebarTitle: "Run an agent"+description: "Start an AI agent with access to the PAM accounts its task needs."+---++To give an AI agent access to your PAM accounts, start the agent with `infisical pam agentic access`. The CLI opens the accounts the agent can use, gives the agent [instructions](/documentation/platform/pam/ai-agents/instructions) for reaching them, and starts the agent in a [sandbox](#sandbox). To learn how agentic access works, see [AI agents](/documentation/platform/pam/ai-agents/overview).++## Prerequisites++- The [Infisical CLI](/cli/install), logged in with `infisical login` or able to authenticate as a [machine identity](/documentation/platform/pam/ai-agents/unattended)+- The Connector, Operator, or Admin [role](/documentation/platform/pam/concepts/access-control) on the folders or accounts the agent needs, held by whoever the run authenticates as+- macOS, or Linux with [bubblewrap](https://github.com/containers/bubblewrap) installed, for the [sandbox](#sandbox) (on any other host, such as Windows, you must [turn the sandbox off](#turn-the-sandbox-off))++## Start an agent++Everything after `--` is the command that starts your agent. By default, the agent can use every account you can launch a session on. To give the agent only the accounts its task needs, add `--account` once for each account:++```bash+infisical pam agentic access --account prod/orders-db --account prod/bastion -- claude+```++Before the agent starts, the CLI prints the accounts the agent can use:++```text+ Infisical PAM proxies ready for claude++ 127.0.0.1:52431 prod/orders-db (PostgreSQL)+ 127.0.0.1:52432 prod/bastion (SSH)+ 127.0.0.1:52433 prod/payments-db (PostgreSQL) [awaiting approval]++ Not started:+ prod/legacy-db: you don't have permission to launch sessions for this account+```++If you don't pass `--account`, the CLI lists each account it left out under **Not started**, with the reason. If you pass `--account` and a named account can't be used, the command stops and prints the reason.++If an account's [template](/documentation/platform/pam/templates/overview) has **Require Reason** turned on, pass the reason with `--reason`. The CLI can't ask for a reason while the agent is running in the terminal.++<Tip>+For all flags available with the `infisical pam agentic access` command, check out the [CLI reference](/cli/reference#pam-agentic-access).+</Tip>++### Supported account types++Agents can use the following account types:++- **Databases:** [PostgreSQL](/documentation/platform/pam/accounts/postgresql), [MySQL](/documentation/platform/pam/accounts/mysql), [Microsoft SQL Server](/documentation/platform/pam/accounts/mssql), [MongoDB](/documentation/platform/pam/accounts/mongodb), and [Redis](/documentation/platform/pam/accounts/redis)+- **Servers:** [SSH](/documentation/platform/pam/accounts/ssh) and [Windows](/documentation/platform/pam/accounts/windows) over RDP+- **Clusters:** [Kubernetes](/documentation/platform/pam/accounts/kubernetes)++For Kubernetes accounts, the CLI configures `kubectl` inside the run without changing your own kubeconfig.++<Note>+ Agents can't use accounts whose template has **Require MFA** turned on. To use one of those accounts yourself, run [`infisical pam access`](/cli/reference#pam-access), which asks you to complete MFA in your browser.+</Note>++## Sandbox++The CLI runs the agent in a sandbox that the operating system enforces. The sandbox stops the agent from reading your Infisical login, so the agent can't open sessions on accounts beyond the ones the run started with. The operating system applies the sandbox to the agent and to every process the agent starts, and the agent can't turn the sandbox off from inside it.++### What the agent can access++| The agent can | The agent can't |+|---|---|+| Read and write files in your working directory | Read your Infisical login or credential store |+| Use its own tools, subprocesses, and state | Open PAM sessions on other accounts |+| Connect to the accounts the run started with | Use Docker or another container runtime |++The agent can still read common development files such as `~/.aws`, `~/.ssh`, and `~/.kube`, so tasks like `git` over SSH keep working. The sandbox protects your access to PAM, not every secret on the machine.++### Limits of the sandbox++The sandbox adds protection, but it doesn't guarantee that an agent can't reach your secrets:++- No operating system sandbox blocks every way to read files on the host, so an agent that is built or tricked into searching for secrets might find a way past it+- The agent keeps its network access, so the sandbox doesn't stop the agent from sending data off the machine++Whether or not the sandbox stops an agent, the account credentials never reach the machine. Each connection is a [session](/documentation/platform/pam/sessions/overview) that you can watch and terminate, and the agent's access is limited by role, duration, and [approval](/documentation/platform/pam/access-requests/overview).++For a sensitive task, [run the agent as its own machine identity](/documentation/platform/pam/ai-agents/unattended) on a dedicated machine. The identity's roles then limit what the agent can reach, even if the agent gets past the sandbox.++### Turn the sandbox off++To run the agent without the sandbox, pass `--no-sandbox`:++```bash+infisical pam agentic access --no-sandbox -- claude+```++Without the sandbox, the agent can read your Infisical login and every other credential file on the machine. Keep the sandbox on wherever your operating system supports it.++## Accounts that need approval++If an account requires [approval](/documentation/platform/pam/access-requests/overview), the CLI still opens a port for it and marks it `[awaiting approval]`. The agent can't use the account until an approver approves a request.++The first time the agent connects to the account, the CLI files a request and the connection fails. After an approver approves the request, the agent's next connection works without restarting the run. If the approved access expires during the run, the same thing happens again: the CLI files a new request, and the account works after an approver approves it.++To stop the CLI from filing requests, pass `--no-approval-request`. The CLI then leaves accounts that need approval out of the run.++## Frequently asked questions++<AccordionGroup>+ <Accordion title="Why is an account missing from the list?">+ Check the **Not started** list that the CLI prints at the start of each run, which gives the reason for each account it left out. If the account isn't there either, whoever the run authenticated as can't launch sessions on it, so check their role on the folder or account.+ </Accordion>+ <Accordion title="Why does an account stay on awaiting approval?">+ The request is waiting for an approver. If the folder has no approvers on its **Approvals** tab, nobody can approve the request.+ </Accordion>+ <Accordion title="Can an agent approve an access request?">+ No. Only users and groups can approve requests, whoever the agent runs as.+ </Accordion>+ <Accordion title="Why won't the command start on Linux?">+ The sandbox isn't available, usually because bubblewrap isn't installed or the host restricts user namespaces. The error message says which. Install bubblewrap or allow user namespaces on the host, then run the command again.+ </Accordion>+</AccordionGroup>++## Next steps++<CardGroup cols={2}>+ <Card title="Review and stop an agent" icon="eye" href="/documentation/platform/pam/ai-agents/review">+ Check what an AI agent did with your accounts and remove its access.+ </Card>+ <Card title="Run unattended" icon="clock" href="/documentation/platform/pam/ai-agents/unattended">+ Run an AI agent as its own machine identity.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/ai-agents/unattended.mdx b/docs/documentation/platform/pam/ai-agents/unattended.mdxnew file mode 100644index 0000000000..063e102a7b--- /dev/null+++ b/docs/documentation/platform/pam/ai-agents/unattended.mdx@@ -0,0 +1,68 @@+---+title: "Run an AI agent unattended"+sidebarTitle: "Run unattended"+description: "Run an AI agent as its own machine identity."+---++If an AI agent runs on a schedule or on a server, run it as its own [machine identity](/documentation/platform/identities/machine-identities) instead of as a person. Infisical then attributes the agent's sessions and access requests to the identity, and the identity's roles decide which accounts the agent can reach.++Running as a machine identity is also the safest way to run an agent you don't fully trust, even when you're watching it. No person's credentials are part of the run, so the agent can never reach more than the identity can.++## Prerequisites++- The [Infisical CLI](/cli/install) on the machine that runs the agent+- The Product Admin [role](/documentation/platform/pam/concepts/access-control#product-membership) in PAM, to add the machine identity+- The Admin role on the folders or accounts the agent needs, to give the identity a role on them++## Step 1: Add a machine identity to PAM++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Access Control**, open the **Identities** tab, and select **Add Identity**.+ </Step>+ <Step>+ Create a new machine identity, or assign one that already exists in your organization. Give the identity the **Member** role.+ </Step>+ <Step>+ Open the identity and create a client secret, then copy the **Client ID** and the **Client Secret**.+ </Step>+</Steps>++A new identity has [Universal Auth](/documentation/platform/identities/universal-auth) attached. If the agent's host can authenticate through Kubernetes, AWS, GCP, Azure, OIDC, JWT, or LDAP, attach that [auth method](/documentation/platform/identities/machine-identities#authentication-methods) instead.++## Step 2: Give the identity access to accounts++<Steps>+ <Step>+ Open the [folder](/documentation/platform/pam/folders/overview) or account that the agent needs, go to **Permissions**, and select **Assign Access**.+ </Step>+ <Step>+ Select the identity and give it the **Connector** role. If the access is temporary, set an expiration.+ </Step>+</Steps>++Give the identity a role only on the accounts its task needs.++## Step 3: Run the agent as the identity++Set the identity's credentials as environment variables, then start the agent:++```bash+export INFISICAL_AUTH_METHOD=universal-auth+export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<client-id>+export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<client-secret>++infisical pam agentic access --reason "nightly triage agent" -- python triage_agent.py+```++The CLI renews the identity's token for the whole run, and removes these variables from the agent's environment before it starts the agent.++<Tip>+ Pass the credentials as environment variables, not as flags such as `--client-secret`. A secret on the command line is saved in your shell history, and any process that can list processes can read it.+</Tip>++For the variables that other auth methods use, see the [CLI reference](/cli/reference#pam-agentic-access).++## Use a dedicated machine++For a sensitive task, we recommend running the agent on a dedicated host or container that has no other credentials. This way, if the agent gets past the [sandbox](/documentation/platform/pam/ai-agents/run#sandbox), the only access it can find is the machine identity's, which is limited by role, duration, and [approval](/documentation/platform/pam/access-requests/overview).diff --git a/docs/documentation/platform/pam/architecture.mdx b/docs/documentation/platform/pam/architecture.mdxindex 89ecd2fd2b..56cf98ebec 100644--- a/docs/documentation/platform/pam/architecture.mdx+++ b/docs/documentation/platform/pam/architecture.mdx@@ -1,92 +1,88 @@---title: "PAM architecture"sidebarTitle: "Architecture"-description: "How PAM connects people and machines to your infrastructure securely."+description: "Learn how PAM connects people and agents to your infrastructure through a Gateway."----PAM uses a proxy-based architecture. Nothing connects directly to your databases or servers: everything goes through the [Gateway](/documentation/platform/gateways/overview). This keeps your infrastructure isolated while providing secure, auditable access.+In Infisical PAM, people and agents never connect to your databases and servers directly. Every connection goes through [Gateway](/documentation/platform/gateways/overview) that you run in your own network. The Gateway adds the account's credentials and records the session, so the person or agent never holds the credentials.## Components-**Infisical Platform** — the control plane. Stores account credentials, manages permissions, and hosts the web interface.--**Gateway** — a lightweight service you deploy in your private network. It proxies connections to your databases and servers, injects credentials, and records sessions.--**Client** — a user's browser (Web Access) or the CLI. Connects to the Gateway through an encrypted tunnel. An [AI agent](/documentation/platform/pam/ai-agents/overview) connects through the CLI, which holds the tunnel on its behalf.--**Actor** — the user or [machine identity](/documentation/platform/identities/machine-identities) the session belongs to. Permissions, policies, and the audit trail all follow the actor.+```mermaid+flowchart LR+ CLIENT["Client<br/>browser or CLI"]+ INF["Infisical<br/>credentials, permissions, recordings"]+ RELAY["Relay<br/>managed by Infisical or by you"]+ GW["Gateway<br/>in your network"]+ TARGET[("Your databases<br/>and servers")]++ CLIENT -->|"encrypted tunnel"| RELAY+ GW -->|"outbound tunnel"| RELAY+ CLIENT -.->|"requests the session"| INF+ GW -.->|"fetches credentials, uploads recordings"| INF+ GW --> TARGET+```++- **Infisical**: Stores the account credentials, checks permissions and [template](/documentation/platform/pam/templates/overview) policies, and stores session recordings+- **Gateway**: A service you deploy in your private network that connects to your databases and servers, adds the credentials, and records each session+- **Relay**: A server that passes the client's connection to the Gateway over a tunnel that the Gateway opens outbound (Infisical runs relays for Infisical Cloud, or you can [run your own](/documentation/platform/gateways/relay-deployment/overview))+- **Client**: The browser for web access, or the [Infisical CLI](/cli/reference#pam), which opens an encrypted tunnel to the Gateway (for web access, Infisical opens the tunnel on the browser's behalf, and an [AI agent](/documentation/platform/pam/ai-agents/overview) connects through the CLI)+- **Actor**: The user or [machine identity](/documentation/platform/identities/machine-identities) that the session belongs to (Infisical checks the actor's permissions and records the actor in the audit log)++<Note>+A Gateway in [direct listen mode](#network-security) accepts connections itself, so it doesn't use a relay.+</Note>++[AWS IAM accounts](/documentation/platform/pam/accounts/aws-iam) are the one account type that doesn't use a Gateway. Infisical gives the user temporary credentials for the IAM role, and [AWS CloudTrail records what the user does](/documentation/platform/pam/accounts/aws-iam#track-activity-in-aws).## How a connection works-When an actor connects to an [account](/documentation/platform/pam/accounts/overview):+When an actor connects to an [account](/documentation/platform/pam/accounts/overview), the connection goes through these steps:-1. **Access is requested** — a user selects Launch in the browser, or the CLI command runs-2. **Infisical checks permissions** — verifies the actor has a [membership](/documentation/platform/pam/concepts/access-control) with the right role-3. **[Template](/documentation/platform/pam/templates/overview) rules are enforced** — MFA, reason requirement, session duration-4. **Approval is checked** — a gated account also needs an approved [access request](/documentation/platform/pam/access-requests/overview)-5. **Connection is established** — an encrypted tunnel is created between the client and Gateway-6. **Gateway fetches credentials** — retrieves them from Infisical-7. **Gateway connects to the target** — using the credentials-8. **Traffic flows through the Gateway** — the actor interacts with the database/server-9. **Session is recorded** — Gateway captures and uploads session activity, attributed to the actor+1. The actor launches a session in the browser or runs a CLI command+2. Infisical checks that the actor has a [role](/documentation/platform/pam/concepts/access-control) that can launch sessions on the account+3. Infisical applies the template's policies, such as requiring a reason or MFA, and limiting the session's duration+4. If the account requires approval, Infisical checks that the actor has an approved [access request](/documentation/platform/pam/access-requests/overview)+5. The client opens an encrypted tunnel to the Gateway, through a relay or, in direct listen mode, straight to the Gateway+6. The Gateway fetches the account's credentials from Infisical and connects to the database or server with them+7. The actor works with the database or server through the Gateway, which records the session-The actor never sees the credentials. The database/server never sees the actor directly.+The actor never sees the credentials, and the database or server only sees connections from the Gateway.## Network security-In relay mode, the Gateway uses outbound connections only:--- **No inbound ports** — your firewall doesn't need to allow any inbound traffic-- **Outbound to Infisical** — for credential retrieval and session uploads-- **Outbound to your infrastructure** — to connect to databases and servers+How the Gateway connects to Infisical depends on its [connection mode](/documentation/platform/gateways/gateway-deployment#choose-a-connection-mode):-In [direct listen mode](/documentation/platform/gateways/gateway-deployment#choose-a-connection-mode), Infisical opens the connection instead, so the Gateway accepts inbound traffic on its listen address from the Infisical host.+- **Relay mode**: The Gateway only makes outbound connections, so your firewall doesn't need to allow any inbound traffic+- **Direct listen mode**: Infisical connects to the Gateway, so the Gateway accepts inbound traffic from the Infisical host on its listen address-<Tip>-Your databases and servers stay completely isolated from the internet either way. Only the Gateway is reachable, and only from Infisical.-</Tip>+Either way, your databases and servers aren't exposed to the internet. Only the Gateway can reach them.-Direct listen changes where a CLI session connects from. Browser-based sessions work in either mode, because the platform brokers the connection. `infisical pam access` connects from the user's own machine instead, so it needs to reach the Gateway's listen address. Users outside that network need a VPN into it, or a relay running on the Gateway alongside direct listen.+The connection mode also decides where the CLI can connect from. Web access works in either mode, because Infisical opens the connection to the Gateway. The CLI connects from the user's own machine, so in direct listen mode the machine must be able to reach the Gateway's listen address. If users connect from outside that network, they need a VPN into it, or you can [run a relay alongside direct listen](/documentation/platform/gateways/gateway-deployment#running-both-modes).## Encryption-All connections are encrypted:+- **Client to Gateway**: An end-to-end encrypted tunnel, which the relay that routes it can't decrypt+- **Gateway to Infisical**: TLS+- **Session recordings**: Encrypted by the Gateway before it uploads them-- **Client to Gateway** — end-to-end encrypted tunnel-- **Gateway to Infisical** — TLS-- **Session recordings** — encrypted before upload+## Recording-The Relay server (which routes traffic between clients and Gateways) can't decrypt or inspect the traffic passing through it.+The Gateway records each session as the traffic passes through it:-## Recording architecture+1. The Gateway captures the session's events, such as queries or terminal input and output+2. The Gateway encrypts the events and saves them on its own disk+3. The Gateway uploads the events while the session runs, so admins can watch active sessions+4. If the Gateway loses its connection to Infisical, it keeps the events on disk and uploads them when the connection comes back-Recording happens at the Gateway:--1. Traffic flows through the Gateway-2. Gateway captures session events-3. Events are encrypted and cached locally-4. Events upload to Infisical in real-time-5. If connectivity drops, recording continues locally and syncs when restored--This ensures no data is lost, even during network issues.+The template decides whether Infisical stores the recording in its own database or in [your S3-compatible bucket](/documentation/platform/pam/sessions/external-storage).## Deployment options-| Setup | Use case |-|-------|----------|-| **Single Gateway** | Small environments, single network |-| **Gateway per network** | Multiple VPCs or on-prem segments |-| **Gateway Pool** | High availability, load balancing |--For deployment instructions, see [Deploy a Gateway](/documentation/platform/gateways/gateway-deployment).--## Next steps+| Setup | When to use it |+| --- | --- |+| One Gateway | All your accounts are in one network |+| One Gateway per network | Your accounts are spread across several VPCs or data centers |+| [Gateway pool](/documentation/platform/gateways/gateway-pools) | You need connections to keep working when one Gateway fails |-<CardGroup cols={2}>- <Card title="Deploy a Gateway" icon="server" href="/documentation/platform/gateways/gateway-deployment">- Deploy a Gateway in your network.- </Card>- <Card title="Launch Your First Session" icon="rocket" href="/documentation/platform/pam/quick-starts/launch-first-session">- Connect to a database in under 10 minutes.- </Card>-</CardGroup>+Each template sets the Gateway or Gateway pool for the accounts that use it, and you can override it on a single account. To deploy a Gateway, see [Deploy a Gateway](/documentation/platform/gateways/gateway-deployment).diff --git a/docs/documentation/platform/pam/auditing.mdx b/docs/documentation/platform/pam/auditing.mdxindex 581ba3a932..9a9b72cf89 100644--- a/docs/documentation/platform/pam/auditing.mdx+++ b/docs/documentation/platform/pam/auditing.mdx@@ -1,70 +1,43 @@---title: "Auditing"sidebarTitle: "Auditing"-description: "Track all activity across your PAM environment."+description: "Track who accessed and changed what across PAM."----PAM logs every action — who accessed what, who changed what, and when. This audit trail is essential for compliance reviews and incident investigation.+Infisical adds an event to the audit log each time someone connects to an account, views a credential, or changes PAM's configuration. Use the audit log for access reviews and to trace what happened before and after an incident.-## What gets logged--| Category | Events |-|----------|--------|-| **Sessions** | Session started, session ended, session terminated |-| **Accounts** | Account created, updated, deleted |-| **Folders** | Folder created, updated, deleted, [joined as Admin by an organization Admin](/documentation/platform/pam/folders/overview#managing-access) |-| **Templates** | Template created, updated, deleted |-| **Memberships** | Membership added, updated, removed |-| **Product Access** | Product member added, removed, role changed |-| **[Access requests](/documentation/platform/pam/access-requests/overview)** | Request filed, reviewed, revoked, approval policy bypassed |+The audit log records that something happened, such as a user starting a session on an account. To view what the user did during that session, use the [session recording](/documentation/platform/pam/sessions/session-recording).-Each event includes:-- **Timestamp** — when it happened-- **Actor** — who did it: a user (name, email, IP address) or a [machine identity](/documentation/platform/identities/machine-identities), named as it's named in your organization-- **Action** — what was done-- **Target** — what was affected-- **Details** — relevant context (e.g., what changed)+## Who can view the audit log-An identity has no email address, so its events show **Machine Identity** where a person's email would be. Everything an [AI agent](/documentation/platform/pam/ai-agents/overview) does is logged the same way a person's activity is.+What you can view depends on your [roles](/documentation/platform/pam/concepts/access-control):-## Viewing audit logs+- With the **Admin** or **Auditor** role on a folder or account, you can view the events for that folder or account, including the events for every account in the folder+- With the **Product Admin** role, you can view the events that don't belong to a folder or account, such as changes to templates and product members-1. Go to **Privileged Access Management → Audit Logs**-2. Browse the log (newest first) or use filters+## View the audit log-## Audit logs vs session recordings+Go to **Privileged Access Management** > **Audit Logs**. The audit log shows the newest events first.-These are complementary:+Each event names the actor, the action, and the folder or account it affected, along with when it happened. If the actor was a [machine identity](/documentation/platform/identities/machine-identities), the event shows **Machine Identity** in place of an email address. When an [AI agent](/documentation/platform/pam/ai-agents/overview) connects to an account, Infisical records the event under the user or machine identity that started the agent.-**Audit logs** track metadata — who accessed what [account](/documentation/platform/pam/accounts/overview), when, from where. They tell you *that* something happened.+To filter events by date, event type, or actor, check out [Filtering audit logs](/documentation/platform/audit-logs#filtering-audit-logs). For filters that answer common PAM questions, such as who accessed an account, check out [Common filters](/documentation/platform/audit-logs#privileged-access-manager).-**[Session recordings](/documentation/platform/pam/sessions/session-recording)** capture content — the actual queries and commands. They tell you *what* was done during the session.+## What gets logged-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.+| Category | Events |+| --- | --- |+| Sessions | Start PAM Session, End PAM Session, Terminate PAM Session, Access PAM Account |+| Credentials | View PAM Account Credentials, Rotate PAM Account Credentials, Set PAM Account Rotation Account |+| Accounts | Create PAM Account, Update PAM Account, Delete PAM Account, Create PAM Account SSH CA |+| Folders | Create PAM Folder, Update PAM Folder, Delete PAM Folder, Org admin accessed PAM folder |+| Templates | Create PAM Account Template, Update PAM Account Template, Delete PAM Account Template |+| Memberships | Add, Update, and Remove PAM Product Member, PAM Folder Member, and PAM Account Member |+| [Access requests](/documentation/platform/pam/access-requests/overview) | Create PAM Access Request, Review PAM Access Request, Revoke PAM Access Grant, Update PAM Approval Configuration, PAM Access Policy Bypassed |+| [Discovery](/documentation/platform/pam/discovery/overview) | Create, Update, and Delete PAM Discovery Source, Run PAM Discovery Scan, Import PAM Discovered Account |++To review every use of [break-glass access](/documentation/platform/pam/access-requests/break-glass), filter for **PAM Access Policy Bypassed**. Each of these events records the reason the user gave, the account and folder, and how many approvers were skipped.## Retention-Audit logs are retained according to your organization's policy. Events are immutable — they can't be modified or deleted.--## Common use cases--**Access reviews** — Filter by date range to see who accessed what during a specific period.--**Incident investigation** — Search for a specific account or user to trace actions before or after an incident.--**Change tracking** — Filter by event type to see configuration changes (template updates, membership changes).--**Activity reports** — Filter by actor to see everything a specific user or machine identity did.--**Break-glass review**: Filter for **PAM Access Policy Bypassed** to see every grant that skipped an approver, with the reason given. Each entry names the account, the folder, and how many approvers were skipped.--## Next steps--<CardGroup cols={2}>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View session recordings for detailed activity.- </Card>- <Card title="Architecture" icon="network" href="/documentation/platform/pam/architecture">- Understand how PAM works under the hood.- </Card>-</CardGroup>+How long Infisical keeps audit log events depends on your [plan](https://infisical.com/pricing). To keep events for longer, send them to your own logging system with an [audit log stream](/documentation/platform/audit-log-streams/audit-log-streams).diff --git a/docs/documentation/platform/pam/concepts/access-control.mdx b/docs/documentation/platform/pam/concepts/access-control.mdxindex 226197e65c..f1bd13cc4c 100644--- a/docs/documentation/platform/pam/concepts/access-control.mdx+++ b/docs/documentation/platform/pam/concepts/access-control.mdx@@ -1,115 +1,111 @@---title: "Access control"-sidebarTitle: "Access control"-description: "Understand how permissions work in Infisical PAM."+sidebarTitle: "Overview"+description: "Control who can manage PAM and who can connect to each account."----Access control in PAM happens at two levels:+Access to Infisical PAM has two levels:-1. **Product membership** — being added to PAM itself (the "entry ticket")-2. **Folder and account memberships** — being granted a role on specific folders or accounts (this is what lets you connect)+- **Product membership** makes someone a member of PAM and decides whether they can manage PAM itself+- **Folder and account memberships** decide what someone can do with the accounts in a folder, such as connect to them-Users, groups, and [machine identities](/documentation/platform/identities/machine-identities) all go through both levels and hold the same roles, so everything below applies to all three unless it says otherwise. An [AI agent](/documentation/platform/pam/ai-agents/overview) runs as whoever started it, so it uses either a person's access or a machine identity's.+Users, groups, and [machine identities](/documentation/platform/identities/machine-identities) need both. An [AI agent](/documentation/platform/pam/ai-agents/overview) has no access of its own and uses the access of the user or machine identity that starts it.## Product membership-Before anyone can do anything in PAM, they need to be added as a product member. This is the "entry ticket" to PAM.+A product membership gives a user, group, or machine identity one of two roles in PAM:-There are two product roles:+| Role | What it allows |+| --- | --- |+| **Admin** | Manage account templates, folders, and product members |+| **Member** | Use PAM, with access only to the folders and accounts they have a role on |-| Role | What they can do |-|------|------------------|-| **Product Admin** | Create and manage templates, folders, and product-level settings |-| **Product Member** | Access PAM — needs folder/account memberships to connect |+A product admin can't connect to an account unless they also have a role on the account or its folder.-Product Admins set up the governance layer — they don't automatically get access to connect to accounts. To connect, you need a membership on a folder or account. If you have the organization Admin role, you can also [join any folder as its Admin](/documentation/platform/pam/folders/overview#managing-access).+### Add product members-<Note>-Organization Admins can enter PAM as a Product Admin without being explicitly added — they just need to opt in.-</Note>+<Steps>+ <Step>+ Go to **Privileged Access Management** > **Access Control**.+ </Step>+ <Step>+ Select the tab for the kind of member you're adding, then select the button on that tab:-### Adding product members+ - **Members**: **Invite Member**+ - **Groups**: **Add Group**+ - **Identities**: **Add Identity**+ </Step>+ <Step>+ Select the users, group, or identity, choose **Admin** or **Member**, and confirm.+ </Step>+</Steps>-1. Go to **Privileged Access Management → Access Control**-2. Select the **Users**, **Groups**, or **Identities** tab-3. Select **Add**-4. Select from users, groups, or machine identities in your organization-5. Choose **Product Admin** or **Product Member**-6. Select **Add**+On the **Identities** tab, you can also create a new machine identity for PAM. To learn how an AI agent uses one, see [Run agents unattended](/documentation/platform/pam/ai-agents/unattended).-The **Identities** tab can also create a new machine identity for PAM instead of adding an existing one. See [AI Agents](/documentation/platform/pam/ai-agents/overview) for the agent workflow that uses it.+### Organization admins-## Folder and account memberships--Once someone is a product member, they still need to be granted access to specific folders or accounts. You do this by assigning them a **role** on a folder or account.+When your organization first opens PAM, everyone with the organization Admin role at that moment becomes a product admin.-### Roles--| Role | What they can do |-|------|------------------|-| **Admin** | Full control — accounts, folders, sessions, memberships |-| **Operator** | Launch sessions and [view account credentials](/documentation/platform/pam/accounts/overview#viewing-credentials) |-| **Connector** | Launch sessions and connect to accounts |-| **Auditor** | View audit logs and session recordings |+If you get the organization Admin role later, you aren't a member of PAM yet. Open **Privileged Access Management** and select **Join as Admin** to add yourself as a product admin. You can also [join any folder as its Admin](/documentation/platform/pam/folders/overview#join-a-folder-as-an-organization-admin).-<Note>- **Operator** is Connector plus the right to read an account's stored password or key. Grant it only where someone genuinely needs the credential in hand, since a revealed credential leaves no session recording.-</Note>--### Folder vs account memberships+## Folder and account memberships-You can assign roles at two levels:+A folder or account membership gives a product member one of the following roles on a [folder](/documentation/platform/pam/folders/overview) or an [account](/documentation/platform/pam/accounts/overview):-**Folder memberships** apply to all accounts in the folder. This is the primary way to grant access — if someone needs access to a set of accounts, grant them a role on the folder.+| Role | What it allows |+| --- | --- |+| **Admin** | Manage the accounts, sessions, and memberships in the folder or account |+| **Operator** | Launch sessions and [view account credentials](/documentation/platform/pam/accounts/view-credentials) |+| **Connector** | Launch sessions and request access to accounts that need approval |+| **Auditor** | View audit logs and session recordings |-**Account memberships** apply to a single account. Use this for exceptions — a contractor who needs just one database, or temporary elevated access to a specific account.+Infisical records a session for every connection, but not what someone does with a credential they've viewed. Give the Operator role only to people who need the credential itself.-### How to assign memberships+### Folder or account-For folders:-1. Open the folder and go to **Permissions**-2. Select **Assign Access**-3. Select a user, group, or machine identity, then set the role and an optional expiration-4. Select **Add**+A role on a folder applies to every account in the folder, including accounts added later. Grant access on folders whenever you can.-For accounts:-1. Open the account and go to **Permissions**-2. Same process as above+A role on an account applies to that account only. Use it when someone needs one account in a folder but not the others, such as a contractor who needs one database.-The picker only offers members of PAM, so a machine identity has to be added on the **Access Control** page before it can be granted a role here.+### Assign a role-### What only people can do+<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts**.+ </Step>+ <Step>+ Open the options menu on the folder's or account's row and select **Configure**, then select the **Permissions** tab.+ </Step>+ <Step>+ Select **Assign Access**.+ </Step>+ <Step>+ Choose the **Assignee** and the **Role**. To remove the access automatically after a set time, choose an **Expiry**.+ </Step>+ <Step>+ Select **Assign**.+ </Step>+</Steps>-Two things stay with users and groups:+The **Assignee** list only includes product members. To give a role to someone who isn't in the list, [add them to PAM](#add-product-members) first.-- **Web Access.** Connecting in the browser is for users. Machine identities connect through the [CLI](/cli/reference#pam-agentic-access).-- **Approving [access requests](/documentation/platform/pam/access-requests/overview).** A machine identity can file a request, but only users and groups can approve one.+If you assign a role to a group, the role follows the group's membership. When someone joins or leaves the group, including through a sync from an identity provider such as Okta or Microsoft Entra ID, their access changes with it.-An account whose [template](/documentation/platform/pam/templates/overview) requires MFA also stays with people: a machine identity can never complete the challenge, and [agent runs](/documentation/platform/pam/ai-agents/overview) don't support it yet.+### What machine identities can't do-## Putting it together+Machine identities can hold any role, but the following stay with users and groups:-Here's a typical setup:+- **Connecting in the browser**: Machine identities connect through the [CLI](/cli/reference#pam-agentic-access)+- **Approving access requests**: A machine identity can request access, but only users and groups can [approve requests](/documentation/platform/pam/access-requests/overview)+- **Accounts that require MFA**: A machine identity can't complete an MFA challenge, so it can't connect to an account whose template requires MFA-1. **Product Admin** adds the Platform team lead as a Product Member-2. **Product Admin** creates a `platform-team` folder-3. **Product Admin** grants the team lead **Admin** on that folder-4. **Team lead** (now a Folder Admin) adds accounts to the folder-5. **Team lead** grants the rest of the team **Connector** on the folder-6. **Team members** can now connect to any account in the folder+## Example setup-The Product Admin sets up the governance structure. The Folder Admin manages day-to-day access within their scope. Team members connect to what they've been granted access to.+The following example gives a platform team access to its databases:-## Next steps+1. A product admin adds the platform team's lead to PAM as a **Member**+2. The product admin creates a `platform-team` folder and gives the team lead the **Admin** role on it+3. The team lead adds the team's accounts to the folder+4. The team lead gives the rest of the team the **Connector** role on the folder-<CardGroup cols={2}>- <Card title="Folders" icon="folder-tree" href="/documentation/platform/pam/folders/overview">- Create folders and manage folder memberships.- </Card>- <Card title="Accounts" icon="user-lock" href="/documentation/platform/pam/accounts/overview">- Add accounts and manage account memberships.- </Card>- <Card title="AI Agents" icon="bot" href="/documentation/platform/pam/ai-agents/overview">- Grant the same access to an AI agent.- </Card>-</CardGroup>+The team can then connect to every account in the folder, and the team lead manages the folder's access without involving the product admin.diff --git a/docs/documentation/platform/pam/concepts/overview.mdx b/docs/documentation/platform/pam/concepts/overview.mdxnew file mode 100644index 0000000000..910feeb391--- /dev/null+++ b/docs/documentation/platform/pam/concepts/overview.mdx@@ -0,0 +1,42 @@+---+title: "Privileged access management"+sidebarTitle: "Concepts"+description: "Learn how Infisical PAM controls access to your infrastructure."+---++## What is privileged access management?++_Privileged access management_ (PAM) controls who can connect to sensitive infrastructure, such as production databases and servers, and records what they do there.++Without PAM, everyone who needs a database or server gets its password or key. Each copy of the credential can leak, and when someone leaves, you have to rotate the credential and update everyone who still needs it. With Infisical PAM, people and AI agents connect through Infisical, which supplies the credential on their behalf, so the credential never reaches them.++## Accounts++An [account](/documentation/platform/pam/accounts/overview) is a privileged identity on one database, server, cluster, or cloud provider, such as the `app_readonly` user on your orders database. The account stores the connection details and the credential that Infisical uses to connect.++## Folders++A [folder](/documentation/platform/pam/folders/overview) holds accounts. Put accounts in the same folder if the same people need them, because you grant access on the folder and the access applies to every account in it.++You can organize folders by team (`backend-team`), application (`checkout-service`), or environment (`prod`), depending on how access works in your organization.++## Account templates++An [account template](/documentation/platform/pam/templates/overview) sets the rules for connecting to the accounts that use it, such as the maximum session length, whether a reason or MFA is required, and whether access needs [approval](/documentation/platform/pam/access-requests/overview). Every account uses a template of the same account type.++Folders and templates are independent:++- Accounts in the same folder can use different templates, so the same team gets different rules for staging and production+- Accounts in different folders can use the same template, so different teams get the same rules++## Memberships++A membership gives a user, group, or [machine identity](/documentation/platform/identities/machine-identities) a role on a folder or an account. A role on a folder applies to every account in the folder. To grant access to one account only, add the membership on the account instead.++Before anyone can hold a membership, they must be a member of PAM itself. To learn about both levels and the roles each one offers, see [Access control](/documentation/platform/pam/concepts/access-control).++## Sessions++A session starts when a person or [AI agent](/documentation/platform/pam/ai-agents/overview) connects to an account, and ends when they disconnect. Before the session starts, Infisical checks the person's role and the template's rules. The connection then runs through a [gateway](/documentation/platform/gateways/overview), which adds the account's credential, and Infisical records everything the person runs.++To learn about each stage of a session, see [Session lifecycle](/documentation/platform/pam/concepts/session-lifecycle).diff --git a/docs/documentation/platform/pam/concepts/pam-components.mdx b/docs/documentation/platform/pam/concepts/pam-components.mdxdeleted file mode 100644index 83480b0dc5..0000000000--- a/docs/documentation/platform/pam/concepts/pam-components.mdx+++ /dev/null@@ -1,68 +0,0 @@-----title: "Core components"-sidebarTitle: "PAM components"-description: "Understand how Infisical PAM is structured."------Infisical PAM is built around four core components: accounts, folders, account templates, and memberships. Understanding how they relate helps you set up secure, organized access to your infrastructure.--## Accounts--An **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. Whoever connects, a person or a machine, goes through Infisical without ever seeing the underlying credentials.--Infisical supports databases (PostgreSQL, MySQL, MS SQL, MongoDB, Redis), servers (SSH, Windows), Kubernetes clusters, and cloud accounts (AWS IAM, GCP, Azure).--[Learn more about Accounts →](/documentation/platform/pam/accounts/overview)--## Folders--**Group accounts by who needs access to them.** If the same people need the same accounts, put them in one folder. If different people need different accounts, use separate folders.--You might organize by team (`backend-team`), department (`engineering`), application (`checkout-service`), or environment — whatever matches how access actually works in your organization.--Permissions are set at the folder level, so everyone with access to a folder can reach all accounts inside.--[Learn more about Folders →](/documentation/platform/pam/folders/overview)--## Account templates--**Account templates** define the policies that apply when someone connects to an account:--- Maximum session duration-- Whether a reason is required-- Whether MFA is required--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 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).--[Learn more about Account Templates →](/documentation/platform/pam/templates/overview)--## Memberships--**Memberships** determine who can access what by assigning a user, group, or [machine identity](/documentation/platform/identities/machine-identities) a role on a folder or account.--| Role | Capabilities |-|------|-------------|-| **Admin** | Full control — accounts, folders, sessions, memberships |-| **Connector** | Launch sessions and connect to accounts |-| **Auditor** | View audit logs and session recordings |--Memberships on a folder cascade to all accounts inside. For most cases, this is all you need. For exceptions, you can assign memberships directly on individual accounts.--Machine identities hold these same roles, which is how an [AI agent](/documentation/platform/pam/ai-agents/overview) reaches an account when it runs unattended. **Connector** is the usual choice.--[Learn more about Access Control →](/documentation/platform/pam/concepts/access-control)--## Next steps--<CardGroup cols={2}>- <Card title="Launch Your First Session" icon="rocket" href="/documentation/platform/pam/quick-starts/launch-first-session">- Get hands-on with a step-by-step walkthrough.- </Card>- <Card title="Session Lifecycle" icon="circle-play" href="/documentation/platform/pam/concepts/session-lifecycle">- Understand what happens when you connect.- </Card>-</CardGroup>diff --git a/docs/documentation/platform/pam/concepts/session-lifecycle.mdx b/docs/documentation/platform/pam/concepts/session-lifecycle.mdxindex 99857090e1..7a7a8bf68e 100644--- a/docs/documentation/platform/pam/concepts/session-lifecycle.mdx+++ b/docs/documentation/platform/pam/concepts/session-lifecycle.mdx@@ -1,72 +1,54 @@---title: "PAM session lifecycle"sidebarTitle: "Session lifecycle"-description: "What happens when you connect to an account."+description: "Learn what happens from the moment someone connects to an account until the session ends."----When you connect to an [account](/documentation/platform/pam/accounts/overview) through PAM, a **session** is created. The session tracks who connected, when, for how long, and what they did. Here's what happens at each stage.+A session starts when a person or [AI agent](/documentation/platform/pam/ai-agents/overview) connects to an [account](/documentation/platform/pam/accounts/overview), and ends when they disconnect. This page describes each stage, from the checks Infisical runs before the session starts to the records it keeps afterward.-An [AI agent](/documentation/platform/pam/ai-agents/overview) goes through the same stages, with the same checks and the same recording.+## Before the session starts-## Requesting access+Infisical checks the following before it starts a session:-When you select **Launch Session** on an account from the **Accounts** page (or run the CLI command), PAM checks:+1. The person has a [role](/documentation/platform/pam/concepts/access-control) on the account or its folder that lets them launch sessions+2. The person gives a reason, if the [template](/documentation/platform/pam/templates/overview) requires one+3. The person completes MFA, if the template requires it+4. An approver has approved the person's [access request](/documentation/platform/pam/access-requests/overview), if the template requires approval-1. **Do you have permission?** — You need a [membership](/documentation/platform/pam/concepts/access-control) (on the [folder](/documentation/platform/pam/folders/overview) or account) with the Connector or Admin role-2. **[Template](/documentation/platform/pam/templates/overview) requirements** — If the template requires a reason, you'll be prompted to enter one. If it requires MFA, you'll need to verify your identity.-3. **Approval, if the account is gated** — A gated account also needs an active [access request](/documentation/platform/pam/access-requests/overview) grant--If everything checks out, the session is approved and you can connect.--An [AI agent](/documentation/platform/pam/ai-agents/overview) can't be prompted, so it supplies its reason up front, and it can't use an account that requires MFA yet.+AI agents go through the same checks. An agent can't answer a prompt, so you pass the reason with `--reason` when you start the agent, and the agent can't use accounts that require MFA. To learn more, see [Run an agent](/documentation/platform/pam/ai-agents/run).## Connecting-Once approved, the connection is established through the [Gateway](/documentation/platform/gateways/overview):+The connection runs through a [gateway](/documentation/platform/gateways/overview) on your network. The gateway connects to the database or server with the account's credential, so the credential never reaches the person's browser or machine. For each step of the connection, see [Architecture](/documentation/platform/pam/architecture#how-a-connection-works).-1. Your client (browser or CLI) connects to the Gateway-2. The Gateway fetches the account credentials from Infisical-3. The Gateway connects to the actual database or server-4. Traffic flows through the Gateway — you never see the credentials--For **Web Access**, this all happens in the browser. For **CLI Access**, SSH accounts connect you straight to a shell, while every other type starts a local proxy you point your preferred client at on `localhost`.+What the person sees depends on the account type and on whether they connect in the browser or with the CLI. To learn how to connect each way, see [Connect to an account](/documentation/platform/pam/accounts/connect).## During the session-While you're connected:--- **Recording** — Every query (database) or command (SSH) is captured-- **Session timer** — The session has a maximum duration set by the template. When time runs out, you're disconnected.-- **Logs upload** — Session activity uploads to Infisical in real-time, so admins can monitor active sessions--You can see your active sessions on the **Sessions** page.+Infisical [records](/documentation/platform/pam/sessions/session-recording) the queries or commands that the person runs. Admins and Auditors on the account can review the recording while the session is still active.## Ending the session-A session ends when:--- You disconnect (close the browser tab, press Ctrl+C, or type `exit`)-- The max session duration is reached-- An admin terminates the session+The session ends when one of the following happens:-Recordings are available in real-time — you can review activity even while the session is still active.+- The person disconnects+- The session reaches the template's maximum session length+- An Admin on the account [terminates the session](/documentation/platform/pam/sessions/overview)## After the session-Every session is logged:--- **Audit log** — records who accessed what, when, and from where-- **Session recording** — captures everything that happened during the session+Infisical keeps the following records of each session:-Admins and Auditors can review sessions from the **Sessions** page. See [Session Recording](/documentation/platform/pam/sessions/session-recording) for details on how recordings work.+- **Recording**: Admins and Auditors on the account can review it on the [Sessions](/documentation/platform/pam/sessions/overview) page+- **Audit log**: The [audit log](/documentation/platform/pam/auditing) has events for the session, such as **Start PAM Session** and **End PAM Session**## Next steps<CardGroup cols={2}>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage sessions.+ <Card title="Connect to an account" icon="plug" href="/documentation/platform/pam/accounts/connect">+ Open a session on an account from your browser or the Infisical CLI.</Card>- <Card title="Session Recording" icon="video" href="/documentation/platform/pam/sessions/session-recording">- How recordings are captured and stored.+ <Card title="Session recording" icon="video" href="/documentation/platform/pam/sessions/session-recording">+ Review what happened during each session on your accounts.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/credential-health/overview.mdx b/docs/documentation/platform/pam/credential-health/overview.mdxnew file mode 100644index 0000000000..64c69d7d69--- /dev/null+++ b/docs/documentation/platform/pam/credential-health/overview.mdx@@ -0,0 +1,86 @@+---+title: "PAM credential health"+sidebarTitle: "Credential health"+description: "Check on a schedule that the credentials stored for your PAM accounts still work."+---++A stored credential can stop working without Infisical knowing, such as when someone changes a password directly on the target, or when a service principal's secret expires. Sessions and [rotations](/documentation/platform/pam/credential-rotation/overview) that use the credential then fail.++Credential health checks each account on a schedule by signing into each account's target with the stored credential and recording the result. The check is read-only: it proves the credential still authenticates and changes nothing on the target.++## How it works++A check signs in the same way a session does, using the account's authentication method, and then disconnects. For most account types, the check connects through the account's [Gateway](/documentation/platform/gateways/overview):++| Account type | What the check does |+| --- | --- |+| PostgreSQL, MySQL, Microsoft SQL Server, Oracle | Signs in and runs a simple query |+| Microsoft SQL Server with Windows authentication | Completes an NTLM or Kerberos sign-in |+| MongoDB | Signs in and pings the server |+| Redis | Sends `AUTH`, then `PING` |+| Windows AD | Signs in to the domain controller over LDAP |+| Windows | Signs in over WinRM |+| Kubernetes | Calls the API server (a `401` response means the credential was rejected) |+| SSH with a password or key | Signs in |+| SSH with a certificate | Gets a certificate valid for 60 seconds from the account's certificate authority, then signs in with it |+| AWS IAM, GCP, Azure | Asks the cloud provider for short-lived credentials |++Infisical spreads checks across the interval instead of running them all at once, and records every check in the [audit logs](/documentation/platform/pam/auditing).++Some account types need a recent Gateway for an accurate result:++- **Oracle:** The Gateway must run v0.43.133 or later, and the password must be 30 characters or fewer, or the account shows as **Unreachable**+- **Microsoft SQL Server with Windows authentication:** An older Gateway reports the account as **Out of Sync** even when the credential works, so update the Gateway++## Configure checks on a template++You configure credential health on the [account template](/documentation/platform/pam/templates/overview), and every account on the template uses the template's settings. To check some accounts on a different schedule, move them to a different template. You need the [Product Admin role](/documentation/platform/pam/concepts/access-control#product-membership) to change a template.++New templates check credentials every 24 hours.++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Account Templates** and select the template.+ </Step>+ <Step>+ Under **Credential Health**, turn on **Check credentials** and set **Check every** to 1 hour, 12 hours, 24 hours, 7 days, or 30 days.+ </Step>+ <Step>+ Select **Save Changes**.+ </Step>+</Steps>++If you turn off **Check credentials**, scheduled checks stop for every account on the template, and each account keeps the result of its last check.++## Check an account's health++Go to **Privileged Access Management** > **Accounts**, open the options menu on the account's row, select **Configure**, and open the **Configuration** tab. The **Credential health** section shows the account's status, when it was last checked, and when it was last healthy. If a check failed, the section also shows the reason that the target gave.++Each account has one of four statuses:++| Status | Meaning |+| --- | --- |+| **Healthy** | The target accepted the credential on the last check |+| **Out of Sync** | The target rejected the credential, so sessions and rotations that use it fail |+| **Unreachable** | Infisical couldn't reach the target, so it doesn't know whether the credential works |+| **Unchecked** | No check has run yet, or the account is missing the details that a check needs |++The **Accounts** page also shows a badge on accounts that are **Out of Sync** or **Unreachable**.++To run a check right away, select **Check now**. You need permission to view the account's credentials, because the check signs in with them.++<Note>+ AWS IAM accounts don't store a credential, so they have no **Credential health** section and no **Check now** button. Infisical still checks them on the template's schedule, and the **Accounts** page shows their badge.+</Note>++## When checks stop++If the target rejects a credential, Infisical stops checking the account, so it doesn't lock out the account by retrying a rejected password. Checks start again when you do one of the following:++- Enter the credential again on the account+- Select **Check now** and the check succeeds+- [Rotate](/documentation/platform/pam/credential-rotation/overview) the account, which checks the new password before saving it++If an account is **Unreachable**, Infisical keeps checking it on schedule.++If you change an account's host or Gateway and you can't view the account's credentials, Infisical pauses checks on the account. This stops the next check from sending the stored credential to the new target. To start checks again, enter the credential again or select **Check now**.diff --git a/docs/documentation/platform/pam/credential-rotation/mssql.mdx b/docs/documentation/platform/pam/credential-rotation/mssql.mdxnew file mode 100644index 0000000000..164f6c48c7--- /dev/null+++ b/docs/documentation/platform/pam/credential-rotation/mssql.mdx@@ -0,0 +1,41 @@+---+title: "Microsoft SQL Server credential rotation for PAM"+sidebarTitle: "Microsoft SQL Server"+description: "Rotate the passwords of Microsoft SQL Server accounts."+---++This page covers what's specific to rotating the password of a [Microsoft SQL Server account](/documentation/platform/pam/accounts/mssql). To turn on rotation and set a rotation account, see [Credential rotation](/documentation/platform/pam/credential-rotation/overview).++Infisical can only rotate accounts that use SQL Server authentication. If an account uses Windows authentication, its password belongs to a Windows or Active Directory account, so Infisical can't rotate it as a SQL Server account. To rotate that password, add the same user to PAM as a [Windows](/documentation/platform/pam/credential-rotation/windows) or Windows AD account and rotate it there.++<Note>+ Infisical doesn't update the SQL Server account when the Windows or Windows AD account rotates. After each rotation, enter the new password on the SQL Server account, or its sessions fail.+</Note>++## Rotation account++The rotation account needs permission to change the target login's password:++- **The account itself:** A login can change its own password, so it needs no extra privileges+- **A different account:** The rotation account needs the `ALTER ANY LOGIN` permission++For example, to create a rotation login and a login for it to rotate:++```sql+-- the login that Infisical signs in as to rotate passwords+CREATE LOGIN infisical_rotator WITH PASSWORD = '<temporary-password>';+GRANT ALTER ANY LOGIN TO infisical_rotator;++-- the login whose password Infisical rotates+CREATE LOGIN app_login WITH PASSWORD = '<temporary-password>';+```++Add both logins to Infisical PAM as Microsoft SQL Server accounts with the same host and port, then select `infisical_rotator` as the rotation account on the `app_login` account's **Rotation** tab.++## How the password is changed++Infisical signs in as the rotation account, using the account's connection details and SSL settings, and runs:++```sql+ALTER LOGIN "<target-login>" WITH PASSWORD = '<generated-password>';+```diff --git a/docs/documentation/platform/pam/credential-rotation/mysql.mdx b/docs/documentation/platform/pam/credential-rotation/mysql.mdxnew file mode 100644index 0000000000..3a553ece5a--- /dev/null+++ b/docs/documentation/platform/pam/credential-rotation/mysql.mdx@@ -0,0 +1,48 @@+---+title: "MySQL credential rotation for PAM"+sidebarTitle: "MySQL"+description: "Rotate the passwords of MySQL accounts."+---++This page covers what's specific to rotating the password of a [MySQL account](/documentation/platform/pam/accounts/mysql). To turn on rotation and set a rotation account, see [Credential rotation](/documentation/platform/pam/credential-rotation/overview).++## Rotation account++The rotation account needs permission to change the target user's password:++- **The account itself:** A user can change its own password, so it needs no extra privileges+- **A different account:** The rotation account needs the global `CREATE USER` privilege, or `UPDATE` on the `mysql` system database++For example, to create a rotation user and a user for it to rotate:++```sql+-- the user that Infisical signs in as to rotate passwords+CREATE USER 'infisical_rotator'@'%' IDENTIFIED BY '<temporary-password>';+GRANT CREATE USER ON *.* TO 'infisical_rotator'@'%';++-- the user whose password Infisical rotates+CREATE USER 'app_user'@'%' IDENTIFIED BY '<temporary-password>';+```++Add both users to Infisical PAM as MySQL accounts with the same host and port, then select `infisical_rotator` as the rotation account on the `app_user` account's **Rotation** tab.++## How the password is changed++Infisical signs in as the rotation account, using the account's connection details and SSL settings, and runs:++```sql+ALTER USER "<target-user>"@'%' IDENTIFIED BY '<generated-password>';+```++The statement changes the user defined for the `'%'` host, so the target user must exist for that host.++## PlanetScale++If the database is on PlanetScale, enter the account's username in the PlanetScale format `<username>.<branch-id>`. Infisical signs in with the full username and changes the password of `<username>`.++To find the branch ID, run these commands with the [PlanetScale CLI](https://planetscale.com/docs/reference/planetscale-cli):++```bash+pscale org switch <org-name>+pscale branch show <database> <branch-name> --format json+```diff --git a/docs/documentation/platform/pam/credential-rotation/oracledb.mdx b/docs/documentation/platform/pam/credential-rotation/oracledb.mdxnew file mode 100644index 0000000000..045410d905--- /dev/null+++ b/docs/documentation/platform/pam/credential-rotation/oracledb.mdx@@ -0,0 +1,67 @@+---+title: "Oracle credential rotation for PAM"+sidebarTitle: "Oracle"+description: "Rotate the passwords of Oracle accounts."+---++This page covers what's specific to rotating the password of an [Oracle account](/documentation/platform/pam/accounts/oracledb). To turn on rotation and set a rotation account, see [Credential rotation](/documentation/platform/pam/credential-rotation/overview).++## Prerequisites++- A [Gateway](/documentation/platform/gateways/overview) running v0.43.133 or later+- A rotation account with a password of 30 characters or fewer (see [Password length](#password-length))++## Rotation account++The rotation account needs permission to change the target user's password:++- **The account itself:** An Oracle user can change its own password, so it needs no privileges beyond `CREATE SESSION`+- **A different account:** The rotation account needs the `ALTER USER` system privilege++For example, to create a rotation user and a user for it to rotate:++```sql+-- the user that Infisical signs in as to rotate passwords+CREATE USER infisical_rotator IDENTIFIED BY "<temporary-password>";+GRANT CREATE SESSION TO infisical_rotator;+GRANT ALTER USER TO infisical_rotator;++-- the user whose password Infisical rotates+CREATE USER app_user IDENTIFIED BY "<temporary-password>";+GRANT CREATE SESSION TO app_user;+```++Add both users to Infisical PAM as Oracle accounts with the same host, port, and service name, then select `infisical_rotator` as the rotation account on the `app_user` account's **Rotation** tab. Oracle scopes each user to one database, so a rotation account that connects to a different service name can't find the target user.++## How the password is changed++Infisical signs in as the rotation account, using the account's connection details and SSL settings, and runs:++```sql+ALTER USER "<target-username>" IDENTIFIED BY "<generated-password>";+```++If the account rotates its own password, the statement also includes the current password, which Oracle requires when a password policy is in force:++```sql+ALTER USER "<target-username>" IDENTIFIED BY "<generated-password>" REPLACE "<current-password>";+```++## Password length++Infisical can't generate an Oracle password longer than 30 characters, and an Oracle template doesn't accept a **Min length** above 30.++Oracle itself accepts longer passwords, but the Gateway can't sign in with them. If Infisical generated a longer password, it could no longer reach, check, or rotate the account.++If the rotation account's own password is longer than 30 characters, the rotation account can't sign in, so change its password to 30 characters or fewer.++## Troubleshooting++If sessions on an account work but rotation fails with one of these errors, the account's username probably doesn't match the case that Oracle stored:++- `ORA-01031: insufficient privileges`, if the account rotates its own password+- `ORA-01918: user does not exist`, if a different account rotates the password++The rotation statement matches the username exactly. Change the account's username to the case that Oracle stored, which is uppercase unless the user was created with a quoted name.++If a different rotation account returns `ORA-01031` and the username is correct, grant the rotation account the `ALTER USER` privilege.diff --git a/docs/documentation/platform/pam/credential-rotation/overview.mdx b/docs/documentation/platform/pam/credential-rotation/overview.mdxnew file mode 100644index 0000000000..2ff888f5c0--- /dev/null+++ b/docs/documentation/platform/pam/credential-rotation/overview.mdx@@ -0,0 +1,114 @@+---+title: "PAM credential rotation"+sidebarTitle: "Overview"+description: "Change the passwords of your PAM accounts on a schedule."+---++Credential rotation changes the password of a PAM [account](/documentation/platform/pam/accounts/overview) on a schedule or on demand. If a password leaks, it stops working at the next rotation.++You set up rotation in two places:++- The [account template](/documentation/platform/pam/templates/overview) sets how often its accounts rotate and which passwords Infisical generates+- Each account sets its rotation account, which is the account that Infisical signs in as to change the password++An account rotates only after both are set.++You can rotate PostgreSQL, MySQL, Microsoft SQL Server, Oracle, Windows, and Windows AD accounts. If an account doesn't store a password, it has nothing to rotate. For example, a PostgreSQL account that uses [AWS IAM authentication](/documentation/platform/pam/accounts/postgresql#aws-iam-authentication) can't rotate.++## How it works++When an account rotates, Infisical:++1. Generates a password that meets the template's password requirements+2. Signs in to the target as the rotation account and changes the account's password+3. Signs in with the new password to check that it works+4. Saves the new password as the account's credential++If a step fails, the account's **Rotation** tab shows the error, and Infisical doesn't change the credential stored on the account. If the step failed after the password change, the target may already use the new password. Infisical keeps the new password and tries it first on the next rotation attempt.++## Rotation accounts++The rotation account is the account that Infisical signs in as to change the password. You can pick one of three options:++- **The account itself:** The account changes its own password+- **A different account:** A more privileged account changes the password, for an account that can't change its own password+- **None:** The account doesn't rotate, even if its template has rotation turned on++<Note>+If you pick a different account, it must be on the same resource as the account it rotates:++- For databases, the same host and port (for Oracle, also the same service name)+- For Windows accounts, the same host+- For Windows AD accounts, the same domain++The page for each account type lists the privileges that the rotation account needs.+</Note>++## Turn on rotation for a template++You need the [Product Admin role](/documentation/platform/pam/concepts/access-control#product-membership) to change a template.++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Account Templates** and select the template that your accounts use.+ </Step>+ <Step>+ Under **Credential settings**, set the password requirements that the target system's password policy accepts: **Min length**, **Min uppercase**, **Min lowercase**, **Min numbers**, **Min symbols**, and **Allowed symbols**.+ </Step>+ <Step>+ Turn on **Automatically rotate credentials** and set **Rotate every** to 1 hour, 12 hours, 24 hours, 7 days, or 30 days.+ </Step>+ <Step>+ Select **Save Changes**.+ </Step>+</Steps>++**Allowed symbols** can only include characters from `!@#$%^&*()-_=+[]{}|:,.<>/~`.++The password requirements also apply when someone adds an account or changes its password, so Infisical rejects a password that doesn't meet them.++If you leave **Automatically rotate credentials** off, the template's accounts rotate only when someone selects **Rotate now** on the account.++## Set an account's rotation account++You need the Admin [role](/documentation/platform/pam/concepts/access-control#folder-and-account-memberships) on the account or its folder. To pick a different account as the rotation account, you also need permission to view that account's credentials.++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts**, open the options menu on the account's row, select **Configure**, and open the **Rotation** tab.+ </Step>+ <Step>+ Under **Rotation account**, select the account that changes the password. To have the account change its own password, select the entry marked **(this account)**.+ </Step>+ <Step>+ Select **Save Changes**.+ </Step>+</Steps>++To rotate the password right away, select **Rotate now**. The next scheduled rotation then happens one full interval later.++<Note>+ If another PAM account stores the same credential, Infisical doesn't update it when this account rotates, so enter the new password on that account after each rotation.++ The **Rotation** tab lists some of these accounts under **Shared identity**, such as accounts that discovery imported, but not accounts that someone added by hand. Check for other copies of the credential before you rotate, even if the list is empty.+</Note>++## Supported account types++<CardGroup cols={2}>+ <Card title="PostgreSQL" icon="database" href="/documentation/platform/pam/credential-rotation/postgresql">+ Rotate the passwords of PostgreSQL accounts.+ </Card>+ <Card title="MySQL" icon="database" href="/documentation/platform/pam/credential-rotation/mysql">+ Rotate the passwords of MySQL accounts.+ </Card>+ <Card title="Microsoft SQL Server" icon="database" href="/documentation/platform/pam/credential-rotation/mssql">+ Rotate the passwords of Microsoft SQL Server accounts.+ </Card>+ <Card title="Oracle" icon="database" href="/documentation/platform/pam/credential-rotation/oracledb">+ Rotate the passwords of Oracle accounts.+ </Card>+ <Card title="Windows" icon="windows" iconType="brands" href="/documentation/platform/pam/credential-rotation/windows">+ Rotate the passwords of local Windows and Active Directory accounts.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/pam/credential-rotation/postgresql.mdx b/docs/documentation/platform/pam/credential-rotation/postgresql.mdxnew file mode 100644index 0000000000..f3efb1dd68--- /dev/null+++ b/docs/documentation/platform/pam/credential-rotation/postgresql.mdx@@ -0,0 +1,40 @@+---+title: "PostgreSQL credential rotation for PAM"+sidebarTitle: "PostgreSQL"+description: "Rotate the passwords of PostgreSQL accounts."+---++This page covers what's specific to rotating the password of a [PostgreSQL account](/documentation/platform/pam/accounts/postgresql). To turn on rotation and set a rotation account, see [Credential rotation](/documentation/platform/pam/credential-rotation/overview).++## Rotation account++The rotation account needs permission to change the target role's password:++- **The account itself:** A role can always change its own password, so it needs no extra privileges+- **A different account:** The rotation account needs the `CREATEROLE` attribute, or must be a superuser++For example, to create a rotation role and a role for it to rotate:++```sql+-- the role that Infisical signs in as to rotate passwords+CREATE ROLE infisical_rotator WITH LOGIN PASSWORD '<temporary-password>' CREATEROLE;++-- the role whose password Infisical rotates+CREATE ROLE app_user WITH LOGIN PASSWORD '<temporary-password>';+```++On PostgreSQL 16 and later, a `CREATEROLE` role can only change the password of a role it has `ADMIN OPTION` on. Grant it with:++```sql+GRANT app_user TO infisical_rotator WITH ADMIN OPTION;+```++Add both roles to Infisical PAM as PostgreSQL accounts with the same host and port, then select `infisical_rotator` as the rotation account on the `app_user` account's **Rotation** tab.++## How the password is changed++Infisical signs in as the rotation account, using the account's connection details and SSL settings, and runs:++```sql+ALTER USER "<target-role>" WITH PASSWORD '<generated-password>';+```diff --git a/docs/documentation/platform/pam/credential-rotation/windows.mdx b/docs/documentation/platform/pam/credential-rotation/windows.mdxnew file mode 100644index 0000000000..374e1df56d--- /dev/null+++ b/docs/documentation/platform/pam/credential-rotation/windows.mdx@@ -0,0 +1,85 @@+---+title: "Windows credential rotation for PAM"+sidebarTitle: "Windows"+description: "Rotate the passwords of local Windows and Active Directory accounts."+---++This page covers what's specific to rotating the password of a [Windows account](/documentation/platform/pam/accounts/windows) (a local account) or a [Windows AD account](/documentation/platform/pam/accounts/windows-ad) (a domain account). To turn on rotation and set a rotation account, see [Credential rotation](/documentation/platform/pam/credential-rotation/overview).++Infisical changes Windows passwords over WinRM through a [Gateway](/documentation/platform/gateways/overview). The WinRM port, HTTPS setting, and CA certificate come from the account's connection details.++When a Windows account rotates, Infisical also updates the services, scheduled tasks, and IIS application pools that run as the account. See [Dependencies](#dependencies).++## Prerequisites++- A Gateway that can reach the account's host (for a local account) or domain controller (for a domain account)+- WinRM turned on and reachable on that host or domain controller++If the network between the Gateway and the host isn't trusted, turn on WinRM over HTTPS on the account. Over HTTP, WinRM protects the connection only with NTLM message encryption.++## Rotation account++<Tabs>+ <Tab title="Windows (local)">+ For the rotation account, use a local administrator on the same host. A local administrator can reset the password and check the new one on the host.++ The account can also change its own password, but only if it can sign in over WinRM and has the right to change its own password. Many local accounts can't, so use a local administrator where you can.+ </Tab>+ <Tab title="Windows AD (domain)">+ For the rotation account, use a different domain account in the same domain. The rotation account needs permission to reset the target account's password, such as an account with delegated control over the target's organizational unit (OU).++ The rotation account must be a different user from the account it rotates. Infisical rejects a rotation account with the same username as the target, because rotating the target would change the rotation account's own password.+ </Tab>+</Tabs>++## How the password is changed++<Tabs>+ <Tab title="Windows (local)">+ Infisical connects to the account's host over WinRM as the rotation account and runs:++ ```powershell+ Set-LocalUser -Name '<target-user>' -Password (ConvertTo-SecureString '<generated-password>' -AsPlainText -Force)+ ```+ </Tab>+ <Tab title="Windows AD (domain)">+ Infisical connects to the account's domain controller over WinRM as the rotation account and runs:++ ```powershell+ Import-Module ActiveDirectory+ Set-ADAccountPassword -Identity '<target-user>' -Reset -NewPassword (ConvertTo-SecureString '<generated-password>' -AsPlainText -Force)+ ```+ </Tab>+</Tabs>++## Dependencies++A dependency is a Windows service, scheduled task, or IIS application pool that runs as the account and stores a copy of the account's password. When the account rotates, Infisical connects over WinRM to each dependency's server as the rotation account and updates the dependency with the new password, so the dependency doesn't fail with the old one:++| Type | What runs as the account | What Infisical does when the account rotates |+|------|------------|--------------|+| **Windows service** | A service whose **Log On As** account is the account | Updates the service's stored password, then restarts the service if it was running |+| **Scheduled task** | A task that runs as the account with a stored password | Updates the task with the new password |+| **IIS application pool** | An application pool whose identity is the account | Updates the application pool's password, then recycles the pool if it was started |++### Find an account's dependencies++Infisical finds dependencies when it scans an [Active Directory discovery source](/documentation/platform/pam/discovery/active-directory) that has **Discover account dependencies** turned on. This option is off by default.++During the scan, Infisical connects over WinRM to each domain-joined Windows server in the source's scope and lists the services, scheduled tasks, and IIS application pools that run as an account it found. When you import an account, Infisical links the account's dependencies to the imported PAM account.++Each scan updates the list. If a scan no longer finds a dependency on a server, Infisical removes the dependency.++Infisical updates every dependency it finds on the scanned servers when the account rotates, so only include servers you trust in the discovery source's scope.++To see an account's dependencies, go to **Privileged Access Management** > **Accounts**, open the options menu on the account's row, select **Configure**, and open the **Rotation** tab.++### Check whether a dependency updated++If Infisical can't update a dependency, the account's rotation still succeeds. The **Rotation Status** column on the **Rotation** tab shows the result for each dependency:++| Status | Meaning |+|--------|---------|+| **Rotated** | The last rotation updated the dependency |+| **Failed** | The last rotation couldn't update the dependency (point to the badge to see the error) |+| **Never** | The account hasn't rotated since Infisical found the dependency |diff --git a/docs/documentation/platform/pam/dependencies/overview.mdx b/docs/documentation/platform/pam/dependencies/overview.mdxdeleted file mode 100644index 2b6cbe214c..0000000000--- a/docs/documentation/platform/pam/dependencies/overview.mdx+++ /dev/null@@ -1,75 +0,0 @@-----title: "Account dependencies"-sidebarTitle: "Overview"-description: "Detect the Windows services, tasks, and app pools that run as an account, and keep them working across rotations."------A **dependency** is a Windows service, scheduled task, or IIS application pool that runs *as* one of your accounts and therefore stores a copy of that account's password. When the account's password rotates, every dependency still holding the old password would fail to start until it's updated.--Infisical **detects** these dependencies during discovery and **syncs** them automatically during rotation, so rotating a Windows account doesn't break the services that depend on it.--<Note>- Dependencies apply to Windows accounts only: [Windows AD](/documentation/platform/pam/accounts/windows-ad) (domain) and [Windows](/documentation/platform/pam/accounts/windows) (local).-</Note>--## Detected dependency types--| Type | What it is |-|------|------------|-| **Windows service** | A service whose *Log On As* identity is the account |-| **Scheduled task** | A task configured to run under the account with a stored password |-| **IIS application pool** | An app pool whose process model runs as the account |--## Detection--Dependencies are detected during [Active Directory discovery](/documentation/platform/pam/discovery/active-directory) when the **Discover account dependencies** option is enabled on the source. This option is **off by default**. When enabled, discovery locates the domain-joined Windows servers, connects to each over WinRM through the [Gateway](/documentation/platform/gateways/overview), and enumerates the services, scheduled tasks, and IIS application pools that run under a discovered account.--Each detected dependency is anchored to the stable identity of the account it runs as, so it's linked to the correct managed account once that account is imported. Re-running a scan updates the dependency list in place rather than creating duplicates, and a dependency that is no longer found on a re-scanned machine is removed.--<Note>- **Discover account dependencies** is independent of **Discover local accounts**, so you can enable either or both. Both reach your servers over WinRM, so the source's WinRM settings (port, HTTPS, and CA certificate) apply to dependency detection as well. Dependencies are detected from the servers within the source's scan scope.-</Note>--You can review an account's detected dependencies on the account's **Rotation** tab, grouped by machine, along with the last sync status of each.--## Rotation (sync)--When a Windows account's password [rotates](/documentation/platform/pam/product-reference/credential-rotation/windows), Infisical pushes the new password to each of the account's dependencies so they continue to authenticate:--<Steps>- <Step title="Connect to each dependency's machine">- Using the account's rotation account, Infisical connects over WinRM to the machine each dependency runs on. For domain accounts, machine hostnames are re-resolved through the domain controller's DNS at sync time so a stale address can't target the wrong host.- </Step>- <Step title="Update the stored credential">- The new password is written to the dependency:-- | Type | What happens |- |------|--------------|- | **Windows service** | The service's stored password is updated, and the service is restarted if it was running |- | **Scheduled task** | The task is reconfigured with the new password |- | **IIS application pool** | The app pool's process-model password is updated, and the pool is recycled if it was started |- </Step>-</Steps>--Dependency sync runs as part of rotation and is **best effort**: a failure on one dependency is recorded on that dependency's row and never fails the account rotation. Each dependency shows one of:--| Status | Meaning |-|--------|---------|-| **Rotated** | The new password was applied successfully on the last rotation |-| **Failed** | The last sync didn't complete; the recorded error explains why |-| **Never** | The dependency hasn't been through a rotation yet |--<Note>- Because sync keeps dependent services working, dependencies detected on the scanned servers are included automatically. Make sure the servers within a discovery source's scan scope are ones you trust to run as your managed accounts.-</Note>--## Next steps--<CardGroup cols={2}>- <Card title="Active Directory Discovery" icon="windows" iconType="brands" href="/documentation/platform/pam/discovery/active-directory">- Enable server scanning to detect dependencies.- </Card>- <Card title="Windows Credential Rotation" icon="refresh-cw" href="/documentation/platform/pam/product-reference/credential-rotation/windows">- How Windows and AD account passwords are rotated.- </Card>-</CardGroup>diff --git a/docs/documentation/platform/pam/discovery/active-directory.mdx b/docs/documentation/platform/pam/discovery/active-directory.mdxindex 0e07064c63..8853e367f5 100644--- a/docs/documentation/platform/pam/discovery/active-directory.mdx+++ b/docs/documentation/platform/pam/discovery/active-directory.mdx@@ -4,117 +4,98 @@ sidebarTitle: "Active Directory"description: "Scan an Active Directory environment for domain and local Windows accounts."----Active Directory discovery scans an AD environment to enumerate privileged accounts, stages them for review, and lets you import them into PAM. It finds two kinds of accounts:+Active Directory discovery finds the users in an Active Directory domain, and optionally the local accounts on its Windows servers, so you can import them into PAM. For how discovery works across every source type, see [Discovery](/documentation/platform/pam/discovery/overview).-| Discovered type | What it is | When it's found |-|-----------------|------------|------------------|-| **Windows AD** | Domain user accounts from Active Directory | Always |-| **Windows** | Local accounts on domain-joined Windows servers | Only when local account discovery is enabled and the server is reachable |+A scan finds two types of account:-All scan traffic (LDAP, DNS, and WinRM) is tunneled through an Infisical [Gateway](/documentation/platform/gateways/overview).+| Account type | What the scan finds | When |+|--------------|---------------------|------|+| [Windows AD](/documentation/platform/pam/accounts/windows-ad) | The domain's user accounts | Every scan |+| [Windows](/documentation/platform/pam/accounts/windows) | The local accounts on the domain's Windows servers | If **Discover local accounts** is on |-## How it works+The scan can also find the [dependencies](/documentation/platform/pam/credential-rotation/windows#dependencies) of the accounts it finds, which are the services, scheduled tasks, and IIS application pools that run as them.-Behind the scenes, an Active Directory scan connects entirely through the Gateway:+Infisical connects to the domain controller and the servers through a [Gateway](/documentation/platform/gateways/overview), signed in as a Windows AD account that you choose for the source.-1. **Domain accounts** are enumerated by querying the domain controller over LDAP (or LDAPS) using the credential account's connection settings.-2. **Windows servers** are located in the same LDAP query when local account discovery or dependency discovery is enabled.-3. Each server's hostname is resolved to an IP through the **domain controller's DNS**, so the Gateway can reach it.-4. Each reachable server is queried over **WinRM** to list its local users (local account discovery) and the services, scheduled tasks, and IIS application pools running as a discovered account (dependency discovery).+<Accordion title="How a scan works">+ 1. Infisical connects to the domain controller over LDAP or LDAPS, using the connection settings of the source's Windows AD account, and lists the domain's users+ 2. If **Discover local accounts** or **Discover account dependencies** is on, Infisical also lists the domain's Windows servers, and resolves each server's hostname through the domain controller's DNS+ 3. Infisical connects to each server over WinRM to list its local accounts, the dependencies of the accounts it found, or both++ If Infisical can't reach a server over WinRM, the scan reports the server and continues with the others.+</Accordion>## Prerequisites-Before creating an Active Directory discovery source, make sure you have:+- A [Gateway](/documentation/platform/gateways/overview) that can reach your domain controller, and your Windows servers if you turn on **Discover local accounts** or **Discover account dependencies**+- A [Windows AD account](/documentation/platform/pam/accounts/windows-ad) with a password, to sign in to the domain with+- The [Product Admin role](/documentation/platform/pam/concepts/access-control#product-membership) in PAM+- The Connector, Operator, or Admin [role](/documentation/platform/pam/concepts/access-control#folder-and-account-memberships) on that Windows AD account-- A [Gateway](/documentation/platform/gateways/overview) (or Gateway pool) with network access to your domain controller and, for local account discovery, to your Windows servers.-- A [Windows AD account](/documentation/platform/pam/accounts/windows-ad) in PAM to use as the **credential account**. Discovery authenticates to your domain as this account. Its FQDN, DC address, ports, and LDAP/LDAPS settings define how the scan connects.-- The **Product Admin** role. See [Access Control](/documentation/platform/pam/concepts/access-control).+To find local accounts or dependencies, you also need:-<Note>-To discover local Windows accounts or account dependencies, the credential account must include a **password**, WinRM must be enabled on your servers, and your domain controller's DNS must resolve each server's hostname so the Gateway can reach it.-</Note>+- WinRM turned on for your Windows servers+- A domain controller whose DNS resolves each server's hostname-## Creating a source+## Step 1: Create a source<Steps>- <Step title="Start adding a source">- Go to **Privileged Access Manager → Discovery** and select **Add Source**, then choose **Active Directory**.+ <Step>+ Go to **Privileged Access Management** > **Discovery** and select **Add Source**.+ </Step>+ <Step>+ Select **Active Directory**, then select **Next**.</Step>- <Step title="Configure the source">+ <Step>+ Configure the source:+| Field | Description ||-------|-------------|- | **Name** | A descriptive name (e.g., `corp-active-directory`) |- | **Credential Account** | The [Windows AD account](/documentation/platform/pam/accounts/windows-ad) used to authenticate and scan |- | **Gateway** | The [Gateway](/documentation/platform/gateways/overview) or Gateway pool that scan traffic tunnels through |- | **Scan Schedule** | How often to scan automatically: **Manual**, **Daily**, or **Weekly** |+ | **Name** | A name for the source, such as `corp-active-directory` |+ | **Credential Account** | The Windows AD account to sign in to the domain with |+ | **Gateway** | The Gateway or Gateway pool to connect through |+ | **Scan Schedule** | **Manual**, **Daily**, or **Weekly** (see [scan schedules](/documentation/platform/pam/discovery/overview#scan-schedules)) |+ | **Discover local accounts** | Find the local accounts on the domain's Windows servers (on by default) |+ | **Discover account dependencies** | Find the services, scheduled tasks, and IIS application pools that run as the accounts the scan finds (off by default) |++ Infisical connects to the domain controller with the domain, address, ports, and LDAPS settings of the Windows AD account.</Step>- <Step title="Choose what to discover on your servers">- Two options control what discovery does beyond enumerating domain accounts, and each can be turned on independently:+ <Step>+ If you turned on **Discover local accounts** or **Discover account dependencies**, configure how Infisical connects to your servers over WinRM:- | Option | Default | What it does |- |--------|---------|--------------|- | **Discover local accounts** | On | Enumerates local users on your Windows servers over WinRM |- | **Discover account dependencies** | Off | Detects the services, scheduled tasks, and IIS application pools that run as a discovered account (see [Dependencies](/documentation/platform/pam/dependencies/overview)) |-- When either is on, discovery locates your Windows servers and connects to them over WinRM. See [Server WinRM Options](#server-winrm-options) for the connection settings.+ | Field | Description |+ |-------|-------------|+ | **WinRM Port** | The WinRM port on each server (default `5985`) |+ | **Use HTTPS** | Connect to WinRM over HTTPS |+ | **Reject Unauthorized** | Check each server's TLS certificate (HTTPS only) |+ | **CA Certificate** | The PEM certificate of the private CA that issued the servers' WinRM certificates, if any |</Step>- <Step title="Save">- Select **Create**. The source appears in the Discovery table.+ <Step>+ Select **Add Source**.</Step></Steps>-## Server WinRM options--When **Discover local accounts** or **Discover account dependencies** is enabled, discovery locates domain-joined Windows servers, resolves each one through the domain controller's DNS, and connects to it over WinRM. Local account discovery enumerates the server's local users (staged as **Windows** accounts); dependency discovery enumerates the [dependencies](/documentation/platform/pam/dependencies/overview) that run as a discovered account.--Both use the same WinRM connection options:--| Field | Description |-|-------|-------------|-| **WinRM Port** | Port used to reach WinRM on each server (default: 5985) |-| **Use HTTPS** | Connect to WinRM over HTTPS |-| **Reject Unauthorized** | Verify the server's TLS certificate (HTTPS only) |-| **CA Certificate** | Optional PEM certificate, needed only when WinRM HTTPS uses a private CA |--<Note>-If a scan can't reach WinRM on a particular server, that server is skipped and the failure is reported on the run. The rest of the scan still completes.-</Note>--## Running a scan--Trigger a scan manually with **Scan Now** from the source's row menu or its detail panel. Scans run in the background, and a source can only have one scan running at a time.+## Step 2: Run a scan-If the source is on a **Daily** or **Weekly** schedule, Infisical also scans it automatically when its interval has elapsed. **Manual** sources are only scanned when you trigger them.+On the **Discovery Sources** table, select the options menu on the source's row, then select **Scan Now**. A source can run one scan at a time.-## Importing accounts+## Step 3: Import accounts-From the **Staged Accounts** tab, select the accounts you want and select **Import Accounts**. Then choose:--| Field | Description |-|-------|-------------|-| **Destination Folder** | The [folder](/documentation/platform/pam/folders/overview) to import the accounts into |-| **Template** | An [account template](/documentation/platform/pam/templates/overview) for each account type in your selection |--Once imported, the accounts become regular PAM accounts in the chosen folder and inherit their template's rules.--<Warning>-Imported accounts arrive without a credential because discovery finds accounts with a username but no password. Open each imported account and add a credential before connecting.-</Warning>--<Note>- Enabling **Discover account dependencies** also connects to each Windows server over WinRM and records the services, scheduled tasks, and IIS application pools that run as a discovered account. These are stored as [dependencies](/documentation/platform/pam/dependencies/overview) so they stay in sync when the account's password rotates. It's off by default and independent of **Discover local accounts**.-</Note>--## Next steps+<Steps>+ <Step>+ On the **Discovery Sources** table, select the source.+ </Step>+ <Step>+ On the **Staged Accounts** tab, select the accounts you want, then select **Import Accounts**.+ </Step>+ <Step>+ Select a **Destination Folder**, then a template for each account type in your selection (**Windows AD Template**, **Windows Template**, or both), and select **Import**.+ </Step>+ <Step>+ Go to **Privileged Access Management** > **Accounts**. For each imported account, open the options menu on its row, select **Configure**, and enter its password on the **Configuration** tab. The scan doesn't read passwords, so you can't connect to an imported account until you enter its password.+ </Step>+</Steps>-<CardGroup cols={2}>- <Card title="Discovery Overview" icon="radar" href="/documentation/platform/pam/discovery/overview">- Understand staging, importing, and schedules.- </Card>- <Card title="Windows AD Accounts" icon="windows" iconType="brands" href="/documentation/platform/pam/accounts/windows-ad">- Learn about the account type used to authenticate scans.- </Card>- <Card title="Account Dependencies" icon="workflow" href="/documentation/platform/pam/dependencies/overview">- Keep dependent services working across rotations.- </Card>-</CardGroup>+<Check>+ Your Active Directory accounts are in PAM. Anyone with access to the destination folder can launch sessions on them, and each scan of the source stages any new accounts it finds.+</Check>diff --git a/docs/documentation/platform/pam/discovery/mssql.mdx b/docs/documentation/platform/pam/discovery/mssql.mdxindex 351900c568..f2015d76d6 100644--- a/docs/documentation/platform/pam/discovery/mssql.mdx+++ b/docs/documentation/platform/pam/discovery/mssql.mdx@@ -4,35 +4,35 @@ sidebarTitle: "Microsoft SQL Server"description: "Scan Microsoft SQL Server instances for SQL logins and import them into PAM."----Microsoft SQL Server discovery scans a set of SQL Server instances, lists the SQL logins on each one, stages them for review, and lets you import them into PAM as [MS SQL accounts](/documentation/platform/pam/accounts/mssql). You list the instances to scan and the MS SQL accounts to scan with.+Microsoft SQL Server discovery finds the SQL logins on your SQL Server instances, so you can import them into PAM as [Microsoft SQL Server accounts](/documentation/platform/pam/accounts/mssql). For how discovery works across every source type, see [Discovery](/documentation/platform/pam/discovery/overview).-All scan traffic is tunneled through an Infisical [Gateway](/documentation/platform/gateways/overview).+You give the source a list of instances and one or more Microsoft SQL Server accounts to sign in with. Infisical connects to each instance through a [Gateway](/documentation/platform/gateways/overview).-<Accordion title="How it works">- A SQL Server scan connects entirely through the Gateway:+<Accordion title="How a scan works">+ 1. Infisical checks that each instance is reachable on the ports of the source's Microsoft SQL Server accounts, and skips the instances it can't reach+ 2. For each instance, Infisical first tries the account whose host and port match the instance, then tries the other accounts until one signs in+ 3. Infisical lists the enabled SQL logins on the instance, and stages each one as a Microsoft SQL Server account for that instance- 1. Each target you list is one instance to scan. The gateway resolves hostnames in the target network.- 2. Discovery probes each target on the ports of your credential accounts and skips unreachable targets.- 3. For each reachable target, discovery tries the credential account whose host and port match the target first, then the other accounts in turn.- 4. Discovery stages each login it finds as an MS SQL account scoped to that instance, so a login named `sa` on two instances becomes two accounts.-- The run reports any instance that no credential account can scan, and the rest of the scan still completes.+ If two instances each have a login named `sa`, Infisical stages two separate accounts. If no account can sign in to an instance, the scan reports the instance and continues with the others.</Accordion>## Prerequisites-Before creating a Microsoft SQL Server discovery source, make sure you have:+- A [Gateway](/documentation/platform/gateways/overview) that can reach the instances you want to scan+- One or more [Microsoft SQL Server accounts](/documentation/platform/pam/accounts/mssql) that use SQL Server authentication, to sign in to the instances with+- The `VIEW ANY DEFINITION` or `ALTER ANY LOGIN` server permission for those accounts' logins, so the scan can see every login (members of the `sysadmin` and `securityadmin` roles already have it)+- The [Product Admin role](/documentation/platform/pam/concepts/access-control#product-membership) in PAM+- The Operator or Admin [role](/documentation/platform/pam/concepts/access-control#folder-and-account-memberships) on those Microsoft SQL Server accounts, because the scan sends their passwords to every instance-- A [Gateway](/documentation/platform/gateways/overview) (or Gateway pool) with network access to the instances you want to scan-- One or more [MS SQL accounts](/documentation/platform/pam/accounts/mssql) that use SQL Server authentication, to use as credential accounts (discovery reuses each account's port, database, and TLS settings)-- The `VIEW ANY DEFINITION` or `ALTER ANY LOGIN` server permission for each credential account's login, so it can see every login on the instance (members of `sysadmin` and `securityadmin` already have it)-- The [Product Admin](/documentation/platform/pam/concepts/access-control#product-membership) role on your PAM project+<Warning>+ Infisical sends the Microsoft SQL Server account's password to every instance that the source scans, so only list instances you trust.+</Warning>## Step 1: Create a source<Steps><Step>- Go to **Privileged Access Manager > Discovery** and select **Add Source**.+ Go to **Privileged Access Management** > **Discovery** and select **Add Source**.</Step><Step>Select **Microsoft SQL Server**, then select **Next**.@@ -42,50 +42,42 @@ Before creating a Microsoft SQL Server discovery source, make sure you have:| Field | Description ||-------|-------------|- | **Name** | A descriptive name (for example, `prod-sql-servers`) |- | **Credential Accounts** | One or more [MS SQL accounts](/documentation/platform/pam/accounts/mssql) used to connect and scan |- | **Gateway** | The [Gateway](/documentation/platform/gateways/overview) or Gateway pool that scan traffic tunnels through |- | **Scan Schedule** | How often to scan automatically: **Manual**, **Daily**, or **Weekly** |- | **Targets** | IP addresses or hostnames of the instances to scan, one per line or comma-separated |+ | **Name** | A name for the source, such as `prod-sql-servers` |+ | **Credential Accounts** | The Microsoft SQL Server accounts to sign in to the instances with |+ | **Gateway** | The Gateway or Gateway pool to connect through |+ | **Scan Schedule** | **Manual**, **Daily**, or **Weekly** (see [scan schedules](/documentation/platform/pam/discovery/overview#scan-schedules)) |+ | **Targets** | The IP addresses or hostnames of the instances to scan, one per line or separated by commas (the Gateway resolves hostnames) |++ Infisical connects to each instance with the port, database, and TLS settings of the Microsoft SQL Server account it signs in with.</Step><Step>- Select **Add Source**. The source appears in the **Discovery Sources** table.+ Select **Add Source**.</Step></Steps>-<Note>-Discovery only stages enabled SQL logins, and skips Windows logins and SQL Server's internal logins.-</Note>-## Step 2: Run a scan-To start a scan manually, select **Scan Now** from the source's row menu or its detail panel. Scans run in the background, one at a time per source, and sources on a **Daily** or **Weekly** schedule also scan automatically.+On the **Discovery Sources** table, select the options menu on the source's row, then select **Scan Now**. A source can run one scan at a time.++The scan stages only enabled SQL logins. It skips Windows logins and SQL Server's internal logins.## Step 3: Import accounts<Steps><Step>- In the **Discovery Sources** table, select the source to open its detail panel.+ On the **Discovery Sources** table, select the source.</Step><Step>- From the source's **Staged Accounts** tab, select the accounts you want and select **Import Accounts**.+ On the **Staged Accounts** tab, select the accounts you want, then select **Import Accounts**.</Step><Step>- Choose a **Destination Folder** and a **Microsoft SQL Server Template**, then select **Import**.+ Select a **Destination Folder** and a **Microsoft SQL Server Template**, then select **Import**.+ </Step>+ <Step>+ Go to **Privileged Access Management** > **Accounts**. For each imported account, open the options menu on its row, select **Configure**, and enter the password for its login on the **Configuration** tab. The scan doesn't read passwords, so you can't connect to an imported account until you enter its password.</Step></Steps>-<Warning>-Imported accounts don't include passwords, because discovery doesn't read passwords from SQL Server. Open each imported account and add the password for its login before you use it to connect.-</Warning>--## Next steps--<CardGroup cols={2}>- <Card title="Discovery overview" icon="radar" href="/documentation/platform/pam/discovery/overview">- Understand staging, importing, and schedules.- </Card>- <Card title="MS SQL accounts" icon="database" href="/documentation/platform/pam/accounts/mssql">- Learn about the account type used to authenticate scans.- </Card>-</CardGroup>+<Check>+ Your SQL Server logins are in PAM. Anyone with access to the destination folder can launch sessions on them, and each scan of the source stages any new logins it finds.+</Check>diff --git a/docs/documentation/platform/pam/discovery/overview.mdx b/docs/documentation/platform/pam/discovery/overview.mdxindex 1c3a94340c..19f090411e 100644--- a/docs/documentation/platform/pam/discovery/overview.mdx+++ b/docs/documentation/platform/pam/discovery/overview.mdx@@ -1,118 +1,63 @@---title: "PAM account discovery"sidebarTitle: "Overview"-description: "Scan external systems for privileged accounts and import them into PAM."+description: "Find accounts on your systems and import them into PAM."----Discovery scans external systems to find privileged accounts you may not know exist, stages them for review, and lets you import the ones you want into PAM as managed [accounts](/documentation/platform/pam/accounts/overview). This gives you visibility into the accounts spread across your environment and a fast path to bringing them under management.+Discovery scans your systems for accounts, such as Active Directory users or PostgreSQL roles, so you can import the ones you want to manage as PAM [accounts](/documentation/platform/pam/accounts/overview). You need the [Product Admin role](/documentation/platform/pam/concepts/access-control#product-membership) to use Discovery.-<Note>-Discovery is available to **Product Admins**. See [Access Control](/documentation/platform/pam/concepts/access-control) for how roles work.-</Note>--## How it works--<Steps>- <Step title="Configure a discovery source">- A **discovery source** is a connection to an external system that Infisical scans. You give it a credential to authenticate with and a [Gateway](/documentation/platform/gateways/overview) to reach the system through.- </Step>- <Step title="Run a scan">- Scanning a source enumerates the privileged accounts it can find. Scans run asynchronously and can be triggered manually or on a schedule.- </Step>- <Step title="Review staged accounts">- Accounts found by a scan are held as **staged accounts**. They're not yet managed by PAM. You review them before deciding which to bring in.- </Step>- <Step title="Import into a folder">- Select the staged accounts you want and import them into a [folder](/documentation/platform/pam/folders/overview) using an [account template](/documentation/platform/pam/templates/overview). Imported accounts become regular PAM accounts.- </Step>-</Steps>--## Discovery sources+To set up a discovery source, follow the guide for the system you want to scan:<CardGroup cols={2}><Card title="Active Directory" icon="windows" iconType="brands" href="/documentation/platform/pam/discovery/active-directory">- Scan an Active Directory environment for domain accounts and local Windows accounts.+ Scan an Active Directory environment for domain and local Windows accounts.</Card><Card title="Linux/Unix" icon="terminal" href="/documentation/platform/pam/discovery/unix">- Scan Linux and Unix hosts over SSH for local accounts.+ Scan Linux and Unix hosts over SSH for local accounts and import them into PAM.</Card><Card title="PostgreSQL" icon="database" href="/documentation/platform/pam/discovery/postgres">- Scan PostgreSQL instances for login roles.+ Scan PostgreSQL instances for login roles and import them into PAM.</Card><Card title="Microsoft SQL Server" icon="database" href="/documentation/platform/pam/discovery/mssql">- Scan Microsoft SQL Server instances for SQL logins.+ Scan Microsoft SQL Server instances for SQL logins and import them into PAM.</Card></CardGroup>-<Note>- Additional discovery sources will be added in future releases.-</Note>+## How discovery works-## Staged accounts+1. You create a discovery source, which names the systems to scan, the PAM accounts to sign in with, and the [Gateway](/documentation/platform/gateways/overview) to connect through+2. Infisical scans the source on demand or on a schedule, and adds the accounts it finds to the source's staged accounts+3. You select the staged accounts to import, and pick a [folder](/documentation/platform/pam/folders/overview) and an [account template](/documentation/platform/pam/templates/overview) for them+4. Infisical creates a PAM account for each staged account you imported-A staged account is an account that a scan found but that hasn't been imported yet. Each staged account records its name and type but doesn't become usable until you import it.+Discovery finds each account's username but not its password. An imported account can't be used until you enter its credential on the account.-Discovery deduplicates accounts by a stable fingerprint per source. Re-running a scan updates existing staged accounts rather than creating duplicates, and accounts you have already imported are left untouched so they can't be imported twice.+## Staged accounts-## Importing accounts+A staged account is an account that a scan found and that you haven't imported yet. To see a source's staged accounts, go to **Privileged Access Management** > **Discovery**, select the source, and open its **Staged Accounts** tab.-When you import staged accounts, you choose:+When you scan a source again, Infisical updates its staged accounts instead of adding duplicates, and doesn't stage an account you already imported. If a scan no longer finds a staged account, Infisical removes it, except on [Unix sources](#unix-sources).-- A **destination [folder](/documentation/platform/pam/folders/overview)** for the imported accounts.-- An **[account template](/documentation/platform/pam/templates/overview)** for each account type in your selection. The template determines the rules the imported accounts inherit.+## Stale accounts-<Warning>-Discovered accounts are found with a username but no password. Imported accounts arrive without a credential and stay unusable until you add one on the account.-</Warning>+If a scan no longer finds an account that you imported, Infisical lists the account on the source's **Stale Accounts** tab and marks it as stale on the **Accounts** page. A stale account keeps working, including sessions and rotation. Check whether the account still exists on the target, and delete the PAM account if it doesn't.-## Scans and schedules+For Windows, PostgreSQL, and Microsoft SQL Server sources, Infisical only removes staged accounts and marks accounts as stale on hosts that the scan reached, so an unreachable host doesn't change its accounts.-Each source can scan on demand or automatically:+### Unix sources-| Schedule | Behavior |-|----------|----------|-| **Manual** | The source is only scanned when you trigger it with **Scan Now**. |-| **Daily** | Infisical scans the source about once per day. |-| **Weekly** | Infisical scans the source about once per week. |+Unix sources never remove staged accounts or mark imported accounts as stale. If you delete a user from a Unix host, its staged account and its PAM account stay as they were. Check the host itself before you treat an account from a Unix source as current.-Scheduled scans are evaluated once a day, so a source runs on its next scheduled check after its interval has elapsed. Every run is recorded in the source's **scan history** with its status, timestamps, and the number of accounts found.+## Scan schedules-## FAQ+Each source has a **Scan Schedule**:-<AccordionGroup>- <Accordion title="Do I need a Gateway to use Discovery?">- Yes. Discovery reaches external systems through an Infisical [Gateway](/documentation/platform/gateways/overview) (or Gateway pool). All scan traffic is tunneled through it, so a Gateway with network access to the target system is required.- </Accordion>- <Accordion title="Why is my imported account unusable?">- Discovery finds accounts with a username but no password. After importing, open the account and add a credential before connecting.- </Accordion>- <Accordion title="What happens if I scan the same source again?">- Existing staged accounts are updated in place, and accounts you have already imported are skipped. Discovery deduplicates by a per-source fingerprint, so scanning repeatedly is safe.- </Accordion>-</AccordionGroup>+| Schedule | When Infisical scans the source |+|----------|----------|+| **Manual** | Only when you select **Scan Now** |+| **Daily** | Once a day |+| **Weekly** | Once a week |-## What's next?+Infisical checks once a day for sources that are due. A scheduled source scans at the first check after its interval has passed since its last scan.-<CardGroup cols={2}>- <Card title="Active Directory" icon="windows" iconType="brands" href="/documentation/platform/pam/discovery/active-directory">- Configure an Active Directory discovery source.- </Card>- <Card title="Linux/Unix" icon="terminal" href="/documentation/platform/pam/discovery/unix">- Configure a Linux/Unix discovery source.- </Card>- <Card title="PostgreSQL" icon="database" href="/documentation/platform/pam/discovery/postgres">- Configure a PostgreSQL discovery source.- </Card>- <Card title="Microsoft SQL Server" icon="database" href="/documentation/platform/pam/discovery/mssql">- Configure a Microsoft SQL Server discovery source.- </Card>- <Card title="Accounts" icon="user-lock" href="/documentation/platform/pam/accounts/overview">- Manage the accounts you import.- </Card>- <Card title="Account Templates" icon="layers" href="/documentation/platform/pam/templates/overview">- Define the rules imported accounts inherit.- </Card>- <Card title="Folders" icon="folder-tree" href="/documentation/platform/pam/folders/overview">- Organize imported accounts and control access.- </Card>-</CardGroup>+The source's **Runs** tab shows each scan's start time, status, and result.diff --git a/docs/documentation/platform/pam/discovery/postgres.mdx b/docs/documentation/platform/pam/discovery/postgres.mdxindex 92641f45a9..342d968ea0 100644--- a/docs/documentation/platform/pam/discovery/postgres.mdx+++ b/docs/documentation/platform/pam/discovery/postgres.mdx@@ -4,48 +4,43 @@ sidebarTitle: "PostgreSQL"description: "Scan PostgreSQL instances for login roles and import them into PAM."----PostgreSQL discovery scans a set of PostgreSQL instances, enumerates the roles that can log in, stages them for review, and lets you import them into PAM as [PostgreSQL accounts](/documentation/platform/pam/accounts/postgresql). You list the instances to scan and the [PostgreSQL accounts](/documentation/platform/pam/accounts/postgresql) to scan with.+PostgreSQL discovery finds the roles that can sign in to your PostgreSQL instances, so you can import them into PAM as [PostgreSQL accounts](/documentation/platform/pam/accounts/postgresql). For how discovery works across every source type, see [Discovery](/documentation/platform/pam/discovery/overview).-All scan traffic is tunneled through an Infisical [Gateway](/documentation/platform/gateways/overview).+You give the source a list of instances and one or more PostgreSQL accounts to sign in with. Infisical connects to each instance through a [Gateway](/documentation/platform/gateways/overview).-<Accordion title="How it works">- A PostgreSQL scan connects entirely through the Gateway:+<Accordion title="How a scan works">+ 1. Infisical checks that each instance is reachable on the ports of the source's PostgreSQL accounts, and skips the instances it can't reach+ 2. For each instance, Infisical first tries the account whose host matches the instance, then tries the other accounts until one signs in+ 3. Infisical lists the roles on the instance that can sign in, and stages each one as a PostgreSQL account for that instance- 1. Each target you list is one instance to scan. Hostnames are resolved by the gateway in the target network.- 2. Each target is probed on the ports of your credential accounts, so unreachable ones are skipped before any login is attempted.- 3. For each reachable host, discovery picks a credential account: it first tries an account whose stored host matches the target, otherwise it tries each account in turn until one connects.- 4. Discovery reads the roles defined on the instance.- 5. Each role that can log in is staged as a PostgreSQL account scoped to that instance. If two instances each have a role named `postgres`, Infisical stages each role as a separate account.-- Hosts that no credential can reach or authenticate to are reported on the run and skipped; the rest of the scan still completes.+ If two instances each have a role named `postgres`, Infisical stages two separate accounts. If no account can sign in to an instance, the scan reports the instance and continues with the others.</Accordion>## Prerequisites-Before creating a PostgreSQL discovery source, make sure you have:+- A [Gateway](/documentation/platform/gateways/overview) that can reach the instances you want to scan+- One or more [PostgreSQL accounts](/documentation/platform/pam/accounts/postgresql) that authenticate with a password, to sign in to the instances with+- The [Product Admin role](/documentation/platform/pam/concepts/access-control#product-membership) in PAM+- The Operator or Admin [role](/documentation/platform/pam/concepts/access-control#folder-and-account-memberships) on those PostgreSQL accounts, because the scan sends their passwords to every instance-- A [Gateway](/documentation/platform/gateways/overview) (or Gateway pool) with network access to the instances you want to scan.-- One or more [PostgreSQL accounts](/documentation/platform/pam/accounts/postgresql) in PAM to use as credential accounts. Discovery connects to each instance as one of these accounts, using its port, database, and TLS settings.-- The [Product Admin](/documentation/platform/pam/concepts/access-control#product-membership) role on your PAM project.+The PostgreSQL role that the scan signs in as only needs permission to sign in to the instance. It doesn't need to be a superuser.-<Note>-The PostgreSQL role used for the scan only needs permission to log in to the target instance. It doesn't need superuser privileges or additional grants to list the roles on that instance.-</Note>+A PostgreSQL account that uses AWS IAM authentication can't scan, because its sign-in token works for only one host, port, and user.<Warning>-The PostgreSQL accounts used for scanning must authenticate with a password. AWS IAM authentication isn't supported because each token is valid only for a specific host, port, and user, so it can't be reused to scan other instances.+ Infisical sends the PostgreSQL account's password to every instance that the source scans, so only list instances you trust.</Warning>## Step 1: Create a source<Steps><Step>- Go to **Privileged Access Manager > Discovery** and select **Add Source**.+ Go to **Privileged Access Management** > **Discovery** and select **Add Source**.</Step><Step>- Choose **PostgreSQL**, then select **Next**.+ Select **PostgreSQL**, then select **Next**.- <Frame>+ <Frame><img src="/images/platform/pam/postgres-discovery-select-source.png" alt="Add Discovery Source panel with PostgreSQL selected" /></Frame></Step>@@ -54,85 +49,58 @@ The PostgreSQL accounts used for scanning must authenticate with a password. AWS| Field | Description ||-------|-------------|- | **Name** | A descriptive name (e.g., `prod-databases`) |- | **Credential Accounts** | One or more [PostgreSQL accounts](/documentation/platform/pam/accounts/postgresql) used to connect and scan |- | **Gateway** | The [Gateway](/documentation/platform/gateways/overview) or Gateway pool that scan traffic tunnels through |- | **Scan Schedule** | How often to scan automatically: **Manual**, **Daily**, or **Weekly** |- | **Targets** | IP addresses or hostnames of the instances to scan, one per line or comma-separated. Hostnames are resolved by the gateway in the target network |+ | **Name** | A name for the source, such as `prod-databases` |+ | **Credential Accounts** | The PostgreSQL accounts to sign in to the instances with |+ | **Gateway** | The Gateway or Gateway pool to connect through |+ | **Scan Schedule** | **Manual**, **Daily**, or **Weekly** (see [scan schedules](/documentation/platform/pam/discovery/overview#scan-schedules)) |+ | **Targets** | The IP addresses or hostnames of the instances to scan, one per line or separated by commas (the Gateway resolves hostnames) |++ Infisical connects to each instance with the port, database, and TLS settings of the PostgreSQL account it signs in with.<Frame><img src="/images/platform/pam/postgres-discovery-configure-source.png" alt="PostgreSQL discovery source configuration with name, credential accounts, gateway, scan schedule, and targets fields" /></Frame></Step><Step>- Select **Add Source**. The source appears in the Discovery table.+ Select **Add Source**.</Step></Steps>-<Note>-Discovery only finds roles that can log in to the scanned instance. Group roles that exist purely to hold privileges can't open a session, so discovery doesn't consider them accounts and ignores them. Discovery also ignores PostgreSQL's own built-in roles.--Roles are cluster-wide rather than per-database, so the database your credential account connects to doesn't change which roles are found.-</Note>-## Step 2: Run a scan-To trigger a scan manually, select **Scan Now** from the source's row menu or its detail panel. Scans run in the background, and a source can only have one scan running at a time.+On the **Discovery Sources** table, select the options menu on the source's row, then select **Scan Now**. A source can run one scan at a time.<Frame><img src="/images/platform/pam/postgres-discovery-scan-now.png" alt="PostgreSQL discovery source row menu showing Scan Now" /></Frame>-<Note>-If the source is on a **Daily** or **Weekly** schedule, Infisical also scans it automatically when its interval has elapsed. **Manual** sources are only scanned when you trigger them.-</Note>+The scan stages only roles that can sign in. Roles are shared across all databases on an instance, so the database that the PostgreSQL account connects to doesn't change which roles the scan finds.## Step 3: Import accounts<Steps><Step>- In the **Discovery Sources** table, select the source to open its detail panel.+ On the **Discovery Sources** table, select the source.</Step><Step>- From the source's **Staged Accounts** tab, select the accounts you want and select **Import Accounts**:+ On the **Staged Accounts** tab, select the accounts you want, then select **Import Accounts**.<Frame><img src="/images/platform/pam/postgres-discovery-staged-accounts.png" alt="Staged Accounts tab with four PostgreSQL accounts selected and the Import Accounts button" /></Frame></Step><Step>- Configure the import settings:-- | Field | Description |- |-------|-------------|- | **Destination Folder** | The [folder](/documentation/platform/pam/folders/overview) to import the accounts into |- | **PostgreSQL Template** | A [PostgreSQL account template](/documentation/platform/pam/templates/overview) to apply |+ Select a **Destination Folder** and a **PostgreSQL Template**, then select **Import**.<Frame><img src="/images/platform/pam/postgres-discovery-import-accounts.png" alt="Import 4 Accounts dialog with Production as the destination folder and PostgreSQL Standard as the template" /></Frame>-- Then, select **Import**.+ </Step>+ <Step>+ Go to **Privileged Access Management** > **Accounts**. For each imported account, open the options menu on its row, select **Configure**, and enter the password for its PostgreSQL role on the **Configuration** tab. The scan doesn't read passwords, so you can't connect to an imported account until you enter its password.</Step></Steps><Check>-Once imported, the accounts become regular PAM PostgreSQL accounts in the chosen folder and inherit their template's rules.+ Your PostgreSQL roles are in PAM. Anyone with access to the destination folder can launch sessions on them, and each scan of the source stages any new roles it finds.</Check>--<Warning>-Imported accounts don't include user credentials because the discovery scan doesn't retrieve passwords from PostgreSQL.--After importing, open each account in PAM and enter the password for its PostgreSQL user. You must add the password before you can use PAM to connect to the PostgreSQL instance as that user.-</Warning>--## Next steps--<CardGroup cols={2}>- <Card title="Discovery Overview" icon="radar" href="/documentation/platform/pam/discovery/overview">- Understand staging, importing, and schedules.- </Card>- <Card title="PostgreSQL Accounts" icon="database" href="/documentation/platform/pam/accounts/postgresql">- Learn about the account type used to authenticate scans.- </Card>-</CardGroup>diff --git a/docs/documentation/platform/pam/discovery/unix.mdx b/docs/documentation/platform/pam/discovery/unix.mdxindex 7f74f691a5..7ecdb0f33a 100644--- a/docs/documentation/platform/pam/discovery/unix.mdx+++ b/docs/documentation/platform/pam/discovery/unix.mdx@@ -4,85 +4,81 @@ sidebarTitle: "Linux/Unix"description: "Scan Linux and Unix hosts over SSH for local accounts and import them into PAM."----Linux/Unix discovery scans a set of Linux and Unix hosts over SSH, enumerates their local accounts, stages them for review, and lets you import them into PAM as [SSH accounts](/documentation/platform/pam/accounts/ssh). Because there is no central directory to read from, you point a source at the hosts to scan and the [SSH accounts](/documentation/platform/pam/accounts/ssh) to scan with.+Linux/Unix discovery finds the local accounts on your Linux and Unix hosts, so you can import them into PAM as [SSH accounts](/documentation/platform/pam/accounts/ssh). For how discovery works across every source type, see [Discovery](/documentation/platform/pam/discovery/overview).-All scan traffic is tunneled through an Infisical [Gateway](/documentation/platform/gateways/overview).+You give the source a list of hosts and one or more SSH accounts to sign in with. Infisical connects to each host over SSH through a [Gateway](/documentation/platform/gateways/overview).-## How it works+<Accordion title="How a scan works">+ 1. Infisical expands each CIDR range into its hosts+ 2. For each host, Infisical first tries the SSH account whose host matches, then tries the other accounts until one signs in+ 3. Infisical reads the host's accounts from `/etc/passwd` and stages each account that has a login shell as an SSH account for that host-A Linux/Unix scan connects entirely through the Gateway:--1. Each **CIDR range** is expanded into a list of target hosts; individual IPs and hostnames are used as-is (hostnames are resolved by the gateway in the target network).-2. For each host, discovery picks a credential account: it first tries an account whose stored host matches the target, otherwise it tries each account in turn until one authenticates.-3. It reads the host's local accounts from `/etc/passwd` (via `getent passwd`) over SSH.-4. Each login-capable account is staged as an **SSH** account scoped to that host. `root` on two hosts becomes two separate staged accounts.--Hosts that no credential can reach or authenticate to are reported on the run and skipped; the rest of the scan still completes.+ If `root` exists on two hosts, Infisical stages two separate accounts. If no account can sign in to a host, the scan reports the host and continues with the others.+</Accordion>## Prerequisites-Before creating a Linux/Unix discovery source, make sure you have:+- A [Gateway](/documentation/platform/gateways/overview) that can reach the hosts you want to scan+- One or more [SSH accounts](/documentation/platform/pam/accounts/ssh) that can sign in to those hosts, using a password, a private key, or a certificate+- The [Product Admin role](/documentation/platform/pam/concepts/access-control#product-membership) in PAM+- The Connector, Operator, or Admin [role](/documentation/platform/pam/concepts/access-control#folder-and-account-memberships) on those SSH accounts (Operator or Admin for an account that uses a password)-- A [Gateway](/documentation/platform/gateways/overview) (or Gateway pool) with network access to the hosts you want to scan.-- One or more [SSH accounts](/documentation/platform/pam/accounts/ssh) in PAM to use as **credential accounts**. Discovery authenticates to each host as one of these accounts, using its port. Password, private-key, and certificate (SSH CA) auth are all supported for scanning; certificate accounts are brokered through the gateway and require the target hosts to trust the account's CA.-- The **Product Admin** role. See [Access Control](/documentation/platform/pam/concepts/access-control).+To scan many hosts, use one SSH account whose key or certificate authority every host trusts.-<Note>-A scanning identity is typically provisioned uniformly across the fleet, most reliably as a key-based [SSH account](/documentation/platform/pam/accounts/ssh) whose key is trusted on every host.-</Note>+<Warning>+ If an SSH account uses a password, Infisical sends the password to every host that the source scans, including hosts in a CIDR range that you don't control. Use a key or certificate account for scanning.+</Warning>-## Creating a source+## Step 1: Create a source<Steps>- <Step title="Start adding a source">- Go to **Privileged Access Manager → Discovery** and select **Add Source**, then choose **Linux/Unix**.+ <Step>+ Go to **Privileged Access Management** > **Discovery** and select **Add Source**.+ </Step>+ <Step>+ Select **Linux/Unix**, then select **Next**.</Step>- <Step title="Configure the source">+ <Step>+ Configure the source:+| Field | Description ||-------|-------------|- | **Name** | A descriptive name (e.g., `corp-servers`) |- | **Credential Accounts** | One or more [SSH accounts](/documentation/platform/pam/accounts/ssh) used to authenticate and scan |- | **Gateway** | The [Gateway](/documentation/platform/gateways/overview) or Gateway pool that scan traffic tunnels through |- | **Scan Schedule** | How often to scan automatically: **Manual**, **Daily**, or **Weekly** |- | **Targets** | IP addresses, IPv4 CIDR ranges, or hostnames to scan, one per line or comma-separated. Hostnames are resolved by the gateway in the target network |+ | **Name** | A name for the source, such as `corp-servers` |+ | **Credential Accounts** | The SSH accounts to sign in to the hosts with |+ | **Gateway** | The Gateway or Gateway pool to connect through |+ | **Scan Schedule** | **Manual**, **Daily**, or **Weekly** (see [scan schedules](/documentation/platform/pam/discovery/overview#scan-schedules)) |+ | **Targets** | IP addresses, IPv4 CIDR ranges, or hostnames to scan, one per line or separated by commas (the Gateway resolves hostnames) |++ Infisical connects to each host on the port of the SSH account it signs in with.</Step>- <Step title="Save">- Select **Add Source**. The source appears in the Discovery table.+ <Step>+ Select **Add Source**.</Step></Steps>-## Account filtering--Discovery surfaces only accounts that can be logged into. Because it reads only `/etc/passwd`, login-capability is inferred from each account's shell: accounts with a real login shell are kept (regular users, `root`, and service accounts such as `postgres`), while accounts with a `nologin`/`false` (or similar non-interactive) shell are dropped. This keeps daemon and system accounts that can never open a session out of the results.--## Running a scan--Trigger a scan manually with **Scan Now** from the source's row menu or its detail panel. Scans run in the background, and a source can only have one scan running at a time.--If the source is on a **Daily** or **Weekly** schedule, Infisical also scans it automatically when its interval has elapsed. **Manual** sources are only scanned when you trigger them.+## Step 2: Run a scan-## Importing accounts+On the **Discovery Sources** table, select the options menu on the source's row, then select **Scan Now**. A source can run one scan at a time.-From the **Staged Accounts** tab, select the accounts you want and select **Import Accounts**. Then choose:+The scan stages only accounts that can sign in. It skips accounts whose shell is `nologin`, `false`, or another shell that doesn't allow a login, which leaves out most system and daemon accounts.-| Field | Description |-|-------|-------------|-| **Destination Folder** | The [folder](/documentation/platform/pam/folders/overview) to import the accounts into |-| **Template** | An [SSH account template](/documentation/platform/pam/templates/overview) to apply |+## Step 3: Import accounts-Once imported, the accounts become regular PAM SSH accounts in the chosen folder and inherit their template's rules.--<Warning>-Imported accounts arrive without a credential because discovery finds accounts with a username but no password. Open each imported account and add a credential before connecting.-</Warning>--## Next steps+<Steps>+ <Step>+ On the **Discovery Sources** table, select the source.+ </Step>+ <Step>+ On the **Staged Accounts** tab, select the accounts you want, then select **Import Accounts**.+ </Step>+ <Step>+ Select a **Destination Folder** and an **SSH Template**, then select **Import**.+ </Step>+ <Step>+ Go to **Privileged Access Management** > **Accounts**. For each imported account, open the options menu on its row, select **Configure**, and enter its credential on the **Configuration** tab. The scan doesn't read credentials, so you can't connect to an imported account until you enter its credential.+ </Step>+</Steps>-<CardGroup cols={2}>- <Card title="Discovery Overview" icon="radar" href="/documentation/platform/pam/discovery/overview">- Understand staging, importing, and schedules.- </Card>- <Card title="SSH Accounts" icon="terminal" href="/documentation/platform/pam/accounts/ssh">- Learn about the account type used to authenticate scans.- </Card>-</CardGroup>+<Check>+ Your Unix accounts are in PAM. Anyone with access to the destination folder can launch sessions on them, and each scan of the source stages any new accounts it finds.+</Check>diff --git a/docs/documentation/platform/pam/folders/overview.mdx b/docs/documentation/platform/pam/folders/overview.mdxindex e6cf640a06..52b7cad12a 100644--- a/docs/documentation/platform/pam/folders/overview.mdx+++ b/docs/documentation/platform/pam/folders/overview.mdx@@ -4,98 +4,56 @@ sidebarTitle: "Folders"description: "Organize PAM accounts and control who can access them."----**Group [accounts](/documentation/platform/pam/accounts/overview) by who needs access to them.** This is the core design principle of Infisical PAM.+A folder holds [accounts](/documentation/platform/pam/accounts/overview). When you give a user, group, or machine identity a role on a folder, the role applies to every account in the folder, including accounts added later.-If the same 10 people need access to the same 5 databases, put those databases in one folder. If a different team needs access to different databases, create a separate folder for them.+Put accounts in the same folder if the same people need them. For example, you can create one folder per team (`backend-team`), per application (`checkout-service`), or per environment (`prod`), depending on how access works in your organization. If a user or group needs only one account from a folder, give them a role on that account instead of on the folder.-Common patterns:-- **By team** — `backend-team`, `data-engineering`, `platform`-- **By department** — `engineering`, `finance`, `operations`-- **By application** — `checkout-service`, `payments`, `user-auth`-- **By environment** — if different people manage dev vs prod+## Create a folder-The right pattern depends on your organization. Folder-level permissions are the primary way to grant access, though you can also assign access directly on individual accounts when needed.--## Creating a folder+Only product admins can create folders. To learn how to become one, see [Product membership](/documentation/platform/pam/concepts/access-control#product-membership).<Steps>- <Step title="Navigate to Accounts">- Go to **Privileged Access Management → Accounts**, select the arrow next to **Add Account**, and select **Add Folder**. Only [Product Admins](/documentation/platform/pam/concepts/access-control#product-membership) can create folders.+ <Step>+ Go to **Privileged Access Management** > **Accounts**.+ </Step>+ <Step>+ Select the arrow next to **Add Account**, then select **Add Folder**.</Step>- <Step title="Configure the folder">- | Field | Description |- |-------|-------------|- | **Name** | A unique name (e.g., `platform-team`, `checkout-service`, `us-west-prod`) |- | **Description** | Optional context about what this folder contains |-- Click **Add Folder**.+ <Step>+ Enter a **Name** and an optional **Description**, then select **Add Folder**.</Step></Steps>-Once created, you can start adding accounts to it. But first, you'll probably want to set up who can manage this folder.+After you create the folder, give at least one person the Admin role on it, so they can add accounts and manage the folder's access.++## Give people access to a folder-## Managing access+To give a user, group, or machine identity a role on the folder, follow the steps in [Assign a role](/documentation/platform/pam/concepts/access-control#assign-a-role). To learn what each role allows, see [Folder and account memberships](/documentation/platform/pam/concepts/access-control#folder-and-account-memberships).-Access to a folder is controlled through **[memberships](/documentation/platform/pam/concepts/access-control)**. You assign a user, group, or [machine identity](/documentation/platform/identities/machine-identities) a role, and that role determines what they can do.+If some accounts in the folder need approval before anyone can use them, the folder's Admins choose the approvers on the folder's **Approvals** tab. To learn how, see [Access requests](/documentation/platform/pam/access-requests/overview).-<Note>- If you have the organization [Admin role](/documentation/platform/access-controls/role-based-access-controls), you can make yourself the Admin of any folder, such as a folder whose last Admin has left. On the **Accounts** page, folders you aren't a member of show a **Not a Member** badge. Open the folder's menu and select **Join as Admin**. Infisical notifies the folder's existing Admins and records the join in the [audit logs](/documentation/platform/pam/auditing).-</Note>+## Join a folder as an organization admin-### Adding members+If you have the organization [Admin role](/documentation/platform/access-controls/role-based-access-controls), you can make yourself the Admin of any folder, such as a folder whose last Admin has left the company.<Steps>- <Step title="Open the folder">- Select the folder to open its detail page.+ <Step>+ Go to **Privileged Access Management** > **Accounts**. Folders you aren't a member of show a **Not a Member** badge.</Step>- <Step title="Go to Permissions">- Open the folder's actions menu and select **Permissions**.- </Step>- <Step title="Add a member">- Select **Assign Access** and configure:-- | Field | Description |- |-------|-------------|- | **User/Group/Identity** | Who you're granting access to |- | **Role** | What they can do (see roles below) |- | **Expires** | Optional expiration date for temporary access |-- Click **Add**.+ <Step>+ Open the options menu on the folder's row and select **Join as Admin**, then confirm.</Step></Steps>-### Roles--| Role | What they can do |-|------|------------------|-| **Admin** | Full control — accounts, folders, sessions, memberships |-| **Connector** | Launch sessions and connect to accounts |-| **Auditor** | View audit logs and session recordings |--When you assign a role on a folder, it applies to **all accounts** inside that folder. This is the main way to grant access — you don't have to set up permissions on each account individually.--### Time-bound access--For contractors or temporary team members, set an expiration when adding the membership. The access is automatically revoked when it expires — no manual cleanup needed.--### Users, groups, and machine identities--You can grant folder access to any of the three:-- **Individual users** — straightforward, easy to audit-- **Groups** — access follows group membership; when someone joins or leaves the group, their folder access updates automatically-- **Machine identities** — for unattended workloads, such as an [AI agent](/documentation/platform/pam/ai-agents/overview) on a schedule. **Connector** is the usual role, and time-bound access works here too.--Groups are managed at the organization level and can sync from identity providers like Okta or Entra ID.+The Admin role replaces any role you already had on the folder. Infisical notifies the folder's other Admins and records the join in the [audit logs](/documentation/platform/pam/auditing).## Next steps-Now that you have a folder, you'll want to add accounts to it. But before that, you might want to set up [templates](/documentation/platform/pam/templates/overview) to define what rules apply to those accounts.-<CardGroup cols={2}>- <Card title="Templates" icon="layers" href="/documentation/platform/pam/templates/overview">- Define session rules before adding accounts.+ <Card title="Account templates" icon="layers" href="/documentation/platform/pam/templates/overview">+ Set the rules for connecting to the accounts that use a template.</Card><Card title="Accounts" icon="user-lock" href="/documentation/platform/pam/accounts/overview">- Add databases and servers to your folder.+ Store the credentials for a database or server that people and agents connect to through Infisical PAM.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/guides/ssh-certificate-auth.mdx b/docs/documentation/platform/pam/guides/ssh-certificate-auth.mdxindex da38998035..18311fed64 100644--- a/docs/documentation/platform/pam/guides/ssh-certificate-auth.mdx+++ b/docs/documentation/platform/pam/guides/ssh-certificate-auth.mdx@@ -1,69 +1,73 @@---title: "Set up SSH certificate authentication"sidebarTitle: "SSH certificate auth"-description: "Configure certificate-based SSH access to eliminate static credentials."+description: "Let people connect to SSH servers with short-lived certificates instead of stored credentials."----This guide walks through setting up SSH certificate authentication. Instead of managing passwords or SSH keys, Infisical mints a short-lived certificate for each [session](/documentation/platform/pam/sessions/overview) — valid only for that session, so there's nothing to rotate or revoke.+With certificate authentication, an [SSH account](/documentation/platform/pam/accounts/ssh) stores no password or private key. Each account has its own certificate authority (CA), and when someone launches a [session](/documentation/platform/pam/sessions/overview), Infisical signs a certificate that's valid only for that session. The server accepts the certificate because it trusts the account's CA.++This guide creates an SSH account that uses certificate authentication, then configures the server to trust the account's CA.## Prerequisites-- Admin access to the [folder](/documentation/platform/pam/folders/overview) where you'll create the [account](/documentation/platform/pam/accounts/overview)-- Root/sudo access on the target server-- The server must be reachable from your [Gateway](/documentation/platform/gateways/gateway-deployment)+- The Admin [role](/documentation/platform/pam/concepts/access-control) on the [folder](/documentation/platform/pam/folders/overview) you'll add the account to+- Root access on the server+- A [Gateway](/documentation/platform/gateways/overview) that can reach the server on its SSH port-## Steps+## Step 1: Create the SSH account<Steps>- <Step title="Create the SSH Account">- 1. Go to **Privileged Access Management → Accounts** and select **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. Select **Create**+ <Step>+ Go to **Privileged Access Management** > **Accounts** and select **Add Account**.</Step>- <Step title="Configure the Server">- Open the account you just created. You'll see a **CA Setup** section.-- <Tabs>- <Tab title="Automated Setup">- Copy the setup command from the account page and run it on your server. The script downloads the CA public key, configures sshd to trust it, and restarts the service.- </Tab>- <Tab title="Manual Setup">- 1. Copy the **CA Public Key** from the account page- 2. Save it to `/etc/ssh/infisical_ca.pub` on the server- 3. Add to sshd_config: `TrustedUserCAKeys /etc/ssh/infisical_ca.pub`- 4. Restart sshd: `sudo systemctl restart sshd`- </Tab>- </Tabs>-- Verify the setup:- ```bash- sudo sshd -T | grep trustedusercakeys- ```+ <Step>+ Select the **Folder** and an SSH **Account Template**, then select **Next**.+ </Step>+ <Step>+ Enter a **Name**, and the server's **Host** and **Port**. If the template doesn't set a Gateway, select one under **Gateway**.+ </Step>+ <Step>+ Select **Certificate** as the **Auth Method**, enter the **Username** to log in as, and select **Create**.+ </Step>+</Steps>++## Step 2: Configure the server to trust the account's CA++<Steps>+ <Step>+ On the **Accounts** page, open the options menu of the account you created and select **Configure**. Under **SSH CA setup required**, select **Copy install command**.+ </Step>+ <Step>+ Run the command on the server. The command downloads a setup script and runs it as root.++ The script adds the account's CA public key to the file that the `TrustedUserCAKeys` setting in `sshd_config` points to. If `sshd_config` has no `TrustedUserCAKeys` setting, the script adds the key to `/etc/ssh/infisical_ca.pub` and adds the setting. It then checks the configuration with `sshd -t` and restarts the SSH service.</Step>- <Step title="Connect">- Your team can now connect from the **Accounts** page — either in the browser or using the CLI proxy.+ <Step>+ Check that the server trusts the CA file:- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and click the rocket icon (or select **Launch Session** from the menu)+ ```bash+ sudo sshd -T | grep -i trustedusercakeys+ ```</Step></Steps>-## Why certificates?+<Note>+ The command contains your Infisical access token, which it uses to download the script. To read the script before you run it, run the command without `| sudo bash`.+</Note>-- **No static credentials** to rotate or leak-- **Short-lived** and valid only for the session-- **Per-account CAs** so compromising one doesn't affect others-- **Automatic** key management for users+## Step 3: Connect to the server++Anyone with access to the account can now launch a session on it from the **Accounts** page, in the browser or through the CLI. To learn how, see [Connect to an account](/documentation/platform/pam/accounts/connect).++If a session fails to authenticate, check that the account's **Username** exists on the server and that the setup script finished without errors.## Next steps<CardGroup cols={2}>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View SSH session recordings.+ <Card title="Access control" icon="shield-half" href="/documentation/platform/pam/concepts/access-control">+ Control who can manage PAM and who can connect to each account.</Card>- <Card title="Team Access Guide" icon="users" href="/documentation/platform/pam/guides/team-access">- Grant team access to databases.+ <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">+ Review and end the connections that people and agents make to your accounts.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/guides/team-access.mdx b/docs/documentation/platform/pam/guides/team-access.mdxdeleted file mode 100644index 3c11563c03..0000000000--- a/docs/documentation/platform/pam/guides/team-access.mdx+++ /dev/null@@ -1,74 +0,0 @@-----title: "Grant team access to a database"-sidebarTitle: "Team database access"-description: "Set up secure PostgreSQL access for your team."------This guide walks through giving your team secure access to a production PostgreSQL database.--## Prerequisites--- Product Admin access-- A PostgreSQL database reachable from your [Gateway](/documentation/platform/gateways/gateway-deployment)-- Database credentials (username and password)--## Steps--<Steps>- <Step title="Create a Folder">- Create a [folder](/documentation/platform/pam/folders/overview) for the [accounts](/documentation/platform/pam/accounts/overview) your team needs to access.-- 1. Go to **Privileged Access Management → Accounts**- 2. Click the arrow next to **Add Account** and select **Add Folder**- 3. Name it based on who needs access (e.g., `backend-team`, `checkout-service`)- 4. Click **Add Folder**- </Step>- <Step title="(Optional) Create a Custom Template">- The default `postgres` [template](/documentation/platform/pam/templates/overview) works for most cases. If you need stricter rules:-- 1. Go to **Account Templates** and click **Create Template**- 2. Select **PostgreSQL** as the type and configure your access policy- 3. Click **Create**- </Step>- <Step title="Add the Database Account">- 1. Select **Add Account**- 2. Select your folder and template- 3. Fill in your database connection details and credentials- 4. Select **Create**- </Step>- <Step title="Grant Your Team Access">- 1. Open your folder- 2. Go to the **Permissions** tab- 3. Select **Assign Access**- 4. Select your team and set the role to **Connector**- 5. Select **Add**-- <Tip>- To let someone manage the folder day-to-day, grant them **Admin** instead of Connector.- </Tip>- </Step>- <Step title="Connect">- Your team can now connect from the **Accounts** page — either in the browser or using the CLI proxy.-- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account and click the rocket icon (or select **Launch Session** from the menu)- </Step>-</Steps>--## Adding more databases--To add another database, open the folder and select **Add Account**. Your team will automatically have access since they already have folder permissions.--## Next steps--<CardGroup cols={2}>- <Card title="SSH Certificate Auth" icon="key" href="/documentation/platform/pam/guides/ssh-certificate-auth">- Set up secure SSH access with certificates.- </Card>- <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">- View and manage team sessions.- </Card>- <Card title="AI Agents" icon="bot" href="/documentation/platform/pam/ai-agents/overview">- Grant the same folder access to an AI agent.- </Card>-</CardGroup>diff --git a/docs/documentation/platform/pam/overview.mdx b/docs/documentation/platform/pam/overview.mdxindex ca41858a4a..a6089b7cfd 100644--- a/docs/documentation/platform/pam/overview.mdx+++ b/docs/documentation/platform/pam/overview.mdx@@ -1,32 +1,128 @@---title: "Privileged Access Management (PAM)"-description: "Manage and secure access to critical infrastructure like databases and servers with policy-based controls, session recording, and audit trails."+description: "Let people and AI agents connect to your infrastructure without giving them its credentials."sidebarTitle: "Privileged Access Management (PAM)"icon: "users"----Infisical Privileged Access Management (PAM) lets you securely manage access to databases and servers. People connect through a browser or CLI, and so do [AI agents](/documentation/platform/pam/ai-agents/overview), running either as the person who started them or as a [machine identity](/documentation/platform/identities/machine-identities). Nothing ever sees the credentials, and every session is recorded and auditable.+Infisical Privileged Access Management (PAM) lets you securely manage access to your databases, servers, clusters, and cloud accounts. It lets you give people and [AI agents](/documentation/platform/pam/ai-agents/overview) access without ever letting them access the actual credentials. Infisical records every session, and you decide who can connect to each account.-<Card title="Get Started" icon="rocket" href="/documentation/platform/pam/quick-starts/launch-first-session">- New to PAM? Launch your first session in under 10 minutes.+## Get started++<Card title="Quickstart" icon="rocket" href="/documentation/platform/pam/quick-starts/launch-first-session">+ Connect to a PostgreSQL database through Infisical PAM.+</Card>++<CardGroup cols={3}>+ <Card title="Concepts" icon="book-open" href="/documentation/platform/pam/concepts/overview">+ Learn how Infisical PAM controls access to your infrastructure.+ </Card>+ <Card title="Session lifecycle" icon="circle-play" href="/documentation/platform/pam/concepts/session-lifecycle">+ Learn what happens from the moment someone connects to an account until the session ends.+ </Card>+ <Card title="Architecture" icon="network" href="/documentation/platform/pam/architecture">+ Learn how PAM connects people and agents to your infrastructure through a Gateway.+ </Card>+</CardGroup>++## Accounts++Add the databases, servers, clusters, and cloud accounts that people connect to:++<CardGroup cols={3}>+ <Card title="Accounts" icon="user-lock" href="/documentation/platform/pam/accounts/overview">+ Store the credentials for a database or server that people and agents connect to through Infisical PAM.+ </Card>+ <Card title="Add an account" icon="plus" href="/documentation/platform/pam/accounts/add">+ Store the connection details and credentials for a database or server in PAM.+ </Card>+ <Card title="Connect to an account" icon="plug" href="/documentation/platform/pam/accounts/connect">+ Open a session on an account from your browser or the Infisical CLI.+ </Card>+ <Card title="View credentials" icon="eye" href="/documentation/platform/pam/accounts/view-credentials">+ Reveal the password or key stored for an account.+ </Card>+ <Card title="Manage an account" icon="sliders-horizontal" href="/documentation/platform/pam/accounts/manage">+ Change an account's details, access, and settings after you add it.+ </Card>+ <Card title="Account types" icon="layout-grid" href="/documentation/platform/pam/accounts/account-types">+ Find the setup guide for each database, server, cluster, and cloud provider that PAM supports.+ </Card>+</CardGroup>++## Access control++Decide who can connect to each account, and which rules and approvals apply:++<CardGroup cols={3}>+ <Card title="Access control" icon="shield-half" href="/documentation/platform/pam/concepts/access-control">+ Control who can manage PAM and who can connect to each account.+ </Card>+ <Card title="Folders" icon="folder-tree" href="/documentation/platform/pam/folders/overview">+ Organize PAM accounts and control who can access them.+ </Card>+ <Card title="Account templates" icon="layers" href="/documentation/platform/pam/templates/overview">+ Set the rules for connecting to the accounts that use a template.+ </Card>+ <Card title="Access requests" icon="hand" href="/documentation/platform/pam/access-requests/overview">+ Require approval before a member can use a sensitive account.+ </Card>+ <Card title="Break-glass access" icon="siren" href="/documentation/platform/pam/access-requests/break-glass">+ Let named responders grant themselves access in an emergency.+ </Card>+</CardGroup>++## AI agents++Let AI agents work with your infrastructure through PAM:++<CardGroup cols={3}>+ <Card title="AI agents" icon="bot" href="/documentation/platform/pam/ai-agents/overview">+ Give an AI agent access to your databases and servers without giving it a credential.+ </Card>+ <Card title="Run an agent" icon="play" href="/documentation/platform/pam/ai-agents/run">+ Start an AI agent with access to the PAM accounts its task needs.+ </Card>+ <Card title="Agent instructions" icon="file-text" href="/documentation/platform/pam/ai-agents/instructions">+ Tell an AI agent which PAM accounts it can use and how to reach them.+ </Card>+ <Card title="Run unattended" icon="clock" href="/documentation/platform/pam/ai-agents/unattended">+ Run an AI agent as its own machine identity.+ </Card>+ <Card title="Review and stop an agent" icon="eye" href="/documentation/platform/pam/ai-agents/review">+ Check what an AI agent did with your accounts and remove its access.+ </Card>+</CardGroup>++## Credential rotation++Change the passwords stored in PAM on a schedule:++<Card title="Credential rotation" icon="rotate-cw" href="/documentation/platform/pam/credential-rotation/overview">+ Change the passwords of your PAM accounts on a schedule.</Card>-## Learn more+## Monitoring++Review what people and agents did with your accounts, check that stored credentials still work, and find accounts on your systems to import:<CardGroup cols={2}>- <Card title="Core Concepts" icon="book" href="/documentation/platform/pam/concepts/pam-components">- Understand how templates, folders, and accounts work together.+ <Card title="Sessions" icon="monitor" href="/documentation/platform/pam/sessions/overview">+ Review and end the connections that people and agents make to your accounts.</Card>- <Card title="Guides" icon="map" href="/documentation/platform/pam/guides/team-access">- End-to-end workflows for common scenarios.+ <Card title="Session recording" icon="video" href="/documentation/platform/pam/sessions/session-recording">+ Review what happened during each session on your accounts.</Card>- <Card title="Access Control" icon="shield-half" href="/documentation/platform/pam/concepts/access-control">- Understand roles and permissions.+ <Card title="External storage" icon="cloud" href="/documentation/platform/pam/sessions/external-storage">+ Store session recordings in an S3-compatible bucket that you own.</Card>- <Card title="AI Agents" icon="bot" href="/documentation/platform/pam/ai-agents/overview">- Let an agent work with real infrastructure, sandboxed and recorded.+ <Card title="Auditing" icon="clipboard-list" href="/documentation/platform/pam/auditing">+ Track who accessed and changed what across PAM.</Card>- <Card title="Architecture" icon="network" href="/documentation/platform/pam/architecture">- How Gateways proxy connections securely.+ <Card title="Credential health" icon="heart-pulse" href="/documentation/platform/pam/credential-health/overview">+ Check on a schedule that the credentials stored for your PAM accounts still work.+ </Card>+ <Card title="Discovery" icon="radar" href="/documentation/platform/pam/discovery/overview">+ Find accounts on your systems and import them into PAM.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/product-reference/credential-health/overview.mdx b/docs/documentation/platform/pam/product-reference/credential-health/overview.mdxdeleted file mode 100644index 432e7e80cb..0000000000--- a/docs/documentation/platform/pam/product-reference/credential-health/overview.mdx+++ /dev/null@@ -1,86 +0,0 @@-----title: "PAM credential health"-sidebarTitle: "Credential health"-description: "Check on a schedule that the credentials stored for your PAM accounts still work."------A stored credential can stop working without anyone noticing. Someone changes a password directly on the target, an administrator disables an account, or a service principal's secret expires. Nothing tells Infisical, so the credential sits in the vault looking fine until a session fails or a rotation breaks.--Credential health checks each account on a schedule by signing in to its target with the stored credential, then records what happened. The check is read-only: it proves the credential still authenticates and changes nothing on the target.--## Concepts--Checking is configured on the [account template](/documentation/platform/pam/templates/overview), which sets whether accounts are checked and how often. Every account created from the template inherits those settings. There is no per-account override, so accounts that need a different frequency belong on a different template.--Templates have checking on by default, every 24 hours.--### Statuses--An account's health is always in one of four states:--| Status | Meaning |-| --- | --- |-| **Healthy** | The target accepted the credential on the last check. |-| **Out of Sync** | The target rejected the credential. Sessions and rotation using it will fail. |-| **Unreachable** | The target couldn't be reached, so the credential's state is unknown. |-| **Unchecked** | No check has run yet, or the account is missing the details needed to sign in. |--The account list shows a badge for **Out of Sync** and **Unreachable** only. A healthy account needs no attention, so it carries no badge.--## How it works--Each check signs in the same way a session would, using the account's own authentication method, and then disconnects. For most resources this means a login through the [gateway](/documentation/platform/gateways/overview) that serves the account. Cloud accounts have no host to reach, so their check asks the provider for short-lived credentials instead.--| Account type | What the check does |-| --- | --- |-| PostgreSQL, MySQL, Microsoft SQL Server | Signs in and runs a trivial query |-| Microsoft SQL Server with Windows authentication | Completes an NTLM or Kerberos handshake |-| Oracle | Signs in and runs a trivial query |-| MongoDB | Signs in and pings the server |-| Redis | Sends `AUTH`, then `PING` |-| Windows Active Directory | Binds to the domain controller |-| Windows | Signs in over WinRM |-| Kubernetes | Calls the API server and treats a 401 as a rejected credential |-| SSH with a password or key | Signs in |-| SSH with a certificate | Issues a certificate valid for 60 seconds from the account's certificate authority, then signs in with it |-| AWS IAM, GCP, Azure | Asks the provider for short-lived credentials |--Checks are spread across the interval rather than fired together, so a template with many accounts doesn't sign in to one domain controller all at once. Every check is recorded in the [audit log](/documentation/platform/pam/auditing).--<Note>- Microsoft SQL Server accounts using Windows authentication need a gateway running a version that supports the Windows authentication handshake. An older gateway reports these accounts as **Out of Sync** even when the credential is valid. Update the gateway to get an accurate result.-</Note>--<Note>- Checking an Oracle credential needs a gateway running v0.43.133 or later, and a password of 30 characters or fewer. An Oracle account that doesn't meet both shows as **Unreachable**.-</Note>--## Configuring a template--Template settings are managed by a [Product Admin](/documentation/platform/pam/concepts/access-control#product-membership). Go to **Privileged Access Management → Account Templates**, open a template, and find **Credential Health**.--Turn on **Check credentials** and set **Check every** to 1 hour, 12 hours, 24 hours, 7 days, or 30 days. Turning it off stops scheduled checks for every account on the template. Each account keeps the result of its last check, labelled as having been taken before checking was turned off.--## Viewing an account's health--Open an account and go to the **Configuration** tab. The **Credential health** section shows the current status, when the account was last checked, and when it was last healthy. When a check fails, the reason the target gave appears below.--Select **Check now** to run a check immediately. This requires permission to view the account's credentials, since the check signs in with them.--<Note>- AWS IAM accounts store no credentials of their own, since Infisical assumes their role instead. They have no **Credential health** section and no **Check now** button. They're still checked on schedule, and their status appears as a badge in the account list.-</Note>--## When checking stops--A rejected credential takes the account off the schedule. Retrying a password the target has already refused is how a monitoring feature locks out a privileged account, so Infisical stops after the first rejection and waits for a person.--Checking resumes when you:--- Enter the credential again on the account.-- Select **Check now** and the check succeeds.-- Rotate the account, since [rotation](/documentation/platform/pam/product-reference/credential-rotation/overview) verifies the new password before it commits.--An **Unreachable** account keeps being checked, because an unreachable target says nothing about the credential and retrying costs nothing.--Changing an account's host or gateway also pauses checking if you can't view that account's credentials, so the next check doesn't carry the stored credential to a target you just chose. The account's reason line says so, and entering the credential or running a check resumes it.diff --git a/docs/documentation/platform/pam/product-reference/credential-rotation/mssql.mdx b/docs/documentation/platform/pam/product-reference/credential-rotation/mssql.mdxdeleted file mode 100644index 0e4b6a27e2..0000000000--- a/docs/documentation/platform/pam/product-reference/credential-rotation/mssql.mdx+++ /dev/null@@ -1,41 +0,0 @@-----title: "Microsoft SQL Server credential rotation for PAM"-sidebarTitle: "Microsoft SQL Server"-description: "Rotate Microsoft SQL Server account passwords with Infisical PAM."------This page covers what is specific to rotating a [Microsoft SQL Server account](/documentation/platform/pam/accounts/mssql). For how rotation is configured and scheduled, see the [overview](/documentation/platform/pam/product-reference/credential-rotation/overview).--## How the password is changed--When a Microsoft SQL Server account rotates, the rotation account connects to the target and runs:--```sql-ALTER LOGIN "<target_login>" WITH PASSWORD = '<generated_password>';-```--The connection uses the account's existing connection details, including the SSL settings.--<Warning>- Only **SQL Server authentication** logins can be rotated. Windows-authenticated accounts aren't supported, because their passwords are managed by the domain or the operating system rather than by SQL Server. A rotation on a Windows-authenticated account is rejected before any change is attempted.-</Warning>--## Rotation account requirements--- **Self-rotation**: a login can change its own password, so no extra privileges are needed.-- **Delegated rotation**: the rotation account needs the `ALTER ANY LOGIN` permission to change another login's password.--An example setup for a dedicated delegated rotation login:--```sql--- the login Infisical connects as to perform rotations-CREATE LOGIN infisical_rotator WITH PASSWORD = 'temporary_password';-GRANT ALTER ANY LOGIN TO infisical_rotator;---- the account whose password gets rotated-CREATE LOGIN app_login WITH PASSWORD = 'temporary_password';-```--<Note>- The target account's connection must use SQL Server authentication so that the rotated password is the credential used to log in.-</Note>diff --git a/docs/documentation/platform/pam/product-reference/credential-rotation/mysql.mdx b/docs/documentation/platform/pam/product-reference/credential-rotation/mysql.mdxdeleted file mode 100644index eda809bef2..0000000000--- a/docs/documentation/platform/pam/product-reference/credential-rotation/mysql.mdx+++ /dev/null@@ -1,46 +0,0 @@-----title: "MySQL credential rotation for PAM"-sidebarTitle: "MySQL"-description: "Rotate MySQL account passwords with Infisical PAM."------This page covers what is specific to rotating a [MySQL account](/documentation/platform/pam/accounts/mysql). For how rotation is configured and scheduled, see the [overview](/documentation/platform/pam/product-reference/credential-rotation/overview).--## How the password is changed--When a MySQL account rotates, the rotation account connects to the target database and runs:--```sql-ALTER USER "<target_user>"@'%' IDENTIFIED BY '<generated_password>';-```--The statement targets the user at the `'%'` (any-host) grant, so the target user must be defined for that host. The connection uses the account's existing connection details, including the SSL settings.--## Rotation account requirements--- **Self-rotation**: a user can change its own password, so no extra privileges are needed.-- **Delegated rotation**: the rotation account needs the global `CREATE USER` privilege (or `UPDATE` on the `mysql` system database) to alter another user's password.--An example setup for a dedicated delegated rotation user:--```sql--- the user Infisical connects as to perform rotations-CREATE USER 'infisical_rotator'@'%' IDENTIFIED BY 'temporary_password';-GRANT CREATE USER ON *.* TO 'infisical_rotator'@'%';---- the account whose password gets rotated-CREATE USER 'app_user'@'%' IDENTIFIED BY 'temporary_password';-```--## Special cases--<Warning>- If the target is hosted on **PlanetScale**, set the account username to the PlanetScale format `username.branch_id`. Infisical connects with that full username but targets the base `username` in the password-change statement, as PlanetScale requires.-- To find your branch ID, use the [PlanetScale CLI](https://planetscale.com/docs/reference/planetscale-cli):-- ```bash- pscale org switch <org-name>- pscale branch show <database> <branch-name> --format json- ```-</Warning>diff --git a/docs/documentation/platform/pam/product-reference/credential-rotation/oracledb.mdx b/docs/documentation/platform/pam/product-reference/credential-rotation/oracledb.mdxdeleted file mode 100644index 4c25613298..0000000000--- a/docs/documentation/platform/pam/product-reference/credential-rotation/oracledb.mdx+++ /dev/null@@ -1,64 +0,0 @@-----title: "Oracle credential rotation for PAM"-sidebarTitle: "Oracle"-description: "Rotate Oracle account passwords with Infisical PAM."------This page covers what is specific to rotating an [Oracle account](/documentation/platform/pam/accounts/oracledb). For how rotation is configured and scheduled, see the [overview](/documentation/platform/pam/product-reference/credential-rotation/overview).--<Note>- Rotating an Oracle account needs a [Gateway](/documentation/platform/gateways/overview) running v0.43.133 or later. Rotation fails on an older Gateway.-</Note>--## How the password is changed--When an Oracle account rotates, the rotation account connects to the target and runs:--```sql-ALTER USER "<target_username>" IDENTIFIED BY "<generated_password>";-```--An account that rotates its own password restates the old one, which Oracle requires when a password policy is in force:--```sql-ALTER USER "<target_username>" IDENTIFIED BY "<generated_password>" REPLACE "<current_password>";-```--The connection uses the account's existing connection details, including the SSL settings.--The statement matches the stored username exactly, so an account whose username doesn't match the case Oracle stored fails to rotate even though its sessions launch fine. Oracle names two different reasons for the same mistake, depending on who is rotating:--- **Self-rotation** returns `ORA-01031: insufficient privileges`, because changing a user other than the one signed in needs the `ALTER USER` privilege, and the name that doesn't exist counts as another user.-- **Delegated rotation** returns `ORA-01918: user does not exist`, because the rotation account holds `ALTER USER` and gets past the privilege check.--Either way the fix is the same: correct the account's username to the case Oracle stored, which is uppercase unless the user was created with a quoted name.--## Rotation account requirements--- **Self-rotation**: an Oracle user can change its own password, so no extra privileges are needed beyond `CREATE SESSION`.-- **Delegated rotation**: the rotation account needs the `ALTER USER` system privilege to change another user's password. Without it Oracle returns `ORA-01031: insufficient privileges`.--An example setup for a dedicated delegated rotation user:--```sql--- the user Infisical connects as to perform rotations-CREATE USER infisical_rotator IDENTIFIED BY "temporary_password";-GRANT CREATE SESSION TO infisical_rotator;-GRANT ALTER USER TO infisical_rotator;---- the account whose password gets rotated-CREATE USER app_user IDENTIFIED BY "temporary_password";-GRANT CREATE SESSION TO app_user;-```--<Note>- A delegated rotation account has to use the same service name as its target, not just the same host and port. Oracle scopes a user to a single database, so a rotation account pointed at a different service can't see the target user.-</Note>--## Password length--An Oracle template won't accept a password length above 30 characters, and rotation never generates a longer one.--The limit is the Gateway's Oracle client, not Oracle. Oracle accepts a longer password and other clients sign in with it, but the Gateway can't, so a rotation that generated one would leave an account Infisical could no longer reach, check, or rotate back. Treat 30 as a hard ceiling rather than a conservative default.--The same limit applies to the rotation account itself. If its own password is longer than 30 characters it can't sign in to perform the rotation, so shorten it first.diff --git a/docs/documentation/platform/pam/product-reference/credential-rotation/overview.mdx b/docs/documentation/platform/pam/product-reference/credential-rotation/overview.mdxdeleted file mode 100644index b22beeb2da..0000000000--- a/docs/documentation/platform/pam/product-reference/credential-rotation/overview.mdx+++ /dev/null@@ -1,94 +0,0 @@-----title: "PAM credential rotation"-sidebarTitle: "Overview"-description: "Automatically rotate the passwords of your PAM accounts on a fixed schedule."------Credential Rotation automatically changes the password of a PAM account on a fixed schedule. Rotating regularly limits how long a leaked or shared password stays valid, so a credential that is exposed is only useful for a short window.--## Concepts--Rotation is configured in two places that work together:--- **[Account template](/documentation/platform/pam/templates/overview)**: defines *whether* accounts rotate, *how often*, and the *format* of the generated password. Every account created from the template inherits these settings.-- **[Account](/documentation/platform/pam/accounts/overview)**: defines *which privileged account* performs the rotation (the **rotation account**).--An account rotates only once both parts are in place: its template has rotation enabled and the account has a rotation account set.--Accounts that authenticate without a stored password have nothing to rotate and can't be given a rotation account. This covers PostgreSQL accounts using [AWS IAM authentication](/documentation/platform/pam/accounts/postgresql#aws-iam-authentication) and Microsoft SQL Server accounts using Windows authentication.--### Rotation account--The rotation account is the account whose credentials are used to connect to the target and change the password. You have three options:--- **This account (self-rotation)**: the account rotates its own password. Use this when the account already has permission to change its own credentials.-- **A different account (delegated)**: a more privileged account on the same resource performs the rotation. Use this when the target account can't change its own password, or when you prefer a single administrative account to manage rotation.-- **None**: no rotation account is set. The account won't rotate until one is chosen, even if its template has rotation enabled.--<Note>- A delegated rotation account must connect to the **same resource** as the account being rotated, because the password change runs over the rotation account's own connection. For databases this means the same host and port; for Windows AD it means the same domain. The two accounts can still be different users (for example, a privileged administrator rotating a less privileged account).-</Note>--## How it works--When a rotation runs, Infisical:--1. Generates a new password that satisfies the template's password format.-2. Connects to the target resource using the rotation account and applies the new password.-3. Verifies the new password by opening a fresh connection with it.-4. Promotes the new password to the live credential once verification succeeds. If any step fails, the existing credential is left untouched and the account's rotation status records the error.--## Configuring a template--Template-level rotation settings are managed by a [Product Admin](/documentation/platform/pam/concepts/access-control#product-membership). Go to **Privileged Access Management → Account Templates** and open the template used by the accounts you want to rotate. In the **Credential settings** section:--<Steps>- <Step title="Enable rotation">- Turn on **Automatically rotate credentials** and set the **frequency**: every 1 hour, 12 hours, 24 hours, 7 days, or 30 days. This frequency applies to all accounts created from the template.-- Leave rotation off to make the template **on-demand only**. Accounts still rotate when triggered manually, but never on a schedule.- </Step>- <Step title="Set the password format">- Choose the length and the character classes (uppercase, lowercase, digits, symbols) for generated passwords. Pick a format that satisfies the target system's password policy.-- The allowed symbols cannot include `'`, `"`, `` ` ``, `\`, `;`, or `?`, because those characters would break the password-change statement run against the target.- </Step>-</Steps>--<Note>- Changing a template's rotation settings updates the rotation schedule for every account created from it. Accounts that don't yet have a rotation account remain unscheduled until one is set.-</Note>--## Configuring an account--Setting an account's rotation account and running manual rotations require an [Admin](/documentation/platform/pam/concepts/access-control#folder-and-account-memberships) role on the account's folder or on the account itself. Open an account that belongs to a rotation-enabled template and go to the **Rotation** tab.--The tab shows the frequency and password format inherited from the template. To finish setup, choose a **rotation account** from the list of eligible accounts on the same resource. To have the account rotate its own password, select the account itself from that list (shown as **this account**). Leaving the rotation account as **None** means rotation stays unconfigured and the account won't rotate.--To rotate immediately without waiting for the next scheduled run, select **Rotate now**. This counts as a rotation, so the schedule resets and the next automatic rotation happens one full interval later.--<Note>- If an account shows that it won't rotate until it's configured, set a rotation account (or configure the account's own credentials for self-rotation) to make it ready.-</Note>--## Supported resources--Each resource type applies the password change differently and has its own requirements for the rotation account. See the resource-specific page for the exact statement, the privileges the rotation account needs, and any special cases.--<CardGroup cols={2}>- <Card title="PostgreSQL" icon="database" href="/documentation/platform/pam/product-reference/credential-rotation/postgresql">- Rotates a role's password with `ALTER USER`.- </Card>- <Card title="MySQL" icon="database" href="/documentation/platform/pam/product-reference/credential-rotation/mysql">- Rotates a user's password with `ALTER USER`, including PlanetScale.- </Card>- <Card title="Microsoft SQL Server" icon="database" href="/documentation/platform/pam/product-reference/credential-rotation/mssql">- Rotates a SQL Server login's password with `ALTER LOGIN`.- </Card>- <Card title="Oracle" icon="database" href="/documentation/platform/pam/product-reference/credential-rotation/oracledb">- Rotates an Oracle user's password with `ALTER USER`.- </Card>- <Card title="Windows" icon="windows" iconType="brands" href="/documentation/platform/pam/product-reference/credential-rotation/windows">- Rotates local Windows and Active Directory account passwords over WinRM.- </Card>-</CardGroup>diff --git a/docs/documentation/platform/pam/product-reference/credential-rotation/postgresql.mdx b/docs/documentation/platform/pam/product-reference/credential-rotation/postgresql.mdxdeleted file mode 100644index 73cafa02c9..0000000000--- a/docs/documentation/platform/pam/product-reference/credential-rotation/postgresql.mdx+++ /dev/null@@ -1,42 +0,0 @@-----title: "PostgreSQL credential rotation for PAM"-sidebarTitle: "PostgreSQL"-description: "Rotate PostgreSQL account passwords with Infisical PAM."------This page covers what is specific to rotating a [PostgreSQL account](/documentation/platform/pam/accounts/postgresql). For how rotation is configured and scheduled, see the [overview](/documentation/platform/pam/product-reference/credential-rotation/overview).--## How the password is changed--When a PostgreSQL account rotates, the rotation account connects to the target database and runs:--```sql-ALTER USER "<target_role>" WITH PASSWORD '<generated_password>';-```--The connection uses the account's existing connection details, including the SSL settings, so no extra configuration is needed for TLS-enabled databases.--## Rotation account requirements--The rotation account is the role that runs the statement above, so it must be allowed to set the target role's password.--- **Self-rotation**: a role can always change its own password, so no extra privileges are needed.-- **Delegated rotation**: the rotation account must be able to alter the target role. Grant it `CREATEROLE`, or use a superuser.--An example setup for a dedicated delegated rotation role:--```sql--- the role Infisical connects as to perform rotations-CREATE ROLE infisical_rotator WITH LOGIN PASSWORD 'temporary_password' CREATEROLE;---- the account whose password gets rotated-CREATE ROLE app_user WITH LOGIN PASSWORD 'temporary_password';-```--<Tip>- On PostgreSQL 16 and later, a `CREATEROLE` role can only alter roles it has `ADMIN OPTION` on. Grant it with `GRANT app_user TO infisical_rotator WITH ADMIN OPTION;`, or use a superuser as the rotation account.-</Tip>--<Note>- Create the rotation account and the target account in Infisical PAM as separate PostgreSQL accounts on the same resource, then select the rotation account on the target account's **Rotation** tab.-</Note>diff --git a/docs/documentation/platform/pam/product-reference/credential-rotation/windows.mdx b/docs/documentation/platform/pam/product-reference/credential-rotation/windows.mdxdeleted file mode 100644index 916cafc409..0000000000--- a/docs/documentation/platform/pam/product-reference/credential-rotation/windows.mdx+++ /dev/null@@ -1,61 +0,0 @@-----title: "Windows credential rotation for PAM"-sidebarTitle: "Windows"-description: "Rotate local Windows and Active Directory account passwords with Infisical PAM."------This page covers what is specific to rotating a [Windows account](/documentation/platform/pam/accounts/windows) (local) or a [Windows AD account](/documentation/platform/pam/accounts/windows-ad) (domain). For how rotation is configured and scheduled, see the [overview](/documentation/platform/pam/product-reference/credential-rotation/overview).--Windows rotation runs over **WinRM**, tunneled through an Infisical [Gateway](/documentation/platform/gateways/overview). The account's WinRM settings (port, HTTPS, and CA certificate) come from its connection details.--## How the password is changed--<Tabs>- <Tab title="Windows (local)">- The rotation account connects to the account's **host** over WinRM and resets the local user's password:-- ```powershell- Set-LocalUser -Name '<target_user>' -Password (ConvertTo-SecureString '<generated_password>' -AsPlainText -Force)- ```- </Tab>- <Tab title="Windows AD (domain)">- The rotation account connects to the **domain controller** (the account's DC address) over WinRM and resets the domain account's password:-- ```powershell- Import-Module ActiveDirectory- Set-ADAccountPassword -Identity '<target_user>' -Reset -NewPassword (ConvertTo-SecureString '<generated_password>' -AsPlainText -Force)- ```- </Tab>-</Tabs>--## Rotation account requirements--<Tabs>- <Tab title="Windows (local)">- - **Self-rotation**: the account changes its own password. This requires the account to be able to sign in over WinRM and to hold the rights to change its own credential. Many local accounts can't, so delegated rotation is the common choice.- - **Delegated rotation**: a **local administrator on the same host** performs the change. This is the recommended setup for local accounts, because the administrator can both reset the password and verify it on the box.-- A delegated rotation account must connect to the **same host** as the account it rotates.- </Tab>- <Tab title="Windows AD (domain)">- Domain accounts use **delegated rotation**: a separate domain account with permission to reset the target account's password (for example, an account with delegated control over the target's OU, or a suitable administrative account).-- The rotation account must be a **different directory identity** than the account it rotates. An account cannot reset its own domain password this way, and Infisical rejects a rotation account that resolves to the same directory object as the target.-- A delegated rotation account must belong to the **same domain** as the account it rotates, since the reset runs against that domain's controller.- </Tab>-</Tabs>--## Prerequisites--- A [Gateway](/documentation/platform/gateways/overview) (or Gateway pool) with network access to the target host (local accounts) or the domain controller (domain accounts).-- **WinRM enabled** and reachable on the host or domain controller the rotation connects to.-- A rotation account configured on the account, as described above.--<Note>- For an untrusted Gateway-to-host network segment, enable **WinRM over HTTPS** on the account so the connection is protected by TLS. Over plain HTTP, WinRM relies on NTLM message sealing.-</Note>--## Dependencies--Rotating a Windows account also updates the services, scheduled tasks, and IIS application pools that run as that account, so they keep working with the new password. See [Account Dependencies](/documentation/platform/pam/dependencies/overview) for how dependencies are detected and synced.diff --git a/docs/documentation/platform/pam/quick-starts/launch-first-session.mdx b/docs/documentation/platform/pam/quick-starts/launch-first-session.mdxindex 69280e9e50..4b8de7c1a7 100644--- a/docs/documentation/platform/pam/quick-starts/launch-first-session.mdx+++ b/docs/documentation/platform/pam/quick-starts/launch-first-session.mdx@@ -1,58 +1,112 @@---title: "Launch your first PAM session"-sidebarTitle: "Launch first session"-description: "Connect to a PostgreSQL database in under 10 minutes."+sidebarTitle: "Quickstart"+description: "Connect to a PostgreSQL database through Infisical PAM."----This quickstart walks you through connecting to a PostgreSQL database via PAM. You'll create a [folder](/documentation/platform/pam/folders/overview), add a database [account](/documentation/platform/pam/accounts/overview), and launch a session.--<Note>-**Gateway required** — PAM connects to your databases and servers through a Gateway. If you haven't deployed one yet, [deploy a Gateway](/documentation/platform/gateways/gateway-deployment) first.-</Note>+In this quickstart, you add a PostgreSQL database to Infisical PAM, connect to it from your browser, review the recording of what you did, and give your team access to the database. Neither you nor your team ever sees the database password.## Prerequisites-- Admin access to PAM-- A deployed [Gateway](/documentation/platform/gateways/gateway-deployment) that can reach your database-- Database credentials (username and password)+- The **Product Admin** [role](/documentation/platform/pam/concepts/access-control) in PAM+- A [Gateway](/documentation/platform/gateways/gateway-deployment) that can reach your PostgreSQL database+- The host, port, and database name of the PostgreSQL database, and a username and password for it++## Step 1: Create a folder++A [folder](/documentation/platform/pam/folders/overview) groups the accounts that the same people need to reach.++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Accounts**, select the arrow next to **Add Account**, and select **Add Folder**.+ </Step>+ <Step>+ Enter a name for the folder, such as `platform-team`, and select **Add Folder**.+ </Step>+</Steps>++Infisical gives you the **Admin** role on the folder, so you can add accounts to it.++## Step 2: Add the database++An [account](/documentation/platform/pam/accounts/overview) stores the connection details and credentials for one database or server.++<Steps>+ <Step>+ Select **Add Account**.+ </Step>+ <Step>+ Select the folder you created, select the `postgres` [template](/documentation/platform/pam/templates/overview), and select **Next**.+ </Step>+ <Step>+ Enter a name for the account, such as `orders-db`.+ </Step>+ <Step>+ Select the **Gateway** that can reach the database, and enter the database's host, port, and database name.+ </Step>+ <Step>+ Enter the username and password, and select **Create**.+ </Step>+</Steps>-## Steps+## Step 3: Connect to the database<Steps>- <Step title="Create a Folder">- Group accounts by who needs access to them — that's what folders are for.+ <Step>+ On the **Accounts** page, select the rocket icon on the account's row.+ </Step>+ <Step>+ Select **Browser**, then select **Connect in Browser**.+ </Step>+</Steps>++The database opens in a new browser tab, where you can browse its tables and run SQL queries. Infisical connects as the account's user, so you don't enter a password.- 1. Go to **Privileged Access Management → Accounts**- 2. Click the arrow next to **Add Account** and select **Add Folder**- 3. Name it based on who needs access (e.g., `platform-team`, `checkout-service`)- 4. Click **Add Folder**+Run a query or two, then close the tab to end the session.++## Step 4: Review the session++<Steps>+ <Step>+ Go to **Privileged Access Management** > **Sessions** and select your session.</Step>- <Step title="Add a Database Account">- 1. Select **Add Account**- 2. Select the folder you just created- 3. Select the `postgres` [template](/documentation/platform/pam/templates/overview)- 4. Fill in your database connection details (host, port, credentials)- 5. Select **Create**+ <Step>+ On the **Session Logs** tab, review the queries you ran and the database's responses.</Step>- <Step title="Launch a Session">- 1. Go to **Privileged Access Management → Accounts**- 2. Find the account you created and select the rocket icon (or select **Launch Session** from the menu)- 3. Select **Connect in Browser**+</Steps>++## Step 5: Give your team access- You'll see the Data Explorer (browse tables) and SQL Editor (run queries).+Give your team a role on the folder, so they can connect to the database the same way you did.++<Note>+ Your team members, or a group they belong to, must already be [product members](/documentation/platform/pam/concepts/access-control#product-membership) of PAM.+</Note>++<Steps>+ <Step>+ On the **Accounts** page, open the folder's options menu, select **Configure**, and open the **Permissions** tab.+ </Step>+ <Step>+ Select **Assign Access**.+ </Step>+ <Step>+ Select your team's group, or a team member, as the **Assignee**, and select **Connector** as the **Role**.+ </Step>+ <Step>+ Select **Assign**.</Step></Steps>+The Connector role lets your team launch sessions on every account in the folder, including accounts you add later. To let someone add accounts and manage access to the folder, give them the **Admin** role instead.+## Next steps<CardGroup cols={2}>- <Card title="Core Concepts" icon="book" href="/documentation/platform/pam/concepts/pam-components">- Understand how folders, templates, and accounts work together.- </Card>- <Card title="Team Access Guide" icon="users" href="/documentation/platform/pam/guides/team-access">- Grant your team access to production databases.+ <Card title="Concepts" icon="book-open" href="/documentation/platform/pam/concepts/overview">+ Learn how Infisical PAM controls access to your infrastructure.</Card>- <Card title="AI Agents" icon="bot" href="/documentation/platform/pam/ai-agents/overview">- Point an AI agent at the same account, sandboxed and recorded.+ <Card title="Access requests" icon="hand" href="/documentation/platform/pam/access-requests/overview">+ Require approval before a member can use a sensitive account.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/sessions/external-storage.mdx b/docs/documentation/platform/pam/sessions/external-storage.mdxindex 1343b961dd..3a1f5b742d 100644--- a/docs/documentation/platform/pam/sessions/external-storage.mdx+++ b/docs/documentation/platform/pam/sessions/external-storage.mdx@@ -1,16 +1,18 @@---title: "Store PAM session recordings externally"sidebarTitle: "External storage"-description: "Store session recordings in your own S3-compatible bucket."+description: "Store session recordings in an S3-compatible bucket that you own."----By default, [session recordings](/documentation/platform/pam/sessions/session-recording) are stored in Infisical's managed database. If you need control over where recordings live — for data residency, retention policies, or compliance requirements — you can store them in your own S3-compatible bucket instead.+By default, Infisical stores [session recordings](/documentation/platform/pam/sessions/session-recording) in its own database. If you need to control where recordings are kept and for how long, such as for data residency or compliance, store them in your own S3-compatible bucket instead.++Windows and Windows AD accounts require a bucket. Until their [template](/documentation/platform/pam/templates/overview) uses one, you can create these accounts but can't launch sessions on them.## Supported providers| Provider | Endpoint | Access key ||----------|----------|------------|-| AWS S3 | `https://s3.<region>.amazonaws.com` | An IAM user with the [required permissions](#required-permissions) |+| AWS S3 | `https://s3.<region>.amazonaws.com` | An IAM user with the [required permissions](#bucket-permissions) || Cloudflare R2 | `https://<account-id>.r2.cloudflarestorage.com` | An R2 API token with **Object Read & Write** on the bucket || Google Cloud Storage | `https://storage.googleapis.com` | An HMAC key for a service account with **Storage Object User** on the bucket || OCI Object Storage | `https://<namespace>.compat.objectstorage.<region>.oraclecloud.com` | A customer secret key for a user who can `inspect buckets` and `manage objects` |@@ -19,13 +21,29 @@ If you self-host Infisical, you can also store recordings on your own S3-compati## Prerequisites-Before configuring external storage, you need an [AWS Connection](/integrations/app-connections/aws) or an S3-Compatible Storage connection in your organization. This provides the credentials Infisical uses to write to your bucket.+- A bucket from one of the [supported providers](#supported-providers)+- The **Product Admin** [role](/documentation/platform/pam/concepts/access-control) in PAM, to edit templates++## Step 1: Prepare the bucket++### Connection-To create an S3-Compatible Storage connection, go to **Integrations** > **App Connections**, select **Add Connection**, and select **S3-Compatible Storage**. Use the endpoint and access key for your provider from [Supported providers](#supported-providers).+Infisical writes to the bucket with the credentials of an app connection in your organization. For AWS S3, you can use an [AWS connection](/integrations/app-connections/aws) whose credentials have the [permissions on the bucket](#bucket-permissions).++For any supported provider, including AWS S3, you can create an S3-Compatible Storage connection instead:++<Steps>+ <Step>+ Go to **Integrations** > **App Connections**, select **Add Connection**, and select **S3-Compatible Storage**.+ </Step>+ <Step>+ Enter the endpoint and access key for your provider from [Supported providers](#supported-providers).+ </Step>+</Steps>-### Required permissions+### Bucket permissions-For AWS S3, the connection's IAM role or user needs these permissions on the bucket:+For AWS S3, give the connection's credentials these permissions, replacing `<bucket-name>` with the name of your bucket:```json{@@ -33,50 +51,23 @@ For AWS S3, the connection's IAM role or user needs these permissions on the buc"Statement": [{"Effect": "Allow",- "Action": ["s3:PutObject", "s3:GetObject"],- "Resource": "arn:aws:s3:::your-bucket-name/*"+ "Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject"],+ "Resource": "arn:aws:s3:::<bucket-name>/*"},{"Effect": "Allow","Action": "s3:ListBucket",- "Resource": "arn:aws:s3:::your-bucket-name"+ "Resource": "arn:aws:s3:::<bucket-name>"}]}```-## Configuring a template for external storage--External storage is set at the [template](/documentation/platform/pam/templates/overview) level. Each template can use a different bucket if needed.--<Steps>- <Step>- Go to **Account Templates** and select the template you want to configure.- </Step>- <Step>- Find the **Session Recording** section on the **General** tab.- </Step>- <Step>- Set **Storage backend** to **S3 Bucket**.- </Step>- <Step>- Configure the bucket:-- | Field | Description |- |-------|-------------|- | **Connection** | Select your AWS or S3-Compatible Storage connection |- | **Bucket Name** | Your S3 bucket |- | **Region** | AWS region (only for an AWS connection) |- | **Key Prefix** | Optional prefix for object keys (e.g., `pam/prod/`) |- </Step>- <Step>- Select **Save**. Infisical validates that it can reach the bucket before saving.- </Step>-</Steps>+When you save a template, Infisical writes a test object to the bucket and then deletes it, to check that it can store recordings there.-## CORS configuration+### CORS policy-For session playback to work in the browser, your bucket needs a CORS policy:+Your browser downloads recordings directly from the bucket when you view a session, so the bucket needs a CORS policy that allows requests from Infisical:```json[@@ -89,44 +80,63 @@ For session playback to work in the browser, your bucket needs a CORS policy:]```-Replace `https://app.infisical.com` with your Infisical URL if you have a custom domain.+If you use a different Infisical URL, such as `https://eu.infisical.com` or your own domain, replace `https://app.infisical.com` with that URL.-To configure it on AWS S3:-1. Open the bucket in AWS Console-2. Go to **Permissions → Cross-origin resource sharing (CORS)**-3. Add the configuration above+Where you add the policy depends on the provider:-Cloudflare R2 takes the same configuration under the bucket's **Settings** > **CORS Policy**. For Google Cloud Storage, [configure CORS](https://cloud.google.com/storage/docs/using-cors) with the same origin and the `GET` method. OCI Object Storage allows requests from any origin, so it needs no CORS configuration.+- **AWS S3:** Open the bucket in the AWS console, go to **Permissions** > **Cross-origin resource sharing (CORS)**, select **Edit**, and paste the policy+- **Cloudflare R2:** Paste the same policy under the bucket's **Settings** > **CORS Policy**+- **Google Cloud Storage:** [Configure CORS](https://cloud.google.com/storage/docs/using-cors) with the same origin and the `GET` method+- **OCI Object Storage:** No policy needed, because OCI allows requests from any origin-If CORS isn't set up correctly, session playback will fail with a network error.+## Step 2: Configure the template-## How recordings are stored+Each template sets the storage for every account that uses it, so you can use different buckets for different templates.-Recordings are stored as encrypted chunks:+<Steps>+ <Step>+ Go to **Privileged Access Management** > **Account Templates** and select the template.+ </Step>+ <Step>+ On the **General** tab, under **Session Recording**, set **Storage backend** to **S3 Bucket**.+ </Step>+ <Step>+ Fill in the bucket details:-```-<key-prefix>/sessions/<session-id>/chunk-0.enc-<key-prefix>/sessions/<session-id>/chunk-1.enc-...-```+ - **Connection**: The AWS or S3-Compatible Storage connection with access to the bucket+ - **S3 Bucket**: The name of the bucket+ - **Region**: The bucket's AWS region, such as `us-east-1` (only for an AWS connection)+ - **Key prefix (optional)**: A folder in the bucket to store recordings in, such as `pam-recordings/`+ </Step>+ <Step>+ Select **Save Changes**.+ </Step>+</Steps>++If Infisical can't reach the bucket, the template isn't saved and the error message says which permission is missing. If the bucket has no CORS policy that allows your Infisical URL, Infisical saves the template and shows a **Bucket CORS not configured** warning.++<Warning>+ If you change the template's bucket, you can't view the recordings in the old bucket until you copy their objects to the new bucket. Keep each object's key the same when you copy it, since Infisical looks for each recording at the key it was saved under.-Infisical encrypts recordings before upload, so the data in your bucket is encrypted. You can add bucket-level encryption (SSE-S3 or SSE-KMS) for additional protection.+ If you only change the key prefix, the recordings that were already stored keep working. Don't move them to the new prefix, or Infisical won't be able to find them.+</Warning>++### Use a different bucket for one account++To store a Windows or Windows AD account's recordings in a different bucket from its template, [open the account's settings](/documentation/platform/pam/accounts/manage#open-an-accounts-settings), go to the **Advanced** tab, and select **Override** under **Recording Settings**.++The override only changes the bucket details, so the template's **Storage backend** must still be **S3 Bucket**. Other account types always use their template's storage.## Managing retention-Since recordings are in your bucket, you control retention. Configure lifecycle rules on the bucket to automatically delete or transition objects after a certain period.+Infisical never deletes recordings from your bucket, so you decide how long to keep them. To delete or archive recordings after a set time, add a lifecycle rule to the bucket, such as an [S3 lifecycle rule](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).-<Tip>-This gives you full control over how long recordings are kept — essential for compliance requirements.-</Tip>+Infisical stores each session's recording under its own path in the bucket:++```text+<key-prefix>/<project-id>/<session-id>/+```-## Next steps+Once a lifecycle rule deletes a session's objects, you can't view that session's recording in Infisical.-<CardGroup cols={2}>- <Card title="Session Recording" icon="video" href="/documentation/platform/pam/sessions/session-recording">- Learn more about how recording works.- </Card>- <Card title="Auditing" icon="clipboard-list" href="/documentation/platform/pam/auditing">- View the audit trail for all PAM activity.- </Card>-</CardGroup>+The objects in the bucket are already encrypted when they arrive, because the [Gateway](/documentation/platform/gateways/overview) encrypts each part of the recording before it uploads it. You can also turn on server-side encryption on the bucket.diff --git a/docs/documentation/platform/pam/sessions/overview.mdx b/docs/documentation/platform/pam/sessions/overview.mdxindex 650e8a88be..2a94181561 100644--- a/docs/documentation/platform/pam/sessions/overview.mdx+++ b/docs/documentation/platform/pam/sessions/overview.mdx@@ -1,72 +1,54 @@---title: "PAM sessions"-sidebarTitle: "Overview"-description: "View and manage active and past sessions."+sidebarTitle: "Sessions"+description: "Review and end the connections that people and agents make to your accounts."----Every time a person or an [AI agent](/documentation/platform/pam/ai-agents/overview) connects to an [account](/documentation/platform/pam/accounts/overview) through PAM, a session is created. The **Sessions** page shows all sessions, active and completed, so you can monitor what's connected and review what happened.+Each time a person or an [AI agent](/documentation/platform/pam/ai-agents/overview) connects to an [account](/documentation/platform/pam/accounts/overview), Infisical creates a session. The session records who connected, when, for how long, and what they did. To learn how a session starts and ends, see [Concepts](/documentation/platform/pam/concepts/overview).-## Viewing sessions+## Who can see sessions-Go to **Privileged Access Management → Sessions** to see the session list.+To see an account's sessions, you need the **Admin** or **Auditor** [role](/documentation/platform/pam/concepts/access-control) on the account or on its [folder](/documentation/platform/pam/folders/overview). The **Connector** and **Operator** roles let you launch sessions, but they don't let you see sessions on the **Sessions** page.-| Column | What it shows |-|--------|---------------|-| **Account** | Which account was accessed |-| **Folder** | Which folder it belongs to |-| **User** | Who connected: a user, or a machine identity shown by name |-| **Status** | Active, Ended, or Terminated |-| **Started** | When the session began |-| **Duration** | How long it lasted (or has been active) |+## View sessions-Select any session to see its details and recording. A [machine identity](/documentation/platform/identities/machine-identities) has no email address, so its sessions show **Machine Identity** wherever a person's email would appear.+Go to **Privileged Access Management** > **Sessions**. The list shows each session's user, account, folder, start time, duration, and status.-### Filtering+To find a session:-Use the filters to find specific sessions:-- **Status** — Active, Ended-- **Account** or **Folder** — Narrow to specific resources-- **User** — Sessions by a specific person or machine identity-- **Date range** — Sessions within a time period+- Search by account name, folder name, or the user's name or email+- Filter by status to show only **Active** or **Ended** sessions-The search bar finds sessions by account name, folder name, or the actor's name or email.+If a [machine identity](/documentation/platform/identities/machine-identities) opened the session, the list shows **Machine Identity** in place of an email address.-## Active sessions+### Session details-Active sessions show a **Live** indicator. While a session is active:-- Logs update in real-time-- You can monitor what's happening-- You can terminate the session if needed+Select a session to open its details:-## Session details+- The user's email and IP address, the folder, and the session's start time, end time, and duration+- The reason the user gave, if the account's [template](/documentation/platform/pam/templates/overview) requires one+- The [session recording](/documentation/platform/pam/sessions/session-recording) of what happened during the session-Select a session to see:-- **Session info** — who, what, when, duration, IP address-- **Session logs** — commands (SSH) or queries (PostgreSQL) executed-- **Recording playback** — review everything that happened+While a session is active, its recording updates as the user works, so you can follow what they do.-## Terminating sessions+## Terminate a session-If something shouldn't be connected (a security incident, a policy violation, someone stuck, or an [agent](/documentation/platform/pam/ai-agents/overview) doing more than you expected), you can terminate the session.+To end a session right away, such as during a security incident or when an agent does more than you expected, terminate it. You need the **Admin** role on the account or its folder.-1. Find the active session-2. Select it to open details-3. Select **Terminate**-4. Confirm+<Steps>+ <Step>+ Go to **Privileged Access Management** > **Sessions**.+ </Step>+ <Step>+ On the row of the active session, select **Terminate**.+ </Step>+ <Step>+ Type `terminate` to confirm, then select **Terminate**.+ </Step>+</Steps>++Infisical disconnects the user or agent right away.<Warning>-Whoever is connected is disconnected immediately, person or machine. Use this for emergencies; normal sessions should end naturally.+ Terminating a session doesn't stop the user from launching a new one. To stop someone from connecting again, remove their [membership](/documentation/platform/pam/concepts/access-control) on the account or folder.</Warning>--## Next steps--To understand how session recordings work and where they're stored:--<CardGroup cols={2}>- <Card title="Session Recording" icon="video" href="/documentation/platform/pam/sessions/session-recording">- How sessions are recorded.- </Card>- <Card title="External Storage" icon="cloud" href="/documentation/platform/pam/sessions/external-storage">- Store recordings in your own S3 bucket.- </Card>-</CardGroup>diff --git a/docs/documentation/platform/pam/sessions/session-recording.mdx b/docs/documentation/platform/pam/sessions/session-recording.mdxindex be726f8e8d..e030961d56 100644--- a/docs/documentation/platform/pam/sessions/session-recording.mdx+++ b/docs/documentation/platform/pam/sessions/session-recording.mdx@@ -1,55 +1,57 @@---title: "PAM session recording"sidebarTitle: "Session recording"-description: "How PAM captures and stores session activity."+description: "Review what happened during each session on your accounts."----PAM captures everything that happens during a session — every query, command, and response. This gives you a complete record for compliance audits and incident investigation.+Infisical records what happens in each [session](/documentation/platform/pam/sessions/overview), whether the user connected in the browser or through the CLI. Use recordings to investigate incidents and to show auditors what was done on an account.++The [Gateway](/documentation/platform/gateways/overview) records the session as the traffic passes through it, encrypts the recording, and uploads it while the session runs. To learn more, see [Architecture](/documentation/platform/pam/architecture#recording).## What gets recorded-The content depends on the account type:+What a recording contains depends on the [account type](/documentation/platform/pam/accounts/overview):++| Account type | What the recording contains |+| --- | --- |+| PostgreSQL, MySQL, Microsoft SQL Server, Oracle, MongoDB, Redis, Snowflake, ClickHouse | Each query or command, and the database's response |+| SSH | Terminal input and output, commands run without a shell, and SFTP file operations |+| Kubernetes, GCP service account, Azure CLI | Each HTTP request to the provider's API, and its response |+| Windows, Windows AD | A replay of the remote desktop |+| AWS IAM | Nothing, because connections don't go through the Gateway (use [AWS CloudTrail](/documentation/platform/pam/accounts/aws-iam#track-activity-in-aws) instead) |-**PostgreSQL sessions:**-- All SQL queries executed-- Query responses and result summaries (not full result data)-- Timestamps for each action+## View a recording-**SSH sessions:**-- All commands entered-- Command output-- Timestamps for each action+To view a recording, you need the **Admin** or **Auditor** [role](/documentation/platform/pam/concepts/access-control) on the account or its folder.-Both Web Access and CLI sessions are recorded the same way.+<Steps>+ <Step>+ Go to **Privileged Access Management** > **Sessions** and select the session.+ </Step>+ <Step>+ Review the recording:-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.+ - For Windows and Windows AD accounts, play the replay on the **Session Recording** tab+ - For every other account type, read the entries on the **Session Logs** tab, and search them with the search bar+ </Step>+</Steps>-## Storage options+You can view the recording of an active session while it's still running.-Recording is always enabled. You can configure where recordings are stored at the **[template](/documentation/platform/pam/templates/overview) level** — all accounts using a template inherit its storage settings.+## Mask sensitive values-| Backend | Description |-|---------|-------------|-| **Internal** | Stored in Infisical's managed database |-| **External S3** | Stored in your own S3 bucket |+Under **Session Log Masking**, the account's [template](/documentation/platform/pam/templates/overview) can mask sensitive values before Infisical stores the recording:-For most cases, internal storage works fine. Use [External Storage](/documentation/platform/pam/sessions/external-storage) if you need control over data residency or retention.+- **Built-in Detection** masks API keys and tokens from known providers, and the account's own credentials+- **Custom patterns** mask any text that matches one of your regular expressions-## Viewing recordings+You can't mask recordings of Windows and Windows AD sessions.-1. Go to **Sessions** and select a session-2. The session detail page shows the full log of activity-3. Use the search bar to find specific content+## Where recordings are stored-Recordings are available in real-time for both active and completed sessions.+Each [template](/documentation/platform/pam/templates/overview) sets where Infisical stores the recordings of the accounts that use it:-## Next steps+- **Internal Database**: Infisical stores recordings in its own database+- **S3 Bucket**: Infisical stores recordings in an S3-compatible bucket that you own-<CardGroup cols={2}>- <Card title="External Storage" icon="cloud" href="/documentation/platform/pam/sessions/external-storage">- Store recordings in your own S3 bucket.- </Card>- <Card title="Auditing" icon="clipboard-list" href="/documentation/platform/pam/auditing">- View the complete audit trail.- </Card>-</CardGroup>+Windows and Windows AD accounts require a bucket. To set one up, see [External storage](/documentation/platform/pam/sessions/external-storage).diff --git a/docs/documentation/platform/pam/templates/overview.mdx b/docs/documentation/platform/pam/templates/overview.mdxindex 962a2d5fd0..1bcdf89098 100644--- a/docs/documentation/platform/pam/templates/overview.mdx+++ b/docs/documentation/platform/pam/templates/overview.mdx@@ -1,90 +1,67 @@---title: "PAM account templates"sidebarTitle: "Account templates"-description: "Define the rules that apply when someone connects to an account."+description: "Set the rules for connecting to the accounts that use a template."----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.+An account template sets the rules for connecting to the [accounts](/documentation/platform/pam/accounts/overview) that use it, such as the maximum session length and whether access needs approval. It also sets which [gateway](/documentation/platform/gateways/overview) the accounts connect through and where Infisical stores their [session recordings](/documentation/platform/pam/sessions/session-recording).-**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** 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.+Every account uses one template, and the template's account type must match the account's type. When you change a template, the change applies to every account that uses it.## Default templates-When you first use PAM, default templates are available for each account type. Each has sensible defaults like 1-hour session duration.+Infisical creates a template for each account type when your organization first opens PAM. The default templates have no policies turned on, so sessions on their accounts last up to one hour, and Infisical stores the recordings in its internal database.++Windows and Windows AD accounts need recordings stored in AWS S3, so before anyone can launch sessions on them, change the default Windows templates to use [external storage](/documentation/platform/pam/sessions/external-storage).-If the defaults work for you, you can skip straight to [adding accounts](/documentation/platform/pam/accounts/overview).+If an account type has no template, such as a type added after your organization started using PAM, the **Account Templates** page shows a message. Select **Add default templates** in the message to create the missing templates.-## Creating a custom template+## Create a template-If you need different rules — say, 4-hour sessions with MFA for production — create a custom template.+Create your own template when some accounts need different rules, such as production databases that need approval before anyone connects.<Steps>- <Step title="Navigate to Account Templates">- Go to **Privileged Access Management → Account Templates** and select **Create Template**.- </Step>- <Step title="Set the basics">- | Field | Description |- |-------|-------------|- | **Name** | A descriptive name (e.g., `prod-postgres`) |- | **Type** | The account type (PostgreSQL, MySQL, SSH, etc.) |- | **Description** | Optional context about when to use this template |+ <Step>+ Go to **Privileged Access Management** > **Account Templates** and select **Create Template**.</Step>- <Step title="Configure policies">- | Option | What it does |- |--------|--------------|- | **Require Approval** | Users must request and receive approval before launching a session or [viewing credentials](/documentation/platform/pam/accounts/overview#viewing-credentials) |- | **Allow Break-Glass** | Named responders can clear their own request without an approver, for emergencies |- | **Require MFA** | Users must re-authenticate with MFA before connecting |- | **Require Reason** | A reason must be provided before connecting |- | **Max Session Duration** | How long someone can stay connected (in seconds) |- | **Command Blocking** | Regex patterns for commands to reject (one per line). Currently SSH only. |-- <Note>- **Require Approval** gates sessions and credential reveals with one switch, but they are approved separately: a session request never reveals the credential, and a credential request never launches a session. A member who needs both files both.- </Note>-- <Note>- **Allow Break-Glass** needs **Require Approval** on the same template, and it stays off until a Folder Admin names the responders on the folder's **Approvals** tab. Break-glass clears whichever request it is used on, so a session request grants a session and a credential request grants a reveal. See [break-glass access](/documentation/platform/pam/access-requests/overview#break-glass-access).- </Note>-- <Note>- **Require MFA** puts an account out of reach of [AI agents](/documentation/platform/pam/ai-agents/overview), which cannot complete the challenge yet, and of [machine identities](/documentation/platform/identities/machine-identities), which never can. For accounts an agent needs, use a template without it and gate access with [approvals](/documentation/platform/pam/access-requests/overview) instead.- </Note>+ <Step>+ Enter a **Name**, choose the account **Type**, and optionally enter a **Description**, then select **Create Template**.</Step>- <Step title="Configure system settings">- | 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>+ On the template's **General** tab, set the [policies](#policies) and [system settings](#system-settings) that the accounts need.</Step>- <Step title="Save">- Select **Create**. The template is now available when adding accounts.+ <Step>+ Select **Save Changes**.</Step></Steps>-## How templates work with accounts+To use the template, choose it when you [add an account](/documentation/platform/pam/accounts/overview).++## Policies++| Policy | What it does |+| --- | --- |+| **Require Approval** | Users must request access, and an approver must approve the request, before they can launch a session or view the account's credentials (see [Access requests](/documentation/platform/pam/access-requests/overview)) |+| **Allow Break-Glass** | Named responders can approve their own access requests in an emergency (see [Break-glass access](/documentation/platform/pam/access-requests/break-glass)) |+| **Require MFA** | Users must complete an MFA challenge before they connect |+| **Require Reason** | Users must give a reason before they connect |+| **Max Session Duration** | Infisical ends the session after this many seconds (60 to 86,400, or 900 to 3,600 for AWS IAM) |+| **Command Blocking** | Infisical rejects commands or SQL statements that match one of these regular expressions (SSH, Snowflake, and ClickHouse only) |-Every account references a template. The account inherits everything from that template — session limits, MFA requirements, Gateway, recording storage, and so on.+**Allow Break-Glass** only works together with **Require Approval**. If you turn off **Require Approval**, Infisical also turns off **Allow Break-Glass**.-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)+Machine identities and [AI agents](/documentation/platform/pam/ai-agents/overview) can't complete an MFA challenge, so they can't connect to accounts whose template has **Require MFA** on. If an agent needs an account, use **Require Approval** instead.-Some options like Gateway can be overridden at the account level when needed.+## System settings-## Next steps+| Setting | What it does |+| --- | --- |+| **Gateway** | The gateway that the accounts connect through |+| **Storage backend** | Where Infisical stores session recordings: **Internal Database** or **S3 Bucket** (see [External storage](/documentation/platform/pam/sessions/external-storage)) |+| **Session Log Masking** | Hides text that matches these patterns in session recordings |-With templates set up, you're ready to add accounts to your [folders](/documentation/platform/pam/folders/overview).+<Note>+You can [override the gateway](/documentation/platform/pam/accounts/manage#override-the-templates-settings) for one account on the account's **Advanced** tab. For Windows and Windows AD accounts, you can also override the recording bucket there.+</Note>-<CardGroup cols={2}>- <Card title="PostgreSQL Accounts" icon="database" href="/documentation/platform/pam/accounts/postgresql">- Add PostgreSQL database accounts.- </Card>- <Card title="SSH Accounts" icon="terminal" href="/documentation/platform/pam/accounts/ssh">- Add SSH server accounts.- </Card>-</CardGroup>+The **General** tab also has settings for [credential rotation](/documentation/platform/pam/credential-rotation/overview) and [credential health](/documentation/platform/pam/credential-health/overview) checks, for account types that support them.diff --git a/docs/snippets/catalogs/pam-account-types.jsx b/docs/snippets/catalogs/pam-account-types.jsxnew file mode 100644index 0000000000..bb3686ac44--- /dev/null+++ b/docs/snippets/catalogs/pam-account-types.jsx@@ -0,0 +1,114 @@+export const pamAccountTypeCategories = ["All", "Databases", "Servers", "Clusters", "Cloud Providers"];++export const pamAccountTypeBadges = (accountType) => [+ { label: accountType.category },+ ...(accountType.browserAccess ? [{ label: "Browser access", color: "green" }] : []),+];++export const pamAccountTypes = [+ {+ name: "PostgreSQL",+ path: "/documentation/platform/pam/accounts/postgresql",+ description: "Give people and agents access to a PostgreSQL database without sharing its credentials.",+ category: "Databases",+ browserAccess: true,+ },+ {+ name: "MySQL",+ path: "/documentation/platform/pam/accounts/mysql",+ description: "Give people and agents access to a MySQL database without sharing its credentials.",+ category: "Databases",+ browserAccess: true,+ },+ {+ name: "Microsoft SQL Server",+ path: "/documentation/platform/pam/accounts/mssql",+ description: "Give people and agents access to a Microsoft SQL Server database without sharing its credentials.",+ category: "Databases",+ browserAccess: false,+ },+ {+ name: "Oracle",+ path: "/documentation/platform/pam/accounts/oracledb",+ description: "Give people and agents access to an Oracle database without sharing its credentials.",+ category: "Databases",+ browserAccess: false,+ },+ {+ name: "MongoDB",+ path: "/documentation/platform/pam/accounts/mongodb",+ description: "Give people and agents access to a MongoDB database without sharing its credentials.",+ category: "Databases",+ browserAccess: false,+ },+ {+ name: "Redis",+ path: "/documentation/platform/pam/accounts/redis",+ description: "Give people and agents access to a Redis database without sharing its credentials.",+ category: "Databases",+ browserAccess: true,+ },+ {+ name: "Snowflake",+ path: "/documentation/platform/pam/accounts/snowflake",+ description: "Give people and agents access to a Snowflake database without sharing its credentials.",+ category: "Databases",+ browserAccess: true,+ },+ {+ name: "ClickHouse",+ path: "/documentation/platform/pam/accounts/clickhouse",+ description: "Give people and agents access to a ClickHouse database without sharing its credentials.",+ category: "Databases",+ browserAccess: true,+ },+ {+ name: "SSH",+ path: "/documentation/platform/pam/accounts/ssh",+ description: "Give people shell access to Linux and Unix servers.",+ category: "Servers",+ browserAccess: true,+ },+ {+ name: "Windows",+ path: "/documentation/platform/pam/accounts/windows",+ description: "Give people remote desktop access to a Windows server with a local account.",+ category: "Servers",+ browserAccess: true,+ },+ {+ name: "Windows AD",+ path: "/documentation/platform/pam/accounts/windows-ad",+ description: "Give people remote desktop access to Windows servers with an Active Directory account.",+ category: "Servers",+ browserAccess: true,+ },+ {+ name: "Kubernetes",+ path: "/documentation/platform/pam/accounts/kubernetes",+ description: "Give people kubectl access to Kubernetes clusters.",+ category: "Clusters",+ browserAccess: false,+ },+ {+ name: "AWS IAM",+ path: "/documentation/platform/pam/accounts/aws-iam",+ description: "Give people temporary access to AWS through an IAM role.",+ category: "Cloud Providers",+ browserAccess: true,+ },+ {+ name: "GCP service account",+ path: "/documentation/platform/pam/accounts/gcp-service-account",+ description: "Give people gcloud access to Google Cloud as a service account.",+ category: "Cloud Providers",+ browserAccess: false,+ },+ {+ name: "Azure CLI",+ path: "/documentation/platform/pam/accounts/azure-cli",+ description: "Give people Azure CLI access to Azure as a service principal.",+ category: "Cloud Providers",+ browserAccess: false,+ },+];