Skip to content

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

greptile reviews

x032205e1214a1d2b72
diff --git a/backend/src/ee/services/pam-resource/pam-resource-service.ts b/backend/src/ee/services/pam-resource/pam-resource-service.ts
index 1cc3ca135f..1c5ead2524 100644
--- a/backend/src/ee/services/pam-resource/pam-resource-service.ts
+++ b/backend/src/ee/services/pam-resource/pam-resource-service.ts
@@ -177,11 +177,13 @@ export const pamResourceServiceFactory = ({
updateDoc.encryptedRotationAccountCredentials = null;
if (rotationAccountCredentials) {
- const decryptedConnectionDetails = await decryptResourceConnectionDetails({
- encryptedConnectionDetails: resource.encryptedConnectionDetails,
- projectId: resource.projectId,
- kmsService
- });
+ const decryptedConnectionDetails =
+ connectionDetails ??
+ (await decryptResourceConnectionDetails({
+ encryptedConnectionDetails: resource.encryptedConnectionDetails,
+ projectId: resource.projectId,
+ kmsService
+ }));
const factory = PAM_RESOURCE_FACTORY_MAP[resource.resourceType as PamResource](
resource.resourceType as PamResource,
diff --git a/backend/src/ee/services/pam-resource/shared/sql/sql-resource-schemas.ts b/backend/src/ee/services/pam-resource/shared/sql/sql-resource-schemas.ts
index cb3abf1099..96b6a6a24d 100644
--- a/backend/src/ee/services/pam-resource/shared/sql/sql-resource-schemas.ts
+++ b/backend/src/ee/services/pam-resource/shared/sql/sql-resource-schemas.ts
@@ -16,6 +16,6 @@ export const BaseSqlResourceConnectionDetailsSchema = z.object({
// Accounts
export const BaseSqlAccountCredentialsSchema = z.object({
- username: z.string().trim().min(1),
- password: z.string().trim().min(1)
+ username: z.string().trim().min(1).max(63),
+ password: z.string().trim().min(1).max(256)
});
diff --git a/backend/src/services/pam-account-rotation/pam-account-rotation-queue.ts b/backend/src/services/pam-account-rotation/pam-account-rotation-queue.ts
index fb265ac56f..6ed78f665a 100644
--- a/backend/src/services/pam-account-rotation/pam-account-rotation-queue.ts
+++ b/backend/src/services/pam-account-rotation/pam-account-rotation-queue.ts
@@ -43,7 +43,7 @@ export const pamAccountRotationServiceFactory = ({
{
batchSize: 1,
workerCount: 1,
- pollingIntervalSeconds: 1 // 5 * 60
+ pollingIntervalSeconds: 5 * 60
}
);
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/PamAccountForm.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/PamAccountForm.tsx
index bb64e33c0c..de23d243f7 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/PamAccountForm.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/PamAccountForm.tsx
@@ -34,8 +34,6 @@ const CreateForm = ({
}: CreateFormProps) => {
const createPamAccount = useCreatePamAccount();
- console.log({ folderId });
-
const onSubmit = async (
formData: DiscriminativePick<
TPamAccount,
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/RotateAccountFields.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/RotateAccountFields.tsx
index f319cf8997..b8972ab318 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/RotateAccountFields.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/RotateAccountFields.tsx
@@ -26,7 +26,7 @@ export const RotateAccountFields = () => {
<FormControl isError={Boolean(error)} errorText={error?.message} className="mb-0">
<Switch
className="ml-0 bg-mineshaft-400/80 shadow-inner data-[state=checked]:bg-green/80"
- id="can-remove-certificates"
+ id="rotation-enabled"
thumbClassName="bg-mineshaft-800"
onCheckedChange={onChange}
isChecked={value}
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/shared/sql-account-schemas.ts b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/shared/sql-account-schemas.ts
index d5a983aded..37efd67d4b 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/shared/sql-account-schemas.ts
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountForm/shared/sql-account-schemas.ts
@@ -5,6 +5,10 @@ export const BaseSqlAccountSchema = z.object({
.string()
.trim()
.min(1, "Username required")
- .max(255, "Username must be 255 characters or less"),
- password: z.string().trim().min(1, "Password required")
+ .max(63, "Username must be 63 characters or less"),
+ password: z
+ .string()
+ .trim()
+ .min(1, "Password required")
+ .max(256, "Password must be 256 characters or less")
});