Skip to content

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

deconflict merge

Scott Wilson1fdb6952409f
diff --cc backend/src/server/routes/v1/app-connection-routers/app-connection-router.ts
index 3b73a72e41,c773acc165..c8d2a976d6
--- 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
@@@ -56,7 -53,7 +57,8 @@@ const SanitizedAppConnectionSchema = z.
...SanitizedPostgresConnectionSchema.options,
...SanitizedMsSqlConnectionSchema.options,
...SanitizedCamundaConnectionSchema.options,
- ...SanitizedWindmillConnectionSchema.options
++ ...SanitizedWindmillConnectionSchema.options,
+ ...SanitizedAuth0ConnectionSchema.options
]);
const AppConnectionOptionsSchema = z.discriminatedUnion("app", [
@@@ -72,7 -69,7 +74,8 @@@
PostgresConnectionListItemSchema,
MsSqlConnectionListItemSchema,
CamundaConnectionListItemSchema,
- WindmillConnectionListItemSchema
++ WindmillConnectionListItemSchema,
+ Auth0ConnectionListItemSchema
]);
export const registerAppConnectionRouter = async (server: FastifyZodProvider) => {
diff --cc backend/src/server/routes/v1/app-connection-routers/index.ts
index ec2b79060f,22bd5f7177..a833b6882b
--- a/backend/src/server/routes/v1/app-connection-routers/index.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/index.ts
@@@ -30,5 -30,5 +31,6 @@@ export const APP_CONNECTION_REGISTER_RO
[AppConnection.Postgres]: registerPostgresConnectionRouter,
[AppConnection.MsSql]: registerMsSqlConnectionRouter,
[AppConnection.Camunda]: registerCamundaConnectionRouter,
- [AppConnection.Windmill]: registerWindmillConnectionRouter
++ [AppConnection.Windmill]: registerWindmillConnectionRouter,
+ [AppConnection.Auth0]: registerAuth0ConnectionRouter
};
diff --cc backend/src/services/app-connection/app-connection-enums.ts
index ca5edf4405,2c5a32c85b..6b6048f2ae
--- a/backend/src/services/app-connection/app-connection-enums.ts
+++ b/backend/src/services/app-connection/app-connection-enums.ts
@@@ -11,7 -11,7 +11,8 @@@ export enum AppConnection
Postgres = "postgres",
MsSql = "mssql",
Camunda = "camunda",
- Windmill = "windmill"
++ Windmill = "windmill",
+ Auth0 = "auth0"
}
export enum AWSRegion {
diff --cc backend/src/services/app-connection/app-connection-fns.ts
index b8eebf6bcc,de329faaaf..7e08a92b44
--- a/backend/src/services/app-connection/app-connection-fns.ts
+++ b/backend/src/services/app-connection/app-connection-fns.ts
@@@ -69,7 -65,7 +70,8 @@@ export const listAppConnectionOptions
getPostgresConnectionListItem(),
getMsSqlConnectionListItem(),
getCamundaConnectionListItem(),
- getWindmillConnectionListItem()
++ getWindmillConnectionListItem(),
+ getAuth0ConnectionListItem()
].sort((a, b) => a.name.localeCompare(b.name));
};
@@@ -115,26 -111,28 +117,29 @@@ export const decryptAppConnectionCreden
return JSON.parse(decryptedPlainTextBlob.toString()) as TAppConnection["credentials"];
};
- const VALIDATE_APP_CONNECTION_CREDENTIALS_MAP: Record<AppConnection, TAppConnectionCredentialsValidator> = {
- [AppConnection.AWS]: validateAwsConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.Databricks]: validateDatabricksConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.GitHub]: validateGitHubConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.GCP]: validateGcpConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.AzureKeyVault]: validateAzureKeyVaultConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.AzureAppConfiguration]:
- validateAzureAppConfigurationConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.Humanitec]: validateHumanitecConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.Postgres]: validateSqlConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.MsSql]: validateSqlConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.TerraformCloud]: validateTerraformCloudConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.Camunda]: validateCamundaConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.Vercel]: validateVercelConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.Windmill]: validateWindmillConnectionCredentials as TAppConnectionCredentialsValidator
- };
-
export const validateAppConnectionCredentials = async (
appConnection: TAppConnectionConfig
- ): Promise<TAppConnection["credentials"]> => VALIDATE_APP_CONNECTION_CREDENTIALS_MAP[appConnection.app](appConnection);
+ ): Promise<TAppConnection["credentials"]> => {
+ const VALIDATE_APP_CONNECTION_CREDENTIALS_MAP: Record<AppConnection, TAppConnectionCredentialsValidator> = {
+ [AppConnection.AWS]: validateAwsConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.Databricks]: validateDatabricksConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.GitHub]: validateGitHubConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.GCP]: validateGcpConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.AzureKeyVault]: validateAzureKeyVaultConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.AzureAppConfiguration]:
+ validateAzureAppConfigurationConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.Humanitec]: validateHumanitecConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.Postgres]: validateSqlConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.MsSql]: validateSqlConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.Camunda]: validateCamundaConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.Vercel]: validateVercelConnectionCredentials as TAppConnectionCredentialsValidator,
+ [AppConnection.TerraformCloud]: validateTerraformCloudConnectionCredentials as TAppConnectionCredentialsValidator,
- [AppConnection.Auth0]: validateAuth0ConnectionCredentials as TAppConnectionCredentialsValidator
++ [AppConnection.Auth0]: validateAuth0ConnectionCredentials as TAppConnectionCredentialsValidator,
++ [AppConnection.Windmill]: validateWindmillConnectionCredentials as TAppConnectionCredentialsValidator
+ };
+
+ return VALIDATE_APP_CONNECTION_CREDENTIALS_MAP[appConnection.app](appConnection);
+ };
export const getAppConnectionMethodName = (method: TAppConnection["method"]) => {
switch (method) {
@@@ -161,8 -159,8 +166,10 @@@
case PostgresConnectionMethod.UsernameAndPassword:
case MsSqlConnectionMethod.UsernameAndPassword:
return "Username & Password";
+ case WindmillConnectionMethod.AccessToken:
+ return "Access Token";
+ case Auth0ConnectionMethod.ClientCredentials:
+ return "Client Credentials";
default:
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
throw new Error(`Unhandled App Connection Method: ${method}`);
@@@ -206,5 -204,5 +213,6 @@@ export const TRANSITION_CONNECTION_CRED
[AppConnection.TerraformCloud]: platformManagedCredentialsNotSupported,
[AppConnection.Camunda]: platformManagedCredentialsNotSupported,
[AppConnection.Vercel]: platformManagedCredentialsNotSupported,
- [AppConnection.Windmill]: platformManagedCredentialsNotSupported
++ [AppConnection.Windmill]: platformManagedCredentialsNotSupported,
+ [AppConnection.Auth0]: platformManagedCredentialsNotSupported
};
diff --cc backend/src/services/app-connection/app-connection-maps.ts
index 15cc783920,2e3f91dd64..762a9bcf22
--- a/backend/src/services/app-connection/app-connection-maps.ts
+++ b/backend/src/services/app-connection/app-connection-maps.ts
@@@ -13,5 -13,5 +13,6 @@@ export const APP_CONNECTION_NAME_MAP: R
[AppConnection.Postgres]: "PostgreSQL",
[AppConnection.MsSql]: "Microsoft SQL Server",
[AppConnection.Camunda]: "Camunda",
- [AppConnection.Windmill]: "Windmill"
++ [AppConnection.Windmill]: "Windmill",
+ [AppConnection.Auth0]: "Auth0"
};
diff --cc backend/src/services/app-connection/app-connection-service.ts
index 608da5607e,6d1d53e930..5293761a8a
--- a/backend/src/services/app-connection/app-connection-service.ts
+++ b/backend/src/services/app-connection/app-connection-service.ts
@@@ -71,7 -71,7 +73,8 @@@ const VALIDATE_APP_CONNECTION_CREDENTIA
[AppConnection.Postgres]: ValidatePostgresConnectionCredentialsSchema,
[AppConnection.MsSql]: ValidateMsSqlConnectionCredentialsSchema,
[AppConnection.Camunda]: ValidateCamundaConnectionCredentialsSchema,
- [AppConnection.Windmill]: ValidateWindmillConnectionCredentialsSchema
++ [AppConnection.Windmill]: ValidateWindmillConnectionCredentialsSchema,
+ [AppConnection.Auth0]: ValidateAuth0ConnectionCredentialsSchema
};
export const appConnectionServiceFactory = ({
@@@ -446,6 -446,6 +449,7 @@@
terraformCloud: terraformCloudConnectionService(connectAppConnectionById),
camunda: camundaConnectionService(connectAppConnectionById, appConnectionDAL, kmsService),
vercel: vercelConnectionService(connectAppConnectionById),
- windmill: windmillConnectionService(connectAppConnectionById)
++ windmill: windmillConnectionService(connectAppConnectionById),
+ auth0: auth0ConnectionService(connectAppConnectionById, appConnectionDAL, kmsService)
};
};
diff --cc backend/src/services/app-connection/app-connection-types.ts
index 2b980a4427,5c1095285b..64d44ccc68
--- a/backend/src/services/app-connection/app-connection-types.ts
+++ b/backend/src/services/app-connection/app-connection-types.ts
@@@ -89,7 -89,7 +95,8 @@@ export type TAppConnection = { id: stri
| TPostgresConnection
| TMsSqlConnection
| TCamundaConnection
+ | TWindmillConnection
+ | TAuth0Connection
);
export type TAppConnectionRaw = NonNullable<Awaited<ReturnType<TAppConnectionDALFactory["findById"]>>>;
@@@ -109,7 -109,7 +116,8 @@@ export type TAppConnectionInput = { id
| TPostgresConnectionInput
| TMsSqlConnectionInput
| TCamundaConnectionInput
+ | TWindmillConnectionInput
+ | TAuth0ConnectionInput
);
export type TSqlConnectionInput = TPostgresConnectionInput | TMsSqlConnectionInput;
@@@ -132,10 -132,10 +140,11 @@@ export type TAppConnectionConfig
| TDatabricksConnectionConfig
| THumanitecConnectionConfig
| TTerraformCloudConnectionConfig
+ | TVercelConnectionConfig
| TSqlConnectionConfig
| TCamundaConnectionConfig
- | TWindmillConnectionConfig;
- | TVercelConnectionConfig
++ | TWindmillConnectionConfig
+ | TAuth0ConnectionConfig;
export type TValidateAppConnectionCredentialsSchema =
| TValidateAwsConnectionCredentialsSchema
@@@ -148,9 -148,9 +157,10 @@@
| TValidatePostgresConnectionCredentialsSchema
| TValidateMsSqlConnectionCredentialsSchema
| TValidateCamundaConnectionCredentialsSchema
- | TValidateVercelConnectionCredentialsSchema
| TValidateTerraformCloudConnectionCredentialsSchema
+ | TValidateVercelConnectionCredentialsSchema
- | TValidateWindmillConnectionCredentialsSchema;
++ | TValidateWindmillConnectionCredentialsSchema
+ | TValidateAuth0ConnectionCredentialsSchema;
export type TListAwsConnectionKmsKeys = {
connectionId: string;
diff --cc frontend/src/helpers/appConnections.ts
index 3c691aca42,666784b54d..c94bd66485
--- a/frontend/src/helpers/appConnections.ts
+++ b/frontend/src/helpers/appConnections.ts
@@@ -15,11 -16,13 +16,14 @@@ import
PostgresConnectionMethod,
TAppConnection,
TerraformCloudConnectionMethod,
- VercelConnectionMethod
+ VercelConnectionMethod,
+ WindmillConnectionMethod
} from "@app/hooks/api/appConnections/types";
- export const APP_CONNECTION_MAP: Record<AppConnection, { name: string; image: string }> = {
+ export const APP_CONNECTION_MAP: Record<
+ AppConnection,
+ { name: string; image: string; size?: number }
+ > = {
[AppConnection.AWS]: { name: "AWS", image: "Amazon Web Services.png" },
[AppConnection.GitHub]: { name: "GitHub", image: "GitHub.png" },
[AppConnection.GCP]: {
@@@ -38,7 -41,7 +42,8 @@@
[AppConnection.Postgres]: { name: "PostgreSQL", image: "Postgres.png" },
[AppConnection.MsSql]: { name: "Microsoft SQL Server", image: "MsSql.png" },
[AppConnection.Camunda]: { name: "Camunda", image: "Camunda.png" },
- [AppConnection.Windmill]: { name: "Windmill", image: "Windmill.png" }
++ [AppConnection.Windmill]: { name: "Windmill", image: "Windmill.png" },
+ [AppConnection.Auth0]: { name: "Auth0", image: "Auth0.png", size: 40 }
};
export const getAppConnectionMethodDetails = (method: TAppConnection["method"]) => {
@@@ -66,8 -69,8 +71,10 @@@
case PostgresConnectionMethod.UsernameAndPassword:
case MsSqlConnectionMethod.UsernameAndPassword:
return { name: "Username & Password", icon: faLock };
+ case WindmillConnectionMethod.AccessToken:
+ return { name: "Access Token", icon: faKey };
+ case Auth0ConnectionMethod.ClientCredentials:
+ return { name: "Client Credentials", icon: faServer };
default:
throw new Error(`Unhandled App Connection Method: ${method}`);
}
diff --cc frontend/src/hooks/api/appConnections/enums.ts
index aa30b905fb,823583d592..704b200bb0
--- a/frontend/src/hooks/api/appConnections/enums.ts
+++ b/frontend/src/hooks/api/appConnections/enums.ts
@@@ -11,5 -11,5 +11,6 @@@ export enum AppConnection
Postgres = "postgres",
MsSql = "mssql",
Camunda = "camunda",
- Windmill = "windmill"
++ Windmill = "windmill",
+ Auth0 = "auth0"
}
diff --cc frontend/src/hooks/api/appConnections/types/app-options.ts
index 624071ef4d,48cee7b814..ae57fbda29
--- a/frontend/src/hooks/api/appConnections/types/app-options.ts
+++ b/frontend/src/hooks/api/appConnections/types/app-options.ts
@@@ -59,10 -59,10 +59,14 @@@ export type TCamundaConnectionOption =
app: AppConnection.Camunda;
};
+export type TWindmillConnectionOption = TAppConnectionOptionBase & {
+ app: AppConnection.Windmill;
+};
+
+ export type TAuth0ConnectionOption = TAppConnectionOptionBase & {
+ app: AppConnection.Auth0;
+ };
+
export type TAppConnectionOption =
| TAwsConnectionOption
| TGitHubConnectionOption
@@@ -76,7 -76,7 +80,8 @@@
| TPostgresConnectionOption
| TMsSqlConnectionOption
| TCamundaConnectionOption
- | TWindmillConnectionOption;
++ | TWindmillConnectionOption
+ | TAuth0ConnectionOption;
export type TAppConnectionOptionMap = {
[AppConnection.AWS]: TAwsConnectionOption;
@@@ -91,5 -91,5 +96,6 @@@
[AppConnection.Postgres]: TPostgresConnectionOption;
[AppConnection.MsSql]: TMsSqlConnectionOption;
[AppConnection.Camunda]: TCamundaConnectionOption;
+ [AppConnection.Windmill]: TWindmillConnectionOption;
+ [AppConnection.Auth0]: TAuth0ConnectionOption;
};
diff --cc frontend/src/hooks/api/appConnections/types/index.ts
index c393841b24,c227ae3813..29e82bff66
--- a/frontend/src/hooks/api/appConnections/types/index.ts
+++ b/frontend/src/hooks/api/appConnections/types/index.ts
@@@ -12,8 -13,8 +13,9 @@@ import { TMsSqlConnection } from "./mss
import { TPostgresConnection } from "./postgres-connection";
import { TTerraformCloudConnection } from "./terraform-cloud-connection";
import { TVercelConnection } from "./vercel-connection";
+import { TWindmillConnection } from "./windmill-connection";
+ export * from "./auth0-connection";
export * from "./aws-connection";
export * from "./azure-app-configuration-connection";
export * from "./azure-key-vault-connection";
@@@ -41,7 -41,7 +43,8 @@@ export type TAppConnection
| TPostgresConnection
| TMsSqlConnection
| TCamundaConnection
- | TWindmillConnection;
++ | TWindmillConnection
+ | TAuth0Connection;
export type TAvailableAppConnection = Pick<TAppConnection, "name" | "id">;
@@@ -81,5 -81,5 +84,6 @@@ export type TAppConnectionMap =
[AppConnection.Postgres]: TPostgresConnection;
[AppConnection.MsSql]: TMsSqlConnection;
[AppConnection.Camunda]: TCamundaConnection;
+ [AppConnection.Windmill]: TWindmillConnection;
+ [AppConnection.Auth0]: TAuth0Connection;
};
diff --cc frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
index 1bfe068f92,907e388f27..05a7eebbc1
--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AppConnectionForm.tsx
@@@ -84,8 -84,8 +85,10 @@@ const CreateForm = ({ app, onComplete }
return <MsSqlConnectionForm onSubmit={onSubmit} />;
case AppConnection.Camunda:
return <CamundaConnectionForm onSubmit={onSubmit} />;
+ case AppConnection.Windmill:
+ return <WindmillConnectionForm onSubmit={onSubmit} />;
+ case AppConnection.Auth0:
+ return <Auth0ConnectionForm onSubmit={onSubmit} />;
default:
throw new Error(`Unhandled App ${app}`);
}
@@@ -146,8 -146,8 +149,10 @@@ const UpdateForm = ({ appConnection, on
return <MsSqlConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
case AppConnection.Camunda:
return <CamundaConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
+ case AppConnection.Windmill:
+ return <WindmillConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
+ case AppConnection.Auth0:
+ return <Auth0ConnectionForm onSubmit={onSubmit} appConnection={appConnection} />;
default:
throw new Error(`Unhandled App ${(appConnection as TAppConnection).app}`);
}