Skip to content

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

feat: add new app connection

adilson38801ba1b572
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index cd6cd952db..1e7b495884 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -2915,6 +2915,9 @@ export const AppConnections = {
ANTHROPIC: {
apiKey: "The Anthropic API key used to authenticate with the Anthropic API."
},
+ CLOUD66: {
+ accessToken: "The Personal Access Token used to authenticate with the Cloud 66 API."
+ },
CONVEX: {
accessToken: "The Convex deploy key or access token used to authenticate with the Convex API.",
instanceUrl: "The Convex API instance URL. Defaults to 'https://api.convex.dev' if not provided."
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.ts
index 8102bc52ff..a70bb1276f 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
@@ -65,6 +65,10 @@ import {
CircleCIConnectionListItemSchema,
SanitizedCircleCIConnectionSchema
} from "@app/services/app-connection/circleci";
+import {
+ Cloud66ConnectionListItemSchema,
+ SanitizedCloud66ConnectionSchema
+} from "@app/services/app-connection/cloud-66";
import {
CloudflareConnectionListItemSchema,
SanitizedCloudflareConnectionSchema
@@ -252,6 +256,7 @@ const SanitizedAppConnectionSchema = z.union([
...SanitizedRailwayConnectionSchema.options,
...SanitizedChecklyConnectionSchema.options,
...SanitizedCircleCIConnectionSchema.options,
+ ...SanitizedCloud66ConnectionSchema.options,
...SanitizedSupabaseConnectionSchema.options,
...SanitizedDigitalOceanConnectionSchema.options,
...SanitizedNetlifyConnectionSchema.options,
@@ -325,6 +330,7 @@ const AppConnectionOptionsSchema = z.discriminatedUnion("app", [
RailwayConnectionListItemSchema,
ChecklyConnectionListItemSchema,
CircleCIConnectionListItemSchema,
+ Cloud66ConnectionListItemSchema,
SupabaseConnectionListItemSchema,
DigitalOceanConnectionListItemSchema,
NetlifyConnectionListItemSchema,
diff --git a/backend/src/server/routes/v1/app-connection-routers/cloud-66-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/cloud-66-connection-router.ts
new file mode 100644
index 0000000000..37665afd7a
--- /dev/null
+++ b/backend/src/server/routes/v1/app-connection-routers/cloud-66-connection-router.ts
@@ -0,0 +1,18 @@
+import { AppConnection } from "@app/services/app-connection/app-connection-enums";
+import {
+ CreateCloud66ConnectionSchema,
+ SanitizedCloud66ConnectionSchema,
+ UpdateCloud66ConnectionSchema
+} from "@app/services/app-connection/cloud-66";
+
+import { registerAppConnectionEndpoints } from "./app-connection-endpoints";
+
+export const registerCloud66ConnectionRouter = async (server: FastifyZodProvider) => {
+ registerAppConnectionEndpoints({
+ app: AppConnection.Cloud66,
+ server,
+ sanitizedResponseSchema: SanitizedCloud66ConnectionSchema,
+ createSchema: CreateCloud66ConnectionSchema,
+ updateSchema: UpdateCloud66ConnectionSchema
+ });
+};
diff --git a/backend/src/server/routes/v1/app-connection-routers/index.ts b/backend/src/server/routes/v1/app-connection-routers/index.ts
index 861a892ccb..a4907d34c5 100644
--- a/backend/src/server/routes/v1/app-connection-routers/index.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/index.ts
@@ -18,6 +18,7 @@ import { registerBitbucketConnectionRouter } from "./bitbucket-connection-router
import { registerCamundaConnectionRouter } from "./camunda-connection-router";
import { registerChecklyConnectionRouter } from "./checkly-connection-router";
import { registerCircleCIConnectionRouter } from "./circleci-connection-router";
+import { registerCloud66ConnectionRouter } from "./cloud-66-connection-router";
import { registerCloudflareConnectionRouter } from "./cloudflare-connection-router";
import { registerConvexConnectionRouter } from "./convex-connection-router";
import { registerDatabricksConnectionRouter } from "./databricks-connection-router";
@@ -127,6 +128,7 @@ export const APP_CONNECTION_REGISTER_ROUTER_MAP: Record<AppConnection, (server:
[AppConnection.SMB]: registerSmbConnectionRouter,
[AppConnection.OpenRouter]: registerOpenRouterConnectionRouter,
[AppConnection.CircleCI]: registerCircleCIConnectionRouter,
+ [AppConnection.Cloud66]: registerCloud66ConnectionRouter,
[AppConnection.AzureEntraId]: registerAzureEntraIdConnectionRouter,
[AppConnection.Venafi]: registerVenafiConnectionRouter,
[AppConnection.VenafiTpp]: registerVenafiTppConnectionRouter,
diff --git a/backend/src/services/app-connection/app-connection-enums.ts b/backend/src/services/app-connection/app-connection-enums.ts
index 2396a9309e..4a6fc195d2 100644
--- a/backend/src/services/app-connection/app-connection-enums.ts
+++ b/backend/src/services/app-connection/app-connection-enums.ts
@@ -68,7 +68,8 @@ export enum AppConnection {
Datadog = "datadog",
F5BigIp = "f5-big-ip",
GoDaddy = "godaddy",
- Convex = "convex"
+ Convex = "convex",
+ Cloud66 = "cloud-66"
}
export enum AWSRegion {
diff --git a/backend/src/services/app-connection/app-connection-fns.ts b/backend/src/services/app-connection/app-connection-fns.ts
index 6fdb0ede8c..1a1991f971 100644
--- a/backend/src/services/app-connection/app-connection-fns.ts
+++ b/backend/src/services/app-connection/app-connection-fns.ts
@@ -100,6 +100,11 @@ import {
getCircleCIConnectionListItem,
validateCircleCIConnectionCredentials
} from "./circleci";
+import {
+ Cloud66ConnectionMethod,
+ getCloud66ConnectionListItem,
+ validateCloud66ConnectionCredentials
+} from "./cloud-66";
import { CloudflareConnectionMethod } from "./cloudflare/cloudflare-connection-enum";
import {
getCloudflareConnectionListItem,
@@ -292,6 +297,11 @@ const PKI_APP_CONNECTIONS = [
AppConnection.GoDaddy
];
+// App Connections available within Secret Manager projects ahead of a dedicated secret sync /
+// rotation / external migration mapping. Once Cloud 66 gains a secret sync it will be derived from
+// SECRET_SYNC_CONNECTION_MAP and can be removed from here.
+const SECRET_MANAGER_APP_CONNECTIONS = [AppConnection.Cloud66];
+
export const listAppConnectionOptions = (projectType?: ProjectType) => {
return [
getAwsConnectionListItem(),
@@ -348,6 +358,7 @@ export const listAppConnectionOptions = (projectType?: ProjectType) => {
getAnthropicConnectionListItem(),
getDevinConnectionListItem(),
getCircleCIConnectionListItem(),
+ getCloud66ConnectionListItem(),
getAzureEntraIdConnectionListItem(),
getVenafiConnectionListItem(),
getVenafiTppConnectionListItem(),
@@ -371,7 +382,8 @@ export const listAppConnectionOptions = (projectType?: ProjectType) => {
return (
Boolean(SECRET_SYNC_APP_CONNECTION_MAP[option.app]) ||
Boolean(SECRET_ROTATION_APP_CONNECTION_MAP[option.app]) ||
- EXTERNAL_MIGRATION_APP_CONNECTIONS.includes(option.app)
+ EXTERNAL_MIGRATION_APP_CONNECTIONS.includes(option.app) ||
+ SECRET_MANAGER_APP_CONNECTIONS.includes(option.app)
);
case ProjectType.SecretScanning:
return Boolean(SECRET_SCANNING_APP_CONNECTION_MAP[option.app]);
@@ -581,6 +593,7 @@ export const validateAppConnectionCredentials = async (
[AppConnection.Anthropic]: validateAnthropicConnectionCredentials as TAppConnectionCredentialsValidator,
[AppConnection.Devin]: validateDevinConnectionCredentials as TAppConnectionCredentialsValidator,
[AppConnection.CircleCI]: validateCircleCIConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.Cloud66]: validateCloud66ConnectionCredentials as TAppConnectionCredentialsValidator,
[AppConnection.AzureEntraId]: validateAzureEntraIdConnectionCredentials as TAppConnectionCredentialsValidator,
[AppConnection.Venafi]: validateVenafiConnectionCredentials as TAppConnectionCredentialsValidator,
[AppConnection.VenafiTpp]: ((config: TAppConnectionConfig) =>
@@ -618,6 +631,7 @@ export const getAppConnectionMethodName = (method: TAppConnection["method"]) =>
case GitHubConnectionMethod.Pat:
case OnaConnectionMethod.PersonalAccessToken:
case ConvexConnectionMethod.PersonalAccessToken:
+ case Cloud66ConnectionMethod.AccessToken:
return "Personal Access Token";
case AzureKeyVaultConnectionMethod.OAuth:
case AzureAppConfigurationConnectionMethod.OAuth:
@@ -832,6 +846,7 @@ export const TRANSITION_CONNECTION_CREDENTIALS_TO_PLATFORM: Record<
[AppConnection.Anthropic]: platformManagedCredentialsNotSupported,
[AppConnection.Devin]: platformManagedCredentialsNotSupported,
[AppConnection.CircleCI]: platformManagedCredentialsNotSupported,
+ [AppConnection.Cloud66]: platformManagedCredentialsNotSupported,
[AppConnection.AzureEntraId]: platformManagedCredentialsNotSupported,
[AppConnection.Venafi]: platformManagedCredentialsNotSupported,
[AppConnection.VenafiTpp]: platformManagedCredentialsNotSupported,
diff --git a/backend/src/services/app-connection/app-connection-maps.ts b/backend/src/services/app-connection/app-connection-maps.ts
index b265cce9c5..90b6d62c51 100644
--- a/backend/src/services/app-connection/app-connection-maps.ts
+++ b/backend/src/services/app-connection/app-connection-maps.ts
@@ -70,7 +70,8 @@ export const APP_CONNECTION_NAME_MAP: Record<AppConnection, string> = {
[AppConnection.Datadog]: "Datadog",
[AppConnection.F5BigIp]: "F5 BIG-IP",
[AppConnection.GoDaddy]: "GoDaddy",
- [AppConnection.Convex]: "Convex"
+ [AppConnection.Convex]: "Convex",
+ [AppConnection.Cloud66]: "Cloud 66"
};
export const APP_CONNECTION_PLAN_MAP: Record<AppConnection, AppConnectionPlanType> = {
@@ -143,5 +144,6 @@ export const APP_CONNECTION_PLAN_MAP: Record<AppConnection, AppConnectionPlanTyp
[AppConnection.Datadog]: AppConnectionPlanType.Regular,
[AppConnection.F5BigIp]: AppConnectionPlanType.Regular,
[AppConnection.GoDaddy]: AppConnectionPlanType.Regular,
- [AppConnection.Convex]: AppConnectionPlanType.Regular
+ [AppConnection.Convex]: AppConnectionPlanType.Regular,
+ [AppConnection.Cloud66]: AppConnectionPlanType.Regular
};
diff --git a/backend/src/services/app-connection/app-connection-service.ts b/backend/src/services/app-connection/app-connection-service.ts
index 310db7fce6..13f1b41271 100644
--- a/backend/src/services/app-connection/app-connection-service.ts
+++ b/backend/src/services/app-connection/app-connection-service.ts
@@ -84,6 +84,7 @@ import { ValidateChecklyConnectionCredentialsSchema } from "./checkly";
import { checklyConnectionService } from "./checkly/checkly-connection-service";
import { ValidateCircleCIConnectionCredentialsSchema } from "./circleci";
import { circleciConnectionService } from "./circleci/circleci-connection-service";
+import { ValidateCloud66ConnectionCredentialsSchema } from "./cloud-66";
import { ValidateCloudflareConnectionCredentialsSchema } from "./cloudflare/cloudflare-connection-schema";
import { cloudflareConnectionService } from "./cloudflare/cloudflare-connection-service";
import { ValidateConvexConnectionCredentialsSchema } from "./convex";
@@ -249,6 +250,7 @@ const VALIDATE_APP_CONNECTION_CREDENTIALS_MAP: Record<AppConnection, TValidateAp
[AppConnection.Dbt]: ValidateDbtConnectionCredentialsSchema,
[AppConnection.SMB]: ValidateSmbConnectionCredentialsSchema,
[AppConnection.CircleCI]: ValidateCircleCIConnectionCredentialsSchema,
+ [AppConnection.Cloud66]: ValidateCloud66ConnectionCredentialsSchema,
[AppConnection.AzureEntraId]: ValidateAzureEntraIdConnectionCredentialsSchema,
[AppConnection.Venafi]: ValidateVenafiConnectionCredentialsSchema,
[AppConnection.VenafiTpp]: ValidateVenafiTppConnectionCredentialsSchema,
diff --git a/backend/src/services/app-connection/app-connection-types.ts b/backend/src/services/app-connection/app-connection-types.ts
index 3fccad5c92..1eaf0a7f64 100644
--- a/backend/src/services/app-connection/app-connection-types.ts
+++ b/backend/src/services/app-connection/app-connection-types.ts
@@ -112,6 +112,12 @@ import {
TCircleCIConnectionInput,
TValidateCircleCIConnectionCredentialsSchema
} from "./circleci";
+import {
+ TCloud66Connection,
+ TCloud66ConnectionConfig,
+ TCloud66ConnectionInput,
+ TValidateCloud66ConnectionCredentialsSchema
+} from "./cloud-66";
import {
TCloudflareConnection,
TCloudflareConnectionConfig,
@@ -469,6 +475,7 @@ export type TAppConnection = { id: string; configuration?: TAppConnectionConfigu
| TSmbConnection
| TOpenRouterConnection
| TCircleCIConnection
+ | TCloud66Connection
| TAzureEntraIdConnection
| TVenafiConnection
| TVenafiTppConnection
@@ -550,6 +557,7 @@ export type TAppConnectionInput = { id: string } & (
| TSmbConnectionInput
| TOpenRouterConnectionInput
| TCircleCIConnectionInput
+ | TCloud66ConnectionInput
| TAzureEntraIdConnectionInput
| TVenafiConnectionInput
| TVenafiTppConnectionInput
@@ -663,6 +671,7 @@ export type TAppConnectionConfig =
| TSmbConnectionConfig
| TOpenRouterConnectionConfig
| TCircleCIConnectionConfig
+ | TCloud66ConnectionConfig
| TAzureEntraIdConnectionConfig
| TVenafiConnectionConfig
| TVenafiTppConnectionConfig
@@ -735,6 +744,7 @@ export type TValidateAppConnectionCredentialsSchema =
| TValidateSmbConnectionCredentialsSchema
| TValidateOpenRouterConnectionCredentialsSchema
| TValidateCircleCIConnectionCredentialsSchema
+ | TValidateCloud66ConnectionCredentialsSchema
| TValidateAzureEntraIdConnectionCredentialsSchema
| TValidateVenafiConnectionCredentialsSchema
| TValidateVenafiTppConnectionCredentialsSchema
diff --git a/backend/src/services/app-connection/cloud-66/cloud-66-connection-enums.ts b/backend/src/services/app-connection/cloud-66/cloud-66-connection-enums.ts
new file mode 100644
index 0000000000..39b95066e4
--- /dev/null
+++ b/backend/src/services/app-connection/cloud-66/cloud-66-connection-enums.ts
@@ -0,0 +1,3 @@
+export enum Cloud66ConnectionMethod {
+ AccessToken = "access-token"
+}
diff --git a/backend/src/services/app-connection/cloud-66/cloud-66-connection-fns.ts b/backend/src/services/app-connection/cloud-66/cloud-66-connection-fns.ts
new file mode 100644
index 0000000000..ef93fbc7ed
--- /dev/null
+++ b/backend/src/services/app-connection/cloud-66/cloud-66-connection-fns.ts
@@ -0,0 +1,39 @@
+import { request } from "@app/lib/config/request";
+import { UnauthorizedError } from "@app/lib/errors";
+import { logger } from "@app/lib/logger";
+import { AppConnection } from "@app/services/app-connection/app-connection-enums";
+
+import { Cloud66ConnectionMethod } from "./cloud-66-connection-enums";
+import { TCloud66ConnectionConfig } from "./cloud-66-connection-types";
+
+export const CLOUD_66_API_BASE_URL = "https://app.cloud66.com/api";
+
+export const getCloud66ConnectionListItem = () => {
+ return {
+ name: "Cloud 66" as const,
+ app: AppConnection.Cloud66 as const,
+ methods: Object.values(Cloud66ConnectionMethod) as [Cloud66ConnectionMethod.AccessToken]
+ };
+};
+
+export const validateCloud66ConnectionCredentials = async (config: TCloud66ConnectionConfig) => {
+ const { accessToken } = config.credentials;
+
+ try {
+ await request.get(`${CLOUD_66_API_BASE_URL}/3/stacks`, {
+ headers: {
+ Authorization: `Bearer ${accessToken}`,
+ Accept: "application/json"
+ },
+ validateStatus: (status) => status === 200
+ });
+ } catch (error: unknown) {
+ logger.error({ error }, "failed to validate cloud 66 connection");
+
+ throw new UnauthorizedError({
+ message: "Unable to validate connection: invalid Personal Access Token"
+ });
+ }
+
+ return config.credentials;
+};
diff --git a/backend/src/services/app-connection/cloud-66/cloud-66-connection-schemas.ts b/backend/src/services/app-connection/cloud-66/cloud-66-connection-schemas.ts
new file mode 100644
index 0000000000..28f6e9f81a
--- /dev/null
+++ b/backend/src/services/app-connection/cloud-66/cloud-66-connection-schemas.ts
@@ -0,0 +1,65 @@
+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 { Cloud66ConnectionMethod } from "./cloud-66-connection-enums";
+
+export const Cloud66ConnectionAccessTokenCredentialsSchema = z.object({
+ accessToken: z
+ .string()
+ .trim()
+ .min(1, "Personal Access Token required")
+ .describe(AppConnections.CREDENTIALS.CLOUD66.accessToken)
+});
+
+const BaseCloud66ConnectionSchema = BaseAppConnectionSchema.extend({ app: z.literal(AppConnection.Cloud66) });
+
+export const Cloud66ConnectionSchema = BaseCloud66ConnectionSchema.extend({
+ method: z.literal(Cloud66ConnectionMethod.AccessToken),
+ credentials: Cloud66ConnectionAccessTokenCredentialsSchema
+});
+
+export const SanitizedCloud66ConnectionSchema = z.discriminatedUnion("method", [
+ BaseCloud66ConnectionSchema.extend({
+ method: z.literal(Cloud66ConnectionMethod.AccessToken),
+ credentials: z.object({})
+ }).describe(JSON.stringify({ title: `${APP_CONNECTION_NAME_MAP[AppConnection.Cloud66]} (Personal Access Token)` }))
+]);
+
+export const ValidateCloud66ConnectionCredentialsSchema = z.discriminatedUnion("method", [
+ z.object({
+ method: z
+ .literal(Cloud66ConnectionMethod.AccessToken)
+ .describe(AppConnections.CREATE(AppConnection.Cloud66).method),
+ credentials: Cloud66ConnectionAccessTokenCredentialsSchema.describe(
+ AppConnections.CREATE(AppConnection.Cloud66).credentials
+ )
+ })
+]);
+
+export const CreateCloud66ConnectionSchema = ValidateCloud66ConnectionCredentialsSchema.and(
+ GenericCreateAppConnectionFieldsSchema(AppConnection.Cloud66)
+);
+
+export const UpdateCloud66ConnectionSchema = z
+ .object({
+ credentials: Cloud66ConnectionAccessTokenCredentialsSchema.optional().describe(
+ AppConnections.UPDATE(AppConnection.Cloud66).credentials
+ )
+ })
+ .and(GenericUpdateAppConnectionFieldsSchema(AppConnection.Cloud66));
+
+export const Cloud66ConnectionListItemSchema = z
+ .object({
+ name: z.literal("Cloud 66"),
+ app: z.literal(AppConnection.Cloud66),
+ methods: z.nativeEnum(Cloud66ConnectionMethod).array()
+ })
+ .describe(JSON.stringify({ title: APP_CONNECTION_NAME_MAP[AppConnection.Cloud66] }));
diff --git a/backend/src/services/app-connection/cloud-66/cloud-66-connection-types.ts b/backend/src/services/app-connection/cloud-66/cloud-66-connection-types.ts
new file mode 100644
index 0000000000..ad9ccd1b0c
--- /dev/null
+++ b/backend/src/services/app-connection/cloud-66/cloud-66-connection-types.ts
@@ -0,0 +1,22 @@
+import z from "zod";
+
+import { DiscriminativePick } from "@app/lib/types";
+
+import { AppConnection } from "../app-connection-enums";
+import {
+ Cloud66ConnectionSchema,
+ CreateCloud66ConnectionSchema,
+ ValidateCloud66ConnectionCredentialsSchema
+} from "./cloud-66-connection-schemas";
+
+export type TCloud66Connection = z.infer<typeof Cloud66ConnectionSchema>;
+
+export type TCloud66ConnectionInput = z.infer<typeof CreateCloud66ConnectionSchema> & {
+ app: AppConnection.Cloud66;
+};
+
+export type TValidateCloud66ConnectionCredentialsSchema = typeof ValidateCloud66ConnectionCredentialsSchema;
+
+export type TCloud66ConnectionConfig = DiscriminativePick<TCloud66ConnectionInput, "method" | "app" | "credentials"> & {
+ orgId: string;
+};
diff --git a/backend/src/services/app-connection/cloud-66/index.ts b/backend/src/services/app-connection/cloud-66/index.ts
new file mode 100644
index 0000000000..13da531335
--- /dev/null
+++ b/backend/src/services/app-connection/cloud-66/index.ts
@@ -0,0 +1,4 @@
+export * from "./cloud-66-connection-enums";
+export * from "./cloud-66-connection-fns";
+export * from "./cloud-66-connection-schemas";
+export * from "./cloud-66-connection-types";
diff --git a/frontend/src/helpers/appConnections.ts b/frontend/src/helpers/appConnections.ts
index 509fa0470b..ac89b1cbd8 100644
--- a/frontend/src/helpers/appConnections.ts
+++ b/frontend/src/helpers/appConnections.ts
@@ -56,6 +56,7 @@ import { BitbucketConnectionMethod } from "@app/hooks/api/appConnections/types/b
import { ChecklyConnectionMethod } from "@app/hooks/api/appConnections/types/checkly-connection";
import { ChefConnectionMethod } from "@app/hooks/api/appConnections/types/chef-connection";
import { CircleCIConnectionMethod } from "@app/hooks/api/appConnections/types/circleci-connection";
+import { Cloud66ConnectionMethod } from "@app/hooks/api/appConnections/types/cloud-66-connection";
import { ConvexConnectionMethod } from "@app/hooks/api/appConnections/types/convex-connection";
import { DatadogConnectionMethod } from "@app/hooks/api/appConnections/types/datadog-connection";
import { DigiCertConnectionMethod } from "@app/hooks/api/appConnections/types/digicert-connection";
@@ -416,6 +417,12 @@ export const APP_CONNECTION_MAP: Record<
category: "CI/CD",
description: "Project and pipeline access for CircleCI."
},
+ [AppConnection.Cloud66]: {
+ name: "Cloud 66",
+ image: "Cloud 66.png",
+ category: "HOSTING",
+ description: "App and deployment access for Cloud 66."
+ },
[AppConnection.AzureEntraId]: {
name: "Azure Entra ID",
image: "Microsoft Azure.png",
@@ -606,6 +613,7 @@ export const getAppConnectionMethodDetails = (method: TAppConnection["method"])
case FlyioConnectionMethod.AccessToken:
case NetlifyConnectionMethod.AccessToken:
case ConvexConnectionMethod.PersonalAccessToken:
+ case Cloud66ConnectionMethod.AccessToken:
return { name: "Personal Access Token", icon: faKey };
case Auth0ConnectionMethod.ClientCredentials:
case SalesforceConnectionMethod.ClientCredentials:
diff --git a/frontend/src/hooks/api/appConnections/enums.ts b/frontend/src/hooks/api/appConnections/enums.ts
index 28a77fade9..7a4a6826b7 100644
--- a/frontend/src/hooks/api/appConnections/enums.ts
+++ b/frontend/src/hooks/api/appConnections/enums.ts
@@ -68,5 +68,6 @@ export enum AppConnection {
F5BigIp = "f5-big-ip",
GoDaddy = "godaddy",
Convex = "convex",
- TriggerDev = "trigger-dev"
+ TriggerDev = "trigger-dev",
+ Cloud66 = "cloud-66"
}
diff --git a/frontend/src/hooks/api/appConnections/types/app-options.ts b/frontend/src/hooks/api/appConnections/types/app-options.ts
index 8538c09801..7e564fe057 100644
--- a/frontend/src/hooks/api/appConnections/types/app-options.ts
+++ b/frontend/src/hooks/api/appConnections/types/app-options.ts
@@ -224,6 +224,10 @@ export type TCircleCISyncConnectionOption = TAppConnectionOptionBase & {
app: AppConnection.CircleCI;
};
+export type TCloud66ConnectionOption = TAppConnectionOptionBase & {
+ app: AppConnection.Cloud66;
+};
+
export type TVenafiConnectionOption = TAppConnectionOptionBase & {
app: AppConnection.Venafi;
};
@@ -335,6 +339,7 @@ export type TAppConnectionOption =
| TOktaConnectionOption
| TOpenRouterConnectionOption
| TCircleCISyncConnectionOption
+ | TCloud66ConnectionOption
| TAzureAdCsConnectionOption
| TLaravelForgeConnectionOption
| TRedisConnectionOption
@@ -418,6 +423,7 @@ export type TAppConnectionOptionMap = {
[AppConnection.Dbt]: TDbtConnectionOption;
[AppConnection.SMB]: TSmbConnectionOption;
[AppConnection.CircleCI]: TCircleCISyncConnectionOption;
+ [AppConnection.Cloud66]: TCloud66ConnectionOption;
[AppConnection.AzureEntraId]: TAzureEntraIdConnectionOption;
[AppConnection.Venafi]: TVenafiConnectionOption;
[AppConnection.VenafiTpp]: TVenafiTppConnectionOption;
diff --git a/frontend/src/hooks/api/appConnections/types/cloud-66-connection.ts b/frontend/src/hooks/api/appConnections/types/cloud-66-connection.ts
new file mode 100644
index 0000000000..47f4e96a6b
--- /dev/null
+++ b/frontend/src/hooks/api/appConnections/types/cloud-66-connection.ts
@@ -0,0 +1,13 @@
+import { AppConnection } from "@app/hooks/api/appConnections/enums";
+import { TRootAppConnection } from "@app/hooks/api/appConnections/types/root-connection";
+
+export enum Cloud66ConnectionMethod {
+ AccessToken = "access-token"
+}
+
+export type TCloud66Connection = TRootAppConnection & { app: AppConnection.Cloud66 } & {
+ method: Cloud66ConnectionMethod.AccessToken;
+ credentials: {
+ accessToken: string;
+ };
+};
diff --git a/frontend/src/hooks/api/appConnections/types/index.ts b/frontend/src/hooks/api/appConnections/types/index.ts
index 745297a050..d15e8c2ef9 100644
--- a/frontend/src/hooks/api/appConnections/types/index.ts
+++ b/frontend/src/hooks/api/appConnections/types/index.ts
@@ -16,6 +16,7 @@ import { TCamundaConnection } from "./camunda-connection";
import { TChecklyConnection } from "./checkly-connection";
import { TChefConnection } from "./chef-connection";
import { TCircleCIConnection } from "./circleci-connection";
+import { TCloud66Connection } from "./cloud-66-connection";
import { TCloudflareConnection } from "./cloudflare-connection";
import { TConvexConnection } from "./convex-connection";
import { TDatabricksConnection } from "./databricks-connection";
@@ -86,6 +87,7 @@ export * from "./camunda-connection";
export * from "./checkly-connection";
export * from "./chef-connection";
export * from "./circleci-connection";
+export * from "./cloud-66-connection";
export * from "./cloudflare-connection";
export * from "./convex-connection";
export * from "./databricks-connection";
@@ -192,6 +194,7 @@ export type TAppConnection =
| TOpenRouterConnection
| TAnthropicConnection
| TCircleCIConnection
+ | TCloud66Connection
| TAzureEntraIdConnection
| TVenafiConnection
| TVenafiTppConnection
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
index 75b0850194..b4e5f06d7e 100644
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
@@ -31,6 +31,7 @@ import { CamundaConnectionForm } from "./CamundaConnectionForm";
import { ChecklyConnectionForm } from "./ChecklyConnectionForm";
import { ChefConnectionForm } from "./ChefConnectionForm";
import { CircleCIConnectionForm } from "./CircleCIConnectionForm";
+import { Cloud66ConnectionForm } from "./Cloud66ConnectionForm";
import { CloudflareConnectionForm } from "./CloudflareConnectionForm";
import { ConvexConnectionForm } from "./ConvexConnectionForm";
import { DatabricksConnectionForm } from "./DatabricksConnectionForm";
@@ -292,6 +293,8 @@ const CreateForm = ({ app, onComplete, projectId }: CreateFormProps) => {
return <DevinConnectionForm onSubmit={onSubmit} />;
case AppConnection.CircleCI:
return <CircleCIConnectionForm onSubmit={onSubmit} />;
+ case AppConnection.Cloud66:
+ return <Cloud66ConnectionForm onSubmit={onSubmit} />;
case AppConnection.Venafi:
return <VenafiConnectionForm onSubmit={onSubmit} />;
case AppConnection.VenafiTpp:
@@ -541,6 +544,8 @@ const UpdateForm = ({ appConnection, onComplete }: UpdateFormProps) => {
return <DevinConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
case AppConnection.CircleCI:
return <CircleCIConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
+ case AppConnection.Cloud66:
+ return <Cloud66ConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
case AppConnection.ExternalInfisical:
return (
<ExternalInfisicalConnectionForm onSubmit={onSubmit} appConnection={appConnection} />
diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Cloud66ConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Cloud66ConnectionForm.tsx
new file mode 100644
index 0000000000..94d31c5cf8
--- /dev/null
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/Cloud66ConnectionForm.tsx
@@ -0,0 +1,132 @@
+import { Controller, FormProvider, useForm } from "react-hook-form";
+import { zodResolver } from "@hookform/resolvers/zod";
+import { Info } from "lucide-react";
+import { z } from "zod";
+
+import {
+ Field,
+ FieldError,
+ FieldLabel,
+ SecretInput,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger
+} from "@app/components/v3";
+import { APP_CONNECTION_MAP, getAppConnectionMethodDetails } from "@app/helpers/appConnections";
+import { AppConnection } from "@app/hooks/api/appConnections/enums";
+import {
+ Cloud66ConnectionMethod,
+ TCloud66Connection
+} from "@app/hooks/api/appConnections/types/cloud-66-connection";
+
+import { AppConnectionFormFooter } from "./AppConnectionFormFooter";
+import {
+ genericAppConnectionFieldsSchema,
+ GenericAppConnectionsFields
+} from "./GenericAppConnectionFields";
+
+type Props = {
+ appConnection?: TCloud66Connection;
+ onSubmit: (formData: FormData) => void;
+};
+
+const rootSchema = genericAppConnectionFieldsSchema.extend({
+ app: z.literal(AppConnection.Cloud66)
+});
+
+const formSchema = z.discriminatedUnion("method", [
+ rootSchema.extend({
+ method: z.literal(Cloud66ConnectionMethod.AccessToken),
+ credentials: z.object({
+ accessToken: z.string().trim().min(1, "Personal Access Token required")
+ })
+ })
+]);
+
+type FormData = z.infer<typeof formSchema>;
+
+export const Cloud66ConnectionForm = ({ appConnection, onSubmit }: Props) => {
+ const isUpdate = Boolean(appConnection);
+
+ const form = useForm<FormData>({
+ resolver: zodResolver(formSchema),
+ defaultValues: appConnection ?? {
+ app: AppConnection.Cloud66,
+ method: Cloud66ConnectionMethod.AccessToken
+ }
+ });
+
+ const { handleSubmit, control } = form;
+
+ return (
+ <FormProvider {...form}>
+ <form onSubmit={handleSubmit(onSubmit)}>
+ {!isUpdate && <GenericAppConnectionsFields />}
+ <Controller
+ name="method"
+ control={control}
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <Field className="mb-4">
+ <FieldLabel>
+ Method
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Info />
+ </TooltipTrigger>
+ <TooltipContent className="max-w-sm">
+ {`The method you would like to use to connect with ${
+ APP_CONNECTION_MAP[AppConnection.Cloud66].name
+ }. This field cannot be changed after creation.`}
+ </TooltipContent>
+ </Tooltip>
+ </FieldLabel>
+ <Select disabled={isUpdate} value={value} onValueChange={(val) => onChange(val)}>
+ <SelectTrigger className="w-full" isError={Boolean(error)}>
+ <SelectValue placeholder="Select a method..." />
+ </SelectTrigger>
+ <SelectContent position="popper">
+ {Object.values(Cloud66ConnectionMethod).map((method) => (
+ <SelectItem value={method} key={method}>
+ {getAppConnectionMethodDetails(method).name}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ <FieldError errors={[error]} />
+ </Field>
+ )}
+ />
+ <Controller
+ name="credentials.accessToken"
+ control={control}
+ shouldUnregister
+ render={({ field: { value, onChange }, fieldState: { error } }) => (
+ <Field className="mb-4">
+ <FieldLabel htmlFor="access-token">
+ Personal Access Token
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Info />
+ </TooltipTrigger>
+ <TooltipContent className="max-w-sm">
+ The Cloud 66 Personal Access Token used to authenticate with the Cloud 66 API.
+ </TooltipContent>
+ </Tooltip>
+ </FieldLabel>
+ <SecretInput value={value} onChange={(e) => onChange(e.target.value)} />
+ <FieldError errors={[error]} />
+ </Field>
+ )}
+ />
+ <AppConnectionFormFooter
+ submitLabel={isUpdate ? "Update Credentials" : "Connect to Cloud 66"}
+ />
+ </form>
+ </FormProvider>
+ );
+};