From 40bb9668fe79d256696f2fe8933b226f0eb9ef2f Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Wed, 3 Apr 2024 01:12:30 +0530 Subject: [PATCH 1/2] docs: added guide to setup integration with api --- .../overview/examples/integration.mdx | 96 +++++++++++++++++++ docs/mint.json | 3 +- 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 docs/api-reference/overview/examples/integration.mdx diff --git a/docs/api-reference/overview/examples/integration.mdx b/docs/api-reference/overview/examples/integration.mdx new file mode 100644 index 000000000..c096826be --- /dev/null +++ b/docs/api-reference/overview/examples/integration.mdx @@ -0,0 +1,96 @@ +--- +title: "Setting Up Integration to Sync Secrets with API" +--- + +Utilizing Infisical's API, you can establish integrations to connect with external third-party providers for syncing secrets. + +While we will focus on AWS Secret Store Manager (AWS SSM) here, information for other providers can be found in their respective API reference documentation. + + +Refer to the [AWS SSM integration setup](../../../integrations/cloud/aws-secret-manager) to understand AWS SSM sync setup in UI and prerequisites. + + + + + Authentication with AWS SSM is necessary for Infisical to establish a connection. + This process is facilitated through the [Integration Auth API](../../endpoints/integrations/create-auth). + + The following are the required fields: + + This value must be **aws-secret-manager**. + + + Infisical project ID for the integration. + + + The AWS IAM User Access ID. + + + The AWS IAM User Access Secret Key. + + + Then you can send a request in the following format: + + ```bash Request + curl --request POST \ + --url https://app.infisical.com/api/v1/integration-auth/access-token \ + --header 'Authorization: ' \ + --header 'Content-Type: application/json' \ + --data '{ + "workspaceId": "", + "integration": "aws-secret-manager", + "accessId": "", + "accessToken": "" + }' + ``` + + + + With the authentication between AWS SSM and Infisical established, you can now proceed to configure the sync behavior. + This involves defining the source (environment and secret path in Infisical) and the destination in SSM. + + This configuration is carried out through the [Integration API](../../endpoints/integrations/create). + For this, we use the [Integration API](../../endpoints/integrations/create). + + The following parameters are required: + + The ID of the integration auth object for authentication with AWS. + This will be the ID field of the previous integration auth API response. + + + Whether the integration should be active or inactive. + + + The secret name used when saving secrets in AWS SSM. This is used for naming and can be arbitrary. + + + The AWS region of the SSM. Example: `us-east-1`. + + + The Infisical environment slug from which secrets will be synced. Example: `dev`. + + + The Infisical folder path from which secrets will be synced. Example: `/some/path`. The root of the environment is `/`. + + + Then you can send a request in the following format: + + ```bash Request + curl --request POST \ + --url https://app.infisical.com/api/v1/integration \ + --header 'Authorization: ' \ + --header 'Content-Type: application/json' \ + --data '{ + "integrationAuthId": "", + "sourceEnvironment": "", + "secretPath": "", + "app": "", + "region": "" + }' + ``` + + + + +You have successfully configured Infisical Integration to sync secrets from Infisical to AWS SSM. +[Refer the integration api reference for more information.](../../endpoints/integrations) diff --git a/docs/mint.json b/docs/mint.json index 4f70fb4c4..88cbb3d81 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -388,7 +388,8 @@ "pages": [ "api-reference/overview/examples/note", "api-reference/overview/examples/e2ee-disabled", - "api-reference/overview/examples/e2ee-enabled" + "api-reference/overview/examples/e2ee-enabled", + "api-reference/overview/examples/integration" ] } ] From f333c905d9e711dc42453b2cd99ed40c7bfce8ff Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Mon, 8 Apr 2024 11:55:38 -0700 Subject: [PATCH 2/2] revise generic integration docs --- .../overview/examples/integration.mdx | 54 +++++++++---------- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/docs/api-reference/overview/examples/integration.mdx b/docs/api-reference/overview/examples/integration.mdx index c096826be..e8da5ea49 100644 --- a/docs/api-reference/overview/examples/integration.mdx +++ b/docs/api-reference/overview/examples/integration.mdx @@ -1,26 +1,25 @@ --- -title: "Setting Up Integration to Sync Secrets with API" +title: "Configure native integrations programmatically" +description: "How to use Infisical API to sync secrets to external secret managers" --- -Utilizing Infisical's API, you can establish integrations to connect with external third-party providers for syncing secrets. +The Infisical API allows you to create programmatic integrations that connect with third-party secret managers to synchronize secrets from Infisical. -While we will focus on AWS Secret Store Manager (AWS SSM) here, information for other providers can be found in their respective API reference documentation. +This guide will primarily demonstrate the process using AWS Secret Store Manager (AWS SSM), but the steps are generally applicable to other secret management integrations. -Refer to the [AWS SSM integration setup](../../../integrations/cloud/aws-secret-manager) to understand AWS SSM sync setup in UI and prerequisites. + For details on setting up AWS SSM synchronization and understanding its prerequisites, refer to the [AWS SSM integration setup documentation](../../../integrations/cloud/aws-secret-manager). - - Authentication with AWS SSM is necessary for Infisical to establish a connection. - This process is facilitated through the [Integration Auth API](../../endpoints/integrations/create-auth). + + Authentication is required for all integrations. Use the [Integration Auth API](../../endpoints/integrations/create-auth) with the following parameters to authenticate. - The following are the required fields: - This value must be **aws-secret-manager**. + Set this parameter to **aws-secret-manager**. - Infisical project ID for the integration. + The Infisical project ID for the integration. The AWS IAM User Access ID. @@ -29,8 +28,6 @@ Refer to the [AWS SSM integration setup](../../../integrations/cloud/aws-secret- The AWS IAM User Access Secret Key. - Then you can send a request in the following format: - ```bash Request curl --request POST \ --url https://app.infisical.com/api/v1/integration-auth/access-token \ @@ -45,36 +42,31 @@ Refer to the [AWS SSM integration setup](../../../integrations/cloud/aws-secret- ``` - - With the authentication between AWS SSM and Infisical established, you can now proceed to configure the sync behavior. - This involves defining the source (environment and secret path in Infisical) and the destination in SSM. + + Once authentication between AWS SSM and Infisical is established, you can configure the synchronization behavior. + This involves specifying the source (environment and secret path in Infisical) and the destination in SSM to which the secrets will be synchronized. - This configuration is carried out through the [Integration API](../../endpoints/integrations/create). - For this, we use the [Integration API](../../endpoints/integrations/create). + Use the [integration API](../../endpoints/integrations/create) with the following parameters to configure the sync source and destination. - The following parameters are required: - The ID of the integration auth object for authentication with AWS. - This will be the ID field of the previous integration auth API response. + The ID of the integration authentication object used with AWS, obtained from the previous API response. - Whether the integration should be active or inactive. + Indicates whether the integration should be active or inactive. - The secret name used when saving secrets in AWS SSM. This is used for naming and can be arbitrary. + The secret name for saving in AWS SSM, which can be arbitrarily chosen. - The AWS region of the SSM. Example: `us-east-1`. + The AWS region where the SSM is located, e.g., `us-east-1`. - The Infisical environment slug from which secrets will be synced. Example: `dev`. + The Infisical environment slug from which secrets will be synchronized, e.g., `dev`. - The Infisical folder path from which secrets will be synced. Example: `/some/path`. The root of the environment is `/`. + The Infisical folder path from which secrets will be synchronized, e.g., `/some/path`. The root path is `/`. - Then you can send a request in the following format: - ```bash Request curl --request POST \ --url https://app.infisical.com/api/v1/integration \ @@ -83,7 +75,7 @@ Refer to the [AWS SSM integration setup](../../../integrations/cloud/aws-secret- --data '{ "integrationAuthId": "", "sourceEnvironment": "", - "secretPath": "", + "secretPath": "", "app": "", "region": "" }' @@ -92,5 +84,7 @@ Refer to the [AWS SSM integration setup](../../../integrations/cloud/aws-secret- -You have successfully configured Infisical Integration to sync secrets from Infisical to AWS SSM. -[Refer the integration api reference for more information.](../../endpoints/integrations) + +Congratulations! You have successfully set up an integration to synchronize secrets from Infisical with AWS SSM. +For more information, [view the integration API reference](../../endpoints/integrations). + \ No newline at end of file