Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
add new app connection
adilson8d3b32417b41
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.tsindex 036afc7ed7..c1df640a04 100644--- a/backend/src/lib/api-docs/constants.ts+++ b/backend/src/lib/api-docs/constants.ts@@ -2793,6 +2793,15 @@ export const AppConnections = {ANTHROPIC: {apiKey: "The Anthropic API key used to authenticate with the Anthropic API."},+ OVH: {+ pkcs12Certificate:+ "The base64-encoded contents of the PKCS#12 (.p12/.pfx) bundle issued by OVH OKMS, containing the client certificate and private key.",+ pkcs12Passphrase:+ "The passphrase that protects the PKCS#12 bundle. Leave empty if the bundle was exported without a passphrase.",+ okmsDomain:+ "The OKMS base URL, including any path prefix (e.g., 'https://ca-east-bhs.okms.ovh.net/api'). The OKMS ID and API version are appended automatically.",+ okmsId: "The OKMS instance identifier from the OVH Control Panel, used as a path segment in all API calls."+ },VENAFI: {apiKey: "The API key used to authenticate with Venafi TLS Protect Cloud.",region: "The region of your Venafi TLS Protect Cloud instance (e.g., 'us', 'eu')."diff --git a/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/app-connection-router.tsindex 66de308e1b..09493f8e24 100644--- a/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts+++ b/backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts@@ -139,6 +139,7 @@ import {OpenRouterConnectionListItemSchema,SanitizedOpenRouterConnectionSchema} from "@app/services/app-connection/open-router";+import { OvhConnectionListItemSchema, SanitizedOvhConnectionSchema } from "@app/services/app-connection/ovh";import {PostgresConnectionListItemSchema,SanitizedPostgresConnectionSchema@@ -233,7 +234,8 @@ const SanitizedAppConnectionSchema = z.union([...SanitizedVenafiConnectionSchema.options,...SanitizedExternalInfisicalConnectionSchema.options,...SanitizedDopplerConnectionSchema.options,- ...SanitizedNetScalerConnectionSchema.options+ ...SanitizedNetScalerConnectionSchema.options,+ ...SanitizedOvhConnectionSchema.options]);const AppConnectionOptionsSchema = z.discriminatedUnion("app", [@@ -293,7 +295,8 @@ const AppConnectionOptionsSchema = z.discriminatedUnion("app", [ExternalInfisicalConnectionListItemSchema,DopplerConnectionListItemSchema,NetScalerConnectionListItemSchema,- AnthropicConnectionListItemSchema+ AnthropicConnectionListItemSchema,+ OvhConnectionListItemSchema]);export const registerAppConnectionRouter = async (server: FastifyZodProvider) => {diff --git a/backend/src/server/routes/v1/app-connection-routers/index.ts b/backend/src/server/routes/v1/app-connection-routers/index.tsindex 8a9fc98591..aa9ec11d26 100644--- a/backend/src/server/routes/v1/app-connection-routers/index.ts+++ b/backend/src/server/routes/v1/app-connection-routers/index.ts@@ -44,6 +44,7 @@ import { registerNorthflankConnectionRouter } from "./northflank-connection-routimport { registerOctopusDeployConnectionRouter } from "./octopus-deploy-connection-router";import { registerOktaConnectionRouter } from "./okta-connection-router";import { registerOpenRouterConnectionRouter } from "./open-router-connection-router";+import { registerOvhConnectionRouter } from "./ovh-connection-router";import { registerPostgresConnectionRouter } from "./postgres-connection-router";import { registerRailwayConnectionRouter } from "./railway-connection-router";import { registerRedisConnectionRouter } from "./redis-connection-router";@@ -118,5 +119,6 @@ export const APP_CONNECTION_REGISTER_ROUTER_MAP: Record<AppConnection, (server:[AppConnection.ExternalInfisical]: registerExternalInfisicalConnectionRouter,[AppConnection.Doppler]: registerDopplerConnectionRouter,[AppConnection.NetScaler]: registerNetScalerConnectionRouter,- [AppConnection.Anthropic]: registerAnthropicConnectionRouter+ [AppConnection.Anthropic]: registerAnthropicConnectionRouter,+ [AppConnection.OVH]: registerOvhConnectionRouter};diff --git a/backend/src/server/routes/v1/app-connection-routers/ovh-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/ovh-connection-router.tsnew file mode 100644index 0000000000..2f13586722--- /dev/null+++ b/backend/src/server/routes/v1/app-connection-routers/ovh-connection-router.ts@@ -0,0 +1,18 @@+import { AppConnection } from "@app/services/app-connection/app-connection-enums";+import {+ CreateOvhConnectionSchema,+ SanitizedOvhConnectionSchema,+ UpdateOvhConnectionSchema+} from "@app/services/app-connection/ovh";++import { registerAppConnectionEndpoints } from "./app-connection-endpoints";++export const registerOvhConnectionRouter = async (server: FastifyZodProvider) => {+ registerAppConnectionEndpoints({+ app: AppConnection.OVH,+ server,+ sanitizedResponseSchema: SanitizedOvhConnectionSchema,+ createSchema: CreateOvhConnectionSchema,+ updateSchema: UpdateOvhConnectionSchema+ });+};diff --git a/backend/src/services/app-connection/app-connection-enums.ts b/backend/src/services/app-connection/app-connection-enums.tsindex 53ea4f312e..372eb24bfa 100644--- a/backend/src/services/app-connection/app-connection-enums.ts+++ b/backend/src/services/app-connection/app-connection-enums.ts@@ -55,7 +55,8 @@ export enum AppConnection {ExternalInfisical = "external-infisical",Doppler = "doppler",NetScaler = "netscaler",- Anthropic = "anthropic"+ Anthropic = "anthropic",+ OVH = "ovh"}export enum AWSRegion {diff --git a/backend/src/services/app-connection/app-connection-fns.ts b/backend/src/services/app-connection/app-connection-fns.tsindex ea24b7e4c0..83a59ace21 100644--- a/backend/src/services/app-connection/app-connection-fns.ts+++ b/backend/src/services/app-connection/app-connection-fns.ts@@ -179,6 +179,7 @@ import {OpenRouterConnectionMethod,validateOpenRouterConnectionCredentials} from "./open-router";+import { getOvhConnectionListItem, OVHConnectionMethod, validateOvhConnectionCredentials } from "./ovh";import { getPostgresConnectionListItem, PostgresConnectionMethod } from "./postgres";import { getRailwayConnectionListItem, validateRailwayConnectionCredentials } from "./railway";import { getRedisConnectionListItem, RedisConnectionMethod, validateRedisConnectionCredentials } from "./redis";@@ -294,7 +295,8 @@ export const listAppConnectionOptions = (projectType?: ProjectType) => {getVenafiConnectionListItem(),getExternalInfisicalConnectionListItem(),getDopplerConnectionListItem(),- getNetScalerConnectionListItem()+ getNetScalerConnectionListItem(),+ getOvhConnectionListItem()].filter((option) => {switch (projectType) {@@ -446,7 +448,8 @@ export const validateAppConnectionCredentials = async (config as TExternalInfisicalConnectionConfig,deps.identityUaDAL)) as TAppConnectionCredentialsValidator,- [AppConnection.Doppler]: validateDopplerConnectionCredentials as TAppConnectionCredentialsValidator+ [AppConnection.Doppler]: validateDopplerConnectionCredentials as TAppConnectionCredentialsValidator,+ [AppConnection.OVH]: validateOvhConnectionCredentials as TAppConnectionCredentialsValidator};return VALIDATE_APP_CONNECTION_CREDENTIALS_MAP[appConnection.app](appConnection, gatewayService, gatewayV2Service);@@ -543,6 +546,8 @@ export const getAppConnectionMethodName = (method: TAppConnection["method"]) =>return "Machine Identity - Universal Auth";case DopplerConnectionMethod.ApiToken:return "API Token";+ case OVHConnectionMethod.Pkcs12Certificate:+ return "PKCS#12 Certificate";default:// eslint-disable-next-line @typescript-eslint/restrict-template-expressionsthrow new Error(`Unhandled App Connection Method: ${method}`);@@ -653,7 +658,8 @@ export const TRANSITION_CONNECTION_CREDENTIALS_TO_PLATFORM: Record<[AppConnection.Venafi]: platformManagedCredentialsNotSupported,[AppConnection.ExternalInfisical]: platformManagedCredentialsNotSupported,[AppConnection.Doppler]: platformManagedCredentialsNotSupported,- [AppConnection.NetScaler]: platformManagedCredentialsNotSupported+ [AppConnection.NetScaler]: platformManagedCredentialsNotSupported,+ [AppConnection.OVH]: platformManagedCredentialsNotSupported};export const enterpriseAppCheck = async (diff --git a/backend/src/services/app-connection/app-connection-maps.ts b/backend/src/services/app-connection/app-connection-maps.tsindex f564dcffae..b4c20a3820 100644--- a/backend/src/services/app-connection/app-connection-maps.ts+++ b/backend/src/services/app-connection/app-connection-maps.ts@@ -57,7 +57,8 @@ export const APP_CONNECTION_NAME_MAP: Record<AppConnection, string> = {[AppConnection.ExternalInfisical]: "Infisical",[AppConnection.Doppler]: "Doppler",[AppConnection.NetScaler]: "NetScaler",- [AppConnection.Anthropic]: "Anthropic"+ [AppConnection.Anthropic]: "Anthropic",+ [AppConnection.OVH]: "OVH"};export const APP_CONNECTION_PLAN_MAP: Record<AppConnection, AppConnectionPlanType> = {@@ -117,5 +118,6 @@ export const APP_CONNECTION_PLAN_MAP: Record<AppConnection, AppConnectionPlanTyp[AppConnection.ExternalInfisical]: AppConnectionPlanType.Regular,[AppConnection.Doppler]: AppConnectionPlanType.Regular,[AppConnection.NetScaler]: AppConnectionPlanType.Regular,- [AppConnection.Anthropic]: AppConnectionPlanType.Regular+ [AppConnection.Anthropic]: AppConnectionPlanType.Regular,+ [AppConnection.OVH]: AppConnectionPlanType.Regular};diff --git a/backend/src/services/app-connection/app-connection-service.ts b/backend/src/services/app-connection/app-connection-service.tsindex d7b426bcf9..51930d2186 100644--- a/backend/src/services/app-connection/app-connection-service.ts+++ b/backend/src/services/app-connection/app-connection-service.ts@@ -126,6 +126,7 @@ import { octopusDeployConnectionService } from "./octopus-deploy/octopus-deploy-import { ValidateOktaConnectionCredentialsSchema } from "./okta";import { oktaConnectionService } from "./okta/okta-connection-service";import { ValidateOpenRouterConnectionCredentialsSchema } from "./open-router";+import { ValidateOvhConnectionCredentialsSchema } from "./ovh";import { ValidatePostgresConnectionCredentialsSchema } from "./postgres";import { ValidateRailwayConnectionCredentialsSchema } from "./railway";import { railwayConnectionService } from "./railway/railway-connection-service";@@ -222,7 +223,8 @@ const VALIDATE_APP_CONNECTION_CREDENTIALS_MAP: Record<AppConnection, TValidateAp[AppConnection.ExternalInfisical]: ValidateExternalInfisicalConnectionCredentialsSchema,[AppConnection.Doppler]: ValidateDopplerConnectionCredentialsSchema,[AppConnection.NetScaler]: ValidateNetScalerConnectionCredentialsSchema,- [AppConnection.Anthropic]: ValidateAnthropicConnectionCredentialsSchema+ [AppConnection.Anthropic]: ValidateAnthropicConnectionCredentialsSchema,+ [AppConnection.OVH]: ValidateOvhConnectionCredentialsSchema};export const appConnectionServiceFactory = ({diff --git a/backend/src/services/app-connection/app-connection-types.ts b/backend/src/services/app-connection/app-connection-types.tsindex 23070947ad..49bb82072d 100644--- a/backend/src/services/app-connection/app-connection-types.ts+++ b/backend/src/services/app-connection/app-connection-types.ts@@ -258,6 +258,12 @@ import {TOpenRouterConnectionInput,TValidateOpenRouterConnectionCredentialsSchema} from "./open-router";+import {+ TOvhConnection,+ TOvhConnectionConfig,+ TOvhConnectionInput,+ TValidateOvhConnectionCredentialsSchema+} from "./ovh";import {TPostgresConnection,TPostgresConnectionInput,@@ -394,6 +400,7 @@ export type TAppConnection = { id: string } & (| TDopplerConnection| TNetScalerConnection| TAnthropicConnection+ | TOvhConnection);export type TAppConnectionRaw = NonNullable<Awaited<ReturnType<TAppConnectionDALFactory["findById"]>>>;@@ -462,6 +469,7 @@ export type TAppConnectionInput = { id: string } & (| TDopplerConnectionInput| TNetScalerConnectionInput| TAnthropicConnectionInput+ | TOvhConnectionInput);export type TSqlConnectionInput =@@ -558,7 +566,8 @@ export type TAppConnectionConfig =| TExternalInfisicalConnectionConfig| TDopplerConnectionConfig| TNetScalerConnectionConfig- | TAnthropicConnectionConfig;+ | TAnthropicConnectionConfig+ | TOvhConnectionConfig;export type TValidateAppConnectionCredentialsSchema =| TValidateAwsConnectionCredentialsSchema@@ -617,7 +626,8 @@ export type TValidateAppConnectionCredentialsSchema =| TValidateExternalInfisicalConnectionCredentialsSchema| TValidateDopplerConnectionCredentialsSchema| TValidateNetScalerConnectionCredentialsSchema- | TValidateAnthropicConnectionCredentialsSchema;+ | TValidateAnthropicConnectionCredentialsSchema+ | TValidateOvhConnectionCredentialsSchema;export type TListAwsConnectionKmsKeys = {connectionId: string;diff --git a/backend/src/services/app-connection/ovh/index.ts b/backend/src/services/app-connection/ovh/index.tsnew file mode 100644index 0000000000..84fd211687--- /dev/null+++ b/backend/src/services/app-connection/ovh/index.ts@@ -0,0 +1,4 @@+export * from "./ovh-connection-enums";+export * from "./ovh-connection-fns";+export * from "./ovh-connection-schemas";+export * from "./ovh-connection-types";diff --git a/backend/src/services/app-connection/ovh/ovh-connection-enums.ts b/backend/src/services/app-connection/ovh/ovh-connection-enums.tsnew file mode 100644index 0000000000..7408c932ef--- /dev/null+++ b/backend/src/services/app-connection/ovh/ovh-connection-enums.ts@@ -0,0 +1,3 @@+export enum OVHConnectionMethod {+ Pkcs12Certificate = "pkcs12-certificate"+}diff --git a/backend/src/services/app-connection/ovh/ovh-connection-fns.ts b/backend/src/services/app-connection/ovh/ovh-connection-fns.tsnew file mode 100644index 0000000000..d97bcb7708--- /dev/null+++ b/backend/src/services/app-connection/ovh/ovh-connection-fns.ts@@ -0,0 +1,42 @@+import https from "https";++import { request } from "@app/lib/config/request";+import { BadRequestError } from "@app/lib/errors";+import { validateSsrfUrl } from "@app/lib/validator/validate-url";+import { AppConnection } from "@app/services/app-connection/app-connection-enums";++import { OVHConnectionMethod } from "./ovh-connection-enums";+import { TOvhConnectionConfig } from "./ovh-connection-types";++export const getOvhConnectionListItem = () => {+ return {+ name: "OVH" as const,+ app: AppConnection.OVH as const,+ methods: Object.values(OVHConnectionMethod) as [OVHConnectionMethod.Pkcs12Certificate]+ };+};++export const validateOvhConnectionCredentials = async (config: TOvhConnectionConfig) => {+ const { pkcs12Certificate, pkcs12Passphrase, okmsDomain, okmsId } = config.credentials;++ await validateSsrfUrl(okmsDomain);++ const httpsAgent = new https.Agent({+ pfx: Buffer.from(pkcs12Certificate, "base64"),+ passphrase: pkcs12Passphrase+ });++ try {+ await request.get(`${okmsDomain}/${encodeURIComponent(okmsId)}/v1/servicekey`, {+ httpsAgent,+ timeout: 15000,+ validateStatus: (status) => status === 200+ });+ } catch (err) {+ throw new BadRequestError({+ message: `Unable to validate OVH connection: ${err instanceof Error ? err.message : "unknown error"}`+ });+ }++ return config.credentials;+};diff --git a/backend/src/services/app-connection/ovh/ovh-connection-schemas.ts b/backend/src/services/app-connection/ovh/ovh-connection-schemas.tsnew file mode 100644index 0000000000..3cec7ab0e1--- /dev/null+++ b/backend/src/services/app-connection/ovh/ovh-connection-schemas.ts@@ -0,0 +1,67 @@+import z from "zod";++import { AppConnections } from "@app/lib/api-docs";+import { AppConnection } from "@app/services/app-connection/app-connection-enums";+import {+ BaseAppConnectionSchema,+ GenericCreateAppConnectionFieldsSchema,+ GenericUpdateAppConnectionFieldsSchema+} from "@app/services/app-connection/app-connection-schemas";++import { APP_CONNECTION_NAME_MAP } from "../app-connection-maps";+import { OVHConnectionMethod } from "./ovh-connection-enums";++export const OvhConnectionPkcs12CredentialsSchema = z.object({+ pkcs12Certificate: z+ .string()+ .trim()+ .min(1, "PKCS#12 certificate required")+ .describe(AppConnections.CREDENTIALS.OVH.pkcs12Certificate),+ pkcs12Passphrase: z.string().optional().describe(AppConnections.CREDENTIALS.OVH.pkcs12Passphrase),+ okmsDomain: z.string().trim().min(1, "OKMS domain required").describe(AppConnections.CREDENTIALS.OVH.okmsDomain),+ okmsId: z.string().trim().min(1, "OKMS ID required").describe(AppConnections.CREDENTIALS.OVH.okmsId)+});++const BaseOvhConnectionSchema = BaseAppConnectionSchema.extend({ app: z.literal(AppConnection.OVH) });++export const OvhConnectionSchema = BaseOvhConnectionSchema.extend({+ method: z.literal(OVHConnectionMethod.Pkcs12Certificate),+ credentials: OvhConnectionPkcs12CredentialsSchema+});++export const SanitizedOvhConnectionSchema = z.discriminatedUnion("method", [+ BaseOvhConnectionSchema.extend({+ method: z.literal(OVHConnectionMethod.Pkcs12Certificate),+ credentials: OvhConnectionPkcs12CredentialsSchema.pick({+ okmsDomain: true,+ okmsId: true+ })+ }).describe(JSON.stringify({ title: `${APP_CONNECTION_NAME_MAP[AppConnection.OVH]} (PKCS#12 Certificate)` }))+]);++export const ValidateOvhConnectionCredentialsSchema = z.discriminatedUnion("method", [+ z.object({+ method: z.literal(OVHConnectionMethod.Pkcs12Certificate).describe(AppConnections.CREATE(AppConnection.OVH).method),+ credentials: OvhConnectionPkcs12CredentialsSchema.describe(AppConnections.CREATE(AppConnection.OVH).credentials)+ })+]);++export const CreateOvhConnectionSchema = ValidateOvhConnectionCredentialsSchema.and(+ GenericCreateAppConnectionFieldsSchema(AppConnection.OVH)+);++export const UpdateOvhConnectionSchema = z+ .object({+ credentials: OvhConnectionPkcs12CredentialsSchema.optional().describe(+ AppConnections.UPDATE(AppConnection.OVH).credentials+ )+ })+ .and(GenericUpdateAppConnectionFieldsSchema(AppConnection.OVH));++export const OvhConnectionListItemSchema = z+ .object({+ name: z.literal("OVH"),+ app: z.literal(AppConnection.OVH),+ methods: z.nativeEnum(OVHConnectionMethod).array()+ })+ .describe(JSON.stringify({ title: APP_CONNECTION_NAME_MAP[AppConnection.OVH] }));diff --git a/backend/src/services/app-connection/ovh/ovh-connection-types.ts b/backend/src/services/app-connection/ovh/ovh-connection-types.tsnew file mode 100644index 0000000000..0e8d0a76fc--- /dev/null+++ b/backend/src/services/app-connection/ovh/ovh-connection-types.ts@@ -0,0 +1,22 @@+import z from "zod";++import { DiscriminativePick } from "@app/lib/types";++import { AppConnection } from "../app-connection-enums";+import {+ CreateOvhConnectionSchema,+ OvhConnectionSchema,+ ValidateOvhConnectionCredentialsSchema+} from "./ovh-connection-schemas";++export type TOvhConnection = z.infer<typeof OvhConnectionSchema>;++export type TOvhConnectionInput = z.infer<typeof CreateOvhConnectionSchema> & {+ app: AppConnection.OVH;+};++export type TValidateOvhConnectionCredentialsSchema = typeof ValidateOvhConnectionCredentialsSchema;++export type TOvhConnectionConfig = DiscriminativePick<TOvhConnectionInput, "method" | "app" | "credentials"> & {+ orgId: string;+};diff --git a/frontend/public/images/integrations/OVH.png b/frontend/public/images/integrations/OVH.pngnew file mode 100644index 0000000000..b1bac15a96Binary files /dev/null and b/frontend/public/images/integrations/OVH.png differdiff --git a/frontend/src/helpers/appConnections.ts b/frontend/src/helpers/appConnections.tsindex 3ddd68127a..87bb22f0fe 100644--- a/frontend/src/helpers/appConnections.ts+++ b/frontend/src/helpers/appConnections.ts@@ -66,6 +66,7 @@ import { NetScalerConnectionMethod } from "@app/hooks/api/appConnections/types/nimport { NorthflankConnectionMethod } from "@app/hooks/api/appConnections/types/northflank-connection";import { OCIConnectionMethod } from "@app/hooks/api/appConnections/types/oci-connection";import { OpenRouterConnectionMethod } from "@app/hooks/api/appConnections/types/open-router-connection";+import { OVHConnectionMethod } from "@app/hooks/api/appConnections/types/ovh-connection";import { RailwayConnectionMethod } from "@app/hooks/api/appConnections/types/railway-connection";import { RenderConnectionMethod } from "@app/hooks/api/appConnections/types/render-connection";import { SmbConnectionMethod } from "@app/hooks/api/appConnections/types/smb-connection";@@ -162,7 +163,8 @@ export const APP_CONNECTION_MAP: Record<[AppConnection.ExternalInfisical]: { name: "Infisical", image: "Infisical.png" },[AppConnection.Doppler]: { name: "Doppler", image: "Doppler.png" },[AppConnection.NetScaler]: { name: "NetScaler", image: "NetScaler.png" },- [AppConnection.Anthropic]: { name: "Anthropic", image: "Anthropic.png" }+ [AppConnection.Anthropic]: { name: "Anthropic", image: "Anthropic.png" },+ [AppConnection.OVH]: { name: "OVH", image: "OVH.png" }};export const getAppConnectionMethodDetails = (method: TAppConnection["method"]) => {@@ -269,6 +271,8 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])return { name: "Machine Identity - Universal Auth", icon: faKey };case NetScalerConnectionMethod.BasicAuth:return { name: "Basic Auth", icon: faLock };+ case OVHConnectionMethod.Pkcs12Certificate:+ return { name: "PKCS#12 Certificate", icon: faCertificate };default:throw new Error(`Unhandled App Connection Method: ${method}`);}diff --git a/frontend/src/hooks/api/appConnections/enums.ts b/frontend/src/hooks/api/appConnections/enums.tsindex 77d7a365ac..3b3182abf3 100644--- a/frontend/src/hooks/api/appConnections/enums.ts+++ b/frontend/src/hooks/api/appConnections/enums.ts@@ -55,5 +55,6 @@ export enum AppConnection {ExternalInfisical = "external-infisical",Doppler = "doppler",NetScaler = "netscaler",- Anthropic = "anthropic"+ Anthropic = "anthropic",+ OVH = "ovh"}diff --git a/frontend/src/hooks/api/appConnections/types/app-options.ts b/frontend/src/hooks/api/appConnections/types/app-options.tsindex 2a0daae112..7005dd1362 100644--- a/frontend/src/hooks/api/appConnections/types/app-options.ts+++ b/frontend/src/hooks/api/appConnections/types/app-options.ts@@ -243,6 +243,10 @@ export type TAnthropicConnectionOption = TAppConnectionOptionBase & {app: AppConnection.Anthropic;};+export type TOvhConnectionOption = TAppConnectionOptionBase & {+ app: AppConnection.OVH;+};+export type TAppConnectionOption =| TAwsConnectionOption| TGitHubConnectionOption@@ -300,7 +304,8 @@ export type TAppConnectionOption =| TExternalInfisicalConnectionOption| TDopplerConnectionOption| TNetScalerConnectionOption- | TAnthropicConnectionOption;+ | TAnthropicConnectionOption+ | TOvhConnectionOption;export type TAppConnectionOptionMap = {[AppConnection.AWS]: TAwsConnectionOption;@@ -360,4 +365,5 @@ export type TAppConnectionOptionMap = {[AppConnection.Doppler]: TDopplerConnectionOption;[AppConnection.NetScaler]: TNetScalerConnectionOption;[AppConnection.Anthropic]: TAnthropicConnectionOption;+ [AppConnection.OVH]: TOvhConnectionOption;};diff --git a/frontend/src/hooks/api/appConnections/types/index.ts b/frontend/src/hooks/api/appConnections/types/index.tsindex 2594dec898..a751714c8a 100644--- a/frontend/src/hooks/api/appConnections/types/index.ts+++ b/frontend/src/hooks/api/appConnections/types/index.ts@@ -44,6 +44,7 @@ import { TOctopusDeployConnection } from "./octopus-deploy-connection";import { TOktaConnection } from "./okta-connection";import { TOpenRouterConnection } from "./open-router-connection";import { TOracleDBConnection } from "./oracledb-connection";+import { TOvhConnection } from "./ovh-connection";import { TPostgresConnection } from "./postgres-connection";import { TRailwayConnection } from "./railway-connection";import { TRedisConnection } from "./redis-connection";@@ -100,6 +101,7 @@ export * from "./octopus-deploy-connection";export * from "./okta-connection";export * from "./open-router-connection";export * from "./oracledb-connection";+export * from "./ovh-connection";export * from "./postgres-connection";export * from "./railway-connection";export * from "./redis-connection";@@ -171,7 +173,8 @@ export type TAppConnection =| TVenafiConnection| TExternalInfisicalConnection| TDopplerConnection- | TNetScalerConnection;+ | TNetScalerConnection+ | TOvhConnection;export type TAvailableAppConnection = Pick<TAppConnection, "name" | "id" | "projectId">;diff --git a/frontend/src/hooks/api/appConnections/types/ovh-connection.ts b/frontend/src/hooks/api/appConnections/types/ovh-connection.tsnew file mode 100644index 0000000000..75377f2a38--- /dev/null+++ b/frontend/src/hooks/api/appConnections/types/ovh-connection.ts@@ -0,0 +1,16 @@+import { AppConnection } from "@app/hooks/api/appConnections/enums";+import { TRootAppConnection } from "@app/hooks/api/appConnections/types/root-connection";++export enum OVHConnectionMethod {+ Pkcs12Certificate = "pkcs12-certificate"+}++export type TOvhConnection = TRootAppConnection & { app: AppConnection.OVH } & {+ method: OVHConnectionMethod.Pkcs12Certificate;+ credentials: {+ pkcs12Certificate: string;+ pkcs12Passphrase?: string;+ okmsDomain: string;+ okmsId: string;+ };+};diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsxindex 408a252ebf..80bdf0ff16 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx@@ -58,6 +58,7 @@ import { OctopusDeployConnectionForm } from "./OctopusDeployConnectionForm";import { OktaConnectionForm } from "./OktaConnectionForm";import { OpenRouterConnectionForm } from "./OpenRouterConnectionForm";import { OracleDBConnectionForm } from "./OracleDBConnectionForm";+import { OVHConnectionForm } from "./OVHConnectionForm";import { PostgresConnectionForm } from "./PostgresConnectionForm";import { RailwayConnectionForm } from "./RailwayConnectionForm";import { RedisConnectionForm } from "./RedisConnectionForm";@@ -279,6 +280,8 @@ const CreateForm = ({ app, onComplete, projectId }: CreateFormProps) => {return <DopplerConnectionForm onSubmit={onSubmit} />;case AppConnection.NetScaler:return <NetScalerConnectionForm onSubmit={onSubmit} />;+ case AppConnection.OVH:+ return <OVHConnectionForm onSubmit={onSubmit} />;default:throw new Error(`Unhandled App ${app}`);}@@ -492,6 +495,8 @@ const UpdateForm = ({ appConnection, onComplete }: UpdateFormProps) => {return <DopplerConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;case AppConnection.NetScaler:return <NetScalerConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;+ case AppConnection.OVH:+ return <OVHConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;default:throw new Error(`Unhandled App ${(appConnection as TAppConnection).app}`);}diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OVHConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OVHConnectionForm.tsxnew file mode 100644index 0000000000..aaaf4df2dc--- /dev/null+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/OVHConnectionForm.tsx@@ -0,0 +1,214 @@+import { Controller, FormProvider, useForm } from "react-hook-form";+import { zodResolver } from "@hookform/resolvers/zod";+import { z } from "zod";++import {+ Button,+ FormControl,+ Input,+ ModalClose,+ SecretInput,+ Select,+ SelectItem+} from "@app/components/v2";+import { APP_CONNECTION_MAP, getAppConnectionMethodDetails } from "@app/helpers/appConnections";+import { AppConnection } from "@app/hooks/api/appConnections/enums";+import {+ OVHConnectionMethod,+ TOvhConnection+} from "@app/hooks/api/appConnections/types/ovh-connection";+import { isBase64 } from "@app/lib/fn/base64";++import {+ genericAppConnectionFieldsSchema,+ GenericAppConnectionsFields+} from "./GenericAppConnectionFields";++type Props = {+ appConnection?: TOvhConnection;+ onSubmit: (formData: FormData) => void;+};++const rootSchema = genericAppConnectionFieldsSchema.extend({+ app: z.literal(AppConnection.OVH)+});++const formSchema = z.discriminatedUnion("method", [+ rootSchema.extend({+ method: z.literal(OVHConnectionMethod.Pkcs12Certificate),+ credentials: z.object({+ pkcs12Certificate: z+ .string()+ .trim()+ .min(1, "PKCS#12 certificate required")+ .refine(isBase64, { message: "Value must be a valid base64 string" }),+ pkcs12Passphrase: z.string().optional(),+ okmsDomain: z.string().trim().min(1, "OKMS domain required"),+ okmsId: z.string().trim().min(1, "OKMS ID required")+ })+ })+]);++type FormData = z.infer<typeof formSchema>;++export const OVHConnectionForm = ({ appConnection, onSubmit }: Props) => {+ const isUpdate = Boolean(appConnection);++ const form = useForm<FormData>({+ resolver: zodResolver(formSchema),+ defaultValues: appConnection+ ? {+ ...appConnection,+ credentials: {+ ...appConnection.credentials,+ pkcs12Certificate: "",+ pkcs12Passphrase: ""+ }+ }+ : {+ app: AppConnection.OVH,+ method: OVHConnectionMethod.Pkcs12Certificate,+ credentials: {+ pkcs12Certificate: "",+ pkcs12Passphrase: "",+ okmsDomain: "",+ okmsId: ""+ }+ }+ });++ const {+ handleSubmit,+ control,+ formState: { isSubmitting, isDirty }+ } = form;++ return (+ <FormProvider {...form}>+ <form onSubmit={handleSubmit(onSubmit)}>+ {!isUpdate && <GenericAppConnectionsFields />}+ <Controller+ name="method"+ control={control}+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <FormControl+ tooltipText={`The method you would like to use to connect with ${+ APP_CONNECTION_MAP[AppConnection.OVH].name+ }. This field cannot be changed after creation.`}+ errorText={error?.message}+ isError={Boolean(error?.message)}+ label="Method"+ >+ <Select+ isDisabled={isUpdate}+ value={value}+ onValueChange={(val) => onChange(val)}+ className="w-full border border-mineshaft-500"+ position="popper"+ dropdownContainerClassName="max-w-none"+ >+ {Object.values(OVHConnectionMethod).map((method) => (+ <SelectItem value={method} key={method}>+ {getAppConnectionMethodDetails(method).name}+ </SelectItem>+ ))}+ </Select>+ </FormControl>+ )}+ />+ <Controller+ name="credentials.pkcs12Certificate"+ control={control}+ shouldUnregister+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <FormControl+ errorText={error?.message}+ isError={Boolean(error?.message)}+ label="PKCS#12 Certificate (Base64)"+ helperText={+ isUpdate+ ? "Paste the base64-encoded PKCS#12 bundle to replace the existing certificate. Generate it locally with: base64 -w 0 cert.p12"+ : "Paste the base64-encoded contents of your .p12/.pfx bundle. Generate it locally with: base64 -w 0 cert.p12"+ }+ tooltipText="The PKCS#12 bundle must be base64-encoded (no line breaks). It will be used for mTLS authentication with OVH OKMS."+ >+ <SecretInput+ containerClassName="text-gray-400 group-focus-within:border-primary-400/50! border border-mineshaft-500 bg-mineshaft-900 px-2.5 py-1.5"+ value={value}+ onChange={(e) => onChange(e.target.value)}+ />+ </FormControl>+ )}+ />+ <Controller+ name="credentials.pkcs12Passphrase"+ control={control}+ shouldUnregister+ render={({ field: { value, onChange }, fieldState: { error } }) => (+ <FormControl+ errorText={error?.message}+ isError={Boolean(error?.message)}+ label="PKCS#12 Passphrase"+ isOptional+ tooltipText="The passphrase set when exporting the PKCS#12 bundle. Leave empty if the bundle has no passphrase."+ >+ <SecretInput+ containerClassName="text-gray-400 group-focus-within:border-primary-400/50! border border-mineshaft-500 bg-mineshaft-900 px-2.5 py-1.5"+ value={value ?? ""}+ onChange={(e) => onChange(e.target.value)}+ />+ </FormControl>+ )}+ />+ <Controller+ name="credentials.okmsDomain"+ control={control}+ shouldUnregister+ render={({ field, fieldState: { error } }) => (+ <FormControl+ errorText={error?.message}+ isError={Boolean(error?.message)}+ label="OKMS Domain"+ helperText="Include the host and any path prefix. The OKMS ID and API version are appended automatically."+ tooltipText="The OKMS base URL, e.g. 'https://ca-east-bhs.okms.ovh.net/api'."+ >+ <Input {...field} placeholder="https://ca-east-bhs.okms.ovh.net/api" />+ </FormControl>+ )}+ />+ <Controller+ name="credentials.okmsId"+ control={control}+ shouldUnregister+ render={({ field, fieldState: { error } }) => (+ <FormControl+ errorText={error?.message}+ isError={Boolean(error?.message)}+ label="OKMS ID"+ helperText="Your OKMS instance identifier from the OVH Control Panel."+ >+ <Input {...field} placeholder="your-okms-instance-id" />+ </FormControl>+ )}+ />+ <div className="mt-8 flex items-center">+ <Button+ className="mr-4"+ size="sm"+ type="submit"+ colorSchema="secondary"+ isLoading={isSubmitting}+ isDisabled={isSubmitting || !isDirty}+ >+ {isUpdate ? "Update Credentials" : "Connect to OVH"}+ </Button>+ <ModalClose asChild>+ <Button colorSchema="secondary" variant="plain">+ Cancel+ </Button>+ </ModalClose>+ </div>+ </form>+ </FormProvider>+ );+};