& {
+ integrationAuthId: string;
+ integration?: string;
+};
+
export type TDeleteIntegrationAuthsDTO = TProjectPermission & {
integration: string;
projectId: string;
diff --git a/backend/src/services/integration/integration-service.ts b/backend/src/services/integration/integration-service.ts
index 1db10405d..a990b1ca6 100644
--- a/backend/src/services/integration/integration-service.ts
+++ b/backend/src/services/integration/integration-service.ts
@@ -151,7 +151,9 @@ export const integrationServiceFactory = ({
isActive,
environment,
secretPath,
- metadata
+ region,
+ metadata,
+ path
}: TUpdateIntegrationDTO) => {
const integration = await integrationDAL.findById(id);
if (!integration) throw new NotFoundError({ message: `Integration with ID '${id}' not found` });
@@ -192,7 +194,9 @@ export const integrationServiceFactory = ({
appId,
targetEnvironment,
owner,
+ region,
secretPath,
+ path,
metadata: {
...(integration.metadata as object),
...metadata
diff --git a/backend/src/services/integration/integration-types.ts b/backend/src/services/integration/integration-types.ts
index a27c4f6ac..f662affd8 100644
--- a/backend/src/services/integration/integration-types.ts
+++ b/backend/src/services/integration/integration-types.ts
@@ -49,6 +49,8 @@ export type TUpdateIntegrationDTO = {
appId?: string;
isActive?: boolean;
secretPath?: string;
+ region?: string;
+ path?: string;
targetEnvironment?: string;
owner?: string;
environment?: string;
diff --git a/backend/src/services/kms/kms-service.ts b/backend/src/services/kms/kms-service.ts
index 007d33e61..c41783860 100644
--- a/backend/src/services/kms/kms-service.ts
+++ b/backend/src/services/kms/kms-service.ts
@@ -4,8 +4,10 @@ import { z } from "zod";
import { KmsKeysSchema, TKmsRootConfig } from "@app/db/schemas";
import { AwsKmsProviderFactory } from "@app/ee/services/external-kms/providers/aws-kms";
+import { GcpKmsProviderFactory } from "@app/ee/services/external-kms/providers/gcp-kms";
import {
ExternalKmsAwsSchema,
+ ExternalKmsGcpSchema,
KmsProviders,
TExternalKmsProviderFns
} from "@app/ee/services/external-kms/providers/model";
@@ -291,6 +293,16 @@ export const kmsServiceFactory = ({
});
break;
}
+ case KmsProviders.Gcp: {
+ const decryptedProviderInput = await ExternalKmsGcpSchema.parseAsync(
+ JSON.parse(decryptedProviderInputBlob.toString("utf8"))
+ );
+
+ externalKms = await GcpKmsProviderFactory({
+ inputs: decryptedProviderInput
+ });
+ break;
+ }
default:
throw new Error("Invalid KMS provider.");
}
@@ -353,6 +365,16 @@ export const kmsServiceFactory = ({
});
break;
}
+ case KmsProviders.Gcp: {
+ const decryptedProviderInput = await ExternalKmsGcpSchema.parseAsync(
+ JSON.parse(decryptedProviderInputBlob.toString("utf8"))
+ );
+
+ externalKms = await GcpKmsProviderFactory({
+ inputs: decryptedProviderInput
+ });
+ break;
+ }
default:
throw new Error("Invalid KMS provider.");
}
diff --git a/backend/src/services/project/project-service.ts b/backend/src/services/project/project-service.ts
index c2ba53430..e7742e4f7 100644
--- a/backend/src/services/project/project-service.ts
+++ b/backend/src/services/project/project-service.ts
@@ -1,7 +1,7 @@
import { ForbiddenError } from "@casl/ability";
import slugify from "@sindresorhus/slugify";
-import { OrgMembershipRole, ProjectMembershipRole, ProjectVersion, TProjectEnvironments } from "@app/db/schemas";
+import { ProjectMembershipRole, ProjectVersion, TProjectEnvironments } from "@app/db/schemas";
import { TLicenseServiceFactory } from "@app/ee/services/license/license-service";
import { OrgPermissionActions, OrgPermissionSubjects } from "@app/ee/services/permission/org-permission";
import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service";
@@ -12,7 +12,6 @@ import { TSshCertificateAuthorityDALFactory } from "@app/ee/services/ssh/ssh-cer
import { TSshCertificateDALFactory } from "@app/ee/services/ssh-certificate/ssh-certificate-dal";
import { TSshCertificateTemplateDALFactory } from "@app/ee/services/ssh-certificate-template/ssh-certificate-template-dal";
import { TKeyStoreFactory } from "@app/keystore/keystore";
-import { isAtLeastAsPrivileged } from "@app/lib/casl";
import { infisicalSymmetricEncypt } from "@app/lib/crypto/encryption";
import { BadRequestError, ForbiddenRequestError, NotFoundError } from "@app/lib/errors";
import { groupBy } from "@app/lib/fn";
@@ -382,20 +381,6 @@ export const projectServiceFactory = ({
});
}
- // Get the role permission for the identity
- const { permission: rolePermission, role: customRole } = await permissionService.getOrgPermissionByRole(
- OrgMembershipRole.Member,
- organization.id
- );
-
- // Identity has to be at least a member in order to create projects
- const hasPrivilege = isAtLeastAsPrivileged(permission, rolePermission);
- if (!hasPrivilege)
- throw new ForbiddenRequestError({
- message: "Failed to add identity to project with more privileged role"
- });
- const isCustomRole = Boolean(customRole);
-
const identityProjectMembership = await identityProjectDAL.create(
{
identityId: actorId,
@@ -407,8 +392,7 @@ export const projectServiceFactory = ({
await identityProjectMembershipRoleDAL.create(
{
projectMembershipId: identityProjectMembership.id,
- role: isCustomRole ? ProjectMembershipRole.Custom : ProjectMembershipRole.Admin,
- customRoleId: customRole?.id
+ role: ProjectMembershipRole.Admin
},
tx
);
diff --git a/backend/src/services/secret/secret-queue.ts b/backend/src/services/secret/secret-queue.ts
index 3d75fa4f8..84a8584ee 100644
--- a/backend/src/services/secret/secret-queue.ts
+++ b/backend/src/services/secret/secret-queue.ts
@@ -932,8 +932,12 @@ export const secretQueueFactory = ({
);
const message =
- (err instanceof AxiosError ? JSON.stringify(err?.response?.data) : (err as Error)?.message) ||
- "Unknown error occurred.";
+ // eslint-disable-next-line no-nested-ternary
+ (err instanceof AxiosError
+ ? err?.response?.data
+ ? JSON.stringify(err?.response?.data)
+ : err?.message
+ : (err as Error)?.message) || "Unknown error occurred.";
await auditLogService.createAuditLog({
projectId,
diff --git a/backend/src/services/smtp/templates/organizationInvitation.handlebars b/backend/src/services/smtp/templates/organizationInvitation.handlebars
index 3ee16ee37..c3ac9556d 100644
--- a/backend/src/services/smtp/templates/organizationInvitation.handlebars
+++ b/backend/src/services/smtp/templates/organizationInvitation.handlebars
@@ -8,9 +8,9 @@
Join your organization on Infisical
- {{inviterFirstName}} ({{inviterUsername}}) has invited you to their Infisical organization — {{organizationName}}
- Join now
+ {{inviterFirstName}} ({{inviterUsername}}) has invited you to their Infisical organization named {{organizationName}}
+ Click to join
What is Infisical?
Infisical is an easy-to-use end-to-end encrypted tool that enables developers to sync and manage their secrets and configs.
-