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 small test
Andrey45538fa91584
diff --git a/backend/src/ee/services/pam-account/pam-account-connection-test.test.ts b/backend/src/ee/services/pam-account/pam-account-connection-test.test.tsindex 965e28ea2c..114c30542b 100644--- a/backend/src/ee/services/pam-account/pam-account-connection-test.test.ts+++ b/backend/src/ee/services/pam-account/pam-account-connection-test.test.ts@@ -1,8 +1,9 @@import { describe, expect, test } from "vitest";-import { PamAccountType, PamSshAuthMethod } from "../pam/pam-enums";+import { GcpServiceAccountAuthMethod, PamAccountType, PamSshAuthMethod } from "../pam/pam-enums";import {buildGatewayConnectionTest,+ CLOUD_CONNECTION_VALIDATORS,ORACLE_MAX_PASSWORD_LENGTH,TestConnectionMode,testVerifiesCredential@@ -348,3 +349,15 @@ describe("buildGatewayConnectionTest: ClickHouse", () => {expect(testVerifiesCredential(result!.request)).toBe(true);});});++describe("CLOUD_CONNECTION_VALIDATORS: GCP service account", () => {+ test("impersonation requires the org's service account ID suffix", async () => {+ await expect(+ CLOUD_CONNECTION_VALIDATORS[PamAccountType.GcpServiceAccount]!({+ connectionDetails: { serviceAccountEmail: "[email protected]" },+ credentials: { authMethod: GcpServiceAccountAuthMethod.Impersonation },+ orgId: ORG_ID+ })+ ).rejects.toThrow('end with "11111111-1111"');+ });+});