Skip to content

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

fix: update doc urls to match updated enum and fix max interval to be half max lifetime of secret

Scott Wilsone603f3787429
diff --git a/backend/src/ee/services/secret-rotation-v2/databricks-service-principal-secret/databricks-service-principal-secret-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/databricks-service-principal-secret/databricks-service-principal-secret-rotation-fns.ts
index efb6286688..6581c057cd 100644
--- a/backend/src/ee/services/secret-rotation-v2/databricks-service-principal-secret/databricks-service-principal-secret-rotation-fns.ts
+++ b/backend/src/ee/services/secret-rotation-v2/databricks-service-principal-secret/databricks-service-principal-secret-rotation-fns.ts
@@ -21,7 +21,8 @@ import { getDatabricksConnectionAccessToken } from "@app/services/app-connection
const DELAY_MS = 1000;
const EXPIRY_PADDING_IN_DAYS = 3;
const MAX_DATABRICKS_SECRETS = 4;
-const MAX_ROTATION_INTERVAL_DAYS = 730;
+const MAX_SECRET_LIFETIME = 730; // from databricks
+const MAX_ROTATION_INTERVAL_DAYS = Math.floor((MAX_SECRET_LIFETIME - EXPIRY_PADDING_IN_DAYS) / 2); // needs to be half, since it lives two intervals
const sleep = async () =>
new Promise((resolve) => {
@@ -201,7 +202,7 @@ export const databricksServicePrincipalSecretRotationFactory: TRotationFactory<
> = async (callback) => {
if (rotationInterval > MAX_ROTATION_INTERVAL_DAYS) {
throw new BadRequestError({
- message: `Databricks does not support OAuth secret duration over ${MAX_ROTATION_INTERVAL_DAYS} days`
+ message: `Databricks does not support OAuth secret duration over ${MAX_SECRET_LIFETIME} days. Rotation interval must be less than or equal to ${MAX_ROTATION_INTERVAL_DAYS} to accomodate this.`
});
}
@@ -226,7 +227,7 @@ export const databricksServicePrincipalSecretRotationFactory: TRotationFactory<
> = async (oldCredentials, callback) => {
if (rotationInterval > MAX_ROTATION_INTERVAL_DAYS) {
throw new BadRequestError({
- message: `Databricks does not support OAuth secret duration over ${MAX_ROTATION_INTERVAL_DAYS} days`
+ message: `Databricks does not support OAuth secret duration over ${MAX_SECRET_LIFETIME} days. Rotation interval must be less than or equal to ${MAX_ROTATION_INTERVAL_DAYS} to accomodate this.`
});
}
diff --git a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/create.mdx b/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/create.mdx
deleted file mode 100644
index 9c64cb3950..0000000000
--- a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/create.mdx
+++ /dev/null
@@ -1,10 +0,0 @@
----
-title: "Create"
-openapi: "POST /api/v2/secret-rotations/databricks-service-principal-secret"
----
-
-<Note>
- Check out the configuration docs for [Databricks Service Account Secret Rotations](/documentation/platform/secret-rotation/databricks-service-account-secret) to learn how to obtain the required parameters.
-</Note>
-
-
diff --git a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/delete.mdx b/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/delete.mdx
deleted file mode 100644
index 759c4ac257..0000000000
--- a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/delete.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "Delete"
-openapi: "DELETE /api/v2/secret-rotations/databricks-service-principal-secret/{rotationId}"
----
-
-
diff --git a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-by-id.mdx
deleted file mode 100644
index d39262bad9..0000000000
--- a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-by-id.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "Get by ID"
-openapi: "GET /api/v2/secret-rotations/databricks-service-principal-secret/{rotationId}"
----
-
-
diff --git a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-by-name.mdx b/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-by-name.mdx
deleted file mode 100644
index 15c5c8a074..0000000000
--- a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-by-name.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "Get by Name"
-openapi: "GET /api/v2/secret-rotations/databricks-service-principal-secret/rotation-name/{rotationName}"
----
-
-
diff --git a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-generated-credentials-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-generated-credentials-by-id.mdx
deleted file mode 100644
index cebd1139ef..0000000000
--- a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-generated-credentials-by-id.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "Get Generated Credentials by ID"
-openapi: "GET /api/v2/secret-rotations/databricks-service-principal-secret/{rotationId}/generated-credentials"
----
-
-
diff --git a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/list.mdx b/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/list.mdx
deleted file mode 100644
index 57c1eca341..0000000000
--- a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/list.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "List"
-openapi: "GET /api/v2/secret-rotations/databricks-service-principal-secret"
----
-
-
diff --git a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/rotate-secrets.mdx b/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/rotate-secrets.mdx
deleted file mode 100644
index 8780ab6f76..0000000000
--- a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/rotate-secrets.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "Rotate Secrets"
-openapi: "POST /api/v2/secret-rotations/databricks-service-principal-secret/{rotationId}/rotate-secrets"
----
-
-
diff --git a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/update.mdx b/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/update.mdx
deleted file mode 100644
index 0388fa0304..0000000000
--- a/docs/api-reference/endpoints/secret-rotations/databricks-service-account-secret/update.mdx
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "Update"
-openapi: "PATCH /api/v2/secret-rotations/databricks-service-principal-secret/{rotationId}"
----
-
-
diff --git a/docs/docs.json b/docs/docs.json
index f8621bb027..d0c154e3b1 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -448,7 +448,7 @@
"documentation/platform/secret-rotation/auth0-client-secret",
"documentation/platform/secret-rotation/aws-iam-user-secret",
"documentation/platform/secret-rotation/azure-client-secret",
- "documentation/platform/secret-rotation/databricks-service-account-secret",
+ "documentation/platform/secret-rotation/databricks-service-principal-secret",
"documentation/platform/secret-rotation/ldap-password",
"documentation/platform/secret-rotation/mongodb-credentials",
"documentation/platform/secret-rotation/mssql-credentials",
@@ -1997,16 +1997,16 @@
]
},
{
- "group": "Databricks Service Account Secret",
+ "group": "Databricks Service Principal Secret",
"pages": [
- "api-reference/endpoints/secret-rotations/databricks-service-account-secret/create",
- "api-reference/endpoints/secret-rotations/databricks-service-account-secret/delete",
- "api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-by-id",
- "api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-by-name",
- "api-reference/endpoints/secret-rotations/databricks-service-account-secret/get-generated-credentials-by-id",
- "api-reference/endpoints/secret-rotations/databricks-service-account-secret/list",
- "api-reference/endpoints/secret-rotations/databricks-service-account-secret/rotate-secrets",
- "api-reference/endpoints/secret-rotations/databricks-service-account-secret/update"
+ "api-reference/endpoints/secret-rotations/databricks-service-principal-secret/create",
+ "api-reference/endpoints/secret-rotations/databricks-service-principal-secret/delete",
+ "api-reference/endpoints/secret-rotations/databricks-service-principal-secret/get-by-id",
+ "api-reference/endpoints/secret-rotations/databricks-service-principal-secret/get-by-name",
+ "api-reference/endpoints/secret-rotations/databricks-service-principal-secret/get-generated-credentials-by-id",
+ "api-reference/endpoints/secret-rotations/databricks-service-principal-secret/list",
+ "api-reference/endpoints/secret-rotations/databricks-service-principal-secret/rotate-secrets",
+ "api-reference/endpoints/secret-rotations/databricks-service-principal-secret/update"
]
},
{
diff --git a/docs/documentation/platform/secret-rotation/databricks-service-account-secret.mdx b/docs/documentation/platform/secret-rotation/databricks-service-account-secret.mdx
deleted file mode 100644
index d0773dcdba..0000000000
--- a/docs/documentation/platform/secret-rotation/databricks-service-account-secret.mdx
+++ /dev/null
@@ -1,140 +0,0 @@
----
-title: "Databricks Service Principal Secret"
-description: "Learn how to automatically rotate Databricks Service Principal OAuth Secrets."
----
-
-## Prerequisites
-
-- Ensure you've configured the service principal for rotation. See [Configure Permissions for Secret Rotation](/integrations/app-connections/databricks#configure-permissions-for-secret-rotation).
-- Ensure your network security policies allow incoming requests from Infisical to this rotation provider, if network restrictions apply.
-
-## Create a Databricks Service Principal Secret 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 **Databricks Service Principal Secret** option.
- ![Select Databricks Service Account Secret](/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-option.png)
-
- 3. Select the **Databricks Connection** to use and configure the rotation behavior. Then click **Next**.
- ![Rotation Configuration](/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-configuration.png)
-
- - **Databricks Connection** - the connection that will perform the rotation of the specified service principal's OAuth secret.
- - **Rotation Interval** - the interval, in days, that once elapsed will trigger a rotation.
- - **Rotate At** - the local time of day when rotation should occur once the interval has elapsed.
- - **Auto-Rotation Enabled** - whether secrets should automatically be rotated once the rotation interval has elapsed. Disable this option to manually rotate secrets or pause secret rotation.
-
- 4. Select the Databricks service principal whose OAuth secret you want to rotate. Then click **Next**.
- ![Rotation Parameters](/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-parameters.png)
-
- 5. Specify the secret names that the client credentials should be mapped to. Then click **Next**.
- ![Rotation Secrets Mapping](/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-mapping.png)
-
- - **Client ID** - the name of the secret that the service principal Client ID will be mapped to.
- - **Client Secret** - the name of the secret that the rotated OAuth Client Secret will be mapped to.
-
- 6. Give your rotation a name and description (optional). Then click **Next**.
- ![Rotation Details](/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-details.png)
-
- - **Name** - the name of the secret rotation configuration. Must be slug-friendly.
- - **Description** (optional) - a description of this rotation configuration.
-
- 7. Review your configuration, then click **Create Secret Rotation**.
- ![Rotation Review](/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-review.png)
-
- 8. Your **Databricks Service Principal Secret** credentials are now available for use via the mapped secrets.
- ![Rotation Created](/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-created.png)
- </Tab>
- <Tab title="API">
- To create a Databricks Service Principal Secret Rotation, make an API request to the [Create Databricks Service Principal Secret Rotation](/api-reference/endpoints/secret-rotations/databricks-service-principal-secret/create) API endpoint.
-
- ### Sample request
-
- ```bash Request
- curl --request POST \
- --url https://us.infisical.com/api/v2/secret-rotations/databricks-service-principal-secret \
- --header 'Content-Type: application/json' \
- --data '{
- "name": "my-databricks-rotation",
- "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "description": "my service account secret rotation",
- "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "environment": "dev",
- "secretPath": "/",
- "isAutoRotationEnabled": true,
- "rotationInterval": 30,
- "rotateAtUtc": {
- "hours": 0,
- "minutes": 0
- },
- "parameters": {
- "servicePrincipalId": "76997828332531",
- "servicePrincipalName": "my-service-principal",
- "clientId": "..."
- },
- "secretsMapping": {
- "clientId": "DATABRICKS_CLIENT_ID",
- "clientSecret": "DATABRICKS_CLIENT_SECRET"
- }
- }'
- ```
-
- ### Sample response
-
- ```bash Response
- {
- "secretRotation": {
- "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "name": "my-databricks-rotation",
- "description": "my service account secret rotation",
- "secretsMapping": {
- "clientId": "DATABRICKS_CLIENT_ID",
- "clientSecret": "DATABRICKS_CLIENT_SECRET"
- },
- "isAutoRotationEnabled": true,
- "activeIndex": 0,
- "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "createdAt": "2023-11-07T05:31:56Z",
- "updatedAt": "2023-11-07T05:31:56Z",
- "rotationInterval": 30,
- "rotationStatus": "success",
- "lastRotationAttemptedAt": "2023-11-07T05:31:56Z",
- "lastRotatedAt": "2023-11-07T05:31:56Z",
- "lastRotationJobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "nextRotationAt": "2023-11-07T05:31:56Z",
- "connection": {
- "app": "databricks",
- "name": "my-databricks-connection",
- "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
- },
- "environment": {
- "slug": "dev",
- "name": "Development",
- "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
- },
- "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "folder": {
- "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "path": "/"
- },
- "rotateAtUtc": {
- "hours": 0,
- "minutes": 0
- },
- "lastRotationMessage": null,
- "type": "databricks-service-principal-secret",
- "parameters": {
- "servicePrincipalId": "76997828332531",
- "servicePrincipalName": "my-service-principal",
- "clientId": "..."
- }
- }
- }
- ```
- </Tab>
-</Tabs>
-
-
diff --git a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-configuration.png b/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-configuration.png
deleted file mode 100644
index 5b94325d5c..0000000000
Binary files a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-configuration.png and /dev/null differ
diff --git a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-created.png b/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-created.png
deleted file mode 100644
index 4ce491b680..0000000000
Binary files a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-created.png and /dev/null differ
diff --git a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-details.png b/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-details.png
deleted file mode 100644
index 7374841eb4..0000000000
Binary files a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-details.png and /dev/null differ
diff --git a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-mapping.png b/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-mapping.png
deleted file mode 100644
index 776ddd18b2..0000000000
Binary files a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-mapping.png and /dev/null differ
diff --git a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-option.png b/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-option.png
deleted file mode 100644
index 33f0983a03..0000000000
Binary files a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-option.png and /dev/null differ
diff --git a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-parameters.png b/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-parameters.png
deleted file mode 100644
index 8c4c1dd94a..0000000000
Binary files a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-parameters.png and /dev/null differ
diff --git a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-review.png b/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-review.png
deleted file mode 100644
index 724b6812db..0000000000
Binary files a/docs/images/secret-rotations-v2/databricks-service-account-secret/databricks-service-account-secret-review.png and /dev/null differ
diff --git a/docs/snippets/RotationsBrowser.jsx b/docs/snippets/RotationsBrowser.jsx
index c919c95814..524aafd5c9 100644
--- a/docs/snippets/RotationsBrowser.jsx
+++ b/docs/snippets/RotationsBrowser.jsx
@@ -1,40 +1,124 @@
-import React, { useState, useMemo } from 'react';
+import React, { useState, useMemo } from "react";
export const RotationsBrowser = () => {
- const [searchTerm, setSearchTerm] = useState('');
- const [selectedCategory, setSelectedCategory] = useState('All');
+ const [searchTerm, setSearchTerm] = useState("");
+ const [selectedCategory, setSelectedCategory] = useState("All");
- const categories = ['All', 'Databases', 'Identity & Auth', 'Cloud Providers'];
+ const categories = ["All", "Databases", "Identity & Auth", "Cloud Providers"];
const rotations = [
- {"name": "AWS IAM User", "slug": "aws-iam-user", "path": "/documentation/platform/secret-rotation/aws-iam-user-secret", "description": "Learn how to automatically rotate AWS IAM user access keys.", "category": "Cloud Providers"},
- {"name": "Azure Client Secret", "slug": "azure-client-secret", "path": "/documentation/platform/secret-rotation/azure-client-secret", "description": "Learn how to automatically rotate Azure client secrets.", "category": "Cloud Providers"},
- {"name": "Databricks Service Account Secret", "slug": "databricks-service-account-secret", "path": "/documentation/platform/secret-rotation/databricks-service-account-secret", "description": "Learn how to automatically rotate Databricks service principal OAuth secrets.", "category": "Cloud Providers"},
- {"name": "Auth0 Client Secret", "slug": "auth0-client-secret", "path": "/documentation/platform/secret-rotation/auth0-client-secret", "description": "Learn how to automatically rotate Auth0 client secrets.", "category": "Identity & Auth"},
- {"name": "Okta Client Secret", "slug": "okta-client-secret", "path": "/documentation/platform/secret-rotation/okta-client-secret", "description": "Learn how to automatically rotate Okta client secrets.", "category": "Identity & Auth"},
- {"name": "LDAP Password", "slug": "ldap-password", "path": "/documentation/platform/secret-rotation/ldap-password", "description": "Learn how to automatically rotate LDAP user passwords.", "category": "Identity & Auth"},
- {"name": "MySQL", "slug": "mysql-credentials", "path": "/documentation/platform/secret-rotation/mysql-credentials", "description": "Learn how to automatically rotate MySQL database credentials.", "category": "Databases"},
- {"name": "PostgreSQL", "slug": "postgres-credentials", "path": "/documentation/platform/secret-rotation/postgres-credentials", "description": "Learn how to automatically rotate PostgreSQL database credentials.", "category": "Databases"},
- {"name": "Redis", "slug": "redis-credentials", "path": "/documentation/platform/secret-rotation/redis-credentials", "description": "Learn how to automatically rotate Redis database credentials.", "category": "Databases"},
- {"name": "Microsoft SQL Server", "slug": "mssql-credentials", "path": "/documentation/platform/secret-rotation/mssql-credentials", "description": "Learn how to automatically rotate Microsoft SQL Server credentials.", "category": "Databases"},
- {"name": "Oracle Database", "slug": "oracledb-credentials", "path": "/documentation/platform/secret-rotation/oracledb-credentials", "description": "Learn how to automatically rotate Oracle Database credentials.", "category": "Databases"},
- {"name": "MongoDB Credentials", "slug": "mongodb-credentials", "path": "/documentation/platform/secret-rotation/mongodb-credentials", "description": "Learn how to automatically rotate MongoDB credentials.", "category": "Databases"}
- ].sort(function(a, b) {
- return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
+ {
+ name: "AWS IAM User",
+ slug: "aws-iam-user",
+ path: "/documentation/platform/secret-rotation/aws-iam-user-secret",
+ description:
+ "Learn how to automatically rotate AWS IAM user access keys.",
+ category: "Cloud Providers",
+ },
+ {
+ name: "Azure Client Secret",
+ slug: "azure-client-secret",
+ path: "/documentation/platform/secret-rotation/azure-client-secret",
+ description: "Learn how to automatically rotate Azure client secrets.",
+ category: "Cloud Providers",
+ },
+ {
+ name: "Databricks Service Principal Secret",
+ slug: "databricks-service-principal-secret",
+ path: "/documentation/platform/secret-rotation/databricks-service-principal-secret",
+ description:
+ "Learn how to automatically rotate Databricks service principal OAuth secrets.",
+ category: "Cloud Providers",
+ },
+ {
+ name: "Auth0 Client Secret",
+ slug: "auth0-client-secret",
+ path: "/documentation/platform/secret-rotation/auth0-client-secret",
+ description: "Learn how to automatically rotate Auth0 client secrets.",
+ category: "Identity & Auth",
+ },
+ {
+ name: "Okta Client Secret",
+ slug: "okta-client-secret",
+ path: "/documentation/platform/secret-rotation/okta-client-secret",
+ description: "Learn how to automatically rotate Okta client secrets.",
+ category: "Identity & Auth",
+ },
+ {
+ name: "LDAP Password",
+ slug: "ldap-password",
+ path: "/documentation/platform/secret-rotation/ldap-password",
+ description: "Learn how to automatically rotate LDAP user passwords.",
+ category: "Identity & Auth",
+ },
+ {
+ name: "MySQL",
+ slug: "mysql-credentials",
+ path: "/documentation/platform/secret-rotation/mysql-credentials",
+ description:
+ "Learn how to automatically rotate MySQL database credentials.",
+ category: "Databases",
+ },
+ {
+ name: "PostgreSQL",
+ slug: "postgres-credentials",
+ path: "/documentation/platform/secret-rotation/postgres-credentials",
+ description:
+ "Learn how to automatically rotate PostgreSQL database credentials.",
+ category: "Databases",
+ },
+ {
+ name: "Redis",
+ slug: "redis-credentials",
+ path: "/documentation/platform/secret-rotation/redis-credentials",
+ description:
+ "Learn how to automatically rotate Redis database credentials.",
+ category: "Databases",
+ },
+ {
+ name: "Microsoft SQL Server",
+ slug: "mssql-credentials",
+ path: "/documentation/platform/secret-rotation/mssql-credentials",
+ description:
+ "Learn how to automatically rotate Microsoft SQL Server credentials.",
+ category: "Databases",
+ },
+ {
+ name: "Oracle Database",
+ slug: "oracledb-credentials",
+ path: "/documentation/platform/secret-rotation/oracledb-credentials",
+ description:
+ "Learn how to automatically rotate Oracle Database credentials.",
+ category: "Databases",
+ },
+ {
+ name: "MongoDB Credentials",
+ slug: "mongodb-credentials",
+ path: "/documentation/platform/secret-rotation/mongodb-credentials",
+ description: "Learn how to automatically rotate MongoDB credentials.",
+ category: "Databases",
+ },
+ ].sort(function (a, b) {
+ return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
});
const filteredRotations = useMemo(() => {
let filtered = rotations;
- if (selectedCategory !== 'All') {
- filtered = filtered.filter(rotation => rotation.category === selectedCategory);
+ if (selectedCategory !== "All") {
+ filtered = filtered.filter(
+ (rotation) => rotation.category === selectedCategory,
+ );
}
if (searchTerm) {
- filtered = filtered.filter(rotation =>
- rotation.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
- rotation.description.toLowerCase().includes(searchTerm.toLowerCase()) ||
- rotation.category.toLowerCase().includes(searchTerm.toLowerCase())
+ filtered = filtered.filter(
+ (rotation) =>
+ rotation.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
+ rotation.description
+ .toLowerCase()
+ .includes(searchTerm.toLowerCase()) ||
+ rotation.category.toLowerCase().includes(searchTerm.toLowerCase()),
);
}
@@ -47,8 +131,18 @@ export const RotationsBrowser = () => {
<div className="mb-6">
<div className="relative w-full">
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
- <svg className="h-4 w-4 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
+ <svg
+ className="h-4 w-4 text-gray-400"
+ fill="none"
+ stroke="currentColor"
+ viewBox="0 0 24 24"
+ >
+ <path
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="2"
+ d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
+ />
</svg>
</div>
<input
@@ -64,14 +158,14 @@ export const RotationsBrowser = () => {
{/* Category Filter */}
<div className="mb-6">
<div className="flex flex-wrap gap-2">
- {categories.map(category => (
+ {categories.map((category) => (
<button
key={category}
onClick={() => setSelectedCategory(category)}
className={`px-3 py-1.5 text-sm font-medium rounded-lg transition-colors shadow-sm ${
selectedCategory === category
- ? 'bg-yellow-100 text-yellow-700 border border-yellow-200'
- : 'bg-white text-gray-700 border border-gray-200 hover:bg-yellow-50 hover:border-yellow-200'
+ ? "bg-yellow-100 text-yellow-700 border border-yellow-200"
+ : "bg-white text-gray-700 border border-gray-200 hover:bg-yellow-50 hover:border-yellow-200"
}`}
>
{category}
@@ -83,8 +177,9 @@ export const RotationsBrowser = () => {
{/* Results Count */}
<div className="mb-4">
<p className="text-sm text-gray-600">
- {filteredRotations.length} secret rotation{filteredRotations.length !== 1 ? 's' : ''} found
- {selectedCategory !== 'All' && ` in ${selectedCategory}`}
+ {filteredRotations.length} secret rotation
+ {filteredRotations.length !== 1 ? "s" : ""} found
+ {selectedCategory !== "All" && ` in ${selectedCategory}`}
{searchTerm && ` for "${searchTerm}"`}
</p>
</div>
@@ -117,13 +212,17 @@ export const RotationsBrowser = () => {
) : (
<div className="text-center py-8">
<div className="flex flex-col items-center space-y-2">
- <p className="text-gray-500">No secret rotations found matching your criteria</p>
+ <p className="text-gray-500">
+ No secret rotations found matching your criteria
+ </p>
{searchTerm && (
- <p className="text-gray-400 text-sm">Try adjusting your search terms or filters</p>
+ <p className="text-gray-400 text-sm">
+ Try adjusting your search terms or filters
+ </p>
)}
</div>
</div>
)}
</div>
);
-};
\ No newline at end of file
+};