Skip to content

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

Merge remote-tracking branch 'origin/main' into feat/add-mi-to-pam-access

Sheen Capadnganbf775a12512b
diff --cc frontend/src/pages/pam/PamAccessControlPage/components/AddIdentityModal.tsx
index ef5aa25791,f0e6b8b615..c01734e47f
--- a/frontend/src/pages/pam/PamAccessControlPage/components/AddIdentityModal.tsx
+++ b/frontend/src/pages/pam/PamAccessControlPage/components/AddIdentityModal.tsx
@@@ -142,65 -79,16 +142,65 @@@ export const AddIdentityModal = ({ isOp
);
};
+ const handleSubmit = () => {
+ if (mode === AddIdentityMode.Create) {
+ handleCreate();
+ } else {
+ handleAssign();
+ }
+ };
+
+ const isSubmitDisabled = mode === AddIdentityMode.Create ? !name.trim() : !selectedIdentity;
+
return (
<Dialog open={isOpen} onOpenChange={onOpenChange}>
- <DialogContent className="overflow-visible sm:max-w-xl">
+ <DialogContent className="sm:max-w-xl">
<DialogHeader>
- <DialogTitle>Add Identity</DialogTitle>
- <DialogDescription>Add an existing organization identity.</DialogDescription>
+ <DialogTitle>Add Machine Identity</DialogTitle>
+ <DialogDescription>
+ Create a new machine identity or assign an existing organization identity.
+ </DialogDescription>
</DialogHeader>
- {availableIdentities.length ? (
- <div className="flex flex-col gap-5">
+ <div className="flex flex-col gap-5">
+ <div className="flex flex-col gap-2">
+ <Tabs
+ className="w-full"
+ value={mode}
+ onValueChange={(next) => {
+ setMode(next as AddIdentityMode);
+ if (next === AddIdentityMode.Create) {
+ setSelectedIdentity(null);
+ } else {
+ setName("");
+ }
+ }}
+ >
+ <TabsList className="w-full">
+ <TabsTrigger value={AddIdentityMode.Create}>Create New</TabsTrigger>
+ <TabsTrigger value={AddIdentityMode.Assign}>Assign Existing</TabsTrigger>
+ </TabsList>
+ </Tabs>
+ <p className="text-sm text-muted">
+ {mode === AddIdentityMode.Create
+ ? "Create a dedicated machine identity managed at the PAM level."
+ : "Reuse an existing machine identity from your organization."}
+ </p>
+ </div>
+
+ {mode === AddIdentityMode.Create ? (
+ <Field>
+ <FieldLabel>
+ Name <span className="text-product-pam">*</span>
+ </FieldLabel>
+ <Input
+ value={name}
+ onChange={(e) => setName(e.target.value)}
+ autoFocus
+ placeholder="Machine 1"
+ />
+ </Field>
+ ) : (
<Field>
<FieldLabel>
Identity <span className="text-product-pam">*</span>
diff --cc frontend/src/pages/project/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
index e89f523a68,c5bdac29e5..3bd8619613
--- a/frontend/src/pages/project/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
+++ b/frontend/src/pages/project/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
@@@ -205,7 -179,21 +206,21 @@@ const Page = () =>
title={identityMembershipDetails.identity.name}
>
<div className="flex items-center gap-2">
+ {isProjectIdentity ? (
+ <ProjectIdentityAlertAction
+ identityId={identityMembershipDetails.identity.id}
+ identityName={identityMembershipDetails.identity.name}
+ projectId={currentProject.id}
+ projectName={currentProject.name}
+ />
+ ) : (
+ <ProjectIdentityAlertAction
+ identityId={identityMembershipDetails.identity.id}
+ identityName={identityMembershipDetails.identity.name}
+ readOnly
+ />
+ )}
- {!isCertManager && (
+ {!isStandaloneProduct && (
<Button variant="outline" onClick={() => setIsPermissionAuditOpen(true)}>
<ShieldIcon />
Permission Audit