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: updated doc
Sheen Capadnganee01ed6ee95a
diff --git a/docs/docs.json b/docs/docs.jsonindex afbda7a845..a6a80863c1 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -877,35 +877,35 @@}]}- ]- },- {- "item": "Secrets Scanning",- "groups": [+ ]+ },{- "group": "Secrets scanning",- "pages": [- "documentation/platform/secret-scanning/overview",+ "item": "Secrets Scanning",+ "groups": [{- "group": "Concepts",+ "group": "Secrets scanning","pages": [- "documentation/platform/secret-scanning/concepts/secret-scanning"+ "documentation/platform/secret-scanning/overview",+ {+ "group": "Concepts",+ "pages": [+ "documentation/platform/secret-scanning/concepts/secret-scanning"+ ]+ }+ ]+ },+ {+ "group": "Product reference",+ "pages": [+ "documentation/platform/secret-scanning/usage",+ "documentation/platform/secret-scanning/bitbucket",+ "documentation/platform/secret-scanning/github",+ "documentation/platform/secret-scanning/gitlab"]}]},{- "group": "Product reference",- "pages": [- "documentation/platform/secret-scanning/usage",- "documentation/platform/secret-scanning/bitbucket",- "documentation/platform/secret-scanning/github",- "documentation/platform/secret-scanning/gitlab"- ]- }- ]- },- {"item": "Certificate Management","groups": [{@@ -1084,6 +1084,7 @@"group": "Reference","pages": ["documentation/platform/pki/reference/pqc-algorithms",+ "documentation/platform/pki/reference/infisical-agent","documentation/platform/pki/migration"]}@@ -1205,8 +1206,8 @@]},{- "tab": "CLI reference",- "groups": [+ "tab": "CLI reference",+ "groups": [{"group": "Command line","pages": [@@ -4539,6 +4540,14 @@}},"redirects": [+ {+ "source": "/documentation/platform/oauth-applications",+ "destination": "/documentation/platform/oauth-applications/overview"+ },+ {+ "source": "/integrations/platforms/certificate-agent",+ "destination": "/documentation/platform/pki/reference/infisical-agent"+ },{"source": "/integrations/platforms/docker-intro","destination": "/integrations/platforms/docker"diff --git a/docs/documentation/getting-started/concepts/client-integrations.mdx b/docs/documentation/getting-started/concepts/client-integrations.mdxindex 9d96ffe200..c19b568bee 100644--- a/docs/documentation/getting-started/concepts/client-integrations.mdx+++ b/docs/documentation/getting-started/concepts/client-integrations.mdx@@ -24,7 +24,7 @@ Infisical offers a non-exhaustive set of clients and interfaces to support a wid- [External Secrets Operator (ESO)](https://external-secrets.io/latest/provider/infisical): Allows Infisical to act as a backend provider for syncing secrets into Kubernetes `Secret` objects using the widely adopted External Secrets Operator.-- [Kubernetes cert-manager](/documentation/platform/pki/guides/applications/k8s-cert-manager-acme): A controller that issues X.509 certificates from Infisical using the [ACME enrollment method](/documentation/platform/pki/enrollment-methods/acme) configured on a [certificate profile](/documentation/platform/pki/certificates/profiles) using the cert-manager Issuer and Certificate CRDs.+- [Kubernetes cert-manager](/documentation/platform/pki/guides/applications/k8s-cert-manager-acme): A controller that issues X.509 certificates from Infisical using the [ACME enrollment method](/documentation/platform/pki/applications/enrollment-methods/acme) configured on a [certificate profile](/documentation/platform/pki/settings/profiles) using the cert-manager Issuer and Certificate CRDs.- [Secret Syncs](/integrations/secret-syncs/overview): Native integrations to forward secrets to services like GitHub, GitLab, AWS Secrets Manager, Vercel, and more.diff --git a/docs/documentation/platform/pki/applications/approvals.mdx b/docs/documentation/platform/pki/applications/approvals.mdxindex 09c18758a6..a2fde2aab2 100644--- a/docs/documentation/platform/pki/applications/approvals.mdx+++ b/docs/documentation/platform/pki/applications/approvals.mdx@@ -24,7 +24,7 @@ Approval workflows add a human review step before certificates are issued. Use t</CardGroup><Note>- For fully automated workloads (e.g., using [Infisical Agent](/integrations/platforms/certificate-agent)), enable the **machine identity bypass** option so automated systems can issue certificates without waiting for approval.+ For fully automated workloads (e.g., using [Infisical Agent](/documentation/platform/pki/reference/infisical-agent)), enable the **machine identity bypass** option so automated systems can issue certificates without waiting for approval.</Note>## How approval policies workdiff --git a/docs/documentation/platform/pki/guides/applications/infisical-agent.mdx b/docs/documentation/platform/pki/guides/applications/infisical-agent.mdxindex 8dcfda2bf9..abfe1ed32b 100644--- a/docs/documentation/platform/pki/guides/applications/infisical-agent.mdx+++ b/docs/documentation/platform/pki/guides/applications/infisical-agent.mdx@@ -25,10 +25,10 @@ Automatically request, persist, and renew certificates on a server using the Inf```</Step><Step title="Create Agent Configuration">- Create `/etc/infisical/agent-config.yaml`:+ Save your machine identity's client ID and client secret into files on the target machine, then create `/etc/infisical/agent-config.yaml` pointing at them:```yaml- version: v1+ version: v2infisical:address: "https://app.infisical.com"@@ -36,8 +36,8 @@ Automatically request, persist, and renew certificates on a server using the Infauth:type: "universal-auth"config:- client-id: "<your-client-id>"- client-secret: "<your-client-secret>"+ client-id: "/etc/infisical/client-id" # Path to a file containing the client ID+ client-secret: "/etc/infisical/client-secret" # Path to a file containing the client secretcertificates:- application-name: "my-first-app"@@ -81,5 +81,5 @@ The agent will:## Next steps-- See the [Infisical Agent Reference](/integrations/platforms/certificate-agent) for all configuration options+- See the [Infisical Agent reference](/documentation/platform/pki/reference/infisical-agent) for all configuration options- Set up [alerting](/documentation/platform/pki/applications/alerting/overview) for expiration notificationsdiff --git a/docs/documentation/platform/pki/reference/infisical-agent.mdx b/docs/documentation/platform/pki/reference/infisical-agent.mdxnew file mode 100644index 0000000000..c71be0c286--- /dev/null+++ b/docs/documentation/platform/pki/reference/infisical-agent.mdx@@ -0,0 +1,390 @@+---+title: "Infisical Agent reference"+sidebarTitle: "Infisical Agent"+description: "Configuration reference for the Infisical Agent's certificate management mode."+---++<Tip>+ Looking for a step-by-step setup guide? See [Automate certificates with+ Infisical Agent](/documentation/platform/pki/guides/applications/infisical-agent).+</Tip>++The Infisical Agent is a client daemon packaged into the [Infisical CLI](/cli/overview). In certificate management mode, it requests a certificate from an [Application](/documentation/platform/pki/applications/overview) using the [API enrollment method](/documentation/platform/pki/applications/enrollment-methods/api), persists it to the filesystem, and monitors and renews it before expiration. This follows the [client-driven approach](/documentation/platform/pki/concepts/certificate-lifecycle) to certificate renewal, where key material stays under the client's control.++The agent authenticates with Infisical as a [machine identity](/documentation/platform/identities/machine-identities), using infrastructure-native authentication methods where available so no long-lived credentials need to be distributed. It also supports post-event hooks to run custom commands after certificate issuance, renewal, or failure events, such as reloading a web server.++## Running the agent++Start the agent with the `--config` flag pointing to your configuration file:++```bash+infisical cert-manager agent --config /path/to/agent-config.yaml+```++This starts the agent as a daemon process that continuously monitors and manages certificates according to your configuration. Add `--verbose` to enable debug logging when troubleshooting.++Instead of a file, you can pass the entire configuration through the `INFISICAL_AGENT_CONFIG_BASE64` environment variable as a base64-encoded string. This is useful in containerized environments where mounting files is inconvenient.++For production deployments, run the agent as a system service so it starts automatically and runs continuously.++## Configuration file++The agent is driven by a YAML configuration file with four top-level sections: `version`, `infisical`, `auth`, and `certificates`.++```yaml agent-config.yaml+version: v2++infisical:+ address: "https://app.infisical.com"+ retry-strategy:+ max-retries: 3+ max-delay: "5s"+ base-delay: "200ms"++auth:+ type: "universal-auth"+ config:+ client-id: "/etc/infisical/client-id" # Path to a file containing the client ID+ client-secret: "/etc/infisical/client-secret" # Path to a file containing the client secret++certificates:+ - application-name: "web-services"+ profile-name: "web-server"+ attributes:+ common-name: "api.example.com"+ alt-names: ["api.example.com", "api-v2.example.com"]+ ttl: "90d"+ key-algorithm: "RSA_2048"+ signature-algorithm: "RSA-SHA256"+ key-usages:+ - "digital_signature"+ - "key_encipherment"+ extended-key-usages:+ - "server_auth"+ lifecycle:+ renew-before-expiry: "30d"+ status-check-interval: "6h"+ file-output:+ private-key:+ path: "/etc/ssl/private/web.key"+ permission: "0600"+ certificate:+ path: "/etc/ssl/certs/web.crt"+ permission: "0644"+ chain:+ path: "/etc/ssl/certs/web-chain.crt"+ permission: "0644"+ omit-root: true+ post-hooks:+ on-issuance:+ command: "systemctl reload nginx"+ timeout: 30+ on-renewal:+ command: "systemctl reload nginx"+ timeout: 30+ on-failure:+ command: "logger 'Certificate operation failed'"+ timeout: 30+```++Set `version` to `v2`. Each certificate entry references an Application and a certificate profile attached to it by name, or an existing certificate by ID (see [Tracking an existing certificate](#tracking-an-existing-certificate)).++### Duration format++Duration values (`ttl`, `renew-before-expiry`, `status-check-interval`, `failure-retry-interval`) accept standard time units (`30s`, `10m`, `6h`) plus a day suffix (`14d`, `90d`).++## Infisical connection++| Parameter | Required | Description |+| --------- | -------- | ----------- |+| `infisical.address` | Yes | The URL of your Infisical instance (e.g. `https://app.infisical.com`, `https://eu.infisical.com`, or your self-hosted instance) |+| `infisical.retry-strategy.max-retries` | Optional (defaults to `3`) | Maximum number of retries for failed API requests, including authentication, issuance, and renewal operations |+| `infisical.retry-strategy.base-delay` | Optional (defaults to `200ms`) | Initial delay between retries; subsequent retries back off exponentially |+| `infisical.retry-strategy.max-delay` | Optional (defaults to `5s`) | Upper bound on the delay between retries |++## Authentication++The `auth` section configures how the agent authenticates with Infisical as a [machine identity](/documentation/platform/identities/machine-identities). Upon successful authentication, the agent receives a short-lived access token that it automatically renews for the lifetime of the process.++Set `auth.type` to one of the supported methods and provide the matching fields under `auth.config`:++| `type` | `config` fields | Identity setup guide |+| ------ | --------------- | -------------------- |+| `universal-auth` | `client-id`, `client-secret`, `remove_client_secret_on_read` (optional) | [Universal Auth](/documentation/platform/identities/universal-auth) |+| `kubernetes` | `identity-id`, `service-account-token` (optional, defaults to `/var/run/secrets/kubernetes.io/serviceaccount/token`) | [Kubernetes Auth](/documentation/platform/identities/kubernetes-auth) |+| `azure` | `identity-id` | [Azure Auth](/documentation/platform/identities/azure-auth) |+| `gcp-id-token` | `identity-id` | [GCP Auth](/documentation/platform/identities/gcp-auth) |+| `gcp-iam` | `identity-id`, `service-account-key` | [GCP Auth](/documentation/platform/identities/gcp-auth) |+| `aws-iam` | `identity-id` | [AWS Auth](/documentation/platform/identities/aws-auth) |+| `ldap-auth` | `identity-id`, `username`, `password`, `remove-password-on-read` (optional) | [LDAP Auth](/documentation/platform/identities/ldap-auth/general) |++<Warning>+ Credential fields (`client-id`, `client-secret`, `identity-id`, `username`,+ `password`) take a **path to a file** containing the value, not the value+ itself. This keeps credentials out of the configuration file. Alternatively,+ supply the value through the matching environment variable, which takes+ precedence over the file.+</Warning>++| Field | Environment variable |+| ----- | -------------------- |+| `client-id` | `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID` |+| `client-secret` | `INFISICAL_UNIVERSAL_CLIENT_SECRET` |+| `identity-id` | `INFISICAL_MACHINE_IDENTITY_ID` |+| `username` | `INFISICAL_LDAP_USERNAME` |+| `password` | `INFISICAL_LDAP_PASSWORD` |+| `service-account-token` | `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH` |+| `service-account-key` | `INFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH` |++`service-account-token` (Kubernetes) and `service-account-key` (GCP IAM) are file paths handed to the authentication flow directly; their environment variables override the path, not the content.++```yaml+auth:+ type: "universal-auth"+ config:+ client-id: "/etc/infisical/client-id" # Path to a file containing the client ID+ client-secret: "/etc/infisical/client-secret" # Path to a file containing the client secret+ remove_client_secret_on_read: true # Optional: delete the secret file after reading+```++## Certificate parameters++Each entry in the `certificates` list accepts the following parameters:++| Parameter | Required | Description |+| --------- | -------- | ----------- |+| `application-name` | Yes | The name of the [Application](/documentation/platform/pki/applications/overview) to request a certificate from |+| `profile-name` | Yes | The slug of the [certificate profile](/documentation/platform/pki/settings/profiles) to request a certificate against. The profile must be attached to the Application |+| `certificate-id` | Conditional | The ID of an existing certificate to fetch and track instead of issuing a new one. Cannot be combined with the parameters above, `csr`/`csr-path`, or `attributes`. See [Tracking an existing certificate](#tracking-an-existing-certificate) |+| `attributes.common-name` | Optional | The common name for the certificate (e.g. `www.example.com`) |+| `attributes.alt-names` | Optional | The list of DNS subject alternative names for the certificate (e.g. `["www.example.com", "api.example.com"]`) |+| `attributes.ttl` | Optional (uses profile default if not specified) | The time-to-live duration for the certificate (e.g. `72h`, `90d`). Cannot be combined with `not-before`/`not-after` |+| `attributes.not-before` / `attributes.not-after` | Optional | Explicit validity bounds for the certificate, as ISO 8601 timestamps (e.g. `2026-09-01T00:00:00.000Z`). Cannot be combined with `ttl` |+| `attributes.key-algorithm` | Optional | The algorithm for the certificate key pair. One of: `RSA_2048`, `RSA_3072`, `RSA_4096`, `EC_prime256v1`, `EC_secp384r1`, `EC_secp521r1` |+| `attributes.signature-algorithm` | Optional | The algorithm used to sign the certificate. One of: `RSA-SHA256`, `RSA-SHA384`, `RSA-SHA512`, `ECDSA-SHA256`, `ECDSA-SHA384`, `ECDSA-SHA512` |+| `attributes.key-usages` | Optional | The list of key usage values. One or more of: `digital_signature`, `key_encipherment`, `non_repudiation`, `data_encipherment`, `key_agreement`, `key_cert_sign`, `crl_sign`, `encipher_only`, `decipher_only` |+| `attributes.extended-key-usages` | Optional | The list of extended key usage values. One or more of: `server_auth`, `client_auth`, `code_signing`, `email_protection`, `timestamping`, `ocsp_signing` |+| `csr-path` | Conditional | The path to a pre-generated certificate signing request (CSR) file (e.g. `/etc/ssl/csr.pem`). See [Using a pre-generated CSR](#one-time-issuance-from-a-pre-generated-csr) |+| `csr` | Conditional | The CSR content inline, as an alternative to `csr-path` |+| `file-output.private-key.path` | Required unless using `csr-path`/`csr` | The path to store the private key |+| `file-output.private-key.permission` | Optional (defaults to `0600`) | The octal file permissions for the private key file |+| `file-output.certificate.path` | Yes | The path to store the issued certificate |+| `file-output.certificate.permission` | Optional (defaults to `0600`) | The octal file permissions for the certificate file (e.g. `0644`) |+| `file-output.chain.path` | Optional | The path to store the certificate chain |+| `file-output.chain.permission` | Optional (defaults to `0600`) | The octal file permissions for the chain file (e.g. `0644`) |+| `file-output.chain.omit-root` | Optional (defaults to `true`) | Whether to exclude the root CA certificate from the written chain |+| `lifecycle.renew-before-expiry` | Optional (auto-renewal is disabled if not set) | How long before expiration the agent should renew the certificate (e.g. `14d`). Must be shorter than the certificate's TTL |+| `lifecycle.status-check-interval` | Optional (defaults to `10s`) | How frequently the agent checks certificate status and renewal needs |+| `lifecycle.failure-retry-interval` | Optional (defaults to the status check interval) | How long the agent waits before retrying after a failed operation |+| `lifecycle.max-failure-retries` | Optional (defaults to `10`) | How many consecutive failures the agent tolerates before it stops retrying an operation |+| `post-hooks.on-issuance.command` | Optional | Shell command to run after a certificate is issued for the first time |+| `post-hooks.on-renewal.command` | Optional | Shell command to run after a certificate is renewed |+| `post-hooks.on-failure.command` | Optional | Shell command to run when issuance or renewal fails, or when a tracked certificate is revoked or expires |+| `post-hooks.*.timeout` | Optional (defaults to `30`) | Maximum execution time in seconds for the hook command before it is terminated |++## Post-event hooks++The agent runs custom commands in response to certificate lifecycle events through the `post-hooks` configuration. Commands run through the system shell, so they can chain multiple actions.++<Tabs>+ <Tab title="Issuance hook">+ Runs when a new certificate is successfully issued:++ ```yaml+ post-hooks:+ on-issuance:+ command: |+ chown nginx:nginx /etc/ssl/certs/web.crt+ systemctl reload nginx+ timeout: 30+ ```++ </Tab>++ <Tab title="Renewal hook">+ Runs when a certificate is successfully renewed:++ ```yaml+ post-hooks:+ on-renewal:+ command: |+ systemctl reload nginx+ systemctl reload haproxy+ logger "Certificate renewed"+ timeout: 60+ ```++ </Tab>++ <Tab title="Failure hook">+ Runs when issuance or renewal fails, and when a tracked certificate is revoked or expires:++ ```yaml+ post-hooks:+ on-failure:+ command: |+ logger -p daemon.error "Certificate agent failure"+ /usr/local/bin/alert.sh+ timeout: 30+ ```++ </Tab>+</Tabs>++## Example configurations++### One-time certificate issuance++Requests a certificate once without any subsequent auto-renewal (no `lifecycle` section):++```yaml+version: v2++infisical:+ address: "https://app.infisical.com"++auth:+ type: "universal-auth"+ config:+ client-id: "/etc/infisical/client-id" # Path to a file containing the client ID+ client-secret: "/etc/infisical/client-secret" # Path to a file containing the client secret++certificates:+ - application-name: "web-services"+ profile-name: "web-server"+ attributes:+ common-name: "api.example.com"+ alt-names:+ - "api.example.com"+ - "api-v2.example.com"+ ttl: "30d"+ file-output:+ private-key:+ path: "/etc/ssl/private/api.example.com.key"+ permission: "0600"+ certificate:+ path: "/etc/ssl/certs/api.example.com.crt"+ permission: "0644"+ chain:+ path: "/etc/ssl/certs/api.example.com.chain.crt"+ permission: "0644"+ omit-root: true+```++### One-time issuance from a pre-generated CSR++Submits a pre-generated CSR to Infisical for signing. When `csr-path` is specified:++- The `private-key` output is omitted because the key pair is generated and managed externally; only the CSR is submitted to Infisical for signing.+- The agent cannot auto-renew the certificate, since it does not hold the private key required to generate a new CSR.++```yaml+version: v2++infisical:+ address: "https://app.infisical.com"++auth:+ type: "universal-auth"+ config:+ client-id: "/etc/infisical/client-id" # Path to a file containing the client ID+ client-secret: "/etc/infisical/client-secret" # Path to a file containing the client secret++certificates:+ - application-name: "web-services"+ profile-name: "web-server"+ csr-path: "/etc/ssl/requests/api.csr"+ file-output:+ certificate:+ path: "/etc/ssl/certs/api.example.com.crt"+ permission: "0644"+ chain:+ path: "/etc/ssl/certs/api.example.com.chain.crt"+ permission: "0644"+ omit-root: true+```++### Issuance with automatic renewal++Requests a certificate and continuously renews it 14 days before expiration, checking the certificate status every 6 hours:++```yaml+version: v2++infisical:+ address: "https://app.infisical.com"++auth:+ type: "universal-auth"+ config:+ client-id: "/etc/infisical/client-id" # Path to a file containing the client ID+ client-secret: "/etc/infisical/client-secret" # Path to a file containing the client secret++certificates:+ - application-name: "web-services"+ profile-name: "web-server"+ attributes:+ common-name: "api.example.com"+ alt-names:+ - "api.example.com"+ - "api-v2.example.com"+ ttl: "30d"+ lifecycle:+ renew-before-expiry: "14d"+ status-check-interval: "6h"+ file-output:+ private-key:+ path: "/etc/ssl/private/api.example.com.key"+ permission: "0600"+ certificate:+ path: "/etc/ssl/certs/api.example.com.crt"+ permission: "0644"+ chain:+ path: "/etc/ssl/certs/api.example.com.chain.crt"+ permission: "0644"+ post-hooks:+ on-issuance:+ command: "systemctl reload nginx"+ timeout: 30+ on-renewal:+ command: "systemctl reload nginx && logger 'Certificate renewed'"+ timeout: 30+```++### Tracking an existing certificate++Instead of issuing a new certificate, the agent can fetch an existing one by setting `certificate-id`. The agent downloads the certificate bundle, writes it to the configured paths, and monitors its status on the configured `status-check-interval`. If the certificate is revoked or expires, the agent runs the `on-failure` hook and stops.++Use this when the certificate's lifecycle is managed in Infisical (for example, through [server-driven auto-renewal](/documentation/platform/pki/applications/enrollment-methods/api#server-driven-auto-renewal)) and the agent's job is only to deliver it to the machine.++```yaml+version: v2++infisical:+ address: "https://app.infisical.com"++auth:+ type: "universal-auth"+ config:+ client-id: "/etc/infisical/client-id" # Path to a file containing the client ID+ client-secret: "/etc/infisical/client-secret" # Path to a file containing the client secret++certificates:+ - certificate-id: "d2f4c1a0-0000-0000-0000-000000000000"+ lifecycle:+ status-check-interval: "6h"+ file-output:+ private-key:+ path: "/etc/ssl/private/api.key"+ permission: "0600"+ certificate:+ path: "/etc/ssl/certs/api.crt"+ permission: "0644"+ post-hooks:+ on-issuance:+ command: "systemctl reload nginx"+ timeout: 30+ on-failure:+ command: "logger 'Tracked certificate was revoked or expired'"+ timeout: 30+```