Skip to content

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

feat: completed frontend changes

=7761b17afb0e
diff --git a/frontend/src/components/secret-rotations-v2/ReconcileSshPasswordRotationModal.tsx b/frontend/src/components/secret-rotations-v2/ReconcileUnixLinuxLocalAccountRotationModal.tsx
similarity index 65%
rename from frontend/src/components/secret-rotations-v2/ReconcileSshPasswordRotationModal.tsx
rename to frontend/src/components/secret-rotations-v2/ReconcileUnixLinuxLocalAccountRotationModal.tsx
index 9b63f0c567..2e51ebac34 100644
--- a/frontend/src/components/secret-rotations-v2/ReconcileSshPasswordRotationModal.tsx
+++ b/frontend/src/components/secret-rotations-v2/ReconcileUnixLinuxLocalAccountRotationModal.tsx
@@ -1,8 +1,8 @@
import { createNotification } from "@app/components/notifications";
import { Button, Modal, ModalClose, ModalContent } from "@app/components/v2";
import { SecretRotation, TSecretRotationV2 } from "@app/hooks/api/secretRotationsV2";
-import { useReconcileSshPasswordRotation } from "@app/hooks/api/secretRotationsV2/mutations";
-import { TSshPasswordRotation } from "@app/hooks/api/secretRotationsV2/types/ssh-password-rotation";
+import { useReconcileUnixLinuxLocalAccountRotation } from "@app/hooks/api/secretRotationsV2/mutations";
+import { TUnixLinuxLocalAccountRotation } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";
type Props = {
secretRotation?: TSecretRotationV2;
@@ -11,17 +11,17 @@ type Props = {
};
type ContentProps = {
- secretRotation: TSshPasswordRotation;
+ secretRotation: TUnixLinuxLocalAccountRotation;
onComplete: () => void;
};
const Content = ({ secretRotation, onComplete }: ContentProps) => {
- const reconcileSshPassword = useReconcileSshPasswordRotation();
+ const reconcileUnixLinuxLocalAccount = useReconcileUnixLinuxLocalAccountRotation();
const { id: rotationId, projectId, folder } = secretRotation;
const handleReconcile = async () => {
- const result = await reconcileSshPassword.mutateAsync({
+ const result = await reconcileUnixLinuxLocalAccount.mutateAsync({
rotationId,
projectId,
secretPath: folder.path
@@ -29,8 +29,8 @@ const Content = ({ secretRotation, onComplete }: ContentProps) => {
createNotification({
text: result.reconciled
- ? "Successfully reconciled SSH password rotation"
- : "SSH password rotation is already in sync",
+ ? "Successfully reconciled Unix/Linux Local Account rotation"
+ : "Unix/Linux Local Account rotation is already in sync",
type: "success"
});
@@ -55,8 +55,8 @@ const Content = ({ secretRotation, onComplete }: ContentProps) => {
</ModalClose>
<Button
onClick={handleReconcile}
- isDisabled={reconcileSshPassword.isPending}
- isLoading={reconcileSshPassword.isPending}
+ isDisabled={reconcileUnixLinuxLocalAccount.isPending}
+ isLoading={reconcileUnixLinuxLocalAccount.isPending}
colorSchema="secondary"
>
Reconcile
@@ -66,21 +66,21 @@ const Content = ({ secretRotation, onComplete }: ContentProps) => {
);
};
-export const ReconcileSshPasswordRotationModal = ({
+export const ReconcileUnixLinuxLocalAccountRotationModal = ({
isOpen,
onOpenChange,
secretRotation
}: Props) => {
- if (!secretRotation || secretRotation.type !== SecretRotation.SshPassword) return null;
+ if (!secretRotation || secretRotation.type !== SecretRotation.UnixLinuxLocalAccount) return null;
return (
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
<ModalContent
- title="Reconcile SSH Password"
- subTitle="Sync the SSH password between Infisical and the server."
+ title="Reconcile Unix/Linux Local Account"
+ subTitle="Sync the Unix/Linux Local Account password between Infisical and the server."
>
<Content
- secretRotation={secretRotation as TSshPasswordRotation}
+ secretRotation={secretRotation as TUnixLinuxLocalAccountRotation}
onComplete={() => onOpenChange(false)}
/>
</ModalContent>
diff --git a/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSecretRotationV2GeneratedCredentials.tsx b/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSecretRotationV2GeneratedCredentials.tsx
index 78e774a5b5..ec71f1d436 100644
--- a/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSecretRotationV2GeneratedCredentials.tsx
+++ b/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSecretRotationV2GeneratedCredentials.tsx
@@ -25,7 +25,7 @@ import { ViewSqlCredentialsRotationGeneratedCredentials } from "./shared";
import { ViewAwsIamUserSecretRotationGeneratedCredentials } from "./ViewAwsIamUserSecretRotationGeneratedCredentials";
import { ViewOktaClientSecretRotationGeneratedCredentials } from "./ViewOktaClientSecretRotationGeneratedCredentials";
import { ViewRedisCredentialsRotationGeneratedCredentials } from "./ViewRedisCredentialsRotationGeneratedCredentials";
-import { ViewSshPasswordRotationGeneratedCredentials } from "./ViewSshPasswordRotationGeneratedCredentials";
+import { ViewUnixLinuxLocalAccountRotationGeneratedCredentials } from "./ViewUnixLinuxLocalAccountRotationGeneratedCredentials";
type Props = {
secretRotation?: TSecretRotationV2;
@@ -125,9 +125,9 @@ const Content = ({ secretRotation }: ContentProps) => {
/>
);
break;
- case SecretRotation.SshPassword:
+ case SecretRotation.UnixLinuxLocalAccount:
Component = (
- <ViewSshPasswordRotationGeneratedCredentials
+ <ViewUnixLinuxLocalAccountRotationGeneratedCredentials
generatedCredentialsResponse={generatedCredentialsResponse}
/>
);
diff --git a/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSshPasswordRotationGeneratedCredentials.tsx b/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewUnixLinuxLocalAccountRotationGeneratedCredentials.tsx
similarity index 76%
rename from frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSshPasswordRotationGeneratedCredentials.tsx
rename to frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewUnixLinuxLocalAccountRotationGeneratedCredentials.tsx
index ba4cc724e8..d41c7db91d 100644
--- a/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewSshPasswordRotationGeneratedCredentials.tsx
+++ b/frontend/src/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials/ViewUnixLinuxLocalAccountRotationGeneratedCredentials.tsx
@@ -1,12 +1,12 @@
-import { TSshPasswordRotationGeneratedCredentialsResponse } from "@app/hooks/api/secretRotationsV2/types/ssh-password-rotation";
+import { TUnixLinuxLocalAccountRotationGeneratedCredentialsResponse } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";
import { CredentialDisplay, ViewRotationGeneratedCredentialsDisplay } from "./shared";
type Props = {
- generatedCredentialsResponse: TSshPasswordRotationGeneratedCredentialsResponse;
+ generatedCredentialsResponse: TUnixLinuxLocalAccountRotationGeneratedCredentialsResponse;
};
-export const ViewSshPasswordRotationGeneratedCredentials = ({
+export const ViewUnixLinuxLocalAccountRotationGeneratedCredentials = ({
generatedCredentialsResponse: { generatedCredentials, activeIndex }
}: Props) => {
const inactiveIndex = activeIndex === 0 ? 1 : 0;
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SecretRotationV2ParametersFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SecretRotationV2ParametersFields.tsx
index 4c0814c06a..70654f2fe7 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SecretRotationV2ParametersFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SecretRotationV2ParametersFields.tsx
@@ -12,7 +12,7 @@ import { MongoRotationParametersFields } from "./MongoRotationParametersFields";
import { OktaClientSecretRotationParametersFields } from "./OktaClientSecretRotationParametersFields";
import { RedisCredentialsRotationParametersFields } from "./RedisCredentialsRotationParametersFields";
import { SqlCredentialsRotationParametersFields } from "./shared";
-import { SshPasswordRotationParametersFields } from "./SshPasswordRotationParametersFields";
+import { UnixLinuxLocalAccountRotationParametersFields } from "./UnixLinuxLocalAccountRotationParametersFields";
const COMPONENT_MAP: Record<SecretRotation, React.FC> = {
[SecretRotation.PostgresCredentials]: SqlCredentialsRotationParametersFields,
@@ -28,7 +28,7 @@ const COMPONENT_MAP: Record<SecretRotation, React.FC> = {
[SecretRotation.MongoDBCredentials]: MongoRotationParametersFields,
[SecretRotation.DatabricksServicePrincipalSecret]:
DatabricksServicePrincipalSecretRotationParametersFields,
- [SecretRotation.SshPassword]: SshPasswordRotationParametersFields
+ [SecretRotation.UnixLinuxLocalAccount]: UnixLinuxLocalAccountRotationParametersFields
};
export const SecretRotationV2ParametersFields = () => {
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SshPasswordRotationParametersFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/UnixLinuxLocalAccountRotationParametersFields.tsx
similarity index 93%
rename from frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SshPasswordRotationParametersFields.tsx
rename to frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/UnixLinuxLocalAccountRotationParametersFields.tsx
index 488dff4fc1..7e3737067c 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/SshPasswordRotationParametersFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/UnixLinuxLocalAccountRotationParametersFields.tsx
@@ -4,19 +4,19 @@ import { TSecretRotationV2Form } from "@app/components/secret-rotations-v2/forms
import { DEFAULT_PASSWORD_REQUIREMENTS } from "@app/components/secret-rotations-v2/forms/schemas/shared";
import { FormControl, Input, Select, SelectItem } from "@app/components/v2";
import { SecretRotation } from "@app/hooks/api/secretRotationsV2";
-import { SshPasswordRotationMethod } from "@app/hooks/api/secretRotationsV2/types/ssh-password-rotation";
+import { UnixLinuxLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";
-export const SshPasswordRotationParametersFields = () => {
+export const UnixLinuxLocalAccountRotationParametersFields = () => {
const { control, watch, setValue } = useFormContext<
TSecretRotationV2Form & {
- type: SecretRotation.SshPassword;
+ type: SecretRotation.UnixLinuxLocalAccount;
}
>();
const id = watch("id");
const rotationMethod = watch(
"parameters.rotationMethod",
- SshPasswordRotationMethod.LoginAsTarget
+ UnixLinuxLocalAccountRotationMethod.LoginAsTarget
);
const isUpdate = Boolean(id);
@@ -25,7 +25,7 @@ export const SshPasswordRotationParametersFields = () => {
<Controller
name="parameters.rotationMethod"
control={control}
- defaultValue={SshPasswordRotationMethod.LoginAsTarget}
+ defaultValue={UnixLinuxLocalAccountRotationMethod.LoginAsTarget}
render={({ field: { value, onChange }, fieldState: { error } }) => (
<FormControl
tooltipText={
@@ -52,7 +52,7 @@ export const SshPasswordRotationParametersFields = () => {
// eslint-disable-next-line no-nested-ternary
isUpdate
? "Cannot be updated."
- : value === SshPasswordRotationMethod.LoginAsRoot
+ : value === UnixLinuxLocalAccountRotationMethod.LoginAsRoot
? "The SSH connection credentials will change the target user's password"
: "The target user will change their own password"
}
@@ -70,7 +70,7 @@ export const SshPasswordRotationParametersFields = () => {
position="popper"
dropdownContainerClassName="max-w-none"
>
- {Object.values(SshPasswordRotationMethod).map((method) => {
+ {Object.values(UnixLinuxLocalAccountRotationMethod).map((method) => {
return (
<SelectItem value={method} className="capitalize" key={method}>
{method.replace(/-/g, " ")}
@@ -104,7 +104,7 @@ export const SshPasswordRotationParametersFields = () => {
</FormControl>
)}
/>
- {!isUpdate && rotationMethod === SshPasswordRotationMethod.LoginAsTarget && (
+ {!isUpdate && rotationMethod === UnixLinuxLocalAccountRotationMethod.LoginAsTarget && (
<Controller
name="temporaryParameters.password"
control={control}
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SecretRotationReviewFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SecretRotationReviewFields.tsx
index 8b0bffbaba..e361156b13 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SecretRotationReviewFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SecretRotationReviewFields.tsx
@@ -14,7 +14,7 @@ import { LdapPasswordRotationReviewFields } from "./LdapPasswordRotationReviewFi
import { OktaClientSecretRotationReviewFields } from "./OktaClientSecretRotationReviewFields";
import { RedisCredentialsRotationReviewFields } from "./RedisCredentialsRotationReviewFields";
import { SqlCredentialsRotationReviewFields } from "./shared";
-import { SshPasswordRotationReviewFields } from "./SshPasswordRotationReviewFields";
+import { UnixLinuxLocalAccountRotationReviewFields } from "./UnixLinuxLocalAccountRotationReviewFields";
const COMPONENT_MAP: Record<SecretRotation, React.FC> = {
[SecretRotation.PostgresCredentials]: SqlCredentialsRotationReviewFields,
@@ -30,7 +30,7 @@ const COMPONENT_MAP: Record<SecretRotation, React.FC> = {
[SecretRotation.MongoDBCredentials]: SqlCredentialsRotationReviewFields,
[SecretRotation.DatabricksServicePrincipalSecret]:
DatabricksServicePrincipalSecretRotationReviewFields,
- [SecretRotation.SshPassword]: SshPasswordRotationReviewFields
+ [SecretRotation.UnixLinuxLocalAccount]: UnixLinuxLocalAccountRotationReviewFields
};
export const SecretRotationV2ReviewFields = () => {
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SshPasswordRotationReviewFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/UnixLinuxLocalAccountRotationReviewFields.tsx
similarity index 94%
rename from frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SshPasswordRotationReviewFields.tsx
rename to frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/UnixLinuxLocalAccountRotationReviewFields.tsx
index e96105ab68..ccc8158638 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/SshPasswordRotationReviewFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ReviewFields/UnixLinuxLocalAccountRotationReviewFields.tsx
@@ -6,10 +6,10 @@ import { SecretRotation } from "@app/hooks/api/secretRotationsV2";
import { SecretRotationReviewSection } from "./shared";
-export const SshPasswordRotationReviewFields = () => {
+export const UnixLinuxLocalAccountRotationReviewFields = () => {
const { watch } = useFormContext<
TSecretRotationV2Form & {
- type: SecretRotation.SshPassword;
+ type: SecretRotation.UnixLinuxLocalAccount;
}
>();
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SecretRotationV2SecretsMappingFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SecretRotationV2SecretsMappingFields.tsx
index 722a53cda4..1f8506a4af 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SecretRotationV2SecretsMappingFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SecretRotationV2SecretsMappingFields.tsx
@@ -11,7 +11,7 @@ import { LdapPasswordRotationSecretsMappingFields } from "./LdapPasswordRotation
import { OktaClientSecretRotationSecretsMappingFields } from "./OktaClientSecretRotationSecretsMappingFields";
import { RedisCredentialsRotationSecretsMappingFields } from "./RedisCredentialsRotationSecretsMappingFields";
import { SqlCredentialsRotationSecretsMappingFields } from "./shared";
-import { SshPasswordRotationSecretsMappingFields } from "./SshPasswordRotationSecretsMappingFields";
+import { UnixLinuxLocalAccountRotationSecretsMappingFields } from "./UnixLinuxLocalAccountRotationSecretsMappingFields";
const COMPONENT_MAP: Record<SecretRotation, React.FC> = {
[SecretRotation.PostgresCredentials]: SqlCredentialsRotationSecretsMappingFields,
@@ -27,7 +27,7 @@ const COMPONENT_MAP: Record<SecretRotation, React.FC> = {
[SecretRotation.MongoDBCredentials]: SqlCredentialsRotationSecretsMappingFields,
[SecretRotation.DatabricksServicePrincipalSecret]:
DatabricksServicePrincipalSecretRotationSecretsMappingFields,
- [SecretRotation.SshPassword]: SshPasswordRotationSecretsMappingFields
+ [SecretRotation.UnixLinuxLocalAccount]: UnixLinuxLocalAccountRotationSecretsMappingFields
};
export const SecretRotationV2SecretsMappingFields = () => {
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SshPasswordRotationSecretsMappingFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/UnixLinuxLocalAccountRotationSecretsMappingFields.tsx
similarity index 91%
rename from frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SshPasswordRotationSecretsMappingFields.tsx
rename to frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/UnixLinuxLocalAccountRotationSecretsMappingFields.tsx
index 1bedf519e0..4dac2d8c90 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/SshPasswordRotationSecretsMappingFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2SecretsMappingFields/UnixLinuxLocalAccountRotationSecretsMappingFields.tsx
@@ -6,14 +6,14 @@ import { SecretRotation, useSecretRotationV2Option } from "@app/hooks/api/secret
import { SecretsMappingTable } from "./shared";
-export const SshPasswordRotationSecretsMappingFields = () => {
+export const UnixLinuxLocalAccountRotationSecretsMappingFields = () => {
const { control } = useFormContext<
TSecretRotationV2Form & {
- type: SecretRotation.SshPassword;
+ type: SecretRotation.UnixLinuxLocalAccount;
}
>();
- const { rotationOption } = useSecretRotationV2Option(SecretRotation.SshPassword);
+ const { rotationOption } = useSecretRotationV2Option(SecretRotation.UnixLinuxLocalAccount);
const items = [
{
diff --git a/frontend/src/components/secret-rotations-v2/forms/schemas/index.ts b/frontend/src/components/secret-rotations-v2/forms/schemas/index.ts
index 9b29e85c22..d7edf85bb5 100644
--- a/frontend/src/components/secret-rotations-v2/forms/schemas/index.ts
+++ b/frontend/src/components/secret-rotations-v2/forms/schemas/index.ts
@@ -11,12 +11,12 @@ import { MySqlCredentialsRotationSchema } from "@app/components/secret-rotations
import { PostgresCredentialsRotationSchema } from "@app/components/secret-rotations-v2/forms/schemas/postgres-credentials-rotation-schema";
import { SecretRotation } from "@app/hooks/api/secretRotationsV2";
import { LdapPasswordRotationMethod } from "@app/hooks/api/secretRotationsV2/types/ldap-password-rotation";
-import { SshPasswordRotationMethod } from "@app/hooks/api/secretRotationsV2/types/ssh-password-rotation";
+import { UnixLinuxLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";
import { OktaClientSecretRotationSchema } from "./okta-client-secret-rotation-schema";
import { OracleDBCredentialsRotationSchema } from "./oracledb-credentials-rotation-schema";
import { RedisCredentialsRotationSchema } from "./redis-credentials-rotation-schema";
-import { SshPasswordRotationSchema } from "./ssh-password-rotation-schema";
+import { UnixLinuxLocalAccountRotationSchema } from "./unix-linux-local-account-rotation-schema";
export const SecretRotationV2FormSchema = (isUpdate: boolean) =>
z
@@ -34,7 +34,7 @@ export const SecretRotationV2FormSchema = (isUpdate: boolean) =>
RedisCredentialsRotationSchema,
MongoDBCredentialsRotationSchema,
DatabricksServicePrincipalSecretRotationSchema,
- SshPasswordRotationSchema
+ UnixLinuxLocalAccountRotationSchema
]),
z.object({ id: z.string().optional() })
)
@@ -55,9 +55,9 @@ export const SecretRotationV2FormSchema = (isUpdate: boolean) =>
}
}
- if (val.type === SecretRotation.SshPassword) {
+ if (val.type === SecretRotation.UnixLinuxLocalAccount) {
if (
- val.parameters.rotationMethod === SshPasswordRotationMethod.LoginAsTarget &&
+ val.parameters.rotationMethod === UnixLinuxLocalAccountRotationMethod.LoginAsTarget &&
!val.temporaryParameters?.password
) {
ctx.addIssue({
diff --git a/frontend/src/components/secret-rotations-v2/forms/schemas/ssh-password-rotation-schema.ts b/frontend/src/components/secret-rotations-v2/forms/schemas/unix-linux-local-account-rotation-schema.ts
similarity index 71%
rename from frontend/src/components/secret-rotations-v2/forms/schemas/ssh-password-rotation-schema.ts
rename to frontend/src/components/secret-rotations-v2/forms/schemas/unix-linux-local-account-rotation-schema.ts
index 011595b9cc..99baa796e5 100644
--- a/frontend/src/components/secret-rotations-v2/forms/schemas/ssh-password-rotation-schema.ts
+++ b/frontend/src/components/secret-rotations-v2/forms/schemas/unix-linux-local-account-rotation-schema.ts
@@ -3,15 +3,15 @@ import { z } from "zod";
import { BaseSecretRotationSchema } from "@app/components/secret-rotations-v2/forms/schemas/base-secret-rotation-v2-schema";
import { PasswordRequirementsSchema } from "@app/components/secret-rotations-v2/forms/schemas/shared";
import { SecretRotation } from "@app/hooks/api/secretRotationsV2";
-import { SshPasswordRotationMethod } from "@app/hooks/api/secretRotationsV2/types/ssh-password-rotation";
+import { UnixLinuxLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";
-export const SshPasswordRotationSchema = z
+export const UnixLinuxLocalAccountRotationSchema = z
.object({
- type: z.literal(SecretRotation.SshPassword),
+ type: z.literal(SecretRotation.UnixLinuxLocalAccount),
parameters: z.object({
username: z.string().trim().min(1, "Username required"),
passwordRequirements: PasswordRequirementsSchema.optional(),
- rotationMethod: z.nativeEnum(SshPasswordRotationMethod).optional()
+ rotationMethod: z.nativeEnum(UnixLinuxLocalAccountRotationMethod).optional()
}),
secretsMapping: z.object({
username: z.string().trim().min(1, "Username required"),
diff --git a/frontend/src/helpers/secretRotationsV2.ts b/frontend/src/helpers/secretRotationsV2.ts
index 9a2f9dfea5..5b298b7596 100644
--- a/frontend/src/helpers/secretRotationsV2.ts
+++ b/frontend/src/helpers/secretRotationsV2.ts
@@ -65,8 +65,8 @@ export const SECRET_ROTATION_MAP: Record<
image: "Databricks.png",
size: 50
},
- [SecretRotation.SshPassword]: {
- name: "SSH Password",
+ [SecretRotation.UnixLinuxLocalAccount]: {
+ name: "Unix/Linux Local Account",
image: "SSH.png",
size: 50
}
@@ -85,7 +85,7 @@ export const SECRET_ROTATION_CONNECTION_MAP: Record<SecretRotation, AppConnectio
[SecretRotation.RedisCredentials]: AppConnection.Redis,
[SecretRotation.MongoDBCredentials]: AppConnection.MongoDB,
[SecretRotation.DatabricksServicePrincipalSecret]: AppConnection.Databricks,
- [SecretRotation.SshPassword]: AppConnection.SSH
+ [SecretRotation.UnixLinuxLocalAccount]: AppConnection.SSH
};
// if a rotation can potentially have downtime due to rotating a single credential set this to false
@@ -102,7 +102,7 @@ export const IS_ROTATION_DUAL_CREDENTIALS: Record<SecretRotation, boolean> = {
[SecretRotation.RedisCredentials]: true,
[SecretRotation.MongoDBCredentials]: true,
[SecretRotation.DatabricksServicePrincipalSecret]: true,
- [SecretRotation.SshPassword]: false
+ [SecretRotation.UnixLinuxLocalAccount]: false
};
export const getRotateAtLocal = ({ hours, minutes }: TSecretRotationV2["rotateAtUtc"]) => {
diff --git a/frontend/src/hooks/api/secretRotationsV2/enums.ts b/frontend/src/hooks/api/secretRotationsV2/enums.ts
index 2ce43eb68d..df26b40992 100644
--- a/frontend/src/hooks/api/secretRotationsV2/enums.ts
+++ b/frontend/src/hooks/api/secretRotationsV2/enums.ts
@@ -11,7 +11,7 @@ export enum SecretRotation {
RedisCredentials = "redis-credentials",
MongoDBCredentials = "mongodb-credentials",
DatabricksServicePrincipalSecret = "databricks-service-principal-secret",
- SshPassword = "ssh-password"
+ UnixLinuxLocalAccount = "unix-linux-local-account"
}
export enum SecretRotationStatus {
diff --git a/frontend/src/hooks/api/secretRotationsV2/mutations.tsx b/frontend/src/hooks/api/secretRotationsV2/mutations.tsx
index fab75dba59..c02574b975 100644
--- a/frontend/src/hooks/api/secretRotationsV2/mutations.tsx
+++ b/frontend/src/hooks/api/secretRotationsV2/mutations.tsx
@@ -6,8 +6,8 @@ import { SecretRotation } from "@app/hooks/api/secretRotationsV2/enums";
import {
TCreateSecretRotationV2DTO,
TDeleteSecretRotationV2DTO,
- TReconcileSshPasswordRotationDTO,
- TReconcileSshPasswordRotationResponse,
+ TReconcileUnixLinuxLocalAccountRotationDTO,
+ TReconcileUnixLinuxLocalAccountRotationResponse,
TRotateSecretRotationV2DTO,
TSecretRotationV2Response,
TUpdateSecretRotationV2DTO
@@ -93,12 +93,12 @@ export const useDeleteSecretRotationV2 = () => {
});
};
-export const useReconcileSshPasswordRotation = () => {
+export const useReconcileUnixLinuxLocalAccountRotation = () => {
const queryClient = useQueryClient();
return useMutation({
- mutationFn: async ({ rotationId }: TReconcileSshPasswordRotationDTO) => {
- const { data } = await apiRequest.post<TReconcileSshPasswordRotationResponse>(
- `/api/v2/secret-rotations/${SecretRotation.SshPassword}/${rotationId}/reconcile`
+ mutationFn: async ({ rotationId }: TReconcileUnixLinuxLocalAccountRotationDTO) => {
+ const { data } = await apiRequest.post<TReconcileUnixLinuxLocalAccountRotationResponse>(
+ `/api/v2/secret-rotations/${SecretRotation.UnixLinuxLocalAccount}/${rotationId}/reconcile`
);
return data;
diff --git a/frontend/src/hooks/api/secretRotationsV2/types/index.ts b/frontend/src/hooks/api/secretRotationsV2/types/index.ts
index 4ba83397ab..4b91324551 100644
--- a/frontend/src/hooks/api/secretRotationsV2/types/index.ts
+++ b/frontend/src/hooks/api/secretRotationsV2/types/index.ts
@@ -60,10 +60,10 @@ import {
TRedisCredentialsRotationOption
} from "./redis-credentials-rotation";
import {
- TSshPasswordRotation,
- TSshPasswordRotationGeneratedCredentialsResponse,
- TSshPasswordRotationOption
-} from "./ssh-password-rotation";
+ TUnixLinuxLocalAccountRotation,
+ TUnixLinuxLocalAccountRotationGeneratedCredentialsResponse,
+ TUnixLinuxLocalAccountRotationOption
+} from "./unix-linux-local-account-rotation";
export type TSecretRotationV2 = (
| TPostgresCredentialsRotation
@@ -78,7 +78,7 @@ export type TSecretRotationV2 = (
| TRedisCredentialsRotation
| TMongoDBCredentialsRotation
| TDatabricksServicePrincipalSecretRotation
- | TSshPasswordRotation
+ | TUnixLinuxLocalAccountRotation
) & {
secrets: (SecretV3RawSanitized | null)[];
};
@@ -93,7 +93,7 @@ export type TSecretRotationV2Option =
| TRedisCredentialsRotationOption
| TMongoDBCredentialsRotationOption
| TDatabricksServicePrincipalSecretRotationOption
- | TSshPasswordRotationOption;
+ | TUnixLinuxLocalAccountRotationOption;
export type TListSecretRotationV2Options = { secretRotationOptions: TSecretRotationV2Option[] };
@@ -112,7 +112,7 @@ export type TViewSecretRotationGeneratedCredentialsResponse =
| TRedisCredentialsRotationGeneratedCredentialsResponse
| TMongoDBCredentialsRotationGeneratedCredentialsResponse
| TDatabricksServicePrincipalSecretRotationGeneratedCredentialsResponse
- | TSshPasswordRotationGeneratedCredentialsResponse;
+ | TUnixLinuxLocalAccountRotationGeneratedCredentialsResponse;
export type TCreateSecretRotationV2DTO = DiscriminativePick<
TSecretRotationV2,
@@ -168,7 +168,7 @@ export type TSecretRotationOptionMap = {
[SecretRotation.RedisCredentials]: TRedisCredentialsRotationOption;
[SecretRotation.MongoDBCredentials]: TMongoDBCredentialsRotationOption;
[SecretRotation.DatabricksServicePrincipalSecret]: TDatabricksServicePrincipalSecretRotationOption;
- [SecretRotation.SshPassword]: TSshPasswordRotationOption;
+ [SecretRotation.UnixLinuxLocalAccount]: TUnixLinuxLocalAccountRotationOption;
};
export type TSecretRotationGeneratedCredentialsResponseMap = {
@@ -184,18 +184,18 @@ export type TSecretRotationGeneratedCredentialsResponseMap = {
[SecretRotation.RedisCredentials]: TRedisCredentialsRotationGeneratedCredentialsResponse;
[SecretRotation.MongoDBCredentials]: TMongoDBCredentialsRotationGeneratedCredentialsResponse;
[SecretRotation.DatabricksServicePrincipalSecret]: TDatabricksServicePrincipalSecretRotationGeneratedCredentialsResponse;
- [SecretRotation.SshPassword]: TSshPasswordRotationGeneratedCredentialsResponse;
+ [SecretRotation.UnixLinuxLocalAccount]: TUnixLinuxLocalAccountRotationGeneratedCredentialsResponse;
};
-export type TReconcileSshPasswordRotationDTO = {
+export type TReconcileUnixLinuxLocalAccountRotationDTO = {
rotationId: string;
// required for query invalidation
secretPath: string;
projectId: string;
};
-export type TReconcileSshPasswordRotationResponse = {
+export type TReconcileUnixLinuxLocalAccountRotationResponse = {
message: string;
reconciled: boolean;
- secretRotation: TSshPasswordRotation;
+ secretRotation: TUnixLinuxLocalAccountRotation;
};
diff --git a/frontend/src/hooks/api/secretRotationsV2/types/ssh-password-rotation.ts b/frontend/src/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation.ts
similarity index 55%
rename from frontend/src/hooks/api/secretRotationsV2/types/ssh-password-rotation.ts
rename to frontend/src/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation.ts
index b06157f67d..927b4c750b 100644
--- a/frontend/src/hooks/api/secretRotationsV2/types/ssh-password-rotation.ts
+++ b/frontend/src/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation.ts
@@ -6,16 +6,16 @@ import {
TSecretRotationV2GeneratedCredentialsResponseBase
} from "@app/hooks/api/secretRotationsV2/types/shared";
-export enum SshPasswordRotationMethod {
+export enum UnixLinuxLocalAccountRotationMethod {
LoginAsTarget = "login-as-target",
LoginAsRoot = "login-as-root"
}
-export type TSshPasswordRotation = TSecretRotationV2Base & {
- type: SecretRotation.SshPassword;
+export type TUnixLinuxLocalAccountRotation = TSecretRotationV2Base & {
+ type: SecretRotation.UnixLinuxLocalAccount;
parameters: {
username: string;
- rotationMethod?: SshPasswordRotationMethod;
+ rotationMethod?: UnixLinuxLocalAccountRotationMethod;
passwordRequirements?: TPasswordRequirements;
};
secretsMapping: {
@@ -24,22 +24,22 @@ export type TSshPasswordRotation = TSecretRotationV2Base & {
};
};
-export type TSshPasswordRotationGeneratedCredentials = {
+export type TUnixLinuxLocalAccountRotationGeneratedCredentials = {
username: string;
password: string;
};
-export type TSshPasswordRotationGeneratedCredentialsResponse =
+export type TUnixLinuxLocalAccountRotationGeneratedCredentialsResponse =
TSecretRotationV2GeneratedCredentialsResponseBase<
- SecretRotation.SshPassword,
- TSshPasswordRotationGeneratedCredentials
+ SecretRotation.UnixLinuxLocalAccount,
+ TUnixLinuxLocalAccountRotationGeneratedCredentials
>;
-export type TSshPasswordRotationOption = {
+export type TUnixLinuxLocalAccountRotationOption = {
name: string;
- type: SecretRotation.SshPassword;
+ type: SecretRotation.UnixLinuxLocalAccount;
connection: AppConnection.SSH;
template: {
- secretsMapping: TSshPasswordRotation["secretsMapping"];
+ secretsMapping: TUnixLinuxLocalAccountRotation["secretsMapping"];
};
};
diff --git a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
index 41ca79bef8..ed48611870 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/OverviewPage.tsx
@@ -31,7 +31,7 @@ import { ProjectPermissionCan } from "@app/components/permissions";
import { CreateSecretRotationV2Modal } from "@app/components/secret-rotations-v2";
import { DeleteSecretRotationV2Modal } from "@app/components/secret-rotations-v2/DeleteSecretRotationV2Modal";
import { EditSecretRotationV2Modal } from "@app/components/secret-rotations-v2/EditSecretRotationV2Modal";
-import { ReconcileSshPasswordRotationModal } from "@app/components/secret-rotations-v2/ReconcileSshPasswordRotationModal";
+import { ReconcileUnixLinuxLocalAccountRotationModal } from "@app/components/secret-rotations-v2/ReconcileUnixLinuxLocalAccountRotationModal";
import { RotateSecretRotationV2Modal } from "@app/components/secret-rotations-v2/RotateSecretRotationV2Modal";
import { ViewSecretRotationV2GeneratedCredentialsModal } from "@app/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials";
import {
@@ -1727,11 +1727,11 @@ export const OverviewPage = () => {
secretRotation={popUp.rotateSecretRotation.data as TSecretRotationV2}
onOpenChange={(isOpen) => handlePopUpToggle("rotateSecretRotation", isOpen)}
/>
- <ReconcileSshPasswordRotationModal
+ <ReconcileUnixLinuxLocalAccountRotationModal
isOpen={
popUp.reconcileSecretRotation.isOpen &&
(popUp.reconcileSecretRotation.data as TSecretRotationV2)?.type ===
- SecretRotationV2.SshPassword
+ SecretRotationV2.UnixLinuxLocalAccount
}
secretRotation={popUp.reconcileSecretRotation.data as TSecretRotationV2}
onOpenChange={(isOpen) => handlePopUpToggle("reconcileSecretRotation", isOpen)}
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx
index fdfba0e6f1..a29a9a6931 100644
--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx
+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretOverviewSecretRotationRow/SecretOverviewSecretRotationRow.tsx
@@ -30,7 +30,7 @@ import {
SecretRotationStatus,
TSecretRotationV2
} from "@app/hooks/api/secretRotationsV2";
-import { SshPasswordRotationMethod } from "@app/hooks/api/secretRotationsV2/types/ssh-password-rotation";
+import { UnixLinuxLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";
import { getExpandedRowStyle } from "@app/pages/secret-manager/OverviewPage/components/utils";
import { SecretOverviewRotationSecretRow } from "./SecretOverviewRotationSecretRow";
@@ -211,9 +211,9 @@ export const SecretOverviewSecretRotationRow = ({
</IconButton>
)}
</ProjectPermissionCan>
- {secretRotation.type === SecretRotation.SshPassword &&
+ {secretRotation.type === SecretRotation.UnixLinuxLocalAccount &&
secretRotation.parameters.rotationMethod ===
- SshPasswordRotationMethod.LoginAsTarget && (
+ UnixLinuxLocalAccountRotationMethod.LoginAsTarget && (
<ProjectPermissionCan
I={ProjectPermissionSecretRotationActions.RotateSecrets}
a={subject(ProjectPermissionSub.SecretRotation, {
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx
index 6517d16ee0..5a0efa061d 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationItem.tsx
@@ -21,7 +21,7 @@ import { ProjectPermissionSecretRotationActions } from "@app/context/ProjectPerm
import { SECRET_ROTATION_MAP } from "@app/helpers/secretRotationsV2";
import { UsedBySecretSyncs } from "@app/hooks/api/dashboard/types";
import { SecretRotation, TSecretRotationV2 } from "@app/hooks/api/secretRotationsV2";
-import { SshPasswordRotationMethod } from "@app/hooks/api/secretRotationsV2/types/ssh-password-rotation";
+import { UnixLinuxLocalAccountRotationMethod } from "@app/hooks/api/secretRotationsV2/types/unix-linux-local-account-rotation";
import { SecretV3RawSanitized, WsTag } from "@app/hooks/api/types";
import { SecretListView } from "../SecretListView";
@@ -184,9 +184,9 @@ export const SecretRotationItem = ({
</IconButton>
)}
</ProjectPermissionCan>
- {secretRotation.type === SecretRotation.SshPassword &&
+ {secretRotation.type === SecretRotation.UnixLinuxLocalAccount &&
secretRotation.parameters.rotationMethod ===
- SshPasswordRotationMethod.LoginAsTarget && (
+ UnixLinuxLocalAccountRotationMethod.LoginAsTarget && (
<ProjectPermissionCan
I={ProjectPermissionSecretRotationActions.RotateSecrets}
a={subject(ProjectPermissionSub.SecretRotation, {
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationListView.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationListView.tsx
index c2218a328e..3d05365efd 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationListView.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretRotationListView/SecretRotationListView.tsx
@@ -1,6 +1,6 @@
import { DeleteSecretRotationV2Modal } from "@app/components/secret-rotations-v2/DeleteSecretRotationV2Modal";
import { EditSecretRotationV2Modal } from "@app/components/secret-rotations-v2/EditSecretRotationV2Modal";
-import { ReconcileSshPasswordRotationModal } from "@app/components/secret-rotations-v2/ReconcileSshPasswordRotationModal";
+import { ReconcileUnixLinuxLocalAccountRotationModal } from "@app/components/secret-rotations-v2/ReconcileUnixLinuxLocalAccountRotationModal";
import { RotateSecretRotationV2Modal } from "@app/components/secret-rotations-v2/RotateSecretRotationV2Modal";
import { ViewSecretRotationV2GeneratedCredentialsModal } from "@app/components/secret-rotations-v2/ViewSecretRotationV2GeneratedCredentials";
import { usePopUp } from "@app/hooks";
@@ -83,11 +83,11 @@ export const SecretRotationListView = ({
secretRotation={popUp.rotateSecretRotation.data as TSecretRotationV2}
onOpenChange={(isOpen) => handlePopUpToggle("rotateSecretRotation", isOpen)}
/>
- <ReconcileSshPasswordRotationModal
+ <ReconcileUnixLinuxLocalAccountRotationModal
isOpen={
popUp.reconcileSecretRotation.isOpen &&
(popUp.reconcileSecretRotation.data as TSecretRotationV2)?.type ===
- SecretRotation.SshPassword
+ SecretRotation.UnixLinuxLocalAccount
}
secretRotation={popUp.reconcileSecretRotation.data as TSecretRotationV2}
onOpenChange={(isOpen) => handlePopUpToggle("reconcileSecretRotation", isOpen)}