mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
97 lines
4.0 KiB
Plaintext
97 lines
4.0 KiB
Plaintext
---
|
|
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.
|
|
|
|
<Info>
|
|
Refer to the [AWS SSM integration setup](../../../integrations/cloud/aws-secret-manager) to understand AWS SSM sync setup in UI and prerequisites.
|
|
</Info>
|
|
|
|
<Steps>
|
|
<Step title="Connect with AWS SSM">
|
|
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:
|
|
<ParamField body="integration" type="string" initialValue="aws-secret-manager" required>
|
|
This value must be **aws-secret-manager**.
|
|
</ParamField>
|
|
<ParamField body="workspaceId" type="string" required>
|
|
Infisical project ID for the integration.
|
|
</ParamField>
|
|
<ParamField body="accessId" type="string" required>
|
|
The AWS IAM User Access ID.
|
|
</ParamField>
|
|
<ParamField body="accessToken" type="string" required>
|
|
The AWS IAM User Access Secret Key.
|
|
</ParamField>
|
|
|
|
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: <authorization>' \
|
|
--header 'Content-Type: application/json' \
|
|
--data '{
|
|
"workspaceId": "<workspaceid>",
|
|
"integration": "aws-secret-manager",
|
|
"accessId": "<aws iam user access id>",
|
|
"accessToken": "<aws iam user access secret key>"
|
|
}'
|
|
```
|
|
|
|
</Step>
|
|
<Step title="Configure the Sync Setup">
|
|
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:
|
|
<ParamField body="integrationAuthId" type="string" 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.
|
|
</ParamField>
|
|
<ParamField body="isActive" type="boolean">
|
|
Whether the integration should be active or inactive.
|
|
</ParamField>
|
|
<ParamField body="app" type="string" required>
|
|
The secret name used when saving secrets in AWS SSM. This is used for naming and can be arbitrary.
|
|
</ParamField>
|
|
<ParamField body="region" type="string" required>
|
|
The AWS region of the SSM. Example: `us-east-1`.
|
|
</ParamField>
|
|
<ParamField body="sourceEnvironment" type="string" required>
|
|
The Infisical environment slug from which secrets will be synced. Example: `dev`.
|
|
</ParamField>
|
|
<ParamField body="secretPath" type="string" required>
|
|
The Infisical folder path from which secrets will be synced. Example: `/some/path`. The root of the environment is `/`.
|
|
</ParamField>
|
|
|
|
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: <authorization>' \
|
|
--header 'Content-Type: application/json' \
|
|
--data '{
|
|
"integrationAuthId": "<integrationauthid>",
|
|
"sourceEnvironment": "<sourceenvironment>",
|
|
"secretPath": "<secret-path default is '/' >",
|
|
"app": "<app>",
|
|
"region": "<aws-ssm-region>"
|
|
}'
|
|
```
|
|
|
|
</Step>
|
|
</Steps>
|
|
|
|
You have successfully configured Infisical Integration to sync secrets from Infisical to AWS SSM.
|
|
[Refer the integration api reference for more information.](../../endpoints/integrations)
|