diff --git a/docs/api-reference/endpoints/secret-syncs/humanitec/create.mdx b/docs/api-reference/endpoints/secret-syncs/humanitec/create.mdx new file mode 100644 index 000000000..f683d67fe --- /dev/null +++ b/docs/api-reference/endpoints/secret-syncs/humanitec/create.mdx @@ -0,0 +1,4 @@ +--- +title: "Create" +openapi: "POST /api/v1/secret-syncs/humanitec" +--- diff --git a/docs/api-reference/endpoints/secret-syncs/humanitec/delete.mdx b/docs/api-reference/endpoints/secret-syncs/humanitec/delete.mdx new file mode 100644 index 000000000..ceef1fbb4 --- /dev/null +++ b/docs/api-reference/endpoints/secret-syncs/humanitec/delete.mdx @@ -0,0 +1,4 @@ +--- +title: "Delete" +openapi: "DELETE /api/v1/secret-syncs/humanitec/{syncId}" +--- diff --git a/docs/api-reference/endpoints/secret-syncs/humanitec/get-by-id.mdx b/docs/api-reference/endpoints/secret-syncs/humanitec/get-by-id.mdx new file mode 100644 index 000000000..a8a2a9bfc --- /dev/null +++ b/docs/api-reference/endpoints/secret-syncs/humanitec/get-by-id.mdx @@ -0,0 +1,4 @@ +--- +title: "Get by ID" +openapi: "GET /api/v1/secret-syncs/humanitec/{syncId}" +--- diff --git a/docs/api-reference/endpoints/secret-syncs/humanitec/get-by-name.mdx b/docs/api-reference/endpoints/secret-syncs/humanitec/get-by-name.mdx new file mode 100644 index 000000000..ad2f11290 --- /dev/null +++ b/docs/api-reference/endpoints/secret-syncs/humanitec/get-by-name.mdx @@ -0,0 +1,4 @@ +--- +title: "Get by Name" +openapi: "GET /api/v1/secret-syncs/humanitec/sync-name/{syncName}" +--- diff --git a/docs/api-reference/endpoints/secret-syncs/humanitec/list.mdx b/docs/api-reference/endpoints/secret-syncs/humanitec/list.mdx new file mode 100644 index 000000000..651e7a435 --- /dev/null +++ b/docs/api-reference/endpoints/secret-syncs/humanitec/list.mdx @@ -0,0 +1,4 @@ +--- +title: "List" +openapi: "GET /api/v1/secret-syncs/humanitec" +--- diff --git a/docs/api-reference/endpoints/secret-syncs/humanitec/remove-secrets.mdx b/docs/api-reference/endpoints/secret-syncs/humanitec/remove-secrets.mdx new file mode 100644 index 000000000..7c5148638 --- /dev/null +++ b/docs/api-reference/endpoints/secret-syncs/humanitec/remove-secrets.mdx @@ -0,0 +1,4 @@ +--- +title: "Remove Secrets" +openapi: "POST /api/v1/secret-syncs/humanitec/{syncId}/remove-secrets" +--- diff --git a/docs/api-reference/endpoints/secret-syncs/humanitec/sync-secrets.mdx b/docs/api-reference/endpoints/secret-syncs/humanitec/sync-secrets.mdx new file mode 100644 index 000000000..cb0446f11 --- /dev/null +++ b/docs/api-reference/endpoints/secret-syncs/humanitec/sync-secrets.mdx @@ -0,0 +1,4 @@ +--- +title: "Sync Secrets" +openapi: "POST /api/v1/secret-syncs/humanitec/{syncId}/sync-secrets" +--- diff --git a/docs/api-reference/endpoints/secret-syncs/humanitec/update.mdx b/docs/api-reference/endpoints/secret-syncs/humanitec/update.mdx new file mode 100644 index 000000000..9e958555f --- /dev/null +++ b/docs/api-reference/endpoints/secret-syncs/humanitec/update.mdx @@ -0,0 +1,4 @@ +--- +title: "Update" +openapi: "PATCH /api/v1/secret-syncs/humanitec/{syncId}" +--- diff --git a/docs/images/app-connections/humanitec/add-service-user-to-application.png b/docs/images/app-connections/humanitec/add-service-user-to-application.png deleted file mode 100644 index 0d132199f..000000000 Binary files a/docs/images/app-connections/humanitec/add-service-user-to-application.png and /dev/null differ diff --git a/docs/images/app-connections/humanitec/create-service-user.png b/docs/images/app-connections/humanitec/create-service-user.png deleted file mode 100644 index 212447d5e..000000000 Binary files a/docs/images/app-connections/humanitec/create-service-user.png and /dev/null differ diff --git a/docs/images/app-connections/humanitec/humanitec-add-api-token.png b/docs/images/app-connections/humanitec/humanitec-add-api-token.png new file mode 100644 index 000000000..6eaf796c4 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-add-api-token.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-add-user-options.png b/docs/images/app-connections/humanitec/humanitec-add-user-options.png new file mode 100644 index 000000000..ad6d28343 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-add-user-options.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-add-user-role.png b/docs/images/app-connections/humanitec/humanitec-add-user-role.png new file mode 100644 index 000000000..71f7647e6 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-add-user-role.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-add-user.png b/docs/images/app-connections/humanitec/humanitec-add-user.png new file mode 100644 index 000000000..d675c8336 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-add-user.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-app-connection-created.png b/docs/images/app-connections/humanitec/humanitec-app-connection-created.png new file mode 100644 index 000000000..0120adfb5 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-app-connection-created.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-app-connection-modal.png b/docs/images/app-connections/humanitec/humanitec-app-connection-modal.png new file mode 100644 index 000000000..9a96d6cee Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-app-connection-modal.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-app-connection-option.png b/docs/images/app-connections/humanitec/humanitec-app-connection-option.png new file mode 100644 index 000000000..1f1f724b2 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-app-connection-option.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-applications-tab.png b/docs/images/app-connections/humanitec/humanitec-applications-tab.png new file mode 100644 index 000000000..c97bb96d9 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-applications-tab.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-copy-api-token.png b/docs/images/app-connections/humanitec/humanitec-copy-api-token.png new file mode 100644 index 000000000..29f67954b Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-copy-api-token.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-create-api-token.png b/docs/images/app-connections/humanitec/humanitec-create-api-token.png new file mode 100644 index 000000000..1cb198129 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-create-api-token.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-create-new-user.png b/docs/images/app-connections/humanitec/humanitec-create-new-user.png new file mode 100644 index 000000000..f1ac7d029 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-create-new-user.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-service-account-filled.png b/docs/images/app-connections/humanitec/humanitec-service-account-filled.png new file mode 100644 index 000000000..023253b88 Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-service-account-filled.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-service-users.png b/docs/images/app-connections/humanitec/humanitec-service-users.png new file mode 100644 index 000000000..3b95403ff Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-service-users.png differ diff --git a/docs/images/app-connections/humanitec/humanitec-user-added.png b/docs/images/app-connections/humanitec/humanitec-user-added.png new file mode 100644 index 000000000..fe918a7bd Binary files /dev/null and b/docs/images/app-connections/humanitec/humanitec-user-added.png differ diff --git a/docs/images/secret-syncs/humanitec/humanitec-created.png b/docs/images/secret-syncs/humanitec/humanitec-created.png index 15c8f945b..19e5d503a 100644 Binary files a/docs/images/secret-syncs/humanitec/humanitec-created.png and b/docs/images/secret-syncs/humanitec/humanitec-created.png differ diff --git a/docs/images/secret-syncs/humanitec/humanitec-destination.png b/docs/images/secret-syncs/humanitec/humanitec-destination.png index 7c65b95fd..81605e9e2 100644 Binary files a/docs/images/secret-syncs/humanitec/humanitec-destination.png and b/docs/images/secret-syncs/humanitec/humanitec-destination.png differ diff --git a/docs/images/secret-syncs/humanitec/humanitec-details.png b/docs/images/secret-syncs/humanitec/humanitec-details.png index a48cd8c62..172fde3f7 100644 Binary files a/docs/images/secret-syncs/humanitec/humanitec-details.png and b/docs/images/secret-syncs/humanitec/humanitec-details.png differ diff --git a/docs/images/secret-syncs/humanitec/humanitec-options.png b/docs/images/secret-syncs/humanitec/humanitec-options.png index 071c1b8f0..f9d6fb34f 100644 Binary files a/docs/images/secret-syncs/humanitec/humanitec-options.png and b/docs/images/secret-syncs/humanitec/humanitec-options.png differ diff --git a/docs/images/secret-syncs/humanitec/humanitec-review.png b/docs/images/secret-syncs/humanitec/humanitec-review.png index adda5535f..2ffda9240 100644 Binary files a/docs/images/secret-syncs/humanitec/humanitec-review.png and b/docs/images/secret-syncs/humanitec/humanitec-review.png differ diff --git a/docs/images/secret-syncs/humanitec/humanitec-source.png b/docs/images/secret-syncs/humanitec/humanitec-source.png index 24ad776a0..ff50c11d8 100644 Binary files a/docs/images/secret-syncs/humanitec/humanitec-source.png and b/docs/images/secret-syncs/humanitec/humanitec-source.png differ diff --git a/docs/integrations/app-connections/humanitec.mdx b/docs/integrations/app-connections/humanitec.mdx index eeb1f50a8..6f6624151 100644 --- a/docs/integrations/app-connections/humanitec.mdx +++ b/docs/integrations/app-connections/humanitec.mdx @@ -8,19 +8,46 @@ Infisical supports connecting to Humanitec using a service user. ## Setup Humanitec Connection in Infisical - - Navigate to the Humanitec Service Users tab and create a new service user. - This user will be used to connect to Humanitec from Infisical. - ![Humanitec Service User](/images/app-connections/humanitec/create-service-user.png) + + Navigate to the Humanitec Service Users tab. + ![Humanitec Service Users Tab](/images/app-connections/humanitec/humanitec-service-users.png) + + + 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) + + + Add a new API token for the service user. + ![Humanitec Add API Token](/images/app-connections/humanitec/humanitec-add-api-token.png) + + + 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) + + + 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) + + + 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) - Add the Service User to the Application you want to sync with Infisical. - Assign at least the **Developer** role to the Service User. - ![Humanitec Service User Role](/images/app-connections/humanitec/add-service-user-to-application.png) + 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. + ![Humanitec Applications Tab](/images/app-connections/humanitec/humanitec-applications-tab.png) - - Generate an API token for the Service User on the Service Users tab. - This token will be used to connect to Humanitec from Infisical. + + 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. + ![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) + + + Your **Humanitec Connection** is now available for use. + ![Humanitec Connection Created](/images/app-connections/humanitec/humanitec-user-added.png) Navigate to the **App Connections** tab on the **Organization Settings** page. @@ -28,15 +55,14 @@ Infisical supports connecting to Humanitec using a service user. 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) - - Add the API token to Infisical as a secret key. - This will allow Infisical to connect to Humanitec using the service user. - ![Infisical Secret Key](/images/app-connections/humanitec/add-humanitec-connection.png) + + Fill the Humanitec Connection modal, here you will need to provide the User Service API Token generated in the previous step. + ![Humanitec Connection Modal](/images/app-connections/humanitec/humanitec-app-connection-modal.png) 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) diff --git a/docs/integrations/secret-syncs/humanitec.mdx b/docs/integrations/secret-syncs/humanitec.mdx index 464d825b5..b4897a4e4 100644 --- a/docs/integrations/secret-syncs/humanitec.mdx +++ b/docs/integrations/secret-syncs/humanitec.mdx @@ -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) @@ -30,10 +30,22 @@ description: "Learn how to configure a Humanitec Sync for Infisical." ![Configure Destination](/images/secret-syncs/humanitec/humanitec-destination.png) - **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.

+ The remaining fields are determined by the selected **Scope**: + + + - **Organization**: The organization to deploy secrets to. + - **App**: The application to deploy secrets to. + + + - **Organization**: The organization to deploy secrets to. + - **App**: The application to deploy secrets to. + - **Environment**: The environment to deploy secrets to. + + 5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**. ![Configure Options](/images/secret-syncs/humanitec/humanitec-options.png) @@ -60,5 +72,85 @@ description: "Learn how to configure a Humanitec Sync for Infisical." 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" + } + } + } + ``` diff --git a/docs/mint.json b/docs/mint.json index a80b79ba3..a9e42d843 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -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" + ] } ] },