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
Doc improvements
Carlos Monastyrskiedf2e64ae22a
diff --git a/backend/src/services/approval-policy/code-signing/code-signing-policy-factory.ts b/backend/src/services/approval-policy/code-signing/code-signing-policy-factory.tsindex 12429d1e65..c1cf19c2ba 100644--- a/backend/src/services/approval-policy/code-signing/code-signing-policy-factory.ts+++ b/backend/src/services/approval-policy/code-signing/code-signing-policy-factory.ts@@ -84,21 +84,10 @@ export const codeSigningPolicyFactory: TApprovalResourceFactory<const hasTimeConstraint = Boolean(maxWindowDuration);const hasCountConstraint = Boolean(maxSignings);- const isManual = !hasTimeConstraint && !hasCountConstraint;- // Manual mode (neither constraint set): no extra parameters allowed- if (isManual) {- if (inputs.requestedWindowStart || inputs.requestedWindowEnd) {- errors.push("This policy does not allow time-window parameters");- }- if (inputs.requestedSignings) {- errors.push("This policy does not allow requestedSignings");- }- }-- if (hasTimeConstraint && (inputs.requestedWindowStart || inputs.requestedWindowEnd)) {+ if (hasTimeConstraint) {if (!inputs.requestedWindowStart || !inputs.requestedWindowEnd) {- errors.push("Both requestedWindowStart and requestedWindowEnd are required");+ errors.push("Both requestedWindowStart and requestedWindowEnd are required for this policy");} else {const startTime = new Date(inputs.requestedWindowStart).getTime();const endTime = new Date(inputs.requestedWindowEnd).getTime();@@ -114,30 +103,18 @@ export const codeSigningPolicyFactory: TApprovalResourceFactory<errors.push(`Requested window duration exceeds maximum of ${maxWindowDuration}`);}}+ } else if (inputs.requestedWindowStart || inputs.requestedWindowEnd) {+ errors.push("This policy does not allow time-window parameters");}- if (hasCountConstraint && inputs.requestedSignings) {- if (maxSignings && inputs.requestedSignings > maxSignings) {+ if (hasCountConstraint) {+ if (!inputs.requestedSignings) {+ errors.push("requestedSignings is required for this policy");+ } else if (maxSignings && inputs.requestedSignings > maxSignings) {errors.push(`Requested signings (${inputs.requestedSignings}) exceeds maximum of ${maxSignings}`);}- }-- if (hasTimeConstraint && !hasCountConstraint) {- if (!inputs.requestedWindowStart && !inputs.requestedWindowEnd && !inputs.requestedSignings) {- errors.push("This policy requires time-window parameters");- }- if (inputs.requestedSignings) {- errors.push("This policy does not allow requestedSignings");- }- }-- if (hasCountConstraint && !hasTimeConstraint) {- if (!inputs.requestedSignings && !inputs.requestedWindowStart) {- errors.push("This policy requires requestedSignings");- }- if (inputs.requestedWindowStart || inputs.requestedWindowEnd) {- errors.push("This policy does not allow time-window parameters");- }+ } else if (inputs.requestedSignings) {+ errors.push("This policy does not allow requestedSignings");}return {@@ -167,10 +144,6 @@ export const codeSigningPolicyFactory: TApprovalResourceFactory<expiresAt = new Date(requestData.requestedWindowEnd);}- if (!requestData.requestedSignings && !requestData.requestedWindowStart) {- grantAttributes.maxSignings = 1;- }-await approvalRequestGrantsDAL.create({projectId: request.projectId,requestId: request.id,diff --git a/backend/src/services/approval-policy/code-signing/code-signing-policy-schemas.ts b/backend/src/services/approval-policy/code-signing/code-signing-policy-schemas.tsindex aaf4c320f7..8e5266e67b 100644--- a/backend/src/services/approval-policy/code-signing/code-signing-policy-schemas.ts+++ b/backend/src/services/approval-policy/code-signing/code-signing-policy-schemas.ts@@ -30,10 +30,14 @@ const WindowDurationSchema = z).optional();-export const CodeSigningPolicyConstraintsSchema = z.object({- maxWindowDuration: WindowDurationSchema,- maxSignings: z.number().int().positive().optional()-});+export const CodeSigningPolicyConstraintsSchema = z+ .object({+ maxWindowDuration: WindowDurationSchema,+ maxSignings: z.number().int().positive().optional()+ })+ .refine((data) => data.maxWindowDuration || data.maxSignings, {+ message: "At least one constraint (maxWindowDuration or maxSignings) is required"+ });export const CodeSigningPolicyRequestDataSchema = z.object({signerId: z.string().uuid(),diff --git a/docs/documentation/platform/pki/code-signing/grants.mdx b/docs/documentation/platform/pki/code-signing/grants.mdxindex 7ec6974f87..6b8e9a75c5 100644--- a/docs/documentation/platform/pki/code-signing/grants.mdx+++ b/docs/documentation/platform/pki/code-signing/grants.mdx@@ -31,8 +31,7 @@ Once revoked, the grant can no longer be used for signing operations. The user m<Accordion title="My grant expired before I finished signing">Depending on the policy constraints:- **Time Window**: Your valid until date has passed. Request a new grant with a longer window.- - **N-Signings**: You used all your allowed sign operations. Request a new grant with a higher count.- - **No constraints**: Grants without constraints are single-use. Request a new grant for each signing operation.+ - **Max Signings**: You used all your allowed sign operations. Request a new grant with a higher count.</Accordion><Accordion title="Can I extend an active grant?">Grants cannot be extended. You need to create a new signing request for additional signing access.diff --git a/docs/documentation/platform/pki/code-signing/guides/pkcs11-jarsigner.mdx b/docs/documentation/platform/pki/code-signing/guides/pkcs11-jarsigner.mdxindex 752150d43c..a1b8220f59 100644--- a/docs/documentation/platform/pki/code-signing/guides/pkcs11-jarsigner.mdx+++ b/docs/documentation/platform/pki/code-signing/guides/pkcs11-jarsigner.mdx@@ -4,7 +4,7 @@ sidebarTitle: "jarsigner"description: "Use the Infisical PKCS#11 module to sign Java artifacts with jarsigner."----In the following steps, we explore how to sign Java JAR files using `jarsigner` with the Infisical PKCS#11 module. The module implements the PKCS#11 v2.40 standard, allowing standard signing tools to use Infisical signers without code changes. Private keys never leave the server.+In the following steps, we explore how to sign Java JAR files using `jarsigner` with the Infisical PKCS#11 module. The module implements the PKCS#11 v2.40 standard, allowing standard signing tools to use Infisical signers without code changes.## Prerequisitesdiff --git a/docs/documentation/platform/pki/code-signing/overview.mdx b/docs/documentation/platform/pki/code-signing/overview.mdxindex 7796519112..efd2aa49b5 100644--- a/docs/documentation/platform/pki/code-signing/overview.mdx+++ b/docs/documentation/platform/pki/code-signing/overview.mdx@@ -35,16 +35,14 @@ sequenceDiagram### Signers-A [signer](/documentation/platform/pki/code-signing/signers) is a named code-signer bound to a certificate. It represents a signing capability within a project. Signers hold no private key material locally. All cryptographic operations happen on the Infisical server.+A [signer](/documentation/platform/pki/code-signing/signers) is a named code-signer bound to a certificate. It represents a signing capability within a project. Private keys are stored securely on the Infisical server and never leave it. All cryptographic operations are performed server-side.### Signing Policies-[Signing policies](/documentation/platform/pki/code-signing/signing-policies) optionally define the rules that must be satisfied before signing can occur. Policies support constraints such as:+[Signing policies](/documentation/platform/pki/code-signing/signing-policies) optionally define the rules that must be satisfied before signing can occur. Policies support constraints that can be combined:-- **Time Window**: Signing access is granted for a defined time period. The policy can define a maximum window duration.-- **N-Signings**: Signing access is granted for a fixed number of operations. The policy can define a maximum number of allowed sign operations.--Without any constraints, each approved request grants exactly one signing operation.+- **Max Window Duration**: Limits how long a signing grant remains valid.+- **Max Signings**: Limits the total number of signing operations a grant allows.### Signing Operationsdiff --git a/docs/documentation/platform/pki/code-signing/pkcs11-module.mdx b/docs/documentation/platform/pki/code-signing/pkcs11-module.mdxindex 0c5ed4742b..0ba1e766a0 100644--- a/docs/documentation/platform/pki/code-signing/pkcs11-module.mdx+++ b/docs/documentation/platform/pki/code-signing/pkcs11-module.mdx@@ -4,7 +4,7 @@ sidebarTitle: "PKCS#11 Module"description: "Install and configure the Infisical PKCS#11 module for use with standard signing tools."----The Infisical PKCS#11 module implements the PKCS#11 v2.40 standard, allowing tools like `jarsigner`, `openssl`, `cosign`, `osslsigncode`, `apksigner`, and `gpg` to use Infisical signers without code changes. Private keys never leave the server.+The Infisical PKCS#11 module implements the PKCS#11 v2.40 standard, allowing tools like `jarsigner`, `openssl`, `cosign`, `osslsigncode`, `apksigner`, and `gpg` to use Infisical signers without code changes.## Installationdiff --git a/docs/documentation/platform/pki/code-signing/signing-policies.mdx b/docs/documentation/platform/pki/code-signing/signing-policies.mdxindex 3f929e75d4..72cf5883bd 100644--- a/docs/documentation/platform/pki/code-signing/signing-policies.mdx+++ b/docs/documentation/platform/pki/code-signing/signing-policies.mdx@@ -17,35 +17,28 @@ Signing policies are recommended when:## Policy Constraints-Signing policies support optional constraints that control how signing grants are issued:+Each signing policy must define at least one constraint that controls the scope of the signing grant issued upon approval. Constraints can be combined to enforce both time and count limits simultaneously.-### Time Window+### Max Window Duration-Each approved request grants signing access for a **defined time period**. You can sign unlimited times within the window.+Limits how long a signing grant remains valid. The requester specifies a **Valid From** and **Valid Until** when requesting access, and the policy enforces a maximum duration.-This constraint is recommended for release cycles where a team needs to sign multiple artifacts during a release window (e.g., a 4-hour release deployment).+This is useful for release cycles where a team needs signing access during a defined window (e.g., a 4-hour deployment).-<Note>- - The policy defines a **Max. Window Duration** that constrains how long a window can be (from 1 minute to 30 days).- - The requester specifies the desired **Valid From** and **Valid Until** dates within that constraint.-</Note>+### Max Signings++Limits the total number of signing operations a grant allows. Once the quota is exhausted, the grant expires automatically.-### N-Signings+This is useful for CI pipelines that sign a known number of artifacts per build (e.g., 10 JARs per release).-Each approved request grants a **fixed number of signing operations**. Once the quota is exhausted, the grant expires automatically.+### Combining Constraints-This constraint is recommended for CI pipelines that need to sign a known number of artifacts per build (e.g., 10 JARs per release).+You can configure both constraints on a single policy. For example, a policy with a **4-hour max window** and **10 max signings** would grant access that expires after 4 hours or 10 signing operations, whichever comes first.<Note>- The policy defines a **Max. Signings** count that caps the number of allowed sign operations a requester can ask for.+ At least one constraint is required. If you only need single-operation approvals, set **Max Signings** to 1.</Note>-### No Constraints--When no constraints are configured, each approved request grants exactly **one signing operation**. This is the strictest mode. Every artifact signature requires a separate approval.--This is recommended for high-security environments where each signing operation must be individually authorized.-## Creating a Signing PolicyA signing policy defines the workflow that must be completed before signing access is granted for a specific signer.@@ -56,7 +49,7 @@ Key features of signing policies include:- **Flexible approvers**: Assign individual users or groups as eligible approvers for each step.- **Required approval count**: Specify how many approvals are needed per step (e.g., require 2 out of 5 eligible approvers).- **Request expiration**: Set a maximum time-to-live (TTL) for pending requests.-- **Optional constraints**: Configure time window or N-signings constraints to control the scope of each grant.+- **Constraints**: Configure max window duration or max signings (or both) to control the scope of each grant.To create a signing policy, head to your Certificate Management Project > **Code Signing > Approvals > Signing Policies** and press **Create Policy**.@@ -65,8 +58,8 @@ To create a signing policy, head to your Certificate Management Project > **CodeConfigure the basic policy settings:- **Policy Name**: A descriptive name for the policy such as `release-signing-approval`.- - **Max. Window Duration** (optional): The maximum time window a requester can ask for (e.g., `4h`, `1d`). Leave empty if you do not need time-based grants.- - **Max. Signings** (optional): The maximum number of allowed sign operations a requester can ask for. Leave empty if you do not need quota-based grants.+ - **Max. Window Duration**: The maximum time window a requester can ask for (e.g., `4h`, `1d`).+ - **Max. Signings**: The maximum number of signing operations a requester can ask for. Set to 1 for single-operation approvals.- **Max. Request TTL**: The maximum time a request can remain pending before it expires (optional).- **Bypass approval for machine identities**: When enabled, machine identities can sign without requiring approval.diff --git a/docs/documentation/platform/pki/code-signing/signing-requests.mdx b/docs/documentation/platform/pki/code-signing/signing-requests.mdxindex f26299eec3..d66bb7ed3c 100644--- a/docs/documentation/platform/pki/code-signing/signing-requests.mdx+++ b/docs/documentation/platform/pki/code-signing/signing-requests.mdx@@ -18,9 +18,8 @@ Head to your Certificate Management Project > **Code Signing > Approvals > SigniDepending on the policy constraints, provide the required parameters:- - **No constraints**: No additional parameters needed. The grant will allow a single signing operation.- - **Time Window**: Specify the **Valid From** and **Valid Until** dates for when you need signing access.- - **N-Signings**: Specify the **Allowed Sign Operations** you need.+ - **Valid From / Valid Until**: If the policy defines a max window duration, specify the time range for when you need signing access.+ - **Allowed Sign Operations**: If the policy defines a max signings count, specify how many signing operations you need.- **Justification**: Optionally provide a reason for the request (e.g., "Release v2.4.0 signing").diff --git a/frontend/src/pages/cert-manager/ApprovalsPage/components/CodeSigningPolicyTab/components/CodeSigningPolicySchema.tsx b/frontend/src/pages/cert-manager/ApprovalsPage/components/CodeSigningPolicyTab/components/CodeSigningPolicySchema.tsxindex 8aae0e8c6a..99de3fcdfc 100644--- a/frontend/src/pages/cert-manager/ApprovalsPage/components/CodeSigningPolicyTab/components/CodeSigningPolicySchema.tsx+++ b/frontend/src/pages/cert-manager/ApprovalsPage/components/CodeSigningPolicyTab/components/CodeSigningPolicySchema.tsx@@ -24,13 +24,20 @@ export const CodeSigningPolicyFormSchema = z.object({2592000,"Duration must be between 1 day and 30 days").nullish(),- constraints: z.object({- maxWindowDuration: DurationSchema().optional(),- maxSignings: z.preprocess(- (val) => (val === "" || val === undefined || val === null ? undefined : Number(val)),- z.number().int().positive().optional()- )- }),+ constraints: z+ .object({+ maxWindowDuration: DurationSchema().optional(),+ maxSignings: z.preprocess(+ (val) => (val === "" || val === undefined || val === null ? undefined : Number(val)),+ z.number().int().positive().optional()+ )+ })+ .refine(+ (data) => (data.maxWindowDuration && data.maxWindowDuration !== "") || data.maxSignings,+ {+ message: "At least one constraint (max window duration or max signings) is required"+ }+ ),bypassForMachineIdentities: z.boolean().optional().default(false),steps: ApprovalStepsSchema});diff --git a/frontend/src/pages/cert-manager/ApprovalsPage/components/CodeSigningPolicyTab/components/CodeSigningPolicySteps/CodeSigningPolicyDetailsStep.tsx b/frontend/src/pages/cert-manager/ApprovalsPage/components/CodeSigningPolicyTab/components/CodeSigningPolicySteps/CodeSigningPolicyDetailsStep.tsxindex ffa0950dce..6b2d988eef 100644--- a/frontend/src/pages/cert-manager/ApprovalsPage/components/CodeSigningPolicyTab/components/CodeSigningPolicySteps/CodeSigningPolicyDetailsStep.tsx+++ b/frontend/src/pages/cert-manager/ApprovalsPage/components/CodeSigningPolicyTab/components/CodeSigningPolicySteps/CodeSigningPolicyDetailsStep.tsx@@ -6,7 +6,12 @@ import { Checkbox, FormControl, Input } from "@app/components/v2";import { TCodeSigningPolicyForm } from "../CodeSigningPolicySchema";export const CodeSigningPolicyDetailsStep = () => {- const { control } = useFormContext<TCodeSigningPolicyForm>();+ const {+ control,+ formState: { errors }+ } = useFormContext<TCodeSigningPolicyForm>();++ const constraintsError = errors.constraints?.root?.message;return (<div className="flex flex-col gap-4">@@ -95,6 +100,8 @@ export const CodeSigningPolicyDetailsStep = () => {)}/>+ {constraintsError && <p className="text-xs text-red">{constraintsError}</p>}+<Controllercontrol={control}name="bypassForMachineIdentities"diff --git a/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerModal.tsx b/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerModal.tsxindex 657c577832..f5af615026 100644--- a/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerModal.tsx+++ b/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerModal.tsx@@ -132,7 +132,7 @@ export const CreateSignerModal = ({ isOpen, onOpenChange, projectId }: Props) =>label="Certificate"isError={Boolean(error)}errorText={error?.message}- helperText="Only active certificates with the codeSigning extended key usage are shown"+ helperText="Only active code signing certificates in the project are shown"><FilterableSelect<CertOption>isLoading={isCertsLoading}@@ -143,7 +143,9 @@ export const CreateSignerModal = ({ isOpen, onOpenChange, projectId }: Props) =>field.onChange(option?.value ?? "");}}placeholder="Search by common name or SAN..."- noOptionsMessage={() => "No code signing certificates found"}+ noOptionsMessage={() =>+ "No active code signing certificates found in the project"+ }maxMenuHeight={200}/></FormControl>diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/components/SignerOverviewSection.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/components/SignerOverviewSection.tsxindex 0e03569d6e..adae4e8332 100644--- a/frontend/src/pages/cert-manager/SignerDetailPage/components/SignerOverviewSection.tsx+++ b/frontend/src/pages/cert-manager/SignerDetailPage/components/SignerOverviewSection.tsx@@ -62,7 +62,7 @@ export const SignerOverviewSection = ({ signer, projectId, onEdit }: Props) => {<div className="flex flex-col gap-5"><UnstableCard><UnstableCardHeader className="border-b">- <UnstableCardTitle>Siger Details</UnstableCardTitle>+ <UnstableCardTitle>Signer Details</UnstableCardTitle><UnstableCardDescription>Signer configuration and key details</UnstableCardDescription>{onEdit && (<UnstableCardAction>