Improve humanitec docs

This commit is contained in:
carlosmonastyrski
2025-03-13 10:47:18 -03:00
parent b0b55344ce
commit 39b323dd9c
33 changed files with 183 additions and 20 deletions
@@ -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}"
---
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 243 KiB

+42 -16
View File
@@ -8,19 +8,46 @@ Infisical supports connecting to Humanitec using a service user.
## Setup Humanitec Connection in Infisical ## Setup Humanitec Connection in Infisical
<Steps> <Steps>
<Step title="Create a Service User on Humanitec"> <Step title="Move to Service Users on Humanitec">
Navigate to the Humanitec Service Users tab and create a new service user. Navigate to the Humanitec Service Users tab.
This user will be used to connect to Humanitec from Infisical. ![Humanitec Service Users Tab](/images/app-connections/humanitec/humanitec-service-users.png)
![Humanitec Service User](/images/app-connections/humanitec/create-service-user.png) </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.
![Humanitec Create New Service User](/images/app-connections/humanitec/humanitec-create-new-user.png)
</Step>
<Step title="Add API Token for the Service User">
Add a new API token for the service user.
![Humanitec Add API Token](/images/app-connections/humanitec/humanitec-add-api-token.png)
</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.
![Humanitec Create API Token](/images/app-connections/humanitec/humanitec-create-api-token.png)
</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.
![Humanitec Copy API Token](/images/app-connections/humanitec/humanitec-copy-api-token.png)
</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.
![Humanitec Service User Created](/images/app-connections/humanitec/humanitec-service-account-filled.png)
</Step> </Step>
<Step title="Add Service User to Application"> <Step title="Add Service User to Application">
Add the Service User to the Application you want to sync with Infisical. Move to Appplication Tab and add the Service User to the Application you want to sync with Infisical.
Assign at least the **Developer** role to the Service User. Clicking on the App Title will open the App details page.
![Humanitec Service User Role](/images/app-connections/humanitec/add-service-user-to-application.png) ![Humanitec Applications Tab](/images/app-connections/humanitec/humanitec-applications-tab.png)
</Step> </Step>
<Step title="Generate API token for Service User"> <Step title="Add new member to this Application">
Generate an API token for the Service User on the Service Users tab. 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.
This token will be used to connect to Humanitec from Infisical. Make sure to assign at least Developer role as Write permissions are required.
![Humanitec Add User to Application](/images/app-connections/humanitec/humanitec-add-user.png)
![Humanitec Add User Options](/images/app-connections/humanitec/humanitec-add-user-options.png)
![Humanitec Add User Role](/images/app-connections/humanitec/humanitec-add-user-role.png)
</Step>
<Step title="Connection Created">
Your **Humanitec Connection** is now available for use.
![Humanitec Connection Created](/images/app-connections/humanitec/humanitec-user-added.png)
</Step> </Step>
<Step title="Navigate to App Connections"> <Step title="Navigate to App Connections">
Navigate to the **App Connections** tab on the **Organization Settings** page. 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>
<Step title="Add Connection"> <Step title="Add Connection">
Select the **Humanitec Connection** option from the connection options modal. Select the **Humanitec Connection** option from the connection options modal.
![Select Humanitec Connection](/images/app-connections/humanitec/select-humanitec-connection.png) ![Select Humanitec Connection](/images/app-connections/humanitec/humanitec-app-connection-option.png)
</Step> </Step>
<Step title="Add API token to Infisical"> <Step title="Fill the Humanitec Connection Modal">
Add the API token to Infisical as a secret key. Fill the Humanitec Connection modal, here you will need to provide the User Service API Token generated in the previous step.
This will allow Infisical to connect to Humanitec using the service user. ![Humanitec Connection Modal](/images/app-connections/humanitec/humanitec-app-connection-modal.png)
![Infisical Secret Key](/images/app-connections/humanitec/add-humanitec-connection.png)
</Step> </Step>
<Step title="Connection Created"> <Step title="Connection Created">
Your **Humanitec Connection** is now available for use. Your **Humanitec Connection** is now available for use.
![Humanitec Connection](/images/app-connections/humanitec/humanitec-connection.png) ![Humanitec Connection Created](/images/app-connections/humanitec/humanitec-app-connection-created.png)
</Step> </Step>
</Steps> </Steps>
+96 -4
View File
@@ -6,7 +6,7 @@ description: "Learn how to configure a Humanitec Sync for Infisical."
**Prerequisites:** **Prerequisites:**
- Set up and add secrets to [Infisical Cloud](https://app.infisical.com) - 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> <Tabs>
<Tab title="Infisical UI"> <Tab title="Infisical UI">
@@ -30,10 +30,22 @@ description: "Learn how to configure a Humanitec Sync for Infisical."
![Configure Destination](/images/secret-syncs/humanitec/humanitec-destination.png) ![Configure Destination](/images/secret-syncs/humanitec/humanitec-destination.png)
- **Humanitec Connection**: The Humanitec Connection to authenticate with. - **Humanitec Connection**: The Humanitec Connection to authenticate with.
- **Organization**: The Humanitec organization to sync secrets to. - **Scope**: The Humanitec secret scope to sync secrets to.
- **App**: The Humanitec app from the selected organization to sync secrets to. - **Application**: Sync secrets to a specific application.
- **Environment**: The Humanitec environment from the selected app to sync secrets to. - **Environment**: Sync secrets to a specific environment of an application.
<p class="height:1px" /> <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**. 5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.
![Configure Options](/images/secret-syncs/humanitec/humanitec-options.png) ![Configure Options](/images/secret-syncs/humanitec/humanitec-options.png)
@@ -60,5 +72,85 @@ description: "Learn how to configure a Humanitec Sync for Infisical."
</Tab> </Tab>
<Tab title="API"> <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. 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> </Tab>
</Tabs> </Tabs>
+13
View File
@@ -1002,6 +1002,19 @@
"api-reference/endpoints/secret-syncs/github/sync-secrets", "api-reference/endpoints/secret-syncs/github/sync-secrets",
"api-reference/endpoints/secret-syncs/github/remove-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"
]
} }
] ]
}, },