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
docs: add initial docs
adilsonb0ad79d645fd
diff --git a/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/create.mdx b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/create.mdxnew file mode 100644index 0000000000..ddb1a20913--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/create.mdx@@ -0,0 +1,10 @@+---+title: "Create"+openapi: "POST /api/v2/secret-rotations/snowflake-user-key-pair"+---++<Note>+ Check out the configuration docs for [Snowflake User Key Pair+ Rotations](/documentation/platform/secret-rotation/snowflake-user-key-pair) to learn how to obtain the+ required parameters.+</Note>diff --git a/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/delete.mdx b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/delete.mdxnew file mode 100644index 0000000000..daa04517bf--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/delete.mdx@@ -0,0 +1,4 @@+---+title: "Delete"+openapi: "DELETE /api/v2/secret-rotations/snowflake-user-key-pair/{rotationId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-by-id.mdxnew file mode 100644index 0000000000..e4632bb3b0--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get by ID"+openapi: "GET /api/v2/secret-rotations/snowflake-user-key-pair/{rotationId}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-by-name.mdx b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-by-name.mdxnew file mode 100644index 0000000000..95edbe58eb--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-by-name.mdx@@ -0,0 +1,4 @@+---+title: "Get by Name"+openapi: "GET /api/v2/secret-rotations/snowflake-user-key-pair/rotation-name/{rotationName}"+---diff --git a/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-generated-credentials-by-id.mdx b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-generated-credentials-by-id.mdxnew file mode 100644index 0000000000..478f66ce73--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-generated-credentials-by-id.mdx@@ -0,0 +1,4 @@+---+title: "Get Credentials by ID"+openapi: "GET /api/v2/secret-rotations/snowflake-user-key-pair/{rotationId}/generated-credentials"+---diff --git a/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/list.mdx b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/list.mdxnew file mode 100644index 0000000000..b377a36279--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/list.mdx@@ -0,0 +1,4 @@+---+title: "List"+openapi: "GET /api/v2/secret-rotations/snowflake-user-key-pair"+---diff --git a/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/rotate-secrets.mdx b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/rotate-secrets.mdxnew file mode 100644index 0000000000..9edd5d57cc--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/rotate-secrets.mdx@@ -0,0 +1,4 @@+---+title: "Rotate Secrets"+openapi: "POST /api/v2/secret-rotations/snowflake-user-key-pair/{rotationId}/rotate-secrets"+---diff --git a/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/update.mdx b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/update.mdxnew file mode 100644index 0000000000..d36f405e69--- /dev/null+++ b/docs/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/update.mdx@@ -0,0 +1,10 @@+---+title: "Update"+openapi: "PATCH /api/v2/secret-rotations/snowflake-user-key-pair/{rotationId}"+---++<Note>+ Check out the configuration docs for [Snowflake User Key Pair+ Rotations](/documentation/platform/secret-rotation/snowflake-user-key-pair) to learn how to obtain the+ required parameters.+</Note>diff --git a/docs/docs.json b/docs/docs.jsonindex 7468eb17f7..033906a7c5 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -503,7 +503,8 @@"documentation/platform/secret-rotation/mysql-credentials","documentation/platform/secret-rotation/oracledb-credentials","documentation/platform/secret-rotation/postgres-credentials",- "documentation/platform/secret-rotation/redis-credentials"+ "documentation/platform/secret-rotation/redis-credentials",+ "documentation/platform/secret-rotation/snowflake-user-key-pair"]},{@@ -2749,6 +2750,19 @@"api-reference/endpoints/secret-rotations/salesforce-oauth-credentials/update"]},+ {+ "group": "Snowflake User Key Pair",+ "pages": [+ "api-reference/endpoints/secret-rotations/snowflake-user-key-pair/create",+ "api-reference/endpoints/secret-rotations/snowflake-user-key-pair/delete",+ "api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-by-id",+ "api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-by-name",+ "api-reference/endpoints/secret-rotations/snowflake-user-key-pair/get-generated-credentials-by-id",+ "api-reference/endpoints/secret-rotations/snowflake-user-key-pair/list",+ "api-reference/endpoints/secret-rotations/snowflake-user-key-pair/rotate-secrets",+ "api-reference/endpoints/secret-rotations/snowflake-user-key-pair/update"+ ]+ },{"group": "Supabase API Key","pages": [diff --git a/docs/documentation/platform/secret-rotation/snowflake-user-key-pair.mdx b/docs/documentation/platform/secret-rotation/snowflake-user-key-pair.mdxnew file mode 100644index 0000000000..ee782b47e1--- /dev/null+++ b/docs/documentation/platform/secret-rotation/snowflake-user-key-pair.mdx@@ -0,0 +1,180 @@+---+title: "Snowflake User Key Pair Rotation"+description: "Learn how to automatically rotate a Snowflake user's RSA key pair."+---++<Note>+ **Rotation Type: Dual-Phase**++ This rotation maintains two active credential sets with overlapping validity, ensuring zero-downtime during rotation cycles. It uses Snowflake's two public-key slots (`RSA_PUBLIC_KEY` and `RSA_PUBLIC_KEY_2`), alternating between them on each rotation so the retired key pair stays valid until the next cycle.+</Note>++Infisical's Snowflake User Key Pair rotation generates a **2048-bit RSA key pair** and assigns its public key to a target Snowflake user for [key-pair authentication](https://docs.snowflake.com/en/user-guide/key-pair-auth). On each rotation, Infisical generates a fresh key pair, writes the public key to the currently-inactive slot on the user, and maps the new private and public keys to the secrets of your choice.++## Prerequisites++1. Create a [Snowflake Connection](/integrations/app-connections/snowflake) with the required **Secret Rotation** permissions.++ The connection's role must be able to alter the target user. Grant a role that can manage the user and assign it to your connection user:++ ```SQL+ -- create a role Infisical will use to manage the target user+ CREATE ROLE IF NOT EXISTS INFISICAL_ROTATION_ROLE;++ -- allow the role to alter the target user's RSA public key+ GRANT OWNERSHIP ON USER MY_TARGET_USER TO ROLE INFISICAL_ROTATION_ROLE;++ -- (optional) allow the role to create the target user if it does not exist yet+ GRANT CREATE USER ON ACCOUNT TO ROLE INFISICAL_ROTATION_ROLE;++ -- assign the role to the user backing your Snowflake Connection+ GRANT ROLE INFISICAL_ROTATION_ROLE TO USER MY_CONNECTION_USER;+ ```++ <Tip>+ To learn more about managing users and privileges in Snowflake, see their [access control documentation](https://docs.snowflake.com/en/user-guide/security-access-control-overview).+ </Tip>++2. Decide on the target user whose key pair you want to rotate.++ If the user already exists, the connection's role only needs privileges to **alter** it (e.g. `OWNERSHIP` on the user). If the user does **not** exist, Infisical creates it as a key-pair-only `SERVICE` user, which additionally requires the `CREATE USER` privilege on the account.++ <Note>+ If the user is created by Infisical, in case the credentials are revoked the user continue to exists.+ </Note>+++3. Ensure your network security policies allow incoming requests from Infisical to your Snowflake account, if network restrictions apply.++ <Warning>+ Only the RSA public key is written to Snowflake. The generated private key is stored solely in the mapped Infisical secret and is never persisted to Snowflake.+ </Warning>++## Create a Snowflake User Key Pair 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 **Snowflake User Key Pair** option.+ ++ 3. Select the **Snowflake Connection** to use and configure the rotation behavior. Then click **Next**.+ ++ - **Snowflake Connection** - the connection that will perform the rotation of the target user's RSA key pair.+ - **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. Specify the Snowflake user whose key pair should be rotated. Then click **Next**.+ ++ - **Username** - the Snowflake user whose RSA key pair will be rotated. If the user does not exist, it is created as a key-pair-only `SERVICE` user.++ 5. Specify the secret names that the generated key pair should be mapped to. Then click **Next**.+ ++ - **Private Key** - the name of the secret that the generated RSA private key (PKCS#8 PEM) will be mapped to.+ - **Public Key** - the name of the secret that the generated RSA public key (SPKI PEM) will be mapped to.++ 6. Give your rotation a name and description (optional). Then click **Next**.+ ++ - **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**.+ ++ 8. Your **Snowflake User Key Pair** is now available for use via the mapped secrets.+ + </Tab>+ <Tab title="API">+ To create a Snowflake User Key Pair Rotation, make an API request to the [Create Snowflake User Key Pair+ Rotation](/api-reference/endpoints/secret-rotations/snowflake-user-key-pair/create) API endpoint.++ ### Sample request++ ```bash Request+ curl --request POST \+ --url https://us.infisical.com/api/v2/secret-rotations/snowflake-user-key-pair \+ --header 'Content-Type: application/json' \+ --data '{+ "name": "my-snowflake-rotation",+ "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "description": "my snowflake key pair rotation",+ "connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "environment": "dev",+ "secretPath": "/",+ "isAutoRotationEnabled": true,+ "rotationInterval": 30,+ "rotateAtUtc": {+ "hours": 0,+ "minutes": 0+ },+ "parameters": {+ "username": "MY_SERVICE_USER"+ },+ "secretsMapping": {+ "privateKey": "SNOWFLAKE_PRIVATE_KEY",+ "publicKey": "SNOWFLAKE_PUBLIC_KEY"+ }+ }'+ ```++ ### Sample response++ ```bash Response+ {+ "secretRotation": {+ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",+ "name": "my-snowflake-rotation",+ "description": "my snowflake key pair rotation",+ "secretsMapping": {+ "privateKey": "SNOWFLAKE_PRIVATE_KEY",+ "publicKey": "SNOWFLAKE_PUBLIC_KEY"+ },+ "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": "snowflake",+ "name": "my-snowflake-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": "snowflake-user-key-pair",+ "parameters": {+ "username": "MY_SERVICE_USER"+ }+ }+ }+ ```+ </Tab>+</Tabs>+