Skip to content

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

Add groups to ssh hosts allowed principals fix delete principal row issue

carlosmonastyrski3ea450e94a1f
diff --git a/frontend/src/pages/ssh/SshHostsPage/components/SshHostModal.tsx b/frontend/src/pages/ssh/SshHostsPage/components/SshHostModal.tsx
index 63f837606c..570633ce13 100644
--- a/frontend/src/pages/ssh/SshHostsPage/components/SshHostModal.tsx
+++ b/frontend/src/pages/ssh/SshHostsPage/components/SshHostModal.tsx
@@ -412,7 +412,7 @@ export const SshHostModal = ({ popUp, handlePopUpToggle }: Props) => {
<div className="flex flex-col space-y-2">
{value.map((principal, principalIndex) => (
<div
- key={`${metadataFieldId}-principal-${principalIndex + 1}`}
+ key={`principal-${i + 1}-${principalIndex + 1}-${principal.type}`}
className="flex items-center space-x-2"
>
<div className="mr-2">
@@ -482,7 +482,7 @@ export const SshHostModal = ({ popUp, handlePopUpToggle }: Props) => {
const newPrincipals = value.filter(
(_, idx) => idx !== principalIndex
);
- onChange(newPrincipals);
+ onChange([...newPrincipals]);
}}
>
<FontAwesomeIcon icon={faTrash} />