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
Add vercel secret syncs docs
carlosmonastyrski90bf8f800bb9
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.tsindex 2e85783ec1..78e5690443 100644--- a/backend/src/lib/api-docs/constants.ts+++ b/backend/src/lib/api-docs/constants.ts@@ -1787,7 +1787,7 @@ export const SecretSyncs = {app: "The ID of the Vercel app to sync secrets to.",appName: "The name of the Vercel app to sync secrets to.",env: "The ID of the Vercel environment to sync secrets to.",- branch: "The branch to sync secrets to. Required for Preview environments."+ branch: "The branch to sync preview secrets to."}}};diff --git a/backend/src/services/app-connection/vercel/vercel-connection-fns.ts b/backend/src/services/app-connection/vercel/vercel-connection-fns.tsindex 5f14565dba..d3adb87adb 100644--- a/backend/src/services/app-connection/vercel/vercel-connection-fns.ts+++ b/backend/src/services/app-connection/vercel/vercel-connection-fns.ts@@ -155,7 +155,7 @@ async function fetchPreviewBranches(projectId: string, apiToken: string): Promis}});- return data.map((b) => b.ref);+ return data.filter((b) => b.ref !== "main").map((b) => b.ref);}type VercelTeam = {diff --git a/backend/src/services/secret-sync/vercel/vercel-sync-schemas.ts b/backend/src/services/secret-sync/vercel/vercel-sync-schemas.tsindex 94888be97f..ac59351b01 100644--- a/backend/src/services/secret-sync/vercel/vercel-sync-schemas.ts+++ b/backend/src/services/secret-sync/vercel/vercel-sync-schemas.ts@@ -12,27 +12,14 @@ import { TSyncOptionsConfig } from "@app/services/secret-sync/secret-sync-types"import { VercelEnvironmentType } from "./vercel-sync-enums";-const VercelSyncDestinationConfigSchema = z- .object({- app: z.string().min(1, "App ID is required").describe(SecretSyncs.DESTINATION_CONFIG.VERCEL.app),- appName: z.string().min(1, "App Name is required").describe(SecretSyncs.DESTINATION_CONFIG.VERCEL.appName),- env: z- .enum([VercelEnvironmentType.Development, VercelEnvironmentType.Preview, VercelEnvironmentType.Production])- .describe(SecretSyncs.DESTINATION_CONFIG.VERCEL.env),- branch: z.string().optional().describe(SecretSyncs.DESTINATION_CONFIG.VERCEL.branch)- })- .refine(- (data) => {- if (data.env === VercelEnvironmentType.Preview) {- return !!data.branch && data.branch.trim().length > 0;- }- return true;- },- {- message: "Branch is required for Preview environments",- path: ["branch"]- }- );+const VercelSyncDestinationConfigSchema = z.object({+ app: z.string().min(1, "App ID is required").describe(SecretSyncs.DESTINATION_CONFIG.VERCEL.app),+ appName: z.string().min(1, "App Name is required").describe(SecretSyncs.DESTINATION_CONFIG.VERCEL.appName),+ env: z+ .enum([VercelEnvironmentType.Development, VercelEnvironmentType.Preview, VercelEnvironmentType.Production])+ .describe(SecretSyncs.DESTINATION_CONFIG.VERCEL.env),+ branch: z.string().optional().describe(SecretSyncs.DESTINATION_CONFIG.VERCEL.branch)+});const VercelSyncOptionsConfig: TSyncOptionsConfig = { canImportSecrets: false };diff --git a/docs/api-reference/endpoints/app-connections/vercel/available.mdx b/docs/api-reference/endpoints/app-connections/vercel/available.mdxnew file mode 100644index 0000000000..16859bded6--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/vercel/available.mdx@@ -0,0 +1,4 @@+---+title: "Available"+openapi: "GET /api/v1/app-connections/vercel/available"+---diff --git a/docs/api-reference/endpoints/app-connections/vercel/create.mdx b/docs/api-reference/endpoints/app-connections/vercel/create.mdxnew file mode 100644index 0000000000..cb2f22f7b5--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/vercel/create.mdx@@ -0,0 +1,4 @@+---+title: "Create"+openapi: "POST /api/v1/app-connections/vercel"+---\ No newline at end of filediff --git a/docs/api-reference/endpoints/app-connections/vercel/delete.mdx b/docs/api-reference/endpoints/app-connections/vercel/delete.mdxnew file mode 100644index 0000000000..4e5b12eff8--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/vercel/delete.mdx@@ -0,0 +1,4 @@+---+title: "Delete"+openapi: "DELETE /api/v1/app-connections/vercel/{connectionId}"+---diff --git a/docs/api-reference/endpoints/app-connections/vercel/get-by-id.mdx b/docs/api-reference/endpoints/app-connections/vercel/get-by-id.mdxnew file mode 100644index 0000000000..fdeb715a83--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/vercel/get-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get by ID"+openapi: "GET /api/v1/app-connections/vercel/{connectionId}"+---diff --git a/docs/api-reference/endpoints/app-connections/vercel/get-by-name.mdx b/docs/api-reference/endpoints/app-connections/vercel/get-by-name.mdxnew file mode 100644index 0000000000..258ed67c7c--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/vercel/get-by-name.mdx@@ -0,0 +1,4 @@+---+title: "Get by Name"+openapi: "GET /api/v1/app-connections/vercel/connection-name/{connectionName}"+---diff --git a/docs/api-reference/endpoints/app-connections/vercel/list.mdx b/docs/api-reference/endpoints/app-connections/vercel/list.mdxnew file mode 100644index 0000000000..5412d35bb0--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/vercel/list.mdx@@ -0,0 +1,4 @@+---+title: "List"+openapi: "GET /api/v1/app-connections/vercel"+---diff --git a/docs/api-reference/endpoints/app-connections/vercel/update.mdx b/docs/api-reference/endpoints/app-connections/vercel/update.mdxnew file mode 100644index 0000000000..b9b46c1642--- /dev/null+++ b/docs/api-reference/endpoints/app-connections/vercel/update.mdx@@ -0,0 +1,4 @@+---+title: "Update"+openapi: "PATCH /api/v1/app-connections/vercel/{connectionId}"+---\ No newline at end of filediff --git a/docs/api-reference/endpoints/secret-syncs/vercel/create.mdx b/docs/api-reference/endpoints/secret-syncs/vercel/create.mdxnew file mode 100644index 0000000000..e14d6ddddd--- /dev/null+++ b/docs/api-reference/endpoints/secret-syncs/vercel/create.mdx@@ -0,0 +1,4 @@+---+title: "Create"+openapi: "POST /api/v1/secret-syncs/vercel"+---diff --git a/docs/api-reference/endpoints/secret-syncs/vercel/delete.mdx b/docs/api-reference/endpoints/secret-syncs/vercel/delete.mdxnew file mode 100644index 0000000000..746e7ffe55--- /dev/null+++ b/docs/api-reference/endpoints/secret-syncs/vercel/delete.mdx@@ -0,0 +1,4 @@+---+title: "Delete"+openapi: "DELETE /api/v1/secret-syncs/vercel/{syncId}"+---diff --git a/docs/api-reference/endpoints/secret-syncs/vercel/get-by-id.mdx b/docs/api-reference/endpoints/secret-syncs/vercel/get-by-id.mdxnew file mode 100644index 0000000000..9a4efd1e6b--- /dev/null+++ b/docs/api-reference/endpoints/secret-syncs/vercel/get-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get by ID"+openapi: "GET /api/v1/secret-syncs/vercel/{syncId}"+---diff --git a/docs/api-reference/endpoints/secret-syncs/vercel/get-by-name.mdx b/docs/api-reference/endpoints/secret-syncs/vercel/get-by-name.mdxnew file mode 100644index 0000000000..3f71a6b3bd--- /dev/null+++ b/docs/api-reference/endpoints/secret-syncs/vercel/get-by-name.mdx@@ -0,0 +1,4 @@+---+title: "Get by Name"+openapi: "GET /api/v1/secret-syncs/vercel/sync-name/{syncName}"+---diff --git a/docs/api-reference/endpoints/secret-syncs/vercel/list.mdx b/docs/api-reference/endpoints/secret-syncs/vercel/list.mdxnew file mode 100644index 0000000000..905470d0db--- /dev/null+++ b/docs/api-reference/endpoints/secret-syncs/vercel/list.mdx@@ -0,0 +1,4 @@+---+title: "List"+openapi: "GET /api/v1/secret-syncs/vercel"+---diff --git a/docs/api-reference/endpoints/secret-syncs/vercel/remove-secrets.mdx b/docs/api-reference/endpoints/secret-syncs/vercel/remove-secrets.mdxnew file mode 100644index 0000000000..49c76ef995--- /dev/null+++ b/docs/api-reference/endpoints/secret-syncs/vercel/remove-secrets.mdx@@ -0,0 +1,4 @@+---+title: "Remove Secrets"+openapi: "POST /api/v1/secret-syncs/vercel/{syncId}/remove-secrets"+---diff --git a/docs/api-reference/endpoints/secret-syncs/vercel/sync-secrets.mdx b/docs/api-reference/endpoints/secret-syncs/vercel/sync-secrets.mdxnew file mode 100644index 0000000000..2b3bc83244--- /dev/null+++ b/docs/api-reference/endpoints/secret-syncs/vercel/sync-secrets.mdx@@ -0,0 +1,4 @@+---+title: "Sync Secrets"+openapi: "POST /api/v1/secret-syncs/vercel/{syncId}/sync-secrets"+---diff --git a/docs/api-reference/endpoints/secret-syncs/vercel/update.mdx b/docs/api-reference/endpoints/secret-syncs/vercel/update.mdxnew file mode 100644index 0000000000..75be8dd892--- /dev/null+++ b/docs/api-reference/endpoints/secret-syncs/vercel/update.mdx@@ -0,0 +1,4 @@+---+title: "Update"+openapi: "PATCH /api/v1/secret-syncs/vercel/{syncId}"+---diff --git a/docs/images/app-connections/vercel/vercel-app-connection-created.png b/docs/images/app-connections/vercel/vercel-app-connection-created.pngnew file mode 100644index 0000000000..8fb3714400Binary files /dev/null and b/docs/images/app-connections/vercel/vercel-app-connection-created.png differdiff --git a/docs/images/app-connections/vercel/vercel-app-connection-modal.png b/docs/images/app-connections/vercel/vercel-app-connection-modal.pngnew file mode 100644index 0000000000..6b789713deBinary files /dev/null and b/docs/images/app-connections/vercel/vercel-app-connection-modal.png differdiff --git a/docs/images/app-connections/vercel/vercel-app-connection-option.png b/docs/images/app-connections/vercel/vercel-app-connection-option.pngnew file mode 100644index 0000000000..b4308a1a29Binary files /dev/null and b/docs/images/app-connections/vercel/vercel-app-connection-option.png differdiff --git a/docs/images/app-connections/vercel/vercel-copy-token.png b/docs/images/app-connections/vercel/vercel-copy-token.pngnew file mode 100644index 0000000000..d6491c02e9Binary files /dev/null and b/docs/images/app-connections/vercel/vercel-copy-token.png differdiff --git a/docs/images/app-connections/vercel/vercel-create-token.png b/docs/images/app-connections/vercel/vercel-create-token.pngnew file mode 100644index 0000000000..c507f0d14bBinary files /dev/null and b/docs/images/app-connections/vercel/vercel-create-token.png differdiff --git a/docs/images/app-connections/vercel/vercel-main-page.png b/docs/images/app-connections/vercel/vercel-main-page.pngnew file mode 100644index 0000000000..e1a28248eaBinary files /dev/null and b/docs/images/app-connections/vercel/vercel-main-page.png differdiff --git a/docs/images/app-connections/vercel/vercel-settings-page.png b/docs/images/app-connections/vercel/vercel-settings-page.pngnew file mode 100644index 0000000000..86e67d6e1aBinary files /dev/null and b/docs/images/app-connections/vercel/vercel-settings-page.png differdiff --git a/docs/images/app-connections/vercel/vercel-token-created.png b/docs/images/app-connections/vercel/vercel-token-created.pngnew file mode 100644index 0000000000..5e57a4bd89Binary files /dev/null and b/docs/images/app-connections/vercel/vercel-token-created.png differdiff --git a/docs/images/secret-syncs/vercel/select-vercel-option.png b/docs/images/secret-syncs/vercel/select-vercel-option.pngnew file mode 100644index 0000000000..b63d33cc7dBinary files /dev/null and b/docs/images/secret-syncs/vercel/select-vercel-option.png differdiff --git a/docs/images/secret-syncs/vercel/vercel-created.png b/docs/images/secret-syncs/vercel/vercel-created.pngnew file mode 100644index 0000000000..fe955b00fcBinary files /dev/null and b/docs/images/secret-syncs/vercel/vercel-created.png differdiff --git a/docs/images/secret-syncs/vercel/vercel-destination.png b/docs/images/secret-syncs/vercel/vercel-destination.pngnew file mode 100644index 0000000000..4d0f73d35cBinary files /dev/null and b/docs/images/secret-syncs/vercel/vercel-destination.png differdiff --git a/docs/images/secret-syncs/vercel/vercel-details.png b/docs/images/secret-syncs/vercel/vercel-details.pngnew file mode 100644index 0000000000..4421c426cdBinary files /dev/null and b/docs/images/secret-syncs/vercel/vercel-details.png differdiff --git a/docs/images/secret-syncs/vercel/vercel-options.png b/docs/images/secret-syncs/vercel/vercel-options.pngnew file mode 100644index 0000000000..1d38e7ae65Binary files /dev/null and b/docs/images/secret-syncs/vercel/vercel-options.png differdiff --git a/docs/images/secret-syncs/vercel/vercel-review.png b/docs/images/secret-syncs/vercel/vercel-review.pngnew file mode 100644index 0000000000..7a921f4ecbBinary files /dev/null and b/docs/images/secret-syncs/vercel/vercel-review.png differdiff --git a/docs/images/secret-syncs/vercel/vercel-source.png b/docs/images/secret-syncs/vercel/vercel-source.pngnew file mode 100644index 0000000000..efb753aad3Binary files /dev/null and b/docs/images/secret-syncs/vercel/vercel-source.png differdiff --git a/docs/integrations/app-connections/vercel.mdx b/docs/integrations/app-connections/vercel.mdxnew file mode 100644index 0000000000..e3b60818ea--- /dev/null+++ b/docs/integrations/app-connections/vercel.mdx@@ -0,0 +1,54 @@+---+title: "Vercel Connection"+description: "Learn how to configure a Vercel Connection for Infisical."+---++Infisical supports connecting to Vercel using an API Token to securely sync your secrets between both platforms.++## Setup Vercel Connection in Infisical++<Steps>+ <Step title="Move to API Tokens on Vercel">+ Navigate to the Vercel **Account Settings** page by clicking on your profile icon in the top-right corner.+ + </Step>+ <Step title="Open API Tokens Tab">+ Select the **API Tokens** tab from the left sidebar navigation menu.+ + </Step>+ <Step title="Create the API Token">+ Click the **Create** button and provide a name for your token (e.g., "Infisical Integration").+ Choose appropriate scope permissions based on your requirements.+ <Note>+ If you configure an expiry date for your API token, you will need to manually rotate to a new token prior to expiration to avoid integration downtime. Consider setting a calendar reminder for this task.+ </Note>+ + </Step>+ <Step title="Copy the API Token">+ After creation, a modal with the API token will be displayed. Copy this token immediately and store it securely, as you won't be able to view it again after closing this dialog.+ + </Step>+ <Step title="Token Created">+ You should now see your newly created token in the list of API tokens on the Vercel dashboard.+ + </Step>+ <Step title="Navigate to App Connections">+ In your Infisical dashboard, go to **Organization Settings** and select the **App Connections** tab.+ + </Step>+ <Step title="Add Connection">+ Click the **+ Add Connection** button and select the **Vercel Connection** option from the available integrations.+ + </Step>+ <Step title="Fill the Vercel Connection Modal">+ Complete the Vercel Connection form by entering:+ - A descriptive name for the connection+ - The API Token you generated in steps 3-4+ - An optional description for future reference+ + </Step>+ <Step title="Connection Created">+ After clicking Create, your **Vercel Connection** is established and ready to use with your Infisical projects.+ + </Step>+</Steps>\ No newline at end of filediff --git a/docs/integrations/secret-syncs/vercel.mdx b/docs/integrations/secret-syncs/vercel.mdxnew file mode 100644index 0000000000..7384121c68--- /dev/null+++ b/docs/integrations/secret-syncs/vercel.mdx@@ -0,0 +1,146 @@+---+title: "Vercel Sync"+description: "Learn how to configure a Vercel Sync for Infisical."+---++**Prerequisites:**++ - Set up and add secrets to [Infisical Cloud](https://app.infisical.com)+ - Create a [Vercel Connection](/integrations/app-connections/vercel)++<Tabs>+ <Tab title="Infisical UI">+ 1. Navigate to **Project** > **Integrations** and select the **Secret Syncs** tab. Click on the **Add Sync** button.+ ++ 2. Select the **Vercel** option.+ ++ 3. Configure the **Source** from where secrets should be retrieved, then click **Next**.+ ++ - **Environment**: The project environment to retrieve secrets from.+ - **Secret Path**: The folder path to retrieve secrets from.++ <Tip>+ If you need to sync secrets from multiple folder locations, check out [secret imports](/documentation/platform/secret-reference#secret-imports).+ </Tip>++ 4. Configure the **Destination** to where secrets should be deployed, then click **Next**.++ - **Vercel Connection**: The Vercel Connection to authenticate with.+ - **Vercel App**: The application to deploy secrets to.+ - **Vercel App Environment**: The environment to deploy secrets to.+ - **Vercel Preview Branch (Optional)**: Specify a branch for preview deployments if needed.++ After configuring these parameters, click the **Next** button to continue to the Sync Options step.++ 5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.+ ++ - **Initial Sync Behavior**: Determines how Infisical should resolve the initial sync.+ - **Overwrite Destination Secrets**: Removes any secrets at the destination endpoint not present in Infisical.+ <Note>+ Vercel does not support importing secrets.+ </Note>+ - **Auto-Sync Enabled**: If enabled, secrets will automatically be synced from the source location when changes occur. Disable to enforce manual syncing only.+ - **Disable Secret Deletion**: If enabled, Infisical will not remove secrets from the sync destination. Enable this option if you intend to manage some secrets manually outside of Infisical.++ 6. Configure the **Details** of your Vercel Sync, then click **Next**.+ ++ - **Name**: The name of your sync. Must be slug-friendly.+ - **Description**: An optional description for your sync.++ 7. Review your Vercel Sync configuration, then click **Create Sync**.+ ++ 8. If enabled, your Vercel Sync will begin syncing your secrets to the destination endpoint.+ ++ </Tab>+ <Tab title="API">+ To create an **Vercel Sync**, make an API request to the [Create Vercel Sync](/api-reference/endpoints/secret-syncs/vercel/create) API endpoint.++ ### Sample request++ ```bash Request+ curl --request POST \+ --url https://app.infisical.com/api/v1/secret-syncs/vercel \+ --header 'Content-Type: application/json' \+ --data '{+ "name": "my-vercel-sync",+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "description": "an example sync",+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "environment": "dev",+ "secretPath": "/my-secrets",+ "isEnabled": true,+ "syncOptions": {+ "initialSyncBehavior": "overwrite-destination"+ },+ "destinationConfig": {+ "app": "prj_bz7zgHvQETPvJWc5tmIr0tGRH9kE",+ "env": "preview",+ "branch": "test",+ "appName": "nextjs-boilerplate"+ }+ }'+ ```++ ### Sample response++ ```bash Response+ {+ "secretSync": {+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "name": "my-vercel-sync",+ "description": "an example sync",+ "isEnabled": true,+ "version": 1,+ "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "createdAt": "2023-11-07T05:31:56Z",+ "updatedAt": "2023-11-07T05:31:56Z",+ "syncStatus": "succeeded",+ "lastSyncJobId": "123",+ "lastSyncMessage": null,+ "lastSyncedAt": "2023-11-07T05:31:56Z",+ "importStatus": null,+ "lastImportJobId": null,+ "lastImportMessage": null,+ "lastImportedAt": null,+ "removeStatus": null,+ "lastRemoveJobId": null,+ "lastRemoveMessage": null,+ "lastRemovedAt": null,+ "syncOptions": {+ "initialSyncBehavior": "overwrite-destination"+ },+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "connection": {+ "app": "vercel",+ "name": "my-vercel-connection",+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"+ },+ "environment": {+ "slug": "dev",+ "name": "Development",+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"+ },+ "folder": {+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "path": "/my-secrets"+ },+ "destination": "vercel",+ "destinationConfig": {+ "app": "prj_bz7zgHvQETPvJWc5tmIr0tGRH9kE",+ "env": "preview",+ "branch": "test",+ "appName": "nextjs-boilerplate"+ }+ }+ }+ ```+ </Tab>+</Tabs>diff --git a/docs/mint.json b/docs/mint.jsonindex 478db02768..5aeb4e53b4 100644--- a/docs/mint.json+++ b/docs/mint.json@@ -419,7 +419,8 @@"integrations/app-connections/databricks","integrations/app-connections/gcp","integrations/app-connections/github",- "integrations/app-connections/humanitec"+ "integrations/app-connections/humanitec",+ "integrations/app-connections/vercel"]}]@@ -438,7 +439,8 @@"integrations/secret-syncs/databricks","integrations/secret-syncs/gcp-secret-manager","integrations/secret-syncs/github",- "integrations/secret-syncs/humanitec"+ "integrations/secret-syncs/humanitec",+ "integrations/secret-syncs/vercel"]}]@@ -922,6 +924,18 @@"api-reference/endpoints/app-connections/humanitec/update","api-reference/endpoints/app-connections/humanitec/delete"]+ },+ {+ "group": "Vercel",+ "pages": [+ "api-reference/endpoints/app-connections/vercel/list",+ "api-reference/endpoints/app-connections/vercel/available",+ "api-reference/endpoints/app-connections/vercel/get-by-id",+ "api-reference/endpoints/app-connections/vercel/get-by-name",+ "api-reference/endpoints/app-connections/vercel/create",+ "api-reference/endpoints/app-connections/vercel/update",+ "api-reference/endpoints/app-connections/vercel/delete"+ ]}]},@@ -1038,6 +1052,19 @@"api-reference/endpoints/secret-syncs/humanitec/sync-secrets","api-reference/endpoints/secret-syncs/humanitec/remove-secrets"]+ },+ {+ "group": "Vercel",+ "pages": [+ "api-reference/endpoints/secret-syncs/vercel/list",+ "api-reference/endpoints/secret-syncs/vercel/get-by-id",+ "api-reference/endpoints/secret-syncs/vercel/get-by-name",+ "api-reference/endpoints/secret-syncs/vercel/create",+ "api-reference/endpoints/secret-syncs/vercel/update",+ "api-reference/endpoints/secret-syncs/vercel/delete",+ "api-reference/endpoints/secret-syncs/vercel/sync-secrets",+ "api-reference/endpoints/secret-syncs/vercel/remove-secrets"+ ]}]},