Improve humanitec docs
@@ -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}"
|
||||
---
|
||||
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 205 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 |
|
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 |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 374 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 247 KiB |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 246 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 269 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 253 KiB |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 243 KiB |
@@ -8,19 +8,46 @@ Infisical supports connecting to Humanitec using a service user.
|
||||
## Setup Humanitec Connection in Infisical
|
||||
|
||||
<Steps>
|
||||
<Step title="Create a Service User on Humanitec">
|
||||
Navigate to the Humanitec Service Users tab and create a new service user.
|
||||
This user will be used to connect to Humanitec from Infisical.
|
||||

|
||||
<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. Depending on the expiry date set, the token will expire and this integration will stop working.
|
||||
This token's permission will be limited to the **Service User** role.
|
||||

|
||||
</Step>
|
||||
<Step title="Copy the API Token">
|
||||
A modal with the API token will be displayed. Copy the token and save it in a secure location.
|
||||

|
||||
</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">
|
||||
Add the Service User to the Application you want to sync with Infisical.
|
||||
Assign at least the **Developer** role to the Service User.
|
||||

|
||||
Move to Appplication 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="Generate API token for Service User">
|
||||
Generate an API token for the Service User on the Service Users tab.
|
||||
This token will be used to connect to Humanitec from Infisical.
|
||||
<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.
|
||||
@@ -28,15 +55,14 @@ Infisical supports connecting to Humanitec using a service user.
|
||||
</Step>
|
||||
<Step title="Add Connection">
|
||||
Select the **Humanitec Connection** option from the connection options modal.
|
||||

|
||||

|
||||
</Step>
|
||||
<Step title="Add API token to Infisical">
|
||||
Add the API token to Infisical as a secret key.
|
||||
This will allow Infisical to connect to Humanitec using the service user.
|
||||

|
||||
<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>
|
||||
|
||||
@@ -6,7 +6,7 @@ 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) using the API token
|
||||
- Create a [Humanitec Connection](/integrations/app-connections/humanitec)
|
||||
|
||||
<Tabs>
|
||||
<Tab title="Infisical UI">
|
||||
@@ -30,10 +30,22 @@ description: "Learn how to configure a Humanitec Sync for Infisical."
|
||||

|
||||
|
||||
- **Humanitec Connection**: The Humanitec Connection to authenticate with.
|
||||
- **Organization**: The Humanitec organization to sync secrets to.
|
||||
- **App**: The Humanitec app from the selected organization to sync secrets to.
|
||||
- **Environment**: The Humanitec environment from the selected app to sync secrets to.
|
||||
- **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**.
|
||||

|
||||
@@ -60,5 +72,85 @@ description: "Learn how to configure a Humanitec Sync for Infisical."
|
||||
</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": "github",
|
||||
"name": "my-github-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>
|
||||
|
||||
@@ -1002,6 +1002,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"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||