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
allow cred verification + docs
Matheus Nogueira8a94a2b42570
diff --git a/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-fns.tsindex b98e483b23..561cdaaed7 100644--- a/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-fns.ts@@ -13,6 +13,7 @@ import { logger } from "@app/lib/logger";import { FIREWORKS_API_BASE_URL } from "@app/services/app-connection/fireworks/fireworks-connection-fns";import {+ TFireworksApiKeyRotationGeneratedCredential,TFireworksApiKeyRotationGeneratedCredentials,TFireworksApiKeyRotationWithConnection} from "./fireworks-api-key-rotation-types";@@ -56,6 +57,20 @@ const $createApiKey = async (}};+const $checkApiKey = async (generatedApiKey: string, accountId: string): Promise<void> => {+ try {+ await request.get(`${FIREWORKS_API_BASE_URL}/v1/accounts/${accountId}`, {+ headers: {+ Authorization: `Bearer ${generatedApiKey}`+ }+ });+ } catch (error: unknown) {+ throw new BadRequestError({+ message: `Fireworks API key verification failed: ${error instanceof AxiosError ? error.message : "Unknown error"}`+ });+ }+};+const $deleteApiKey = async (authKey: string, accountId: string, userId: string, keyId: string): Promise<void> => {try {await request.post(@@ -140,6 +155,10 @@ export const fireworksApiKeyRotationFactory: TRotationFactory<return callback(credentials);};+ const checkActiveCredentials = async ({ apiKey: generatedKey }: TFireworksApiKeyRotationGeneratedCredential) => {+ await $checkApiKey(generatedKey, accountId);+ };+const getSecretsPayload: TRotationFactoryGetSecretsPayload<TFireworksApiKeyRotationGeneratedCredentials> = (generatedCredentials) => [{ key: secretsMapping.apiKey, value: generatedCredentials.apiKey }];@@ -148,6 +167,7 @@ export const fireworksApiKeyRotationFactory: TRotationFactory<issueCredentials,revokeCredentials,rotateCredentials,- getSecretsPayload+ getSecretsPayload,+ checkActiveCredentials};};diff --git a/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-types.ts b/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-types.tsindex 2c421d5248..383c66d521 100644--- a/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-types.ts+++ b/backend/src/ee/services/secret-rotation-v2/fireworks-api-key/fireworks-api-key-rotation-types.ts@@ -22,3 +22,5 @@ export type TFireworksApiKeyRotationWithConnection = TFireworksApiKeyRotation &export type TFireworksApiKeyRotationGeneratedCredentials = z.infer<typeof FireworksApiKeyRotationGeneratedCredentialsSchema>;++export type TFireworksApiKeyRotationGeneratedCredential = TFireworksApiKeyRotationGeneratedCredentials[number];diff --git a/docs/docs.json b/docs/docs.jsonindex 4b2717289d..4d4d7fa0e4 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -134,6 +134,7 @@"integrations/app-connections/doppler","integrations/app-connections/dns-made-easy","integrations/app-connections/f5-big-ip",+ "integrations/app-connections/fireworks","integrations/app-connections/flyio","integrations/app-connections/gcp","integrations/app-connections/github",@@ -492,6 +493,7 @@"documentation/platform/secret-rotation/databricks-service-principal-secret","documentation/platform/secret-rotation/datadog-application-key-secret","documentation/platform/secret-rotation/dbt-service-token",+ "documentation/platform/secret-rotation/fireworks-api-key","documentation/platform/secret-rotation/ldap-password","documentation/platform/secret-rotation/mongodb-credentials","documentation/platform/secret-rotation/mssql-credentials",@@ -1628,6 +1630,18 @@"api-reference/endpoints/app-connections/f5-big-ip/delete"]},+ {+ "group": "Fireworks",+ "pages": [+ "api-reference/endpoints/app-connections/fireworks/list",+ "api-reference/endpoints/app-connections/fireworks/available",+ "api-reference/endpoints/app-connections/fireworks/get-by-id",+ "api-reference/endpoints/app-connections/fireworks/get-by-name",+ "api-reference/endpoints/app-connections/fireworks/create",+ "api-reference/endpoints/app-connections/fireworks/update",+ "api-reference/endpoints/app-connections/fireworks/delete"+ ]+ },{"group": "Fly.io","pages": [@@ -2443,6 +2457,19 @@"api-reference/endpoints/secret-rotations/dbt-service-token/update"]},+ {+ "group": "Fireworks API Key",+ "pages": [+ "api-reference/endpoints/secret-rotations/fireworks-api-key/create",+ "api-reference/endpoints/secret-rotations/fireworks-api-key/delete",+ "api-reference/endpoints/secret-rotations/fireworks-api-key/get-by-id",+ "api-reference/endpoints/secret-rotations/fireworks-api-key/get-by-name",+ "api-reference/endpoints/secret-rotations/fireworks-api-key/get-generated-credentials-by-id",+ "api-reference/endpoints/secret-rotations/fireworks-api-key/list",+ "api-reference/endpoints/secret-rotations/fireworks-api-key/rotate-secrets",+ "api-reference/endpoints/secret-rotations/fireworks-api-key/update"+ ]+ },{"group": "LDAP Password","pages": [diff --git a/docs/documentation/platform/secret-rotation/fireworks-api-key.mdx b/docs/documentation/platform/secret-rotation/fireworks-api-key.mdxnew file mode 100644index 0000000000..87e4d7120e--- /dev/null+++ b/docs/documentation/platform/secret-rotation/fireworks-api-key.mdx@@ -0,0 +1,141 @@+---+title: "Fireworks API Key"+description: "Learn how to automatically rotate Fireworks AI API keys."+---++<Note>+ **Rotation Type: Dual-Phase**++ This rotation maintains two active credential sets with overlapping validity, ensuring zero-downtime during rotation cycles.+</Note>++## Prerequisites++- Create a [Fireworks Connection](/integrations/app-connections/fireworks) using an **API Key** and **Account ID**. That connection is used to create and delete API keys on your behalf during rotation.+- A **Fireworks Service Account** whose API keys will be rotated. See [Create a Fireworks Service Account](#create-a-fireworks-service-account) below.++## Create a Fireworks Service Account++<Steps>+ <Step title="Navigate to Settings">+ In your [Fireworks AI account](https://fireworks.ai/), click **Settings** in the left sidebar.++ + </Step>+ <Step title="Navigate to Users & Access">+ In the Settings sidebar, click **Users & Access**.++ + </Step>+ <Step title="Add a Service Account">+ Click **+ Add** and select **Service Account** from the dropdown.++ + </Step>+ <Step title="Configure the Service Account">+ Enter a **Service Account ID** (lowercase letters, numbers, and hyphens only) and click **Add**. You will need this ID when configuring the rotation in Infisical.++ + </Step>+</Steps>++## Create a Fireworks API Key Rotation in Infisical++<Tabs>+ <Tab title="Infisical UI">+ 1. Navigate to your Secret Manager Project's Dashboard and select **Add Secret Rotation** from the actions dropdown.++ ++ 2. Select the **Fireworks Secret** option.++ ++ 3. Configure the rotation behavior, then click **Next**.++ ++ - **Fireworks Connection** -- The connection (with an API key) that will create and delete API keys during rotation.+ - **Rotation Interval** -- The interval, in days, after which a rotation is triggered.+ - **Rotate At** -- The local time of day when rotation runs once the interval has elapsed.+ - **Auto-Rotation Enabled** -- Whether to rotate automatically on the interval. Turn off to rotate only manually or pause rotation.++ 4. Select the **Service Account** whose API keys will be rotated, then click **Next**. This is the service account you [created in Fireworks](#create-a-fireworks-service-account) earlier.++ ++ - **Service Account** -- The Fireworks service account created in the prerequisites step above.++ 5. Specify the secret name that the rotated API key will be mapped to. Then click **Next**.++ ++ - **API Key** -- The name of the secret in Infisical where the rotated API key value will be stored.++ 6. Give your rotation a name and description (optional). Then click **Next**.++ ++ - **Name** -- A slug-friendly name for this rotation configuration.+ - **Description** (optional) -- Notes about this rotation.++ 7. Review your configuration, then click **Create Secret Rotation**.++ + </Tab>+ <Tab title="API">+ To create a Fireworks API Key rotation, call the [Create Fireworks API Key Rotation](/api-reference/endpoints/secret-rotations/fireworks-api-key/create) API endpoint.++ ### Sample request++ ```bash Request+ curl --request POST \+ --url https://us.infisical.com/api/v2/secret-rotations/fireworks-api-key \+ --header 'Content-Type: application/json' \+ --data '{+ "name": "my-fireworks-rotation",+ "projectId": "<project-id>",+ "description": "Fireworks API key rotation",+ "connectionId": "<fireworks-connection-id>",+ "environment": "dev",+ "secretPath": "/",+ "isAutoRotationEnabled": true,+ "rotationInterval": 30,+ "rotateAtUtc": {+ "hours": 0,+ "minutes": 0+ },+ "parameters": {+ "serviceAccountUserId": "<fireworks-user-id>"+ },+ "secretsMapping": {+ "apiKey": "FIREWORKS_API_KEY"+ }+ }'+ ```++ ### Sample response++ ```bash Response+ {+ "secretRotation": {+ "id": "<rotation-id>",+ "name": "my-fireworks-rotation",+ "description": "Fireworks API key rotation",+ "secretsMapping": {+ "apiKey": "FIREWORKS_API_KEY"+ },+ "isAutoRotationEnabled": true,+ "activeIndex": 0,+ "connectionId": "<fireworks-connection-id>",+ "rotationInterval": 30,+ "rotateAtUtc": { "hours": 0, "minutes": 0 },+ "type": "fireworks-api-key",+ "parameters": {+ "serviceAccountUserId": "<fireworks-user-id>"+ }+ }+ }+ ```+ </Tab>+</Tabs>diff --git a/docs/images/app-connections/fireworks/account-id.png b/docs/images/app-connections/fireworks/account-id.pngnew file mode 100644index 0000000000..0f6113fd04Binary files /dev/null and b/docs/images/app-connections/fireworks/account-id.png differdiff --git a/docs/images/app-connections/fireworks/api-keys-nav.png b/docs/images/app-connections/fireworks/api-keys-nav.pngnew file mode 100644index 0000000000..e133565779Binary files /dev/null and b/docs/images/app-connections/fireworks/api-keys-nav.png differdiff --git a/docs/images/app-connections/fireworks/copy-api-key.png b/docs/images/app-connections/fireworks/copy-api-key.pngnew file mode 100644index 0000000000..ce81437e11Binary files /dev/null and b/docs/images/app-connections/fireworks/copy-api-key.png differdiff --git a/docs/images/app-connections/fireworks/create-api-key.png b/docs/images/app-connections/fireworks/create-api-key.pngnew file mode 100644index 0000000000..3ff282edb3Binary files /dev/null and b/docs/images/app-connections/fireworks/create-api-key.png differdiff --git a/docs/images/app-connections/fireworks/create-app-connection.png b/docs/images/app-connections/fireworks/create-app-connection.pngnew file mode 100644index 0000000000..a1399ae6d7Binary files /dev/null and b/docs/images/app-connections/fireworks/create-app-connection.png differdiff --git a/docs/images/app-connections/fireworks/created-app-connection.png b/docs/images/app-connections/fireworks/created-app-connection.pngnew file mode 100644index 0000000000..c390893fb4Binary files /dev/null and b/docs/images/app-connections/fireworks/created-app-connection.png differdiff --git a/docs/images/app-connections/fireworks/select-fireworks.png b/docs/images/app-connections/fireworks/select-fireworks.pngnew file mode 100644index 0000000000..f5bf64a2afBinary files /dev/null and b/docs/images/app-connections/fireworks/select-fireworks.png differdiff --git a/docs/images/app-connections/fireworks/settings.png b/docs/images/app-connections/fireworks/settings.pngnew file mode 100644index 0000000000..8cb56a4290Binary files /dev/null and b/docs/images/app-connections/fireworks/settings.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/add-service-account.png b/docs/images/secret-rotations-v2/fireworks-api-key/add-service-account.pngnew file mode 100644index 0000000000..42f3ad2e2cBinary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/add-service-account.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/configuration.png b/docs/images/secret-rotations-v2/fireworks-api-key/configuration.pngnew file mode 100644index 0000000000..e9bb264af4Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/configuration.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/details.png b/docs/images/secret-rotations-v2/fireworks-api-key/details.pngnew file mode 100644index 0000000000..9051928bf7Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/details.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/parameters.png b/docs/images/secret-rotations-v2/fireworks-api-key/parameters.pngnew file mode 100644index 0000000000..bf1fd9b2f5Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/parameters.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/review.png b/docs/images/secret-rotations-v2/fireworks-api-key/review.pngnew file mode 100644index 0000000000..3f41b88e61Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/review.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/secrets-mapping.png b/docs/images/secret-rotations-v2/fireworks-api-key/secrets-mapping.pngnew file mode 100644index 0000000000..878dbdafc0Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/secrets-mapping.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/select-fireworks-api-key.png b/docs/images/secret-rotations-v2/fireworks-api-key/select-fireworks-api-key.pngnew file mode 100644index 0000000000..072d650caeBinary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/select-fireworks-api-key.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/service-account-id.png b/docs/images/secret-rotations-v2/fireworks-api-key/service-account-id.pngnew file mode 100644index 0000000000..4aa38cc006Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/service-account-id.png differdiff --git a/docs/images/secret-rotations-v2/fireworks-api-key/users-and-access.png b/docs/images/secret-rotations-v2/fireworks-api-key/users-and-access.pngnew file mode 100644index 0000000000..f283ea0f22Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/users-and-access.png differdiff --git a/docs/integrations/app-connections/fireworks.mdx b/docs/integrations/app-connections/fireworks.mdxnew file mode 100644index 0000000000..fea0775420--- /dev/null+++ b/docs/integrations/app-connections/fireworks.mdx@@ -0,0 +1,62 @@+---+title: "Fireworks Connection"+description: "Learn how to configure a Fireworks AI connection for Infisical."+---++[Fireworks AI](https://fireworks.ai/) is an AI inference platform for running and fine-tuning large language models. Infisical supports connecting to Fireworks using an **API Key** and **Account ID**.++## Prerequisites++- A [Fireworks AI](https://fireworks.ai/) account with API access.+- An **API Key** with permissions to create and delete API keys for the target service account.+- Your **Account ID**, which can be found in your Fireworks account settings.++## Create a Fireworks API Key++<Steps>+ <Step title="Navigate to Settings">+ In your [Fireworks AI account](https://fireworks.ai/), click **Settings** in the left sidebar.++ + </Step>+ <Step title="Navigate to API Keys">+ In the Settings sidebar, click **API Keys**.++ + </Step>+ <Step title="Create an API Key">+ Click **+ Create API Key** and select **API Key** from the dropdown.++ + </Step>+ <Step title="Generate and copy your API Key">+ Give the key a name and generate it. Copy the generated API key and store it securely. This value is viewable one time only, you will need it when creating the Infisical connection.++ + </Step>+ <Step title="Copy Your Account ID">+ Click the account dropdown in the top-right corner and copy your **Account ID** using the copy button. You will also need this when creating the connection.++ + </Step>+</Steps>++## Setup Fireworks Connection in Infisical++<Steps>+ <Step title="Navigate to App Connections">+ Navigate to the **App Connections** tab in your organization and click **+ Add Connection**. Select the **Fireworks** option.++ + </Step>+ <Step title="Create the Connection">+ Fill in the connection **Name**, select the **API Key** method, paste the **Account ID** and **API Key** you copied earlier, and click **Connect to Fireworks**.++ + </Step>+ <Step title="Connection Created">+ Your **Fireworks Connection** is now available for use with [Fireworks API Key Secret Rotation](/documentation/platform/secret-rotation/fireworks-api-key).++ + </Step>+</Steps>diff --git a/docs/snippets/AppConnectionsBrowser.jsx b/docs/snippets/AppConnectionsBrowser.jsxindex 31a02f632c..7f5a2ac1da 100644--- a/docs/snippets/AppConnectionsBrowser.jsx+++ b/docs/snippets/AppConnectionsBrowser.jsx@@ -527,6 +527,14 @@ export const AppConnectionsBrowser = () => {"Learn how to connect Devin to manage and rotate API keys with Infisical.",category: "AI & LLM",},+ {+ name: "Fireworks",+ slug: "fireworks",+ path: "/integrations/app-connections/fireworks",+ description:+ "Learn how to connect Fireworks AI to manage and rotate API keys with Infisical.",+ category: "AI & LLM",+ },{name: "DigiCert",slug: "digicert",diff --git a/docs/snippets/RotationsBrowser.jsx b/docs/snippets/RotationsBrowser.jsxindex 592e9b8c0f..0bb555eb62 100644--- a/docs/snippets/RotationsBrowser.jsx+++ b/docs/snippets/RotationsBrowser.jsx@@ -4,7 +4,7 @@ export const RotationsBrowser = () => {const [searchTerm, setSearchTerm] = useState("");const [selectedCategory, setSelectedCategory] = useState("All");- const categories = ["All", "Databases", "Identity & Auth", "Cloud Providers", "Networking & DNS", "Data Analytics", "Monitoring", "SaaS"];+ const categories = ["All", "AI & LLM", "Databases", "Identity & Auth", "Cloud Providers", "Networking & DNS", "Data Analytics", "Monitoring", "SaaS"];const rotations = [{@@ -160,6 +160,15 @@ export const RotationsBrowser = () => {category: "AI & LLM",rotationType: "Dual-Phase",},+ {+ name: "Fireworks API Key",+ slug: "fireworks-api-key",+ path: "/documentation/platform/secret-rotation/fireworks-api-key",+ description:+ "Learn how to automatically rotate Fireworks AI API keys.",+ category: "AI & LLM",+ rotationType: "Dual-Phase",+ },{name: "Supabase API Key",slug: "supabase-api-key",