From 40bb9668fe79d256696f2fe8933b226f0eb9ef2f Mon Sep 17 00:00:00 2001 From: Akhil Mohan Date: Wed, 3 Apr 2024 01:12:30 +0530 Subject: [PATCH] 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" ] } ]