Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Address PR comments

Carlos Monastyrskie76a255fb4fa
diff --git a/backend/src/services/signer-membership/signer-membership-service.ts b/backend/src/services/signer-membership/signer-membership-service.ts
index f092c9e5d3..3bdc7fc624 100644
--- a/backend/src/services/signer-membership/signer-membership-service.ts
+++ b/backend/src/services/signer-membership/signer-membership-service.ts
@@ -240,7 +240,7 @@ export const signerMembershipServiceFactory = ({
// eslint-disable-next-line no-nested-ternary
const subjectLabel = userId ? "user" : identityId ? "machine identity" : "group";
throw new BadRequestError({
- message: `This ${subjectLabel} is not a member of this project. Add them to the project first, then assign them to the signer.`
+ message: `This ${subjectLabel} can't be added here yet. Grant them access under Access Control first, then assign them to the signer.`
});
}
diff --git a/backend/src/services/signer/signer-issuance-service.ts b/backend/src/services/signer/signer-issuance-service.ts
index b9da0f7158..44e987d643 100644
--- a/backend/src/services/signer/signer-issuance-service.ts
+++ b/backend/src/services/signer/signer-issuance-service.ts
@@ -51,8 +51,6 @@ type TRequestIssuanceInput = {
keyAlgorithm?: CertKeyAlgorithm;
};
-type TExternalOrderRef = Record<string, unknown>;
-
export const signerIssuanceServiceFactory = ({
signerIssuanceJobDAL,
signerDAL,
diff --git a/backend/src/services/signer/signer-service.ts b/backend/src/services/signer/signer-service.ts
index 7e4b196620..28f2907156 100644
--- a/backend/src/services/signer/signer-service.ts
+++ b/backend/src/services/signer/signer-service.ts
@@ -438,7 +438,7 @@ export const signerServiceFactory = ({
// eslint-disable-next-line no-nested-ternary
const subjectLabel = m.kind === "user" ? "user" : m.kind === "identity" ? "machine identity" : "group";
throw new BadRequestError({
- message: `Cannot add ${subjectLabel} ${m.id} to the signer: they are not a member of this project. Add them to the project first.`
+ message: `Cannot add ${subjectLabel} ${m.id} to the signer: grant them access under Access Control first.`
});
}
}
diff --git a/docs/documentation/platform/pki/code-signing/approvals.mdx b/docs/documentation/platform/pki/code-signing/approvals.mdx
index 37075f82b1..5799ab22cb 100644
--- a/docs/documentation/platform/pki/code-signing/approvals.mdx
+++ b/docs/documentation/platform/pki/code-signing/approvals.mdx
@@ -45,9 +45,9 @@ flowchart LR
C -.->|Step 2 rejected| X
```
-Each step runs in order. Once the **last** step's required approvals are reached, Infisical issues an **active access record** bounded by the policy's per-approval limits. The Operator can then sign through the [PKCS#11 module](/documentation/platform/pki/code-signing/pkcs11-module) or the [Sign API](/api-reference/endpoints/code-signing/signers/sign).
+Each step runs in order. Once the last step's required approvals are reached, Infisical issues an **active access record** bounded by the policy's per-approval limits. The Operator can then sign through the [PKCS#11 module](/documentation/platform/pki/code-signing/pkcs11-module) or the [Sign API](/api-reference/endpoints/code-signing/signers/sign).
-If the Administrator doesn't want to wait, they can [pre-approve signing](#pre-approve-signing) directly. Same outcome, no review workflow.
+Administrators can also [pre-approve signing](#pre-approve-signing) directly when the approval flow isn't a fit, for example during an incident response where waiting on approvers would block recovery.
## Configure the approval policy
@@ -87,9 +87,23 @@ Open the Signer's **Approvals** tab and click the pencil icon on the **Approval
Press **Save policy**. The new policy applies to **new** requests; existing active access keeps its original terms until it expires or is revoked.
+### Access lifecycle
+
+Every approved request becomes an **active access record**. On the Approvals tab it's a row in the Requests table with its own status, expiry, and signature counter.
+
+#### Statuses you'll see
+
+| Status | Meaning |
+|--------|---------|
+| **Pending** | Approval workflow is in progress. Waiting on the current step's approvers. |
+| **Active** | All steps approved, access issued, still within window and signatures remaining. |
+| **Expired** | Window has passed, or the signature count was exhausted. |
+| **Revoked** | An Administrator revoked the access (or the requester cancelled the request). |
+| **Rejected** | An approver rejected one of the steps. |
+
## Approval paths
-There are two ways someone gets active access on a Signer. Pick the tab that matches who you are.
+There are two ways someone gets active access on a Signer: Administrators **pre-approve signing** directly for someone else, or members open a **request to sign** that runs through the approval policy.
<Tabs>
<Tab title="Pre-approve signing">
@@ -97,7 +111,7 @@ There are two ways someone gets active access on a Signer. Pick the tab that mat
<Steps>
<Step title="Click Pre-approve signing">
- From the Signer's **Approvals** tab, click **Pre-approve signing**. (Hidden if the Signer has no approval policy. Without a policy, the concept doesn't apply.)
+ From the Signer's **Approvals** tab, click **Pre-approve signing**.
</Step>
<Step title="Pick the recipient">
Select the user or machine identity that should receive access. The list includes every Signer member except Auditors (including users reachable via a group).
@@ -161,30 +175,14 @@ If you're an eligible approver for the **current** step of a pending request, an
Click the row on the Signer's **Approvals** tab. Full details: requester, recipient, justification, requested signings, requested window, and which step is currently pending.
</Step>
<Step title="Review">
- Verify who's asking, for how many signings, for how long, why, and that you're the intended approver.
+ Verify who's asking, for how many signings, for how long, and why.
</Step>
<Step title="Decide">
- - **Approve** counts toward the current step's required approvals. When the **last** step's count is reached, the access record is created.
+ - **Approve** counts toward the current step's required approvals. When the last step's count is reached, the access record is created.
- **Reject** terminates the workflow. No access is created. The requester can submit a new request.
</Step>
</Steps>
-## Access lifecycle
-
-Every approved request becomes an **active access record**. On the Approvals tab it's a row in the Requests table with its own status, expiry, and signature counter.
-
-### Statuses you'll see
-
-| Status | Meaning |
-|--------|---------|
-| **Pending** | Approval workflow is in progress. Waiting on the current step's approvers. |
-| **Approved / Active** | All steps approved, access issued, still within window and signatures remaining. |
-| **Expired** | Window has passed, or the signature count was exhausted. |
-| **Revoked** | An Administrator revoked the access (or the requester cancelled the request). |
-| **Rejected** | An approver rejected one of the steps. |
-
-The **Expires** column shows a live countdown for Active rows ("Expires in 42 minutes") plus the remaining signature count ("7 of 10 signings left"). Pending rows show "Awaiting approval".
-
## Revoking access
Administrators can revoke an active access record (or cancel a pending request) at any time. Hover the row on the Approvals tab; an **X** icon appears. Confirm in the dialog and:
@@ -198,7 +196,7 @@ In-flight sign calls already in progress complete normally; revocation is checke
<AccordionGroup>
<Accordion title="I approved a request but nothing happened.">
- The policy has more than one step and yours wasn't the final step. Open the request to see which step is currently pending; the access record is issued only after the **last** step's required approvals are reached.
+ The policy has more than one step and yours wasn't the final step. Open the request to see which step is currently pending; the access record is issued only after the last step's required approvals are reached.
</Accordion>
<Accordion title="I'm an Operator but I don't see Request to sign.">
Three possibilities:
diff --git a/docs/documentation/platform/pki/code-signing/pkcs11-module.mdx b/docs/documentation/platform/pki/code-signing/pkcs11-module.mdx
index 7acfbee851..76c40e5875 100644
--- a/docs/documentation/platform/pki/code-signing/pkcs11-module.mdx
+++ b/docs/documentation/platform/pki/code-signing/pkcs11-module.mdx
@@ -10,29 +10,6 @@ The Infisical **PKCS#11 module** is a small native library (`.so`, `.dylib`, or
Before installing the module, ensure a Product Admin has created a [Signer](/documentation/platform/pki/code-signing/signers) and added the machine identity (or user) you plan to authenticate as. If the Signer has an [approval policy](/documentation/platform/pki/code-signing/approvals), you'll also need [active access](/documentation/platform/pki/code-signing/approvals#access-lifecycle).
</Info>
-## Tool Guides
-
-<CardGroup cols={3}>
- <Card title="jarsigner" href="/documentation/platform/pki/guides/code-signing/jarsigner">
- Sign Java JARs.
- </Card>
- <Card title="apksigner" href="/documentation/platform/pki/guides/code-signing/apksigner">
- Sign Android APKs.
- </Card>
- <Card title="osslsigncode" href="/documentation/platform/pki/guides/code-signing/osslsigncode">
- Sign Windows executables.
- </Card>
- <Card title="Cosign" href="/documentation/platform/pki/guides/code-signing/cosign">
- Sign container images.
- </Card>
- <Card title="OpenSSL" href="/documentation/platform/pki/guides/code-signing/openssl">
- Sign with OpenSSL.
- </Card>
- <Card title="GPG" href="/documentation/platform/pki/guides/code-signing/gpg">
- Sign with GPG.
- </Card>
-</CardGroup>
-
## Installation
Grab the pre-built binary for your platform from the [releases page](https://github.com/Infisical/infisical-pkcs-11/releases):
@@ -240,7 +217,7 @@ Turn on debug logging in the config first. It'll usually tell you exactly what w
The module rejects any other scheme (`file://`, `gopher://`, etc.) to prevent credentials being sent to unintended targets. Make sure your `server_url` starts with `http://` or `https://`.
</Accordion>
<Accordion title="The PKCS#11 module sees the slot but says 'signer X has no certificate'">
- The Signer is in **Pending** or **Failed** status; no certificate has been issued yet. Check the Signer's status in the UI; for external CAs (ACME, DigiCert), issuance can take minutes. Once the Signer becomes Active, the cert is fetched automatically.
+ The Signer is in **Pending** or **Failed** status; no certificate has been issued yet. Check the Signer's status in the UI; for external CAs (AWS Private CA, Azure AD CS), issuance can take minutes. Once the Signer becomes Active, the cert is fetched automatically.
</Accordion>
</AccordionGroup>
diff --git a/docs/documentation/platform/pki/code-signing/signers.mdx b/docs/documentation/platform/pki/code-signing/signers.mdx
index 71137eda83..48e4793bc9 100644
--- a/docs/documentation/platform/pki/code-signing/signers.mdx
+++ b/docs/documentation/platform/pki/code-signing/signers.mdx
@@ -6,7 +6,7 @@ description: "Create, configure, and manage code-signing identities for your tea
A Signer is a single signing identity inside Code Signing. It bundles three things:
-- A code-signing certificate issued from a CA in your project
+- A code-signing certificate issued by a Certificate Authority
- A list of members who are allowed to use it
- An optional approval policy that decides whether signing needs sign-off
@@ -58,11 +58,11 @@ In **Certificate Manager → Code Signing → Signers**, click **Create Signer**
</Step>
<Step title="Certificate">
- Infisical issues a fresh code-signing certificate for the Signer from a CA in your project.
+ Infisical issues a fresh code-signing certificate for the Signer from one of your Certificate Authorities.
| Field | Description |
|-------|-------------|
- | **Certificate Authority** | The CA that issues the certificate. Internal CAs issue immediately. External CAs (ACME, DigiCert, Azure AD CS, AWS PCA, Venafi TPP) issue asynchronously and the Signer enters **Pending** until the cert lands. |
+ | **Certificate Authority** | The CA that issues the certificate. Internal CAs issue immediately. External CAs (AWS Private CA, Azure AD CS) issue asynchronously and the Signer enters **Pending** until the cert lands. |
| **Common Name** | The legal name shown on the certificate, for example `Acme Mobile, Inc.`. Fixed once the certificate is issued. To change it you must reissue. |
| **Key algorithm** | The key for the signing certificate: `RSA-2048`, `RSA-3072`, `RSA-4096`, `ECDSA P-256`, `ECDSA P-384`, or `ECDSA P-521`. |
| **Validity (days)** | How long each issued certificate is valid for. Default 365. |
@@ -97,72 +97,12 @@ In **Certificate Manager → Code Signing → Signers**, click **Create Signer**
| Status | Meaning |
|--------|---------|
-| **Pending** | The Signer is created but the certificate has not been issued yet. Most common with external CAs that take time to respond (ACME validation, DigiCert order, etc.). The PKCS#11 module sees this slot but signing is rejected until the certificate lands. |
+| **Pending** | The Signer is created but the certificate has not been issued yet. Most common with external CAs that take time to respond. The PKCS#11 module sees this slot but signing is rejected until the certificate lands. |
| **Active** | Certificate issued and bound. Signing works, subject to the approval policy. |
| **Failed** | Issuance failed. Hover the badge to see the reason. Use **Retry issuance** from the Options menu, or [Edit a Signer](#edit-a-signer) to change the CA, Common Name, or Validity and try again. |
| **Disabled** | Manually disabled. Signing is blocked. Re-enable from the Options menu. |
| **Expired** | The certificate's `notAfter` has passed and no auto-renewal was configured (or the renewal failed). Reissue with a new validity period. |
-## Signer detail page
-
-Click any Signer to open its detail page. Three tabs cover everything you can do with it.
-
-<Tabs>
- <Tab title="Activity">
- The **Signing History** table: an audit trail of every signing operation against this Signer, with the most recent at the top.
-
- | Column | What you'll see |
- |--------|-----------------|
- | **Timestamp** | When the operation happened, down to the second. |
- | **Status** | `Success`, `Failed`, or `Denied`. Denied entries show why on hover (no policy access, expired access, disabled Signer, etc.). |
- | **Algorithm** | Friendly label for the signing algorithm, for example *RSA PKCS#1 v1.5 (SHA-256)* or *ECDSA (SHA-384)*. |
- | **Data Hash** | First few bytes of the SHA digest that was signed, useful for matching an entry back to a specific artifact. Hover for the full value. |
- | **Actor** | The user or machine identity that issued the call. Click through to see who else they are. |
-
- Paginated at the bottom (1, 5, 10, 20, 50 per page). Read-only and visible to all roles, including Auditors.
- </Tab>
-
- <Tab title="Approvals">
- A two-panel view that ties together **who has to approve** signing and **who currently can sign**.
-
- **Approval Policy** (left panel)
-
- Summary card for the active policy. Shows the per-approval limits (**Max signings**, **Max window**) and the list of **Approval Steps** in order, each with its name and required-approver count. The pencil icon opens the 2-step editor; see [Configure the approval policy](/documentation/platform/pki/code-signing/approvals#configure-the-approval-policy).
-
- If there's no policy, the panel reads *No policy required* and signing is direct for any member with sign rights.
-
- **Requests** (right panel)
-
- The full table of signing requests and active access. Includes both pending requests in flight and historical (expired, revoked, rejected) rows. Filter icon at the top right scopes the list by status.
-
- | Column | What you'll see |
- |--------|-----------------|
- | **Member** | The user or machine identity who will hold the access, plus a one-line justification subtitle (e.g. *"Auto-requested by PKCS#11 module"*, *"Signing release v2.4.0"*). |
- | **Status** | `Pending`, `Active`, `Expired`, `Revoked`, or `Rejected`. |
- | **When** | When the request was submitted or the pre-approval was issued. |
- | **Expires** | Live countdown plus remaining signature count for Active rows (e.g. *2 of 3 signings left*). Pending rows show *Awaiting approval*. Expired and revoked rows show the terminal reason. |
-
- The **Pre-approve signing** and **Request to sign** buttons live at the top of this tab. Full coverage of both flows, plus revocation and approver decisions, is in [Approvals](/documentation/platform/pki/code-signing/approvals).
- </Tab>
-
- <Tab title="Members">
- The **Members** table: everyone (and everything) who has access to this Signer.
-
- Use the **Add Member** button (top right) to add a user, machine identity, or group. Pick a role at add time. Use the role dropdown on any row to promote or demote later. The kebab (`⋯`) on each row removes the member from the Signer.
-
- | Column | What you'll see |
- |--------|-----------------|
- | **Member** | Display name of the user, machine identity, or group. |
- | **Type** | Badge: `User`, `Machine Identity`, or `Group`. |
- | **Role** | Dropdown: `Administrator`, `Operator`, or `Auditor`. See the [role table](#signer-roles) above for what each can do. |
- | **Added** | Date the member was first added to this Signer. |
-
- <Note>
- At least one Administrator must remain on the Signer at all times. The last remaining Administrator can't be removed or demoted; promote someone else first.
- </Note>
- </Tab>
-</Tabs>
-
## Edit a Signer
Open the Signer and choose **Options → Edit settings**. The edit sheet walks you through two steps.
@@ -182,7 +122,7 @@ Open the Signer and choose **Options → Edit settings**. The edit sheet walks y
**Always editable**
- - **Certificate Authority**: swap to another CA in the project. Saving with a different CA reissues the certificate immediately from the new CA.
+ - **Certificate Authority**: swap to another CA. Saving with a different CA reissues the certificate immediately from the new CA.
- **Renew before (days)**: edit any time, 1 to 30, must be less than Validity.
**Locked once the Signer is Active**
@@ -202,79 +142,9 @@ Open the Signer and choose **Options → Edit settings**. The edit sheet walks y
</Step>
</Steps>
-## Lifecycle operations
-
-Each operation lives under the Signer's **Options** menu in the top right of the detail page.
-
-<Tabs>
- <Tab title="Export certificate">
- **Options → Export certificate** downloads the PEM-encoded X.509 certificate chain (leaf, intermediates, root). You'll typically ship the leaf alongside signed artifacts so verifiers can check the signature.
- </Tab>
-
- <Tab title="Disable / enable">
- **Options → Disable signer** marks the Signer as Disabled and rejects all sign API calls. The certificate is not revoked, so re-enabling later resumes signing immediately. Use this when you suspect a member's machine identity is compromised but don't want to invalidate every artifact already signed.
-
- Re-enable the Signer from the same Options menu (**Enable signer**) when you're ready to resume signing.
- </Tab>
+## Signing with a Signer
- <Tab title="Retry issuance">
- For Signers stuck in **Failed**: hover the badge to see the reason. **Options → Retry issuance** re-requests the certificate using the stored CA, Common Name, and Validity.
-
- If the failure was caused by bad inputs (wrong CA, invalid Common Name), use [Edit a Signer](#edit-a-signer) instead to fix the fields before retrying.
- </Tab>
-
- <Tab title="Delete">
- **Options → Delete signer** permanently removes:
-
- - The Signer record
- - Its approval policy, steps, and approvers
- - All members on the Signer
- - All signing requests and active access records
- - The audit log entries
-
- The certificate object itself remains in **Certificate Manager → Inventory** and can be revoked separately if needed. Deletion cascades cleanly.
-
- <Note>
- Deletion is irreversible. If you're not sure, disable the Signer first.
- </Note>
- </Tab>
-</Tabs>
-
-## Signing via the API
-
-For service-to-service signing you can call the [Sign API](/api-reference/endpoints/code-signing/signers/sign) directly (no PKCS#11 module required). The most common path is still the [PKCS#11 module](/documentation/platform/pki/code-signing/pkcs11-module); use the API directly only when you need precise control.
-
-```bash
-curl --request POST \
- --url https://app.infisical.com/api/v1/cert-manager/signers/{signerId}/sign \
- --header 'Authorization: Bearer <access-token>' \
- --header 'Content-Type: application/json' \
- --data '{
- "data": "<base64-encoded-digest>",
- "signingAlgorithm": "RSASSA_PKCS1_V1_5_SHA_256",
- "isDigest": true,
- "clientMetadata": {
- "tool": "custom-pipeline",
- "hostname": "build-runner-42"
- }
- }'
-```
-
-| Field | Description |
-|-------|-------------|
-| `data` | Base64-encoded payload. Must be the digest itself (≤128 bytes) when `isDigest=true`, or arbitrary data otherwise. |
-| `signingAlgorithm` | One of the algorithms allowed by the Signer's key (see below). |
-| `isDigest` | `true` if `data` is already a hash digest. `false` to let Infisical hash first. |
-| `clientMetadata` | Optional. Recorded verbatim on the audit entry. Handy for distinguishing CI jobs in the Activity log. |
-
-### Algorithms by key type
-
-| Key | Allowed `signingAlgorithm` values |
-|-----|-----------------------------------|
-| RSA (2048 / 3072 / 4096) | `RSASSA_PKCS1_V1_5_SHA_256`, `RSASSA_PKCS1_V1_5_SHA_384`, `RSASSA_PKCS1_V1_5_SHA_512`, `RSASSA_PSS_SHA_256`, `RSASSA_PSS_SHA_384`, `RSASSA_PSS_SHA_512` |
-| ECDSA P-256 | `ECDSA_SHA_256` |
-| ECDSA P-384 | `ECDSA_SHA_384` |
-| ECDSA P-521 | `ECDSA_SHA_512` |
+To sign with a Signer, use the [PKCS#11 module](/documentation/platform/pki/code-signing/pkcs11-module) (works with `jarsigner`, `cosign`, `osslsigncode`, `signtool`, and more) or call the [Sign API](/api-reference/endpoints/code-signing/signers/sign) directly.
## FAQ
@@ -288,7 +158,7 @@ curl --request POST \
**Delete** is permanent. The Signer and everything attached to it (members, policy, access records, audit log) is removed. The certificate object remains in the inventory unless you delete that separately.
</Accordion>
<Accordion title="Why is my new Signer stuck in Pending?">
- External CAs (ACME, DigiCert, Azure AD CS, AWS PCA, Venafi TPP) issue asynchronously. Infisical polls the CA in the background and flips the Signer to **Active** once the certificate is delivered. If it stays Pending for more than a few minutes, hover the badge; the failure reason appears there once the polling job gives up.
+ External CAs (AWS Private CA, Azure AD CS) issue asynchronously. Infisical polls the CA in the background and flips the Signer to **Active** once the certificate is delivered. If it stays Pending for more than a few minutes, hover the badge; the failure reason appears there once the polling job gives up.
</Accordion>
<Accordion title="What happens to signed artifacts when I delete a Signer?">
Artifacts already signed remain valid as long as the certificate they were signed with is still valid and the verifier trusts the issuing CA's chain. Deleting the Signer in Infisical only removes Infisical's ability to sign new artifacts with that certificate; it doesn't invalidate past signatures.
diff --git a/docs/documentation/platform/pki/guides/code-signing/apksigner.mdx b/docs/documentation/platform/pki/guides/code-signing/apksigner.mdx
index 56d00b357d..2138f06a2b 100644
--- a/docs/documentation/platform/pki/guides/code-signing/apksigner.mdx
+++ b/docs/documentation/platform/pki/guides/code-signing/apksigner.mdx
@@ -18,7 +18,37 @@ Sign Android APK and Android App Bundle (AAB) files using `apksigner` with the I
- The Infisical [PKCS#11 module](/documentation/platform/pki/code-signing/pkcs11-module) installed and configured
- Android SDK Build Tools 30.0.0 or later (includes `apksigner`)
-## Step 1: Create the SunPKCS11 Provider Configuration
+## Step 1: Set Up Authentication
+
+Configure the Infisical PKCS#11 module with your machine identity credentials. Without this, the signing commands below fail with an auth error.
+
+Create `/etc/infisical/pkcs11.conf` (or set `INFISICAL_PKCS11_CONFIG` to point elsewhere):
+
+```yaml
+auth:
+ method: universal-auth
+ universal_auth:
+ client_id: "<machine-identity-client-id>"
+ client_secret: "<machine-identity-client-secret>"
+
+signer:
+ id: "<signer-id>"
+```
+
+You can also pass the credentials via environment variables:
+
+```bash
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID="<machine-identity-client-id>"
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET="<machine-identity-client-secret>"
+```
+
+<Note>
+ Environment variables override values from the config file.
+</Note>
+
+For the full set of options, see the [PKCS#11 module configuration reference](/documentation/platform/pki/code-signing/pkcs11-module#configuration).
+
+## Step 2: Create the SunPKCS11 Provider Configuration
Create a configuration file for Java's SunPKCS11 provider. Save it as `infisical-pkcs11.cfg`:
@@ -31,7 +61,7 @@ library = /usr/local/lib/libinfisical-pkcs11.so
On macOS, use `.dylib`. On Windows, use `.dll`. If you have multiple signers and need a specific one, add `slot = 0` (replace with the correct slot index).
</Note>
-## Step 2: Sign an APK
+## Step 3: Sign an APK
Use `apksigner` with the PKCS#11 provider:
@@ -70,7 +100,7 @@ jarsigner \
"release-signer"
```
-## Step 3: Verify the Signature
+## Step 4: Verify the Signature
Verify the signed APK. If you signed in place (without `--out`), verify the same file. If you used `--out`, verify the output file:
diff --git a/docs/documentation/platform/pki/guides/code-signing/cosign.mdx b/docs/documentation/platform/pki/guides/code-signing/cosign.mdx
index 2e9d3e7f62..56a4284c3b 100644
--- a/docs/documentation/platform/pki/guides/code-signing/cosign.mdx
+++ b/docs/documentation/platform/pki/guides/code-signing/cosign.mdx
@@ -19,7 +19,37 @@ Sign OCI container images using `cosign` (from the Sigstore project) with the In
- `cosign` v2.0 or later, **built with PKCS#11 support** (see below)
- Write access to an OCI-compatible container registry
-## Step 1: Install cosign with PKCS#11 Support
+## Step 1: Set Up Authentication
+
+Configure the Infisical PKCS#11 module with your machine identity credentials. Without this, the signing commands below fail with an auth error.
+
+Create `/etc/infisical/pkcs11.conf` (or set `INFISICAL_PKCS11_CONFIG` to point elsewhere):
+
+```yaml
+auth:
+ method: universal-auth
+ universal_auth:
+ client_id: "<machine-identity-client-id>"
+ client_secret: "<machine-identity-client-secret>"
+
+signer:
+ id: "<signer-id>"
+```
+
+You can also pass the credentials via environment variables:
+
+```bash
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID="<machine-identity-client-id>"
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET="<machine-identity-client-secret>"
+```
+
+<Note>
+ Environment variables override values from the config file.
+</Note>
+
+For the full set of options, see the [PKCS#11 module configuration reference](/documentation/platform/pki/code-signing/pkcs11-module#configuration).
+
+## Step 2: Install cosign with PKCS#11 Support
<Warning>
Pre-built cosign binaries (including Homebrew) do **not** include PKCS#11 support. You must build cosign from source with the `pkcs11key` build tag enabled.
@@ -49,7 +79,7 @@ cosign pkcs11-tool --help
If you see `This cosign was not built with pkcs11-tool support!`, you need to rebuild with the `pkcs11key` tag.
-## Step 2: Sign a Container Image
+## Step 3: Sign a Container Image
First, list the available tokens and key URIs to find the correct PKCS#11 URI for your signer:
@@ -82,7 +112,7 @@ cosign sign \
- Prefer signing by digest (`@sha256:...`) rather than tag for reproducible builds.
</Note>
-## Step 3: Verify the Signature
+## Step 4: Verify the Signature
Verify a signed image using the public key or certificate from the signer:
diff --git a/docs/documentation/platform/pki/guides/code-signing/gpg.mdx b/docs/documentation/platform/pki/guides/code-signing/gpg.mdx
index a3fc45677a..1dce8f3e6e 100644
--- a/docs/documentation/platform/pki/guides/code-signing/gpg.mdx
+++ b/docs/documentation/platform/pki/guides/code-signing/gpg.mdx
@@ -19,7 +19,37 @@ Use GnuPG with the Infisical PKCS#11 module via `gnupg-pkcs11-scd` to sign git c
- GnuPG 2.2 or later
- `gnupg-pkcs11-scd` (the PKCS#11 smart card daemon bridge)
-## Step 1: Install gnupg-pkcs11-scd
+## Step 1: Set Up Authentication
+
+Configure the Infisical PKCS#11 module with your machine identity credentials. Without this, the signing commands below fail with an auth error.
+
+Create `/etc/infisical/pkcs11.conf` (or set `INFISICAL_PKCS11_CONFIG` to point elsewhere):
+
+```yaml
+auth:
+ method: universal-auth
+ universal_auth:
+ client_id: "<machine-identity-client-id>"
+ client_secret: "<machine-identity-client-secret>"
+
+signer:
+ id: "<signer-id>"
+```
+
+You can also pass the credentials via environment variables:
+
+```bash
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID="<machine-identity-client-id>"
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET="<machine-identity-client-secret>"
+```
+
+<Note>
+ Environment variables override values from the config file.
+</Note>
+
+For the full set of options, see the [PKCS#11 module configuration reference](/documentation/platform/pki/code-signing/pkcs11-module#configuration).
+
+## Step 2: Install gnupg-pkcs11-scd
<Tabs>
<Tab title="Ubuntu / Debian">
@@ -40,7 +70,7 @@ Use GnuPG with the Infisical PKCS#11 module via `gnupg-pkcs11-scd` to sign git c
</Tab>
</Tabs>
-## Step 2: Configure gnupg-pkcs11-scd
+## Step 3: Configure gnupg-pkcs11-scd
Create `~/.gnupg/gnupg-pkcs11-scd.conf`:
@@ -69,7 +99,7 @@ Restart the GPG agent to apply the changes:
gpgconf --kill gpg-agent
```
-## Step 3: Import the PKCS#11 Key into GPG
+## Step 4: Import the PKCS#11 Key into GPG
List the available keys from the PKCS#11 token:
@@ -119,7 +149,7 @@ gpg --batch --gen-key /tmp/gpg-keygen.txt
Note the key ID from the output (shown as a 40-character hex string). You'll use it for signing.
-## Step 4: Sign Git Commits
+## Step 5: Sign Git Commits
Configure git to use your GPG key:
@@ -154,7 +184,7 @@ git log --show-signature -1
git tag -v v1.0.0
```
-## Step 5: Sign Arbitrary Files
+## Step 6: Sign Arbitrary Files
Use GPG to create detached signatures for any file:
diff --git a/docs/documentation/platform/pki/guides/code-signing/jarsigner.mdx b/docs/documentation/platform/pki/guides/code-signing/jarsigner.mdx
index d1f1e075a1..f3e5946723 100644
--- a/docs/documentation/platform/pki/guides/code-signing/jarsigner.mdx
+++ b/docs/documentation/platform/pki/guides/code-signing/jarsigner.mdx
@@ -18,7 +18,37 @@ Sign Java JAR files using `jarsigner` with the Infisical PKCS#11 module. The mod
- The Infisical [PKCS#11 module](/documentation/platform/pki/code-signing/pkcs11-module) installed and configured
- Java JDK 9 or later (for the `-addprovider` flag)
-## Step 1: Create the SunPKCS11 Provider Configuration
+## Step 1: Set Up Authentication
+
+Configure the Infisical PKCS#11 module with your machine identity credentials. Without this, the signing commands below fail with an auth error.
+
+Create `/etc/infisical/pkcs11.conf` (or set `INFISICAL_PKCS11_CONFIG` to point elsewhere):
+
+```yaml
+auth:
+ method: universal-auth
+ universal_auth:
+ client_id: "<machine-identity-client-id>"
+ client_secret: "<machine-identity-client-secret>"
+
+signer:
+ id: "<signer-id>"
+```
+
+You can also pass the credentials via environment variables:
+
+```bash
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID="<machine-identity-client-id>"
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET="<machine-identity-client-secret>"
+```
+
+<Note>
+ Environment variables override values from the config file.
+</Note>
+
+For the full set of options, see the [PKCS#11 module configuration reference](/documentation/platform/pki/code-signing/pkcs11-module#configuration).
+
+## Step 2: Create the SunPKCS11 Provider Configuration
Create a configuration file for Java's SunPKCS11 provider. Save it as `infisical-pkcs11.cfg`:
@@ -39,7 +69,7 @@ library = /usr/local/lib/libinfisical-pkcs11.so
slot = 0
```
-## Step 2: Sign a JAR
+## Step 3: Sign a JAR
Use `jarsigner` with the PKCS#11 provider to sign your JAR file:
diff --git a/docs/documentation/platform/pki/guides/code-signing/openssl.mdx b/docs/documentation/platform/pki/guides/code-signing/openssl.mdx
index 5dd5e43091..69818d1d58 100644
--- a/docs/documentation/platform/pki/guides/code-signing/openssl.mdx
+++ b/docs/documentation/platform/pki/guides/code-signing/openssl.mdx
@@ -19,7 +19,37 @@ Use OpenSSL with the Infisical PKCS#11 module via the `libp11` engine for genera
- OpenSSL 1.1.1 or later
- `libp11` (OpenSSL PKCS#11 engine)
-## Step 1: Install the PKCS#11 Engine
+## Step 1: Set Up Authentication
+
+Configure the Infisical PKCS#11 module with your machine identity credentials. Without this, the signing commands below fail with an auth error.
+
+Create `/etc/infisical/pkcs11.conf` (or set `INFISICAL_PKCS11_CONFIG` to point elsewhere):
+
+```yaml
+auth:
+ method: universal-auth
+ universal_auth:
+ client_id: "<machine-identity-client-id>"
+ client_secret: "<machine-identity-client-secret>"
+
+signer:
+ id: "<signer-id>"
+```
+
+You can also pass the credentials via environment variables:
+
+```bash
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID="<machine-identity-client-id>"
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET="<machine-identity-client-secret>"
+```
+
+<Note>
+ Environment variables override values from the config file.
+</Note>
+
+For the full set of options, see the [PKCS#11 module configuration reference](/documentation/platform/pki/code-signing/pkcs11-module#configuration).
+
+## Step 2: Install the PKCS#11 Engine
<Tabs>
<Tab title="Ubuntu / Debian">
@@ -53,7 +83,7 @@ The output confirms the engine is loaded:
[ available ]
```
-## Step 2: Create an OpenSSL Configuration
+## Step 3: Create an OpenSSL Configuration
Create an OpenSSL config file `infisical-openssl.cnf` to set up the PKCS#11 engine:
@@ -78,7 +108,7 @@ Set this as the active OpenSSL config:
export OPENSSL_CONF=/path/to/infisical-openssl.cnf
```
-## Step 3: Sign a File
+## Step 4: Sign a File
Sign a file using the PKCS#11 key. The same command works for both RSA and ECDSA keys. OpenSSL automatically selects the correct algorithm based on the key type:
@@ -115,7 +145,7 @@ openssl dgst -sha256 \
RSA-PSS requires the signer's key to support the `RSASSA_PSS` mechanism. This is only available with RSA keys.
</Note>
-## Step 4: Verify the Signature
+## Step 5: Verify the Signature
Extract the public key or certificate from PKCS#11, then verify:
diff --git a/docs/documentation/platform/pki/guides/code-signing/osslsigncode.mdx b/docs/documentation/platform/pki/guides/code-signing/osslsigncode.mdx
index a9eff4a5ce..762ded3389 100644
--- a/docs/documentation/platform/pki/guides/code-signing/osslsigncode.mdx
+++ b/docs/documentation/platform/pki/guides/code-signing/osslsigncode.mdx
@@ -18,7 +18,37 @@ Sign Windows Authenticode artifacts using `osslsigncode` with the Infisical PKCS
- The Infisical [PKCS#11 module](/documentation/platform/pki/code-signing/pkcs11-module) installed and configured
- `osslsigncode` 2.5 or later (includes native PKCS#11 support)
-## Step 1: Install osslsigncode and Dependencies
+## Step 1: Set Up Authentication
+
+Configure the Infisical PKCS#11 module with your machine identity credentials. Without this, the signing commands below fail with an auth error.
+
+Create `/etc/infisical/pkcs11.conf` (or set `INFISICAL_PKCS11_CONFIG` to point elsewhere):
+
+```yaml
+auth:
+ method: universal-auth
+ universal_auth:
+ client_id: "<machine-identity-client-id>"
+ client_secret: "<machine-identity-client-secret>"
+
+signer:
+ id: "<signer-id>"
+```
+
+You can also pass the credentials via environment variables:
+
+```bash
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID="<machine-identity-client-id>"
+export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET="<machine-identity-client-secret>"
+```
+
+<Note>
+ Environment variables override values from the config file.
+</Note>
+
+For the full set of options, see the [PKCS#11 module configuration reference](/documentation/platform/pki/code-signing/pkcs11-module#configuration).
+
+## Step 2: Install osslsigncode and Dependencies
<Tabs>
<Tab title="Ubuntu / Debian">
@@ -44,7 +74,7 @@ Sign Windows Authenticode artifacts using `osslsigncode` with the Infisical PKCS
</Tab>
</Tabs>
-## Step 2: Identify Your Signer
+## Step 3: Identify Your Signer
Use `pkcs11-tool` to list available signers and note the token label:
@@ -59,7 +89,7 @@ Slot 0 (0x0): release-signer
token manufacturer : Infisical
```
-## Step 3: Sign a Windows Executable
+## Step 4: Sign a Windows Executable
Use `osslsigncode` with the PKCS#11 module to sign your binary:
@@ -97,7 +127,7 @@ osslsigncode can sign the following Windows artifact types:
| Scripts | `.ps1`, `.vbs` |
| Catalogs | `.cat` |
-## Step 4: Verify the Signature
+## Step 5: Verify the Signature
Verify the signed binary:
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/CertManagerNav.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/CertManagerNav.tsx
index 9f3b4de733..d09d11da26 100644
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/CertManagerNav.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/CertManagerNav.tsx
@@ -1,4 +1,5 @@
import { useQuery } from "@tanstack/react-query";
+import { useLocation } from "@tanstack/react-router";
import {
Bell,
FileKey,
@@ -37,6 +38,10 @@ export const CertManagerNav = ({
}) => {
const { hasProjectRole } = useProjectPermission();
const { currentProject } = useProject();
+ const { search: locationSearch } = useLocation();
+ const hasSignerContext = Boolean(
+ (locationSearch as { signerId?: string })?.signerId
+ );
const isCertManagerAdmin = hasProjectRole("admin");
const projectId = currentProject?.id ?? "";
const { data: certManagerInstance } = useCertManagerInstanceState();
@@ -117,7 +122,9 @@ export const CertManagerNav = ({
label: "Signers",
icon: PenTool,
pathSuffix: "code-signing",
- activeMatch: /\/code-signing/
+ activeMatch: hasSignerContext
+ ? /\/code-signing|\/approvals\/[^/]+/
+ : /\/code-signing/
}
];
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/ProjectNav.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/ProjectNav.tsx
index 147972bc97..ca861f3333 100644
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/ProjectNav.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/ProjectNav.tsx
@@ -58,6 +58,9 @@ export const ProjectNav = () => {
(locationSearch as { applicationName?: string })?.applicationName
);
const isFromRootRequests = (locationSearch as { from?: string })?.from === "root-requests";
+ const hasSignerContext = Boolean(
+ (locationSearch as { signerId?: string })?.signerId
+ );
const { submenu: smApprovalsSubmenu, pendingRequestsCount: smPendingCount } =
useApprovalSubmenu();
const intermediateAvailable = hasIntermediateProjectsView(currentProject.type);
@@ -82,7 +85,7 @@ export const ProjectNav = () => {
const isOnCertApprovals = isCertManager && pathname.includes("/approvals");
const getInitialProjectSubmenu = (): Submenu | null => {
- if (isLegacyView || hasApplicationContext || isFromRootRequests) return null;
+ if (isLegacyView || hasApplicationContext || isFromRootRequests || hasSignerContext) return null;
if (isCertManager && (isOnAccessControl || pathname.includes("/discovery"))) return null;
if (isOnAccessControl) {
if (currentProject.type === ProjectType.SecretManager)
diff --git a/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/ApprovalRequestDetailPage.tsx b/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/ApprovalRequestDetailPage.tsx
index 4e462be994..287133bc9d 100644
--- a/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/ApprovalRequestDetailPage.tsx
+++ b/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/ApprovalRequestDetailPage.tsx
@@ -96,7 +96,7 @@ const CodeSigningDetailsSection = ({
const PageContent = () => {
const { approvalRequestId } = useParams({ from: ROUTE_ID });
- const { policyType, applicationName, from } = useSearch({ from: ROUTE_ID });
+ const { policyType, applicationName, signerId, from } = useSearch({ from: ROUTE_ID });
const { currentOrg } = useOrganization();
const { currentProject } = useProject();
const { user: currentUser } = useUser();
@@ -151,6 +151,18 @@ const PageContent = () => {
});
return;
}
+ if (signerId) {
+ navigate({
+ to: "/organizations/$orgId/projects/cert-manager/$projectId/code-signing/$signerId",
+ params: {
+ orgId: currentOrg.id,
+ projectId: currentProject.id,
+ signerId
+ },
+ search: { selectedTab: "approvals" }
+ });
+ return;
+ }
navigate({
to: isCodeSigning
? "/organizations/$orgId/projects/cert-manager/$projectId/code-signing"
@@ -316,6 +328,24 @@ const PageContent = () => {
);
}
+ if (signerId) {
+ return (
+ <Link
+ to="/organizations/$orgId/projects/cert-manager/$projectId/code-signing/$signerId"
+ params={{
+ orgId: currentOrg.id,
+ projectId: currentProject.id,
+ signerId
+ }}
+ search={{ selectedTab: "approvals" }}
+ className={linkClass}
+ >
+ <FontAwesomeIcon icon={faChevronLeft} />
+ Back to Signer
+ </Link>
+ );
+ }
+
return (
<Link
to={
diff --git a/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/components/ApprovalStepsSection.tsx b/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/components/ApprovalStepsSection.tsx
index 7239e9c667..f37d7b6ac2 100644
--- a/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/components/ApprovalStepsSection.tsx
+++ b/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/components/ApprovalStepsSection.tsx
@@ -1,5 +1,5 @@
import { useMemo } from "react";
-import { Eye, User } from "lucide-react";
+import { CheckCircle2, Eye, User } from "lucide-react";
import { Tooltip } from "@app/components/v2";
import { Badge } from "@app/components/v3";
@@ -8,6 +8,7 @@ import { useGetWorkspaceUsers, useListWorkspaceGroups } from "@app/hooks/api";
import { ApproverType } from "@app/hooks/api/approvalPolicies";
import {
ApprovalRequestApprovalDecision,
+ ApprovalRequestStatus,
ApprovalRequestStepStatus,
TApprovalRequest
} from "@app/hooks/api/approvalRequests";
@@ -61,78 +62,93 @@ export const ApprovalStepsSection = ({ request }: Props) => {
<div className="flex w-full flex-col rounded-lg border border-mineshaft-600 bg-mineshaft-900 px-4 py-4">
<h3 className="mb-4 text-base font-medium text-mineshaft-100">Approval Workflow</h3>
- <div className="relative space-y-0">
- {request.steps.map((step, index) => {
- const isCurrentStep = step.status === ApprovalRequestStepStatus.InProgress;
- const isCompleted = step.status === ApprovalRequestStepStatus.Completed;
- const isLast = index === request.steps.length - 1;
+ {request.steps.length === 0 && request.status === ApprovalRequestStatus.Approved ? (
+ <div className="flex items-start gap-3 rounded-md border border-mineshaft-600 bg-mineshaft-800 px-3 py-3">
+ <div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary/15 text-primary">
+ <CheckCircle2 className="h-4 w-4" />
+ </div>
+ <div className="min-w-0">
+ <p className="text-sm font-medium text-mineshaft-100">Pre-approved</p>
+ <p className="mt-0.5 text-xs text-mineshaft-400">
+ An Administrator pre-approved this request.
+ </p>
+ </div>
+ </div>
+ ) : (
+ <div className="relative space-y-0">
+ {request.steps.map((step, index) => {
+ const isCurrentStep = step.status === ApprovalRequestStepStatus.InProgress;
+ const isCompleted = step.status === ApprovalRequestStepStatus.Completed;
+ const isLast = index === request.steps.length - 1;
- return (
- <div key={step.id} className="relative flex gap-3">
- {!isLast && (
- <div
- className={`absolute top-6 left-[11px] h-[calc(100%-26px)] w-0.5 ${
- isCompleted ? "bg-primary" : "bg-mineshaft-600"
- }`}
- />
- )}
-
- <div
- className={`relative z-10 flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-xs text-xs font-medium ${getStepCircleClasses(isCurrentStep, isCompleted)}`}
- >
- {index + 1}
- </div>
+ return (
+ <div key={step.id} className="relative flex gap-3">
+ {!isLast && (
+ <div
+ className={`absolute top-6 left-[11px] h-[calc(100%-26px)] w-0.5 ${
+ isCompleted ? "bg-primary" : "bg-mineshaft-600"
+ }`}
+ />
+ )}
- <div className={`flex-1 pb-4 ${isLast ? "pb-0" : ""}`}>
- <div className="flex items-center gap-2">
- <span
- className={`text-sm font-medium ${isCurrentStep || isCompleted ? "text-mineshaft-100" : "text-mineshaft-400"}`}
- >
- {step.name || `Step ${index + 1}`}
- </span>
- {isCurrentStep && (
- <Badge variant="project" className="text-xs">
- Current
- </Badge>
- )}
+ <div
+ className={`relative z-10 flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-xs text-xs font-medium ${getStepCircleClasses(isCurrentStep, isCompleted)}`}
+ >
+ {index + 1}
</div>
- <p className="mt-0.5 text-xs text-mineshaft-400">
- {step.requiredApprovals} approval{step.requiredApprovals > 1 ? "s" : ""} required
- </p>
- <div className="mt-2 space-y-1">
- {step.approvers.map((approver) => {
- const approval = step.approvals.find((a) => a.approverUserId === approver.id);
- const isApproved =
- approval?.decision === ApprovalRequestApprovalDecision.Approved;
- const isRejected =
- approval?.decision === ApprovalRequestApprovalDecision.Rejected;
- const hasComment = approval?.comment;
- return (
- <div
- key={approver.id}
- className="flex items-center gap-2 rounded-md bg-mineshaft-700 px-3 py-1.5 text-sm text-mineshaft-300"
- >
- <User className="h-3.5 w-3.5" />
- <span className="flex-1">
- {getApproverLabel(approver.id, approver.type)}
- </span>
- {isApproved && <span className="text-xs text-green-500">Approved</span>}
- {isRejected && <span className="text-xs text-red-500">Rejected</span>}
- {hasComment && (
- <Tooltip content={approval.comment}>
- <Eye className="h-3.5 w-3.5 cursor-pointer text-mineshaft-400 hover:text-mineshaft-200" />
- </Tooltip>
- )}
- </div>
- );
- })}
+ <div className={`flex-1 pb-4 ${isLast ? "pb-0" : ""}`}>
+ <div className="flex items-center gap-2">
+ <span
+ className={`text-sm font-medium ${isCurrentStep || isCompleted ? "text-mineshaft-100" : "text-mineshaft-400"}`}
+ >
+ {step.name || `Step ${index + 1}`}
+ </span>
+ {isCurrentStep && (
+ <Badge variant="project" className="text-xs">
+ Current
+ </Badge>
+ )}
+ </div>
+ <p className="mt-0.5 text-xs text-mineshaft-400">
+ {step.requiredApprovals} approval{step.requiredApprovals > 1 ? "s" : ""}{" "}
+ required
+ </p>
+
+ <div className="mt-2 space-y-1">
+ {step.approvers.map((approver) => {
+ const approval = step.approvals.find((a) => a.approverUserId === approver.id);
+ const isApproved =
+ approval?.decision === ApprovalRequestApprovalDecision.Approved;
+ const isRejected =
+ approval?.decision === ApprovalRequestApprovalDecision.Rejected;
+ const hasComment = approval?.comment;
+ return (
+ <div
+ key={approver.id}
+ className="flex items-center gap-2 rounded-md bg-mineshaft-700 px-3 py-1.5 text-sm text-mineshaft-300"
+ >
+ <User className="h-3.5 w-3.5" />
+ <span className="flex-1">
+ {getApproverLabel(approver.id, approver.type)}
+ </span>
+ {isApproved && <span className="text-xs text-green-500">Approved</span>}
+ {isRejected && <span className="text-xs text-red-500">Rejected</span>}
+ {hasComment && (
+ <Tooltip content={approval.comment}>
+ <Eye className="h-3.5 w-3.5 cursor-pointer text-mineshaft-400 hover:text-mineshaft-200" />
+ </Tooltip>
+ )}
+ </div>
+ );
+ })}
+ </div>
</div>
</div>
- </div>
- );
- })}
- </div>
+ );
+ })}
+ </div>
+ )}
</div>
);
};
diff --git a/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/route.tsx b/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/route.tsx
index 29c1264246..786cc75e77 100644
--- a/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/route.tsx
+++ b/frontend/src/pages/cert-manager/ApprovalRequestDetailPage/route.tsx
@@ -9,6 +9,7 @@ import { ApprovalRequestDetailPage } from "./ApprovalRequestDetailPage";
const ApprovalRequestSearchSchema = z.object({
policyType: z.nativeEnum(ApprovalPolicyType).optional(),
applicationName: z.string().optional(),
+ signerId: z.string().optional(),
from: z.enum(["root-requests"]).optional()
});
diff --git a/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerWizard/CertificateStep.tsx b/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerWizard/CertificateStep.tsx
index 696267ccc2..6807bc66ae 100644
--- a/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerWizard/CertificateStep.tsx
+++ b/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerWizard/CertificateStep.tsx
@@ -1,4 +1,5 @@
import { Controller, useForm } from "react-hook-form";
+import { Link, useParams } from "@tanstack/react-router";
import {
Field,
@@ -15,6 +16,7 @@ import {
SelectTrigger,
SelectValue
} from "@app/components/v3";
+import { ROUTE_PATHS } from "@app/const/routes";
import { SignerKeyAlgorithm, signerKeyAlgorithmLabels } from "@app/hooks/api/signers";
import { CertificateForm } from "./schemas";
@@ -26,135 +28,159 @@ type CertificateStepProps = {
isCasLoading: boolean;
};
-export const CertificateStep = ({ form, caOptions, isCasLoading }: CertificateStepProps) => (
- <FieldGroup>
- <Controller
- name="caId"
- control={form.control}
- render={({ field, fieldState: { error } }) => (
- <Field>
- <FieldLabel>
- Certificate Authority <span className="text-danger">*</span>
- </FieldLabel>
- <FieldContent>
- <FilterableSelect<CaOption>
- isLoading={isCasLoading}
- options={caOptions}
- value={caOptions.find((o) => o.id === field.value) ?? null}
- onChange={(selected) => {
- const opt = selected as CaOption | null;
- field.onChange(opt?.id ?? "");
- }}
- getOptionLabel={(opt) => opt.name}
- getOptionValue={(opt) => opt.id}
- groupBy={caOptions.length > 0 ? "groupType" : undefined}
- getGroupHeaderLabel={
- caOptions.length > 0
- ? (groupType: CaGroup) =>
- groupType === "internal" ? "Internal CAs" : "External CAs"
- : undefined
- }
- placeholder="Select a Certificate Authority..."
- noOptionsMessage={() => "No active CAs found in this project."}
- isError={Boolean(error)}
- />
- <FieldDescription>The CA that will issue the certificate.</FieldDescription>
- <FieldError errors={[error]} />
- </FieldContent>
- </Field>
- )}
- />
- <Controller
- name="commonName"
- control={form.control}
- render={({ field, fieldState: { error } }) => (
- <Field>
- <FieldLabel>
- Common Name <span className="text-danger">*</span>
- </FieldLabel>
- <FieldContent>
- <Input {...field} placeholder="Acme Mobile, Inc." isError={Boolean(error)} />
- <FieldDescription>The legal name shown on the certificate.</FieldDescription>
- <FieldError errors={[error]} />
- </FieldContent>
- </Field>
- )}
- />
- <Controller
- name="keyAlgorithm"
- control={form.control}
- render={({ field, fieldState: { error } }) => (
- <Field>
- <FieldLabel>
- Key algorithm <span className="text-danger">*</span>
- </FieldLabel>
- <FieldContent>
- <Select value={field.value} onValueChange={field.onChange}>
- <SelectTrigger className="w-full">
- <SelectValue />
- </SelectTrigger>
- <SelectContent>
- {Object.values(SignerKeyAlgorithm).map((value) => (
- <SelectItem key={value} value={value}>
- {signerKeyAlgorithmLabels[value]}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- <FieldError errors={[error]} />
- </FieldContent>
- </Field>
- )}
- />
- <Controller
- name="certificateTtlDays"
- control={form.control}
- render={({ field, fieldState: { error } }) => (
- <Field>
- <FieldLabel>
- Validity (days) <span className="text-danger">*</span>
- </FieldLabel>
- <FieldContent>
- <Input
- type="number"
- min={1}
- max={3650}
- value={field.value ?? ""}
- onChange={(e) => field.onChange(Number(e.target.value))}
- placeholder="365"
- isError={Boolean(error)}
- />
- <FieldError errors={[error]} />
- </FieldContent>
- </Field>
- )}
- />
- <Controller
- name="certificateRenewBeforeDays"
- control={form.control}
- render={({ field, fieldState: { error } }) => (
- <Field>
- <FieldLabel>Renew before (days)</FieldLabel>
- <FieldContent>
- <Input
- type="number"
- min={1}
- max={30}
- value={field.value ?? ""}
- onChange={(e) => {
- const raw = e.target.value;
- field.onChange(raw === "" ? null : Number(raw));
- }}
- placeholder="Leave empty to disable auto-renewal"
- isError={Boolean(error)}
- />
- <FieldDescription>
- Renew the certificate this many days before it expires.
- </FieldDescription>
- <FieldError errors={[error]} />
- </FieldContent>
- </Field>
- )}
- />
- </FieldGroup>
-);
+export const CertificateStep = ({ form, caOptions, isCasLoading }: CertificateStepProps) => {
+ const { orgId, projectId } = useParams({ strict: false }) as {
+ orgId?: string;
+ projectId?: string;
+ };
+ return (
+ <FieldGroup>
+ <Controller
+ name="caId"
+ control={form.control}
+ render={({ field, fieldState: { error } }) => (
+ <Field>
+ <FieldLabel>
+ Certificate Authority <span className="text-danger">*</span>
+ </FieldLabel>
+ <FieldContent>
+ <FilterableSelect<CaOption>
+ isLoading={isCasLoading}
+ options={caOptions}
+ value={caOptions.find((o) => o.id === field.value) ?? null}
+ onChange={(selected) => {
+ const opt = selected as CaOption | null;
+ field.onChange(opt?.id ?? "");
+ }}
+ getOptionLabel={(opt) => opt.name}
+ getOptionValue={(opt) => opt.id}
+ groupBy={caOptions.length > 0 ? "groupType" : undefined}
+ getGroupHeaderLabel={
+ caOptions.length > 0
+ ? (groupType: CaGroup) =>
+ groupType === "internal" ? "Internal CAs" : "External CAs"
+ : undefined
+ }
+ placeholder="Select a Certificate Authority..."
+ noOptionsMessage={() => "No active CAs available."}
+ isError={Boolean(error)}
+ />
+ <FieldDescription>
+ The CA that will issue the certificate.
+ {!isCasLoading && caOptions.length === 0 && orgId && projectId && (
+ <>
+ {" "}
+ <Link
+ to={ROUTE_PATHS.CertManager.CertificateAuthoritiesPage.path}
+ params={{ orgId, projectId }}
+ className="text-primary underline hover:text-primary/80"
+ >
+ Create one in the Certificate Authorities page.
+ </Link>
+ </>
+ )}
+ </FieldDescription>
+ <FieldError errors={[error]} />
+ </FieldContent>
+ </Field>
+ )}
+ />
+ <Controller
+ name="commonName"
+ control={form.control}
+ render={({ field, fieldState: { error } }) => (
+ <Field>
+ <FieldLabel>
+ Common Name <span className="text-danger">*</span>
+ </FieldLabel>
+ <FieldContent>
+ <Input {...field} placeholder="Acme Mobile, Inc." isError={Boolean(error)} />
+ <FieldDescription>The legal name shown on the certificate.</FieldDescription>
+ <FieldError errors={[error]} />
+ </FieldContent>
+ </Field>
+ )}
+ />
+ <Controller
+ name="keyAlgorithm"
+ control={form.control}
+ render={({ field, fieldState: { error } }) => (
+ <Field>
+ <FieldLabel>
+ Key algorithm <span className="text-danger">*</span>
+ </FieldLabel>
+ <FieldContent>
+ <Select value={field.value} onValueChange={field.onChange}>
+ <SelectTrigger className="w-full">
+ <SelectValue />
+ </SelectTrigger>
+ <SelectContent>
+ {Object.values(SignerKeyAlgorithm).map((value) => (
+ <SelectItem key={value} value={value}>
+ {signerKeyAlgorithmLabels[value]}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ <FieldDescription>
+ Algorithm used to generate the signer&apos;s private key. RSA is widely compatible,
+ ECDSA produces smaller signatures and is faster.
+ </FieldDescription>
+ <FieldError errors={[error]} />
+ </FieldContent>
+ </Field>
+ )}
+ />
+ <Controller
+ name="certificateTtlDays"
+ control={form.control}
+ render={({ field, fieldState: { error } }) => (
+ <Field>
+ <FieldLabel>
+ Validity (days) <span className="text-danger">*</span>
+ </FieldLabel>
+ <FieldContent>
+ <Input
+ type="number"
+ min={1}
+ max={3650}
+ value={field.value ?? ""}
+ onChange={(e) => field.onChange(Number(e.target.value))}
+ placeholder="365"
+ isError={Boolean(error)}
+ />
+ <FieldError errors={[error]} />
+ </FieldContent>
+ </Field>
+ )}
+ />
+ <Controller
+ name="certificateRenewBeforeDays"
+ control={form.control}
+ render={({ field, fieldState: { error } }) => (
+ <Field>
+ <FieldLabel>Renew before (days)</FieldLabel>
+ <FieldContent>
+ <Input
+ type="number"
+ min={1}
+ max={30}
+ value={field.value ?? ""}
+ onChange={(e) => {
+ const raw = e.target.value;
+ field.onChange(raw === "" ? null : Number(raw));
+ }}
+ placeholder="Leave empty to disable auto-renewal"
+ isError={Boolean(error)}
+ />
+ <FieldDescription>
+ Renew the certificate this many days before it expires.
+ </FieldDescription>
+ <FieldError errors={[error]} />
+ </FieldContent>
+ </Field>
+ )}
+ />
+ </FieldGroup>
+ );
+};
diff --git a/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerWizard/CreateSignerWizard.tsx b/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerWizard/CreateSignerWizard.tsx
index dba22b0d25..adcd05c1b6 100644
--- a/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerWizard/CreateSignerWizard.tsx
+++ b/frontend/src/pages/cert-manager/CodeSigningPage/components/CreateSignerWizard/CreateSignerWizard.tsx
@@ -18,10 +18,9 @@ import {
import { useOrganization, useUser } from "@app/context";
import { useListCasByProjectId } from "@app/hooks/api/ca";
import { CaStatus, CaType } from "@app/hooks/api/ca/enums";
-import {
- useGetIdentityMembershipOrgs,
- useGetOrganizationGroups
-} from "@app/hooks/api/organization";
+import { useGetOrganizationGroups } from "@app/hooks/api/organization";
+import { useListProjectIdentityMemberships } from "@app/hooks/api/projectIdentityMembership";
+import { ProjectType } from "@app/hooks/api/projects/types";
import { SignerKeyAlgorithm, SignerMemberRole, useCreateSigner } from "@app/hooks/api/signers";
import { useGetOrgUsers } from "@app/hooks/api/users";
@@ -56,7 +55,11 @@ export const CreateSignerWizard = ({ isOpen, onOpenChange, projectId }: Props) =
const cas = useListCasByProjectId();
const usersQuery = useGetOrgUsers(orgId);
- const identitiesQuery = useGetIdentityMembershipOrgs({ organizationId: orgId, limit: 100 });
+ const identitiesQuery = useListProjectIdentityMemberships({
+ projectId,
+ projectType: ProjectType.CertificateManager,
+ limit: 1000
+ });
const groupsQuery = useGetOrganizationGroups(orgId);
const createSigner = useCreateSigner();
diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/components/AddSignerMemberModal.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/components/AddSignerMemberModal.tsx
index 292885a81a..0e93c71b49 100644
--- a/frontend/src/pages/cert-manager/SignerDetailPage/components/AddSignerMemberModal.tsx
+++ b/frontend/src/pages/cert-manager/SignerDetailPage/components/AddSignerMemberModal.tsx
@@ -23,10 +23,7 @@ import {
SelectValue
} from "@app/components/v3";
import { useOrganization, useProject } from "@app/context";
-import {
- useGetIdentityMembershipOrgs,
- useGetOrganizationGroups
-} from "@app/hooks/api/organization";
+import { useGetOrganizationGroups } from "@app/hooks/api/organization";
import { useListProjectIdentityMemberships } from "@app/hooks/api/projectIdentityMembership";
import { ProjectType } from "@app/hooks/api/projects/types";
import {
@@ -70,7 +67,6 @@ export const AddSignerMemberModal = ({
const [submitting, setSubmitting] = useState(false);
const usersQuery = useGetOrgUsers(orgId);
- const orgIdentitiesQuery = useGetIdentityMembershipOrgs({ organizationId: orgId, limit: 100 });
const projectIdentitiesQuery = useListProjectIdentityMemberships({
projectId,
projectType: ProjectType.CertificateManager,
@@ -106,20 +102,11 @@ export const AddSignerMemberModal = ({
}, [usersQuery.data, taken]);
const identityOptions: Option[] = useMemo(() => {
- const seen = new Set<string>();
- const collect = (id: string, name: string) => {
- if (seen.has(id) || taken.has(`identity:${id}`)) return null;
- seen.add(id);
- return { value: id, label: name };
- };
- const fromOrg = (orgIdentitiesQuery.data?.identityMemberships ?? [])
- .map((im) => collect(im.identity.id, im.identity.name))
- .filter((opt): opt is Option => opt !== null);
- const fromProject = (projectIdentitiesQuery.data?.identityMemberships ?? [])
- .map((im) => collect(im.identity.id, im.identity.name))
- .filter((opt): opt is Option => opt !== null);
- return [...fromOrg, ...fromProject].sort((a, b) => a.label.localeCompare(b.label));
- }, [orgIdentitiesQuery.data, projectIdentitiesQuery.data, taken]);
+ return (projectIdentitiesQuery.data?.identityMemberships ?? [])
+ .filter((im) => !taken.has(`identity:${im.identity.id}`))
+ .map((im) => ({ value: im.identity.id, label: im.identity.name }))
+ .sort((a, b) => a.label.localeCompare(b.label));
+ }, [projectIdentitiesQuery.data, taken]);
const groupOptions: Option[] = useMemo(() => {
return (groupsQuery.data ?? [])
diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerModal/CertificateStep.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerModal/CertificateStep.tsx
index f02eef8c48..99002799f3 100644
--- a/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerModal/CertificateStep.tsx
+++ b/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerModal/CertificateStep.tsx
@@ -63,7 +63,7 @@ export const CertificateStep = ({
: undefined
}
placeholder="Select a Certificate Authority..."
- noOptionsMessage={() => "No active CAs found in this project."}
+ noOptionsMessage={() => "No active CAs available."}
isError={Boolean(error)}
/>
<FieldDescription>
@@ -155,6 +155,10 @@ export const CertificateStep = ({
<FieldLabel>Key algorithm</FieldLabel>
<FieldContent>
<Input value={keyAlgorithmLabel} readOnly disabled />
+ <FieldDescription>
+ Algorithm of the signer&apos;s private key. Fixed at creation; create a new signer to use
+ a different one.
+ </FieldDescription>
</FieldContent>
</Field>
diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerPolicyModal/EditSignerPolicyModal.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerPolicyModal/EditSignerPolicyModal.tsx
index bbc393d029..cc2af86074 100644
--- a/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerPolicyModal/EditSignerPolicyModal.tsx
+++ b/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerPolicyModal/EditSignerPolicyModal.tsx
@@ -55,6 +55,7 @@ export const EditSignerPolicyModal = ({
const [maxSignings, setMaxSignings] = useState<number | null>(null);
const [maxWindow, setMaxWindow] = useState<string | null>(null);
const [submitting, setSubmitting] = useState(false);
+ const [showLimitsError, setShowLimitsError] = useState(false);
const approverOptions = useMemo<ApproverOption[]>(() => {
const userOpts: ApproverOption[] = (users.data?.memberships ?? [])
@@ -106,8 +107,13 @@ export const EditSignerPolicyModal = ({
setMaxSignings(null);
setMaxWindow(null);
}
+ setShowLimitsError(false);
}, [isOpen, existingPolicy]);
+ useEffect(() => {
+ if (maxSignings != null || maxWindow != null) setShowLimitsError(false);
+ }, [maxSignings, maxWindow]);
+
useEffect(() => {
if (!isOpen || approverOptions.length === 0) return;
const lookup = new Map(approverOptions.map((o) => [approverKey(o.kind, o.value), o.label]));
@@ -151,7 +157,14 @@ export const EditSignerPolicyModal = ({
const WIZARD_STEPS = steps.length > 0 ? [APPROVERS_STEP, LIMITS_STEP] : [APPROVERS_STEP];
const safeStep = Math.min(step, WIZARD_STEPS.length - 1);
+ const limitsInvalid = steps.length > 0 && maxSignings == null && maxWindow == null;
+
const onSave = async () => {
+ if (limitsInvalid) {
+ setShowLimitsError(true);
+ if (safeStep !== 1) setStep(1);
+ return;
+ }
const invalidStepIndex = steps.findIndex((s) => {
if (s.approvers.length === 0) return true;
if (s.requiredApprovals < 1) return true;
@@ -269,6 +282,7 @@ export const EditSignerPolicyModal = ({
setMaxSignings={setMaxSignings}
maxWindow={maxWindow}
setMaxWindow={setMaxWindow}
+ showError={showLimitsError && limitsInvalid}
/>
)}
</div>
diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerPolicyModal/LimitsStep.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerPolicyModal/LimitsStep.tsx
index dd52689e50..84743e9681 100644
--- a/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerPolicyModal/LimitsStep.tsx
+++ b/frontend/src/pages/cert-manager/SignerDetailPage/components/EditSignerPolicyModal/LimitsStep.tsx
@@ -2,6 +2,7 @@ import {
Field,
FieldContent,
FieldDescription,
+ FieldError,
FieldGroup,
FieldLabel,
Input,
@@ -19,9 +20,16 @@ type Props = {
setMaxSignings: (v: number | null) => void;
maxWindow: string | null;
setMaxWindow: (v: string | null) => void;
+ showError?: boolean;
};
-export const LimitsStep = ({ maxSignings, setMaxSignings, maxWindow, setMaxWindow }: Props) => (
+export const LimitsStep = ({
+ maxSignings,
+ setMaxSignings,
+ maxWindow,
+ setMaxWindow,
+ showError = false
+}: Props) => (
<>
<h2 className="text-xl font-semibold text-mineshaft-100">What an approval allows</h2>
<p className="mt-1 mb-4 text-sm text-mineshaft-300">
@@ -38,10 +46,16 @@ export const LimitsStep = ({ maxSignings, setMaxSignings, maxWindow, setMaxWindo
value={maxSignings ?? ""}
onChange={(e) => setMaxSignings(e.target.value ? Number(e.target.value) : null)}
placeholder="10"
+ isError={showError}
/>
<FieldDescription>
How many times one approval can be used to sign. Leave empty for unlimited.
</FieldDescription>
+ {showError && (
+ <FieldError
+ errors={[{ message: "Set a limit here or pick a signing window below." }]}
+ />
+ )}
</FieldContent>
</Field>
@@ -52,7 +66,7 @@ export const LimitsStep = ({ maxSignings, setMaxSignings, maxWindow, setMaxWindo
value={maxWindow ?? NO_WINDOW_LIMIT}
onValueChange={(v) => setMaxWindow(v === NO_WINDOW_LIMIT ? null : v)}
>
- <SelectTrigger className="w-full">
+ <SelectTrigger className="w-full" isError={showError}>
<SelectValue />
</SelectTrigger>
<SelectContent>
@@ -66,6 +80,11 @@ export const LimitsStep = ({ maxSignings, setMaxSignings, maxWindow, setMaxWindo
<FieldDescription>
After approval is granted, how long signing is allowed before it expires.
</FieldDescription>
+ {showError && (
+ <FieldError
+ errors={[{ message: "Pick a window here or set signatures per approval." }]}
+ />
+ )}
</FieldContent>
</Field>
</FieldGroup>
diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/components/PreApproveSigningModal.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/components/PreApproveSigningModal.tsx
index b3983f01f8..08e8c59d2b 100644
--- a/frontend/src/pages/cert-manager/SignerDetailPage/components/PreApproveSigningModal.tsx
+++ b/frontend/src/pages/cert-manager/SignerDetailPage/components/PreApproveSigningModal.tsx
@@ -64,7 +64,11 @@ const schema = z
type FormData = z.infer<typeof schema>;
const HOURS_24_MS = 24 * 60 * 60 * 1000;
-const isoLocal = (epochMs: number) => new Date(epochMs).toISOString().slice(0, 16);
+const isoLocal = (epochMs: number) => {
+ const d = new Date(epochMs);
+ const pad = (n: number) => String(n).padStart(2, "0");
+ return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;
+};
const parseWindowMs = (s?: string | null): number | null => {
if (!s) return null;
diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/components/RequestToSignModal.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/components/RequestToSignModal.tsx
index 54c716ad2c..505088a1ac 100644
--- a/frontend/src/pages/cert-manager/SignerDetailPage/components/RequestToSignModal.tsx
+++ b/frontend/src/pages/cert-manager/SignerDetailPage/components/RequestToSignModal.tsx
@@ -54,7 +54,12 @@ const schema = z
type FormData = z.infer<typeof schema>;
const HOURS_24_MS = 24 * 60 * 60 * 1000;
-const isoLocal = (epochMs: number) => new Date(epochMs).toISOString().slice(0, 16);
+
+const isoLocal = (epochMs: number) => {
+ const d = new Date(epochMs);
+ const pad = (n: number) => String(n).padStart(2, "0");
+ return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;
+};
const parseWindowMs = (s?: string | null): number | null => {
if (!s) return null;
diff --git a/frontend/src/pages/cert-manager/SignerDetailPage/components/SignerRequestsTab/SignerRequestsTab.tsx b/frontend/src/pages/cert-manager/SignerDetailPage/components/SignerRequestsTab/SignerRequestsTab.tsx
index 0872e1f889..c37a7286ec 100644
--- a/frontend/src/pages/cert-manager/SignerDetailPage/components/SignerRequestsTab/SignerRequestsTab.tsx
+++ b/frontend/src/pages/cert-manager/SignerDetailPage/components/SignerRequestsTab/SignerRequestsTab.tsx
@@ -1,4 +1,5 @@
import { useEffect, useMemo, useState } from "react";
+import { useNavigate } from "@tanstack/react-router";
import { format } from "date-fns";
import { FilterIcon, MessageSquareTextIcon, XIcon } from "lucide-react";
import { twMerge } from "tailwind-merge";
@@ -35,6 +36,8 @@ import {
TooltipProvider,
TooltipTrigger
} from "@app/components/v3";
+import { useOrganization, useProject } from "@app/context";
+import { ApprovalPolicyType } from "@app/hooks/api/approvalPolicies";
import {
SIGNER_TABLE_PAGE_SIZE,
SignerRequestStatus,
@@ -67,6 +70,9 @@ type Props = {
};
export const SignerRequestsTab = ({ signerId, canPreApprove, canRequestSign }: Props) => {
+ const navigate = useNavigate();
+ const { currentOrg } = useOrganization();
+ const { currentProject } = useProject();
const [statusFilters, setStatusFilters] = useState<Set<FilterStatus>>(new Set());
const [isRequestOpen, setIsRequestOpen] = useState(false);
const [isPreApproveOpen, setIsPreApproveOpen] = useState(false);
@@ -243,7 +249,24 @@ export const SignerRequestsTab = ({ signerId, canPreApprove, canRequestSign }: P
req.status === SignerRequestStatus.Approved;
const created = new Date(req.createdAt);
return (
- <TableRow key={req.id} className="group [&>td]:py-3">
+ <TableRow
+ key={req.id}
+ className="group cursor-pointer transition-colors hover:bg-mineshaft-700 [&>td]:py-3"
+ onClick={() =>
+ navigate({
+ to: "/organizations/$orgId/projects/cert-manager/$projectId/approvals/$approvalRequestId",
+ params: {
+ orgId: currentOrg.id,
+ projectId: currentProject.id,
+ approvalRequestId: req.id
+ },
+ search: {
+ policyType: ApprovalPolicyType.CertCodeSigning,
+ signerId
+ }
+ })
+ }
+ >
<TableCell isTruncatable>
<div className="flex items-start gap-2">
<div className="mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-border bg-mineshaft-800">
@@ -294,7 +317,7 @@ export const SignerRequestsTab = ({ signerId, canPreApprove, canRequestSign }: P
<TableCell className="text-accent">
<ExpiresCell req={req} />
</TableCell>
- <TableCell>
+ <TableCell onClick={(e) => e.stopPropagation()}>
{isRevocable && canPreApprove && (
<Tooltip>
<TooltipTrigger asChild>