Merge pull request #3235 from Infisical/feat/addHumanitecIntegration
Add Humanitec secret sync integration
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Available"
|
||||
openapi: "GET /api/v1/app-connections/humanitec/available"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Create"
|
||||
openapi: "POST /api/v1/app-connections/humanitec"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Delete"
|
||||
openapi: "DELETE /api/v1/app-connections/humanitec/{connectionId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Get by ID"
|
||||
openapi: "GET /api/v1/app-connections/humanitec/{connectionId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Get by Name"
|
||||
openapi: "GET /api/v1/app-connections/humanitec/connection-name/{connectionName}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "List"
|
||||
openapi: "GET /api/v1/app-connections/humanitec"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Update"
|
||||
openapi: "PATCH /api/v1/app-connections/humanitec/{connectionId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Create"
|
||||
openapi: "POST /api/v1/secret-syncs/humanitec"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Delete"
|
||||
openapi: "DELETE /api/v1/secret-syncs/humanitec/{syncId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Get by ID"
|
||||
openapi: "GET /api/v1/secret-syncs/humanitec/{syncId}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Get by Name"
|
||||
openapi: "GET /api/v1/secret-syncs/humanitec/sync-name/{syncName}"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "List"
|
||||
openapi: "GET /api/v1/secret-syncs/humanitec"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Remove Secrets"
|
||||
openapi: "POST /api/v1/secret-syncs/humanitec/{syncId}/remove-secrets"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Sync Secrets"
|
||||
openapi: "POST /api/v1/secret-syncs/humanitec/{syncId}/sync-secrets"
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: "Update"
|
||||
openapi: "PATCH /api/v1/secret-syncs/humanitec/{syncId}"
|
||||
---
|
||||
|
After Width: | Height: | Size: 229 KiB |
|
After Width: | Height: | Size: 324 KiB |
|
After Width: | Height: | Size: 302 KiB |
|
After Width: | Height: | Size: 317 KiB |
BIN
docs/images/app-connections/humanitec/humanitec-add-user.png
Normal file
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 337 KiB |
|
After Width: | Height: | Size: 230 KiB |
|
After Width: | Height: | Size: 234 KiB |
|
After Width: | Height: | Size: 318 KiB |
BIN
docs/images/app-connections/humanitec/humanitec-connection.png
Normal file
|
After Width: | Height: | Size: 340 KiB |
|
After Width: | Height: | Size: 325 KiB |
|
After Width: | Height: | Size: 330 KiB |
|
After Width: | Height: | Size: 286 KiB |
|
After Width: | Height: | Size: 333 KiB |
|
After Width: | Height: | Size: 300 KiB |
BIN
docs/images/app-connections/humanitec/humanitec-user-added.png
Normal file
|
After Width: | Height: | Size: 316 KiB |
|
After Width: | Height: | Size: 232 KiB |
BIN
docs/images/secret-syncs/humanitec/humanitec-created.png
Normal file
|
After Width: | Height: | Size: 374 KiB |
BIN
docs/images/secret-syncs/humanitec/humanitec-destination.png
Normal file
|
After Width: | Height: | Size: 247 KiB |
BIN
docs/images/secret-syncs/humanitec/humanitec-details.png
Normal file
|
After Width: | Height: | Size: 246 KiB |
BIN
docs/images/secret-syncs/humanitec/humanitec-options.png
Normal file
|
After Width: | Height: | Size: 267 KiB |
BIN
docs/images/secret-syncs/humanitec/humanitec-review.png
Normal file
|
After Width: | Height: | Size: 253 KiB |
BIN
docs/images/secret-syncs/humanitec/humanitec-source.png
Normal file
|
After Width: | Height: | Size: 243 KiB |
BIN
docs/images/secret-syncs/humanitec/select-humanitec-option.png
Normal file
|
After Width: | Height: | Size: 258 KiB |
71
docs/integrations/app-connections/humanitec.mdx
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
title: "Humanitec Connection"
|
||||
description: "Learn how to configure a Humanitec Connection for Infisical."
|
||||
---
|
||||
|
||||
Infisical supports connecting to Humanitec using a service user.
|
||||
|
||||
## Setup Humanitec Connection in Infisical
|
||||
|
||||
<Steps>
|
||||
<Step title="Move to Service Users on Humanitec">
|
||||
Navigate to the Humanitec **Service Users** tab.
|
||||

|
||||
</Step>
|
||||
<Step title="Create a Service User">
|
||||
Create a new service user. Take into account that the role set here will affect the permissions of the API Token so be sure to set it so the Service User has access permissions to the App you want to integrate to Infisical.
|
||||

|
||||
</Step>
|
||||
<Step title="Add API Token for the Service User">
|
||||
Add a new API token for the service user.
|
||||

|
||||
</Step>
|
||||
<Step title="Create the API Token for the Service User">
|
||||
Create the API token for the service user.
|
||||
This token's permission will be limited to the **Service User** role.
|
||||
<Note>
|
||||
If you configure an expiry date for your API token you will need to manually rotate to a new token prior to expiration to avoid integration downtime.
|
||||
</Note>
|
||||

|
||||
</Step>
|
||||
<Step title="Copy the API Token">
|
||||
A modal with the API token will be displayed. Save the token in a secure location for later use in the following steps.
|
||||

|
||||
</Step>
|
||||
<Step title="Service User has been successfully created">
|
||||
After following the previous steps the Service User has been successfully created, and now should be visible on the Service Users tab.
|
||||

|
||||
</Step>
|
||||
<Step title="Add Service User to Application">
|
||||
Move to the **Applications** tab and add the Service User to the Application you want to sync with Infisical.
|
||||
Clicking on the App Title will open the App details page.
|
||||

|
||||
</Step>
|
||||
<Step title="Add new member to this Application">
|
||||
Move to the **People** tab and add a new member to this Application. The recently created User Service should be visible on the dropdown shown.
|
||||
Make sure to assign at least Developer role as Write permissions are required.
|
||||

|
||||

|
||||

|
||||
</Step>
|
||||
<Step title="Connection Created">
|
||||
Your **Humanitec Connection** is now available for use.
|
||||

|
||||
</Step>
|
||||
<Step title="Navigate to App Connections">
|
||||
Navigate to the **App Connections** tab on the **Organization Settings** page.
|
||||

|
||||
</Step>
|
||||
<Step title="Add Connection">
|
||||
Select the **Humanitec Connection** option from the connection options modal.
|
||||

|
||||
</Step>
|
||||
<Step title="Fill the Humanitec Connection Modal">
|
||||
Fill the Humanitec Connection modal, here you will need to provide the User Service API Token generated in the previous step.
|
||||

|
||||
</Step>
|
||||
<Step title="Connection Created">
|
||||
Your **Humanitec Connection** is now available for use.
|
||||

|
||||
</Step>
|
||||
</Steps>
|
||||
156
docs/integrations/secret-syncs/humanitec.mdx
Normal file
@@ -0,0 +1,156 @@
|
||||
---
|
||||
title: "Humanitec Sync"
|
||||
description: "Learn how to configure a Humanitec Sync for Infisical."
|
||||
---
|
||||
|
||||
**Prerequisites:**
|
||||
|
||||
- Set up and add secrets to [Infisical Cloud](https://app.infisical.com)
|
||||
- Create a [Humanitec Connection](/integrations/app-connections/humanitec)
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Infisical UI">
|
||||
1. Navigate to **Project** > **Integrations** and select the **Secret Syncs** tab. Click on the **Add Sync** button.
|
||||

|
||||
|
||||
2. Select the **Humanitec** option.
|
||||

|
||||
|
||||
3. Configure the **Source** from where secrets should be retrieved, then click **Next**.
|
||||

|
||||
|
||||
- **Environment**: The project environment to retrieve secrets from.
|
||||
- **Secret Path**: The folder path to retrieve secrets from.
|
||||
|
||||
<Tip>
|
||||
If you need to sync secrets from multiple folder locations, check out [secret imports](/documentation/platform/secret-reference#secret-imports).
|
||||
</Tip>
|
||||
|
||||
4. Configure the **Destination** to where secrets should be deployed, then click **Next**.
|
||||

|
||||
|
||||
- **Humanitec Connection**: The Humanitec Connection to authenticate with.
|
||||
- **Scope**: The Humanitec secret scope to sync secrets to.
|
||||
- **Application**: Sync secrets to a specific application.
|
||||
- **Environment**: Sync secrets to a specific environment of an application.
|
||||
<p class="height:1px" />
|
||||
The remaining fields are determined by the selected **Scope**:
|
||||
<AccordionGroup>
|
||||
<Accordion title="Application">
|
||||
- **Organization**: The organization to deploy secrets to.
|
||||
- **App**: The application to deploy secrets to.
|
||||
</Accordion>
|
||||
<Accordion title="Environment">
|
||||
- **Organization**: The organization to deploy secrets to.
|
||||
- **App**: The application to deploy secrets to.
|
||||
- **Environment**: The environment to deploy secrets to.
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.
|
||||

|
||||
|
||||
- **Initial Sync Behavior**: Determines how Infisical should resolve the initial sync.
|
||||
- **Overwrite Destination Secrets**: Removes any secrets at the destination endpoint not present in Infisical.
|
||||
<Note>
|
||||
Humanitec does not support importing secrets.
|
||||
</Note>
|
||||
- **Auto-Sync Enabled**: If enabled, secrets will automatically be synced from the source location when changes occur. Disable to enforce manual syncing only.
|
||||
|
||||
6. Configure the **Details** of your Humanitec Sync, then click **Next**.
|
||||

|
||||
|
||||
- **Name**: The name of your sync. Must be slug-friendly.
|
||||
- **Description**: An optional description for your sync.
|
||||
|
||||
7. Review your Humanitec Sync configuration, then click **Create Sync**.
|
||||

|
||||
|
||||
8. If enabled, your Humanitec Sync will begin syncing your secrets to the destination endpoint.
|
||||

|
||||
|
||||
</Tab>
|
||||
<Tab title="API">
|
||||
To create an **Humanitec Sync**, make an API request to the [Create Humanitec Sync](/api-reference/endpoints/secret-syncs/humanitec/create) API endpoint.
|
||||
|
||||
### Sample request
|
||||
|
||||
```bash Request
|
||||
curl --request POST \
|
||||
--url https://app.infisical.com/api/v1/secret-syncs/humanitec \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data '{
|
||||
"name": "my-humanitec-sync",
|
||||
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"description": "an example sync",
|
||||
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"environment": "dev",
|
||||
"secretPath": "/my-secrets",
|
||||
"isEnabled": true,
|
||||
"syncOptions": {
|
||||
"initialSyncBehavior": "overwrite-destination"
|
||||
},
|
||||
"destinationConfig": {
|
||||
"scope": "application",
|
||||
"app": "my-app",
|
||||
"environment": "development"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
### Sample response
|
||||
|
||||
```bash Response
|
||||
{
|
||||
"secretSync": {
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"name": "my-humanitec-sync",
|
||||
"description": "an example sync",
|
||||
"isEnabled": true,
|
||||
"version": 1,
|
||||
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"connectionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"createdAt": "2023-11-07T05:31:56Z",
|
||||
"updatedAt": "2023-11-07T05:31:56Z",
|
||||
"syncStatus": "succeeded",
|
||||
"lastSyncJobId": "123",
|
||||
"lastSyncMessage": null,
|
||||
"lastSyncedAt": "2023-11-07T05:31:56Z",
|
||||
"importStatus": null,
|
||||
"lastImportJobId": null,
|
||||
"lastImportMessage": null,
|
||||
"lastImportedAt": null,
|
||||
"removeStatus": null,
|
||||
"lastRemoveJobId": null,
|
||||
"lastRemoveMessage": null,
|
||||
"lastRemovedAt": null,
|
||||
"syncOptions": {
|
||||
"initialSyncBehavior": "overwrite-destination"
|
||||
},
|
||||
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"connection": {
|
||||
"app": "humanitec",
|
||||
"name": "my-humanitec-connection",
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
|
||||
},
|
||||
"environment": {
|
||||
"slug": "dev",
|
||||
"name": "Development",
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
|
||||
},
|
||||
"folder": {
|
||||
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
|
||||
"path": "/my-secrets"
|
||||
},
|
||||
"destination": "humanitec",
|
||||
"destinationConfig": {
|
||||
"scope": "application",
|
||||
"org": "my-organization",
|
||||
"app": "my-app",
|
||||
"env": "development"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
@@ -408,7 +408,8 @@
|
||||
"integrations/app-connections/azure-key-vault",
|
||||
"integrations/app-connections/databricks",
|
||||
"integrations/app-connections/gcp",
|
||||
"integrations/app-connections/github"
|
||||
"integrations/app-connections/github",
|
||||
"integrations/app-connections/humanitec"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -426,7 +427,8 @@
|
||||
"integrations/secret-syncs/azure-key-vault",
|
||||
"integrations/secret-syncs/databricks",
|
||||
"integrations/secret-syncs/gcp-secret-manager",
|
||||
"integrations/secret-syncs/github"
|
||||
"integrations/secret-syncs/github",
|
||||
"integrations/secret-syncs/humanitec"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -898,6 +900,18 @@
|
||||
"api-reference/endpoints/app-connections/github/update",
|
||||
"api-reference/endpoints/app-connections/github/delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Humanitec",
|
||||
"pages": [
|
||||
"api-reference/endpoints/app-connections/humanitec/list",
|
||||
"api-reference/endpoints/app-connections/humanitec/available",
|
||||
"api-reference/endpoints/app-connections/humanitec/get-by-id",
|
||||
"api-reference/endpoints/app-connections/humanitec/get-by-name",
|
||||
"api-reference/endpoints/app-connections/humanitec/create",
|
||||
"api-reference/endpoints/app-connections/humanitec/update",
|
||||
"api-reference/endpoints/app-connections/humanitec/delete"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1001,6 +1015,19 @@
|
||||
"api-reference/endpoints/secret-syncs/github/sync-secrets",
|
||||
"api-reference/endpoints/secret-syncs/github/remove-secrets"
|
||||
]
|
||||
},
|
||||
{
|
||||
"group": "Humanitec",
|
||||
"pages": [
|
||||
"api-reference/endpoints/secret-syncs/humanitec/list",
|
||||
"api-reference/endpoints/secret-syncs/humanitec/get-by-id",
|
||||
"api-reference/endpoints/secret-syncs/humanitec/get-by-name",
|
||||
"api-reference/endpoints/secret-syncs/humanitec/create",
|
||||
"api-reference/endpoints/secret-syncs/humanitec/update",
|
||||
"api-reference/endpoints/secret-syncs/humanitec/delete",
|
||||
"api-reference/endpoints/secret-syncs/humanitec/sync-secrets",
|
||||
"api-reference/endpoints/secret-syncs/humanitec/remove-secrets"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||