Skip to content

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

fix minor comments

adilsonbec87f501e18
diff --git a/backend/src/services/delegated-approval/providers/servicenow/servicenow-fns.test.ts b/backend/src/services/delegated-approval/providers/servicenow/servicenow-fns.test.ts
index 672a9f7484..dc708286d4 100644
--- a/backend/src/services/delegated-approval/providers/servicenow/servicenow-fns.test.ts
+++ b/backend/src/services/delegated-approval/providers/servicenow/servicenow-fns.test.ts
@@ -128,6 +128,23 @@ describe("buildServiceNowAccessRequestPayload", () => {
).toThrow(/too long for ServiceNow to store/);
});
+ test("refuses a permission list that fills the ServiceNow column, which read-back treats as cut short", () => {
+ expect(() =>
+ buildServiceNowAccessRequestPayload(
+ makeInput({
+ details: {
+ policyType: ApprovalPolicyType.SecretAccess,
+ environment: "prod",
+ secretPath: "/",
+ permissions: ["x".repeat(4000)],
+ isTemporary: false,
+ temporaryRange: null
+ }
+ })
+ )
+ ).toThrow(/too long for ServiceNow to store/);
+ });
+
test("refuses a temporary range longer than ServiceNow stores", () => {
expect(() =>
buildServiceNowAccessRequestPayload(
diff --git a/backend/src/services/delegated-approval/providers/servicenow/servicenow-schemas.ts b/backend/src/services/delegated-approval/providers/servicenow/servicenow-schemas.ts
index df9f503634..0e90d22157 100644
--- a/backend/src/services/delegated-approval/providers/servicenow/servicenow-schemas.ts
+++ b/backend/src/services/delegated-approval/providers/servicenow/servicenow-schemas.ts
@@ -26,7 +26,7 @@ export const ServiceNowAccessRequestPayloadSchema = z.object({
.string()
.array()
.refine(
- (lines) => lines.join("\n").length <= SERVICENOW_PERMISSIONS_MAX_CHARS,
+ (lines) => lines.join("\n").length < SERVICENOW_PERMISSIONS_MAX_CHARS,
"The permission list is too long for ServiceNow to store. Split it into smaller requests"
)
.optional(),
diff --git a/docs/documentation/platform/workflow-integrations/servicenow-integration.mdx b/docs/documentation/platform/workflow-integrations/servicenow-integration.mdx
index 023e00d0d4..66d407bf24 100644
--- a/docs/documentation/platform/workflow-integrations/servicenow-integration.mdx
+++ b/docs/documentation/platform/workflow-integrations/servicenow-integration.mdx
@@ -15,11 +15,13 @@ Infisical stays the enforcement point. It creates the request, waits for Service
## How it works
1. A user requests access in Infisical to an environment and secret path.
-2. The request matches an access policy configured with the **ServiceNow** approver type.
+2. The request matches an access policy that sends its requests to ServiceNow.
3. Infisical creates an Infisical Access Request record on your ServiceNow instance over the ServiceNow app connection.
4. A ServiceNow flow you own routes that record to the right approvers.
-5. When the flow reaches a decision, its final step calls the **Infisical - Notify Decision** action, which sends the decision back to Infisical using a machine identity.
-6. Infisical grants the access on approval, or closes the request on rejection.
+5. When the flow reaches a decision, its final step calls the **Infisical - Notify Decision** action, which tells Infisical that the record has a decision.
+6. Infisical reads the decision from the record, then grants the access on approval or closes the request on rejection.
+
+You don't create an Infisical credential for ServiceNow. Each record carries a token that Infisical issued for that request alone, and the **Infisical - Notify Decision** action sends that token to Infisical with its notice.
If ServiceNow never returns a decision, the request expires in Infisical according to the policy's request expiration setting. Access is never granted by default.
@@ -28,6 +30,7 @@ If ServiceNow never returns a decision, the request expires in Infisical accordi
- A Secrets Management project on Infisical with Access Requests available.
- A ServiceNow instance where you can install a scoped application, create users, and use Flow Designer.
- Network reachability in both directions: Infisical must reach your ServiceNow instance, and your ServiceNow instance must reach your Infisical URL.
+- If you self-host Infisical, a [`SITE_URL`](/self-hosting/configuration/envars) that starts with `https://` (ServiceNow notifies Infisical at that address).
## Setup
@@ -37,19 +40,18 @@ If ServiceNow never returns a decision, the request expires in Infisical accordi
- **Access Requests**: every request Infisical has sent.
- **Pending Requests**: requests awaiting a decision.
- - **Identity Mappings**: which Infisical credential the app uses to send decisions back.
- **Admin Console**: a single-page view of the above.
The application also installs four roles:
| Role | Grants |
| --- | --- |
- | `x_infis_approvals.admin` | Full configuration access, including identity mappings. |
+ | `x_infis_approvals.admin` | Full access to every request, including delete, and the **Admin Console**. |
| `x_infis_approvals.approver` | View and decide on access requests. |
| `x_infis_approvals.viewer` | Read-only access to requests and their audit trail. |
| `x_infis_approvals.secret-manager-integration` | API-only role used by Infisical to create requests. |
- Assign `x_infis_approvals.admin` to complete the rest of this setup, and `x_infis_approvals.approver` to your approver groups.
+ Assign `x_infis_approvals.admin` to the people who manage the integration, and `x_infis_approvals.approver` to your approver groups.
</Step>
@@ -60,48 +62,13 @@ If ServiceNow never returns a decision, the request expires in Infisical accordi
</Step>
- <Step title="Create a machine identity for decision callbacks">
- ServiceNow needs its own credential to send decisions back to Infisical.
-
- In Infisical, go to **Access Control** > **Machine Identities** and create a machine identity, for example `servicenow-approvals`.
-
- Configure it with **Universal Auth** and generate a Client ID and Client Secret. Save both, the secret is shown only once.
-
- Next, give the identity permission to submit decisions:
-
- 1. In your Secrets Management project, go to **Access Control > Project Roles** and create a role such as `servicenow-external-reviewer`.
- 2. Grant it the **External Review** permission on **Approval Requests**.
- 3. Add the machine identity to the project with that role.
-
- <Note>
- **External Review** only allows submitting an approve or reject decision on
- requests Infisical has already sent to ServiceNow. It does not allow reading
- secrets, and it does not allow creating or modifying policies.
- </Note>
-
- </Step>
-
- <Step title="Store the Infisical credential in ServiceNow">
- In ServiceNow, create a Connection and Credential alias from the **Infisical - Universal Auth** template that ships with the application. Provide:
-
- - **Infisical URL**: your Infisical base URL, for example `https://app.infisical.com`, or your self-hosted URL.
- - **Client ID**: the Universal Auth Client ID from the previous step.
- - **Client Secret**: the Universal Auth Client Secret.
- - **Infisical Identity ID**: the ID of the machine identity.
-
- The Client Secret is stored in the ServiceNow credential store, not in an application table. At decision time the app exchanges the Client ID and Secret for a short-lived Infisical token, so no long-lived token sits on the instance.
-
- Saving the alias automatically creates a row under **Infisical > Identity Mappings** that maps the identity ID to the alias. The app uses this mapping to pick the right credential when it sends a decision, which is what lets one instance serve several Infisical organizations or projects. You can edit the mapping later, or clear its Active flag to stop decisions from being sent through it.
-
- </Step>
-
<Step title="Build the approval flow">
Approval routing is entirely yours to define in Flow Designer. Infisical doesn't dictate approvers, steps, or SLAs.
The fastest path is to clone the included template:
1. Go to **All > Process Automation > Flow Designer**.
- 2. Open **Infisical - Sequential Approval Template** and click **Copy Flow**.
+ 2. Open **Infisical - Single Approval Template** and select **Copy Flow**.
3. Adjust the trigger condition. The trigger is a record created on **Infisical Access Request [x_infis_approvals_access_request]**, and the condition is what decides which requests this flow owns, for example `Environment is prod` or `Secret Path contains /payments`.
4. Fill in the approvers on each **Ask for Approval** step, along with the number of approvals required.
5. Confirm that every branch, approved and rejected alike, ends with an **Update Record** action setting **State**, followed by the **Infisical - Notify Decision** action.
@@ -129,13 +96,13 @@ If ServiceNow never returns a decision, the request expires in Infisical accordi
<Step title="Enable ServiceNow approvals on an access policy">
In your Secrets Management project, go to **Approvals > Policies** and create or edit an **Access Policy**. Set:
- - **Approver Type**: **ServiceNow**.
- - **ServiceNow Connection**: the connection created in step 2.
- - **Review Identity**: the machine identity created in step 3. Infisical includes this identity's ID on every request so ServiceNow can resolve the matching identity mapping.
+ - **Approval Workflow**: **External Approval System**.
+ - **Provider**: **ServiceNow**.
+ - **App Connection**: the connection created in step 2.
- **Environments** and **Secret Path**: what this policy governs, as with any access policy.
- **Request Expiration**: how long a request may sit in ServiceNow before Infisical closes it.
- Requests matching this policy are now routed to ServiceNow. Policies without the ServiceNow approver type keep using in-app approvers, so you can move one environment at a time.
+ Requests matching this policy are now routed to ServiceNow. Policies set to the **Infisical** workflow keep using in-app approvers, so you can move one environment at a time.
</Step>
</Steps>
@@ -178,12 +145,11 @@ Both sides keep their own record. In ServiceNow, the access request record carri
| Symptom | Cause and fix |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Requests never appear in ServiceNow | The policy isn't set to the ServiceNow approver type, or the environment and secret path on the policy don't match the request. Check the Infisical audit log for the delivery attempt. |
+| Requests never appear in ServiceNow | The policy doesn't send its requests to ServiceNow, or the environment and secret path on the policy don't match the request. Check the Infisical audit log for the delivery attempt. |
| Record created but nothing happens | No active flow matches the record. Verify your flow is activated and its trigger condition matches the record's field values. |
| Approvers see duplicate approvals | Two flows match the same record. Make the trigger conditions mutually exclusive and deactivate the one you no longer want. |
| State stuck at Notifying Infisical | The callback is in flight or the flow errored mid-step. Check the flow's execution details. |
-| Callback Failed: no active identity mapping | The request's identity ID has no active row under Infisical > Identity Mappings**. Confirm the **Review Identity\*\* on the policy matches the identity ID in the mapping. |
-| Callback Failed with HTTP 401 or 403 | The machine identity isn't a member of the project, or is missing the External Review permission on Approval Requests. |
-| Callback Failed with a connection error | The ServiceNow instance can't reach your Infisical URL. Check the URL on the alias and any outbound firewall rules on the instance. |
+| Callback Failed with HTTP 403 | Infisical already closed this request, or ServiceNow notified Infisical about it more than five times. Check the request's status in Infisical, and create the request again if the requester still needs access. |
+| Callback Failed with a connection error | The ServiceNow instance can't reach the **Callback URL** on the record. Fix the instance's outbound firewall rules, then select **Resend to Infisical** on the request in the **Admin Console**. If the URL itself is wrong, correct `SITE_URL` and create the request again. |
| Request expired before approval | The policy's request expiration elapsed while the request sat in ServiceNow. Extend it, or shorten your approval SLA. |
| Infisical says the request couldn't be completed in ServiceNow | Infisical couldn't apply the decision. The reason is shown under the request status: the **Permissions** field was changed in ServiceNow, the record was deleted, or ServiceNow rejected the integration user's credentials. Fix the cause and create the request again. |