Skip to content

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

Merge branch 'heads/main' into daniel/fips-initative

Daniel Hougaard001a2ef63a4d
diff --cc backend/src/ee/services/dynamic-secret/providers/aws-iam.ts
index e3be93aff4,3297159411..377e58d337
--- a/backend/src/ee/services/dynamic-secret/providers/aws-iam.ts
+++ b/backend/src/ee/services/dynamic-secret/providers/aws-iam.ts
@@@ -17,12 -17,11 +17,12 @@@ import
RemoveUserFromGroupCommand
} from "@aws-sdk/client-iam";
import { AssumeRoleCommand, STSClient } from "@aws-sdk/client-sts";
-import { randomUUID } from "crypto";
import { z } from "zod";
+import { CustomAWSHasher } from "@app/lib/aws/hashing";
import { getConfig } from "@app/lib/config/env";
+import { crypto } from "@app/lib/crypto/cryptography";
- import { BadRequestError } from "@app/lib/errors";
+ import { BadRequestError, UnauthorizedError } from "@app/lib/errors";
import { alphaNumericNanoId } from "@app/lib/nanoid";
import { AwsIamAuthType, DynamicSecretAwsIamSchema, TDynamicProviderFns } from "./models";
@@@ -86,10 -81,23 +86,27 @@@ export const AwsIamProvider = (): TDyna
return client;
}
+ if (providerInputs.method === AwsIamAuthType.IRSA) {
+ // Allow instances to disable automatic service account token fetching (e.g. for shared cloud)
+ if (!appCfg.KUBERNETES_AUTO_FETCH_SERVICE_ACCOUNT_TOKEN) {
+ throw new UnauthorizedError({
+ message: "Failed to get AWS credentials via IRSA: KUBERNETES_AUTO_FETCH_SERVICE_ACCOUNT_TOKEN is not enabled."
+ });
+ }
+
+ // The SDK will automatically pick up credentials from the environment
+ const client = new IAMClient({
- region: providerInputs.region
++ region: providerInputs.region,
++ useFipsEndpoint: crypto.isFipsModeEnabled(),
++ sha256: CustomAWSHasher
+ });
+ return client;
+ }
+
const client = new IAMClient({
region: providerInputs.region,
+ useFipsEndpoint: crypto.isFipsModeEnabled(),
+ sha256: CustomAWSHasher,
credentials: {
accessKeyId: providerInputs.accessKey,
secretAccessKey: providerInputs.secretAccessKey
diff --cc backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
index c21150b75f,101885fc58..8b4f0b4739
--- a/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
+++ b/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
@@@ -10,8 -10,9 +10,9 @@@ import
TSecretApprovalRequestsSecretsInsert,
TSecretApprovalRequestsSecretsV2Insert
} from "@app/db/schemas";
+ import { Event, EventType } from "@app/ee/services/audit-log/audit-log-types";
import { getConfig } from "@app/lib/config/env";
-import { decryptSymmetric128BitHexKeyUTF8 } from "@app/lib/crypto";
+import { crypto, SymmetricKeySize } from "@app/lib/crypto/cryptography";
import { BadRequestError, ForbiddenRequestError, NotFoundError } from "@app/lib/errors";
import { groupBy, pick, unique } from "@app/lib/fn";
import { setKnexStringValue } from "@app/lib/knex";
diff --cc backend/src/server/routes/v1/admin-router.ts
index e57c2a58e2,c3b204c48c..2e31077a7e
--- a/backend/src/server/routes/v1/admin-router.ts
+++ b/backend/src/server/routes/v1/admin-router.ts
@@@ -62,9 -61,9 +63,10 @@@ export const registerAdminRouter = asyn
return {
config: {
...config,
+ fipsEnabled: crypto.isFipsModeEnabled(),
isMigrationModeOn: serverEnvs.MAINTENANCE_MODE,
- isSecretScanningDisabled: serverEnvs.DISABLE_SECRET_SCANNING
+ isSecretScanningDisabled: serverEnvs.DISABLE_SECRET_SCANNING,
+ kubernetesAutoFetchServiceAccountToken: serverEnvs.KUBERNETES_AUTO_FETCH_SERVICE_ACCOUNT_TOKEN
}
};
}
diff --cc backend/src/services/org/org-service.ts
index 94bf4aa4e7,8917a4fc10..b6e6bf4ecf
--- a/backend/src/services/org/org-service.ts
+++ b/backend/src/services/org/org-service.ts
@@@ -31,8 -33,11 +31,10 @@@ import { ProjectPermissionMemberActions
import { TProjectUserAdditionalPrivilegeDALFactory } from "@app/ee/services/project-user-additional-privilege/project-user-additional-privilege-dal";
import { TSamlConfigDALFactory } from "@app/ee/services/saml-config/saml-config-dal";
import { getConfig } from "@app/lib/config/env";
-import { generateAsymmetricKeyPair } from "@app/lib/crypto";
-import { generateSymmetricKey, infisicalSymmetricDecrypt, infisicalSymmetricEncypt } from "@app/lib/crypto/encryption";
+import { crypto } from "@app/lib/crypto/cryptography";
import { generateUserSrpKeys } from "@app/lib/crypto/srp";
+ import { applyJitter } from "@app/lib/dates";
+ import { delay as delayMs } from "@app/lib/delay";
import {
BadRequestError,
ForbiddenRequestError,