Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: remove self host support (it is not recommended, only for demo purpose)

adilson07b7d81a0c0e
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index 231cabee97..a9c92d2d92 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -2882,8 +2882,7 @@ export const AppConnections = {
apiKey: "The API key used to authenticate with Octopus Deploy."
},
QOVERY: {
- accessToken: "The project access token used to authenticate with Qovery.",
- instanceUrl: "The Qovery API URL to connect to (defaults to https://api.qovery.com)."
+ accessToken: "The project access token used to authenticate with Qovery."
},
DATADOG: {
url: "The Datadog site URL to connect to (e.g., 'https://api.datadoghq.com').",
diff --git a/backend/src/services/app-connection/qovery/qovery-connection-fns.ts b/backend/src/services/app-connection/qovery/qovery-connection-fns.ts
index 2f3abcd51f..44319d9bbf 100644
--- a/backend/src/services/app-connection/qovery/qovery-connection-fns.ts
+++ b/backend/src/services/app-connection/qovery/qovery-connection-fns.ts
@@ -3,8 +3,6 @@ import { AxiosError, AxiosResponse, HttpStatusCode } from "axios";
import { request } from "@app/lib/config/request";
import { applyJitter, delay } from "@app/lib/delay";
import { BadRequestError } from "@app/lib/errors";
-import { removeTrailingSlash } from "@app/lib/fn";
-import { blockLocalAndPrivateIpAddresses } from "@app/lib/validator";
import { AppConnection } from "../app-connection-enums";
import { QoveryConnectionMethod } from "./qovery-connection-enums";
@@ -15,20 +13,9 @@ const QOVERY_MAX_RETRIES = 5;
const QOVERY_RETRY_DELAY_MS = 2_000;
const QOVERY_MAX_PAGES = 1_000;
+// Qovery is a hosted-only service; self-hosting its API is not possible, so the API URL is fixed.
export const QOVERY_DEFAULT_API_URL = "https://api.qovery.com";
-// Accepts anything carrying Qovery credentials (a create config or a stored connection) so the
-// same resolver is reused by validation, resource discovery, and the secret sync.
-export const getQoveryInstanceUrl = async (connection: { credentials: { instanceUrl?: string } }) => {
- const instanceUrl = connection.credentials.instanceUrl
- ? removeTrailingSlash(connection.credentials.instanceUrl)
- : QOVERY_DEFAULT_API_URL;
-
- await blockLocalAndPrivateIpAddresses(instanceUrl);
-
- return instanceUrl;
-};
-
export const getQoveryAuthHeaders = (accessToken: string) => ({
Authorization: `Token ${accessToken}`,
Accept: "application/json"
@@ -93,10 +80,9 @@ export const paginatedQoveryRequest = async <T>(
export type TQoveryResource = { id: string; name: string };
const listQoveryResources = async (appConnection: TQoveryConnection, path: string): Promise<TQoveryResource[]> => {
- const instanceUrl = await getQoveryInstanceUrl(appConnection);
const { accessToken } = appConnection.credentials;
- const results = await paginatedQoveryRequest<TQoveryResource>(`${instanceUrl}${path}`, accessToken);
+ const results = await paginatedQoveryRequest<TQoveryResource>(`${QOVERY_DEFAULT_API_URL}${path}`, accessToken);
return results.map(({ id, name }) => ({ id, name }));
};
@@ -119,11 +105,10 @@ export const getQoveryConnectionListItem = () => {
};
export const validateQoveryConnectionCredentials = async (config: TQoveryConnectionConfig) => {
- const instanceUrl = await getQoveryInstanceUrl(config);
const { accessToken } = config.credentials;
try {
- await request.get(`${instanceUrl}/organization`, {
+ await request.get(`${QOVERY_DEFAULT_API_URL}/organization`, {
headers: {
Authorization: `Token ${accessToken}`,
Accept: "application/json"
diff --git a/backend/src/services/app-connection/qovery/qovery-connection-schemas.ts b/backend/src/services/app-connection/qovery/qovery-connection-schemas.ts
index 00c8fae331..8717eb8076 100644
--- a/backend/src/services/app-connection/qovery/qovery-connection-schemas.ts
+++ b/backend/src/services/app-connection/qovery/qovery-connection-schemas.ts
@@ -16,14 +16,7 @@ export const QoveryConnectionAccessTokenCredentialsSchema = z.object({
.string()
.trim()
.min(1, "Project Access Token required")
- .describe(AppConnections.CREDENTIALS.QOVERY.accessToken),
- instanceUrl: z
- .string()
- .trim()
- .url("Invalid Instance URL")
- .max(255)
- .optional()
- .describe(AppConnections.CREDENTIALS.QOVERY.instanceUrl)
+ .describe(AppConnections.CREDENTIALS.QOVERY.accessToken)
});
const BaseQoveryConnectionSchema = BaseAppConnectionSchema.extend({
@@ -40,7 +33,7 @@ export const QoveryConnectionSchema = z.discriminatedUnion("method", [
export const SanitizedQoveryConnectionSchema = z.discriminatedUnion("method", [
BaseQoveryConnectionSchema.extend({
method: z.literal(QoveryConnectionMethod.AccessToken),
- credentials: QoveryConnectionAccessTokenCredentialsSchema.pick({ instanceUrl: true })
+ credentials: QoveryConnectionAccessTokenCredentialsSchema.pick({})
}).describe(JSON.stringify({ title: `${APP_CONNECTION_NAME_MAP[AppConnection.Qovery]} (Access Token)` }))
]);
diff --git a/backend/src/services/secret-sync/qovery/qovery-sync-fns.test.ts b/backend/src/services/secret-sync/qovery/qovery-sync-fns.test.ts
deleted file mode 100644
index 139e055aba..0000000000
--- a/backend/src/services/secret-sync/qovery/qovery-sync-fns.test.ts
+++ /dev/null
@@ -1,434 +0,0 @@
-/* eslint-disable @typescript-eslint/unbound-method */
-/* eslint-disable @typescript-eslint/no-unsafe-assignment */
-import { AxiosError, AxiosResponse } from "axios";
-import { beforeEach, describe, expect, test, vi } from "vitest";
-
-import { request } from "@app/lib/config/request";
-import { applyJitter, delay } from "@app/lib/delay";
-import { SecretSync } from "@app/services/secret-sync/secret-sync-enums";
-
-import { QoverySyncScope, QoveryVariableType } from "./qovery-sync-enums";
-import { getQoveryResourceUrl, QoverySyncFns, resolveQoverySyncTarget } from "./qovery-sync-fns";
-import { TQoveryApiVariable, TQoverySyncWithCredentials } from "./qovery-sync-types";
-
-// Mock the HTTP client so no real Qovery call is made; the test only verifies the settings the user
-// chose map to the correct endpoint, method, payload, and auth header.
-vi.mock("@app/lib/config/request", () => ({
- request: {
- get: vi.fn(),
- post: vi.fn(),
- put: vi.fn(),
- delete: vi.fn()
- }
-}));
-
-// Make the 429 retry's sleep instant; stub applyJitter to the identity so the awaited delay is deterministic.
-vi.mock("@app/lib/delay", () => ({
- delay: vi.fn().mockResolvedValue(undefined),
- applyJitter: vi.fn((ms: number) => ms)
-}));
-
-// Keep the real connection module so the real paginatedQoveryRequest pagination + 429 retry runs, but
-// stub getQoveryInstanceUrl to skip the SSRF/DNS check the real helper performs.
-vi.mock("@app/services/app-connection/qovery", async (importOriginal) => {
- const actual = await importOriginal<typeof import("@app/services/app-connection/qovery")>();
-
- return {
- ...actual,
- getQoveryInstanceUrl: vi.fn(
- async (connection: { credentials: { instanceUrl?: string } }) =>
- connection.credentials.instanceUrl ?? "https://api.qovery.com"
- )
- };
-});
-
-// keySchema filtering is exercised elsewhere; here every key is considered a match.
-vi.mock("@app/services/secret-sync/secret-sync-fns", () => ({
- matchesSchema: () => true
-}));
-
-const ACCESS_TOKEN = "test-token";
-
-const listResponse = (results: TQoveryApiVariable[]) => ({ data: { results } }) as unknown as AxiosResponse;
-
-const pagedListResponse = (results: TQoveryApiVariable[], pagination: { page: number; total_pages: number }) =>
- ({ data: { results, pagination: { ...pagination, page_size: 100, total_count: 0 } } }) as unknown as AxiosResponse;
-
-const tooManyRequests = () =>
- new AxiosError("Too Many Requests", "ERR_BAD_REQUEST", undefined, undefined, {
- status: 429,
- headers: {}
- } as unknown as AxiosResponse);
-
-const expectedAuth = expect.objectContaining({
- headers: expect.objectContaining({ Authorization: `Token ${ACCESS_TOKEN}`, Accept: "application/json" })
-});
-
-const buildSecretSync = (overrides: {
- variableType: QoveryVariableType;
- environmentId?: string;
- disableSecretDeletion?: boolean;
- instanceUrl?: string;
-}): TQoverySyncWithCredentials =>
- ({
- destination: SecretSync.Qovery,
- environment: { slug: "dev" },
- syncOptions: {
- disableSecretDeletion: overrides.disableSecretDeletion ?? false
- },
- destinationConfig: {
- organizationId: "org-1",
- projectId: "proj-1",
- environmentId: overrides.environmentId,
- variableType: overrides.variableType
- },
- connection: {
- credentials: {
- accessToken: ACCESS_TOKEN,
- instanceUrl: overrides.instanceUrl
- }
- }
- }) as unknown as TQoverySyncWithCredentials;
-
-beforeEach(() => {
- vi.clearAllMocks();
- vi.mocked(request.get).mockResolvedValue(listResponse([]));
- vi.mocked(request.post).mockResolvedValue({ data: {} } as AxiosResponse);
- vi.mocked(request.put).mockResolvedValue({ data: {} } as AxiosResponse);
- vi.mocked(request.delete).mockResolvedValue({ data: {} } as AxiosResponse);
-});
-
-describe("getQoveryResourceUrl", () => {
- const instanceUrl = "https://api.qovery.com";
-
- test("secret + project scope", () => {
- expect(
- getQoveryResourceUrl({
- instanceUrl,
- scope: QoverySyncScope.Project,
- scopeId: "proj-1",
- variableType: QoveryVariableType.Secret
- })
- ).toBe("https://api.qovery.com/project/proj-1/secret");
- });
-
- test("variable + project scope", () => {
- expect(
- getQoveryResourceUrl({
- instanceUrl,
- scope: QoverySyncScope.Project,
- scopeId: "proj-1",
- variableType: QoveryVariableType.Variable
- })
- ).toBe("https://api.qovery.com/project/proj-1/environmentVariable");
- });
-
- test("variable + environment scope", () => {
- expect(
- getQoveryResourceUrl({
- instanceUrl,
- scope: QoverySyncScope.Environment,
- scopeId: "env-1",
- variableType: QoveryVariableType.Variable
- })
- ).toBe("https://api.qovery.com/environment/env-1/environmentVariable");
- });
-
- test("secret + environment scope", () => {
- expect(
- getQoveryResourceUrl({
- instanceUrl,
- scope: QoverySyncScope.Environment,
- scopeId: "env-1",
- variableType: QoveryVariableType.Secret
- })
- ).toBe("https://api.qovery.com/environment/env-1/secret");
- });
-
- test("appends the resource id when provided", () => {
- expect(
- getQoveryResourceUrl({
- instanceUrl,
- scope: QoverySyncScope.Project,
- scopeId: "proj-1",
- variableType: QoveryVariableType.Secret,
- resourceId: "sec-1"
- })
- ).toBe("https://api.qovery.com/project/proj-1/secret/sec-1");
- });
-
- test("normalizes a trailing slash on the instance URL", () => {
- expect(
- getQoveryResourceUrl({
- instanceUrl: "https://qovery.self-hosted.io/",
- scope: QoverySyncScope.Project,
- scopeId: "proj-1",
- variableType: QoveryVariableType.Secret
- })
- ).toBe("https://qovery.self-hosted.io/project/proj-1/secret");
- });
-});
-
-describe("resolveQoverySyncTarget", () => {
- test("derives project scope when no environment is selected", () => {
- expect(
- resolveQoverySyncTarget({
- organizationId: "org-1",
- projectId: "proj-1",
- variableType: QoveryVariableType.Secret
- } as TQoverySyncWithCredentials["destinationConfig"])
- ).toEqual({ scope: QoverySyncScope.Project, scopeId: "proj-1", variableType: QoveryVariableType.Secret });
- });
-
- test("derives environment scope when an environment is selected", () => {
- expect(
- resolveQoverySyncTarget({
- organizationId: "org-1",
- projectId: "proj-1",
- environmentId: "env-1",
- variableType: QoveryVariableType.Variable
- } as TQoverySyncWithCredentials["destinationConfig"])
- ).toEqual({ scope: QoverySyncScope.Environment, scopeId: "env-1", variableType: QoveryVariableType.Variable });
- });
-});
-
-describe("QoverySyncFns.syncSecrets endpoint selection", () => {
- const scenarios = [
- {
- name: "Scenario 1: environment secret + project scope",
- variableType: QoveryVariableType.Secret,
- environmentId: undefined,
- url: "https://api.qovery.com/project/proj-1/secret"
- },
- {
- name: "Scenario 2: environment variable + project scope",
- variableType: QoveryVariableType.Variable,
- environmentId: undefined,
- url: "https://api.qovery.com/project/proj-1/environmentVariable"
- },
- {
- name: "Scenario 3: environment variable + environment scope",
- variableType: QoveryVariableType.Variable,
- environmentId: "env-1",
- url: "https://api.qovery.com/environment/env-1/environmentVariable"
- },
- {
- name: "Scenario 4: environment secret + environment scope",
- variableType: QoveryVariableType.Secret,
- environmentId: "env-1",
- url: "https://api.qovery.com/environment/env-1/secret"
- }
- ];
-
- scenarios.forEach((scenario) => {
- test(`${scenario.name} lists and creates against the correct endpoint`, async () => {
- const secretSync = buildSecretSync({
- variableType: scenario.variableType,
- environmentId: scenario.environmentId
- });
-
- await QoverySyncFns.syncSecrets(secretSync, { FOO: { value: "bar" } });
-
- expect(request.get).toHaveBeenCalledWith(scenario.url, expectedAuth);
- expect(request.post).toHaveBeenCalledWith(scenario.url, { key: "FOO", value: "bar" }, expectedAuth);
- });
- });
-
- test("uses a custom self-hosted instance URL", async () => {
- const secretSync = buildSecretSync({
- variableType: QoveryVariableType.Secret,
- instanceUrl: "https://qovery.self-hosted.io"
- });
-
- await QoverySyncFns.syncSecrets(secretSync, { FOO: { value: "bar" } });
-
- expect(request.post).toHaveBeenCalledWith(
- "https://qovery.self-hosted.io/project/proj-1/secret",
- { key: "FOO", value: "bar" },
- expectedAuth
- );
- });
-});
-
-describe("QoverySyncFns.syncSecrets reconciliation", () => {
- test("updates a changed environment variable via PUT (and does not create)", async () => {
- vi.mocked(request.get).mockResolvedValue(
- listResponse([{ id: "v1", key: "FOO", value: "old", scope: "PROJECT", variable_type: "VALUE" }])
- );
-
- await QoverySyncFns.syncSecrets(buildSecretSync({ variableType: QoveryVariableType.Variable }), {
- FOO: { value: "new" }
- });
-
- expect(request.put).toHaveBeenCalledWith(
- "https://api.qovery.com/project/proj-1/environmentVariable/v1",
- { key: "FOO", value: "new" },
- expectedAuth
- );
- expect(request.post).not.toHaveBeenCalled();
- });
-
- test("skips the PUT when an environment variable value is unchanged", async () => {
- vi.mocked(request.get).mockResolvedValue(
- listResponse([{ id: "v1", key: "FOO", value: "same", scope: "PROJECT", variable_type: "VALUE" }])
- );
-
- await QoverySyncFns.syncSecrets(buildSecretSync({ variableType: QoveryVariableType.Variable }), {
- FOO: { value: "same" }
- });
-
- expect(request.put).not.toHaveBeenCalled();
- });
-
- test("always overwrites an existing secret since its value is never returned", async () => {
- vi.mocked(request.get).mockResolvedValue(
- listResponse([{ id: "s1", key: "FOO", scope: "PROJECT", variable_type: "VALUE" }])
- );
-
- await QoverySyncFns.syncSecrets(buildSecretSync({ variableType: QoveryVariableType.Secret }), {
- FOO: { value: "bar" }
- });
-
- expect(request.put).toHaveBeenCalledWith(
- "https://api.qovery.com/project/proj-1/secret/s1",
- { key: "FOO", value: "bar" },
- expectedAuth
- );
- });
-
- test("deletes managed remote entries not present in the source set", async () => {
- vi.mocked(request.get).mockResolvedValue(
- listResponse([{ id: "v1", key: "OLD", scope: "PROJECT", variable_type: "VALUE" }])
- );
-
- await QoverySyncFns.syncSecrets(buildSecretSync({ variableType: QoveryVariableType.Secret }), {
- FOO: { value: "bar" }
- });
-
- expect(request.delete).toHaveBeenCalledWith("https://api.qovery.com/project/proj-1/secret/v1", expectedAuth);
- });
-
- test("does not delete anything when disableSecretDeletion is set", async () => {
- vi.mocked(request.get).mockResolvedValue(
- listResponse([{ id: "v1", key: "OLD", scope: "PROJECT", variable_type: "VALUE" }])
- );
-
- await QoverySyncFns.syncSecrets(
- buildSecretSync({ variableType: QoveryVariableType.Secret, disableSecretDeletion: true }),
- { FOO: { value: "bar" } }
- );
-
- expect(request.delete).not.toHaveBeenCalled();
- });
-
- test("never touches built-in or inherited-scope entries", async () => {
- vi.mocked(request.get).mockResolvedValue(
- listResponse([
- { id: "b1", key: "BUILTIN", scope: "BUILT_IN", variable_type: "BUILT_IN" },
- // ENVIRONMENT-scoped entry is inherited when syncing at the project level.
- { id: "e1", key: "INHERITED", scope: "ENVIRONMENT", variable_type: "VALUE" }
- ])
- );
-
- await QoverySyncFns.syncSecrets(buildSecretSync({ variableType: QoveryVariableType.Secret }), {});
-
- expect(request.delete).not.toHaveBeenCalled();
- expect(request.put).not.toHaveBeenCalled();
- });
-});
-
-describe("QoverySyncFns.removeSecrets", () => {
- test("deletes only the managed entries present in the secret map", async () => {
- vi.mocked(request.get).mockResolvedValue(
- listResponse([
- { id: "v1", key: "FOO", scope: "PROJECT", variable_type: "VALUE" },
- { id: "v2", key: "BAR", scope: "PROJECT", variable_type: "VALUE" }
- ])
- );
-
- await QoverySyncFns.removeSecrets(buildSecretSync({ variableType: QoveryVariableType.Secret }), {
- FOO: { value: "x" }
- });
-
- expect(request.delete).toHaveBeenCalledTimes(1);
- expect(request.delete).toHaveBeenCalledWith("https://api.qovery.com/project/proj-1/secret/v1", expectedAuth);
- });
-});
-
-describe("QoverySyncFns pagination", () => {
- test("walks every page of managed variables and reconciles entries from all pages", async () => {
- vi.mocked(request.get)
- .mockResolvedValueOnce(
- pagedListResponse([{ id: "v1", key: "FOO", scope: "PROJECT", variable_type: "VALUE" }], {
- page: 1,
- total_pages: 2
- })
- )
- .mockResolvedValueOnce(
- pagedListResponse([{ id: "v2", key: "BAR", scope: "PROJECT", variable_type: "VALUE" }], {
- page: 2,
- total_pages: 2
- })
- );
-
- await QoverySyncFns.removeSecrets(buildSecretSync({ variableType: QoveryVariableType.Secret }), {
- FOO: { value: "x" },
- BAR: { value: "y" }
- });
-
- // Both pages were fetched, in order, with the page/page_size query params.
- expect(request.get).toHaveBeenCalledTimes(2);
- expect(request.get).toHaveBeenNthCalledWith(
- 1,
- "https://api.qovery.com/project/proj-1/secret",
- expect.objectContaining({ params: { page: 1, page_size: 100 } })
- );
- expect(request.get).toHaveBeenNthCalledWith(
- 2,
- "https://api.qovery.com/project/proj-1/secret",
- expect.objectContaining({ params: { page: 2, page_size: 100 } })
- );
-
- // Entries discovered across both pages are reconciled.
- expect(request.delete).toHaveBeenCalledTimes(2);
- expect(request.delete).toHaveBeenCalledWith("https://api.qovery.com/project/proj-1/secret/v1", expectedAuth);
- expect(request.delete).toHaveBeenCalledWith("https://api.qovery.com/project/proj-1/secret/v2", expectedAuth);
- });
-});
-
-describe("QoverySyncFns rate limiting", () => {
- test("sleeps with jitter and retries the listing after a 429, then succeeds", async () => {
- vi.mocked(request.get)
- .mockRejectedValueOnce(tooManyRequests())
- .mockResolvedValueOnce(listResponse([{ id: "v1", key: "FOO", scope: "PROJECT", variable_type: "VALUE" }]));
-
- await QoverySyncFns.removeSecrets(buildSecretSync({ variableType: QoveryVariableType.Secret }), {
- FOO: { value: "x" }
- });
-
- // First GET was rate-limited; after one jittered sleep the retry succeeded and the entry was reconciled.
- expect(request.get).toHaveBeenCalledTimes(2);
- expect(applyJitter).toHaveBeenCalledWith(2000);
- expect(delay).toHaveBeenCalledTimes(1);
- expect(request.delete).toHaveBeenCalledWith("https://api.qovery.com/project/proj-1/secret/v1", expectedAuth);
- });
-
- test("surfaces the error after exhausting retries", async () => {
- vi.mocked(request.get).mockRejectedValue(tooManyRequests());
-
- await expect(
- QoverySyncFns.removeSecrets(buildSecretSync({ variableType: QoveryVariableType.Secret }), { FOO: { value: "x" } })
- ).rejects.toBeInstanceOf(AxiosError);
-
- // 1 initial attempt + 5 retries.
- expect(request.get).toHaveBeenCalledTimes(6);
- });
-});
-
-describe("QoverySyncFns.getSecrets", () => {
- test("throws because Qovery does not support importing secrets", async () => {
- await expect(
- QoverySyncFns.getSecrets(buildSecretSync({ variableType: QoveryVariableType.Secret }))
- ).rejects.toThrow(/does not support importing secrets/i);
- });
-});
diff --git a/backend/src/services/secret-sync/qovery/qovery-sync-fns.ts b/backend/src/services/secret-sync/qovery/qovery-sync-fns.ts
index d94d31ab8b..6f259a097e 100644
--- a/backend/src/services/secret-sync/qovery/qovery-sync-fns.ts
+++ b/backend/src/services/secret-sync/qovery/qovery-sync-fns.ts
@@ -2,8 +2,8 @@ import { request } from "@app/lib/config/request";
import { removeTrailingSlash } from "@app/lib/fn";
import {
getQoveryAuthHeaders,
- getQoveryInstanceUrl,
- paginatedQoveryRequest
+ paginatedQoveryRequest,
+ QOVERY_DEFAULT_API_URL
} from "@app/services/app-connection/qovery";
import { SecretSyncError } from "@app/services/secret-sync/secret-sync-errors";
import { matchesSchema } from "@app/services/secret-sync/secret-sync-fns";
@@ -50,8 +50,7 @@ export const resolveQoverySyncTarget = (
};
// Pure, verifiable URL construction: {instanceUrl}/{scope}/{scopeId}/{variableTypeSegment}[/{resourceId}].
-// SSRF validation of the host happens once in getQoveryInstanceUrl; the segments appended here are
-// resource ids, not hosts, so they cannot change the host that was already validated.
+// The host is the fixed QOVERY_DEFAULT_API_URL; the segments appended here are resource ids, not hosts.
export const getQoveryResourceUrl = ({
instanceUrl,
scope,
@@ -117,7 +116,7 @@ export const QoverySyncFns = {
syncSecrets: async (secretSync: TQoverySyncWithCredentials, secretMap: TSecretMap) => {
const { connection, destinationConfig, environment, syncOptions } = secretSync;
const { accessToken } = connection.credentials;
- const instanceUrl = await getQoveryInstanceUrl(connection);
+ const instanceUrl = QOVERY_DEFAULT_API_URL;
const target = resolveQoverySyncTarget(destinationConfig);
const managedVariables = await listManagedQoveryVariables(instanceUrl, accessToken, target);
@@ -170,7 +169,7 @@ export const QoverySyncFns = {
removeSecrets: async (secretSync: TQoverySyncWithCredentials, secretMap: TSecretMap) => {
const { connection, destinationConfig } = secretSync;
const { accessToken } = connection.credentials;
- const instanceUrl = await getQoveryInstanceUrl(connection);
+ const instanceUrl = QOVERY_DEFAULT_API_URL;
const target = resolveQoverySyncTarget(destinationConfig);
const managedVariables = await listManagedQoveryVariables(instanceUrl, accessToken, target);
diff --git a/docs/integrations/app-connections/qovery.mdx b/docs/integrations/app-connections/qovery.mdx
index 0849c2cbef..e86e29a044 100644
--- a/docs/integrations/app-connections/qovery.mdx
+++ b/docs/integrations/app-connections/qovery.mdx
@@ -49,7 +49,6 @@ Infisical supports the use of [Project Access Tokens](https://www.qovery.com/doc
- An optional **Description** for future reference
- The **Method**, set to **Personal Access Token**
- The **Project Access Token** from earlier steps
- - The **Qovery API URL** (defaults to `https://api.qovery.com`; change this only if you are connecting to a self-hosted Qovery instance)
Then click **Connect to Qovery**.
diff --git a/frontend/src/hooks/api/appConnections/types/qovery-connection.ts b/frontend/src/hooks/api/appConnections/types/qovery-connection.ts
index 57484f32b4..3e8b10206a 100644
--- a/frontend/src/hooks/api/appConnections/types/qovery-connection.ts
+++ b/frontend/src/hooks/api/appConnections/types/qovery-connection.ts
@@ -9,6 +9,5 @@ export type TQoveryConnection = TRootAppConnection & { app: AppConnection.Qovery
method: QoveryConnectionMethod.AccessToken;
credentials: {
accessToken: string;
- instanceUrl?: string;
};
};
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/QoveryConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/QoveryConnectionForm.tsx
index e8d67dba9b..3a9ee85b25 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/QoveryConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/QoveryConnectionForm.tsx
@@ -7,7 +7,6 @@ import {
Field,
FieldError,
FieldLabel,
- Input,
SecretInput,
Select,
SelectContent,
@@ -41,15 +40,7 @@ const formSchema = z.discriminatedUnion("method", [
rootSchema.extend({
method: z.literal(QoveryConnectionMethod.AccessToken),
credentials: z.object({
- accessToken: z.string().trim().min(1, "Project Access Token required"),
- instanceUrl: z
- .string()
- .trim()
- .transform((value) => value || undefined)
- .refine((value) => (!value ? true : z.string().url().safeParse(value).success), {
- message: "Invalid Qovery API URL"
- })
- .optional()
+ accessToken: z.string().trim().min(1, "Project Access Token required")
})
})
]);
@@ -63,10 +54,7 @@ export const QoveryConnectionForm = ({ appConnection, onSubmit }: Props) => {
resolver: zodResolver(formSchema),
defaultValues: appConnection ?? {
app: AppConnection.Qovery,
- method: QoveryConnectionMethod.AccessToken,
- credentials: {
- instanceUrl: "https://api.qovery.com"
- }
+ method: QoveryConnectionMethod.AccessToken
}
});
@@ -135,34 +123,6 @@ export const QoveryConnectionForm = ({ appConnection, onSubmit }: Props) => {
</Field>
)}
/>
- <Controller
- name="credentials.instanceUrl"
- control={control}
- shouldUnregister
- render={({ field, fieldState: { error } }) => (
- <Field className="mb-4">
- <FieldLabel htmlFor="instance-url">
- Qovery API URL
- <Tooltip>
- <TooltipTrigger asChild>
- <Info />
- </TooltipTrigger>
- <TooltipContent className="max-w-sm">
- Optional. Override only when connecting to a self-hosted Qovery instance.
- Defaults to https://api.qovery.com.
- </TooltipContent>
- </Tooltip>
- </FieldLabel>
- <Input
- id="instance-url"
- {...field}
- placeholder="https://api.qovery.com"
- isError={Boolean(error?.message)}
- />
- <FieldError errors={[error]} />
- </Field>
- )}
- />
<AppConnectionFormFooter
submitLabel={isUpdate ? "Update Credentials" : "Connect to Qovery"}
/>