Skip to content

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

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.ts
index 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.ts
index 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.json
index 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.mdx
new file mode 100644
index 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.
+
+ ![Fireworks Settings](/images/app-connections/fireworks/settings.png)
+ </Step>
+ <Step title="Navigate to Users & Access">
+ In the Settings sidebar, click **Users & Access**.
+
+ ![Fireworks Users & Access](/images/secret-rotations-v2/fireworks-api-key/users-and-access.png)
+ </Step>
+ <Step title="Add a Service Account">
+ Click **+ Add** and select **Service Account** from the dropdown.
+
+ ![Add Service Account](/images/secret-rotations-v2/fireworks-api-key/add-service-account.png)
+ </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.
+
+ ![Service Account ID](/images/secret-rotations-v2/fireworks-api-key/service-account-id.png)
+ </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.
+
+ ![Secret Manager Dashboard](/images/secret-rotations-v2/generic/add-secret-rotation.png)
+
+ 2. Select the **Fireworks Secret** option.
+
+ ![Select Fireworks Secret](/images/secret-rotations-v2/fireworks-api-key/select-fireworks-api-key.png)
+
+ 3. Configure the rotation behavior, then click **Next**.
+
+ ![Rotation Configuration](/images/secret-rotations-v2/fireworks-api-key/configuration.png)
+
+ - **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.
+
+ ![Rotation Parameters](/images/secret-rotations-v2/fireworks-api-key/parameters.png)
+
+ - **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**.
+
+ ![Rotation Secrets Mapping](/images/secret-rotations-v2/fireworks-api-key/secrets-mapping.png)
+
+ - **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**.
+
+ ![Rotation Details](/images/secret-rotations-v2/fireworks-api-key/details.png)
+
+ - **Name** -- A slug-friendly name for this rotation configuration.
+ - **Description** (optional) -- Notes about this rotation.
+
+ 7. Review your configuration, then click **Create Secret Rotation**.
+
+ ![Rotation Review](/images/secret-rotations-v2/fireworks-api-key/review.png)
+ </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.png
new file mode 100644
index 0000000000..0f6113fd04
Binary files /dev/null and b/docs/images/app-connections/fireworks/account-id.png differ
diff --git a/docs/images/app-connections/fireworks/api-keys-nav.png b/docs/images/app-connections/fireworks/api-keys-nav.png
new file mode 100644
index 0000000000..e133565779
Binary files /dev/null and b/docs/images/app-connections/fireworks/api-keys-nav.png differ
diff --git a/docs/images/app-connections/fireworks/copy-api-key.png b/docs/images/app-connections/fireworks/copy-api-key.png
new file mode 100644
index 0000000000..ce81437e11
Binary files /dev/null and b/docs/images/app-connections/fireworks/copy-api-key.png differ
diff --git a/docs/images/app-connections/fireworks/create-api-key.png b/docs/images/app-connections/fireworks/create-api-key.png
new file mode 100644
index 0000000000..3ff282edb3
Binary files /dev/null and b/docs/images/app-connections/fireworks/create-api-key.png differ
diff --git a/docs/images/app-connections/fireworks/create-app-connection.png b/docs/images/app-connections/fireworks/create-app-connection.png
new file mode 100644
index 0000000000..a1399ae6d7
Binary files /dev/null and b/docs/images/app-connections/fireworks/create-app-connection.png differ
diff --git a/docs/images/app-connections/fireworks/created-app-connection.png b/docs/images/app-connections/fireworks/created-app-connection.png
new file mode 100644
index 0000000000..c390893fb4
Binary files /dev/null and b/docs/images/app-connections/fireworks/created-app-connection.png differ
diff --git a/docs/images/app-connections/fireworks/select-fireworks.png b/docs/images/app-connections/fireworks/select-fireworks.png
new file mode 100644
index 0000000000..f5bf64a2af
Binary files /dev/null and b/docs/images/app-connections/fireworks/select-fireworks.png differ
diff --git a/docs/images/app-connections/fireworks/settings.png b/docs/images/app-connections/fireworks/settings.png
new file mode 100644
index 0000000000..8cb56a4290
Binary files /dev/null and b/docs/images/app-connections/fireworks/settings.png differ
diff --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.png
new file mode 100644
index 0000000000..42f3ad2e2c
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/add-service-account.png differ
diff --git a/docs/images/secret-rotations-v2/fireworks-api-key/configuration.png b/docs/images/secret-rotations-v2/fireworks-api-key/configuration.png
new file mode 100644
index 0000000000..e9bb264af4
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/configuration.png differ
diff --git a/docs/images/secret-rotations-v2/fireworks-api-key/details.png b/docs/images/secret-rotations-v2/fireworks-api-key/details.png
new file mode 100644
index 0000000000..9051928bf7
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/details.png differ
diff --git a/docs/images/secret-rotations-v2/fireworks-api-key/parameters.png b/docs/images/secret-rotations-v2/fireworks-api-key/parameters.png
new file mode 100644
index 0000000000..bf1fd9b2f5
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/parameters.png differ
diff --git a/docs/images/secret-rotations-v2/fireworks-api-key/review.png b/docs/images/secret-rotations-v2/fireworks-api-key/review.png
new file mode 100644
index 0000000000..3f41b88e61
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/review.png differ
diff --git a/docs/images/secret-rotations-v2/fireworks-api-key/secrets-mapping.png b/docs/images/secret-rotations-v2/fireworks-api-key/secrets-mapping.png
new file mode 100644
index 0000000000..878dbdafc0
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/secrets-mapping.png differ
diff --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.png
new file mode 100644
index 0000000000..072d650cae
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/select-fireworks-api-key.png differ
diff --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.png
new file mode 100644
index 0000000000..4aa38cc006
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/service-account-id.png differ
diff --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.png
new file mode 100644
index 0000000000..f283ea0f22
Binary files /dev/null and b/docs/images/secret-rotations-v2/fireworks-api-key/users-and-access.png differ
diff --git a/docs/integrations/app-connections/fireworks.mdx b/docs/integrations/app-connections/fireworks.mdx
new file mode 100644
index 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.
+
+ ![Fireworks Settings](/images/app-connections/fireworks/settings.png)
+ </Step>
+ <Step title="Navigate to API Keys">
+ In the Settings sidebar, click **API Keys**.
+
+ ![Fireworks API Keys Nav](/images/app-connections/fireworks/api-keys-nav.png)
+ </Step>
+ <Step title="Create an API Key">
+ Click **+ Create API Key** and select **API Key** from the dropdown.
+
+ ![Fireworks Create API Key](/images/app-connections/fireworks/create-api-key.pngCopy the generated API key and store it securely. )
+ </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.
+
+ ![Fireworks Copy API Key](/images/app-connections/fireworks/copy-api-key.png)
+ </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.
+
+ ![Fireworks Account ID](/images/app-connections/fireworks/account-id.png)
+ </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.
+
+ ![Select Fireworks Connection](/images/app-connections/fireworks/select-fireworks.png)
+ </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**.
+
+ ![Create Fireworks Connection](/images/app-connections/fireworks/create-app-connection.png)
+ </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).
+
+ ![Fireworks Connection Created](/images/app-connections/fireworks/created-app-connection.png)
+ </Step>
+</Steps>
diff --git a/docs/snippets/AppConnectionsBrowser.jsx b/docs/snippets/AppConnectionsBrowser.jsx
index 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.jsx
index 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",