From c52180c890be581bf85322da8a4d4b2ca683aa00 Mon Sep 17 00:00:00 2001 From: carlosmonastyrski Date: Thu, 19 Jun 2025 15:17:36 -0300 Subject: [PATCH] feat(secret-sync): minor fix on heroku docs --- .../heroku/heroku-connection-fns.ts | 27 +------------------ docs/integrations/app-connections/heroku.mdx | 2 +- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/backend/src/services/app-connection/heroku/heroku-connection-fns.ts b/backend/src/services/app-connection/heroku/heroku-connection-fns.ts index 6d04c4780..5a8533c83 100644 --- a/backend/src/services/app-connection/heroku/heroku-connection-fns.ts +++ b/backend/src/services/app-connection/heroku/heroku-connection-fns.ts @@ -4,9 +4,9 @@ import { getConfig } from "@app/lib/config/env"; import { request } from "@app/lib/config/request"; import { BadRequestError, InternalServerError } from "@app/lib/errors"; import { AppConnection } from "@app/services/app-connection/app-connection-enums"; +import { encryptAppConnectionCredentials } from "@app/services/app-connection/app-connection-fns"; import { IntegrationUrls } from "@app/services/integration-auth/integration-list"; import { TKmsServiceFactory } from "@app/services/kms/kms-service"; -import { KmsDataKey } from "@app/services/kms/kms-types"; import { TAppConnectionDALFactory } from "../app-connection-dal"; import { HerokuConnectionMethod } from "./heroku-connection-enums"; @@ -21,31 +21,6 @@ interface HerokuOAuthTokenResponse { session_nonce: string; } -const encryptAppConnectionCredentials = async ({ - orgId, - credentials, - kmsService -}: { - orgId: string; - credentials: { - refreshToken: string; - authToken: string; - expiresAt: Date; - }; - kmsService: Pick; -}) => { - const { encryptor } = await kmsService.createCipherPairWithDataKey({ - type: KmsDataKey.Organization, - orgId - }); - - const { cipherTextBlob: encryptedCredentialsBlob } = encryptor({ - plainText: Buffer.from(JSON.stringify(credentials)) - }); - - return encryptedCredentialsBlob; -}; - export const getHerokuConnectionListItem = () => { const { CLIENT_ID_HEROKU } = getConfig(); diff --git a/docs/integrations/app-connections/heroku.mdx b/docs/integrations/app-connections/heroku.mdx index 2a5620d5f..d67411627 100644 --- a/docs/integrations/app-connections/heroku.mdx +++ b/docs/integrations/app-connections/heroku.mdx @@ -24,7 +24,7 @@ Infisical supports two methods for connecting to Heroku: **OAuth** and **Auth To ![Heroku config applications](/images/integrations/heroku/integrations-heroku-config-applications.png) ![Heroku config new app](/images/integrations/heroku/integrations-heroku-config-new-app.png) - Create the API client. As part of the form, set the **OAuth callback URL** to `https://your-domain.com/organization/app-connections/heroku/oauth/callback`. + Create the API client. As part of the form, set the **OAuth callback URL** to `https://your-domain.com/integrations/heroku/oauth2/callback`. The domain you defined in the OAuth callback URL should be equivalent to the `SITE_URL` configured in your Infisical instance.