Skip to content

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

feat(frontend): update org identity membership page ui

Scott Wilsonbc2bb5ab70cf
diff --git a/frontend/src/components/v2/PageHeader/PageHeader.tsx b/frontend/src/components/v2/PageHeader/PageHeader.tsx
index 0c2a671761..b299e08259 100644
--- a/frontend/src/components/v2/PageHeader/PageHeader.tsx
+++ b/frontend/src/components/v2/PageHeader/PageHeader.tsx
@@ -28,12 +28,12 @@ const SCOPE_BADGE: Record<NonNullable<Props["scope"]>, { icon: LucideIcon; class
};
export const PageHeader = ({ title, description, children, className, scope }: Props) => (
- <div className={twMerge("mb-10 w-full", className)}>
+ <div className={twMerge("mb-10 w-full border-b border-border pb-8", className)}>
<div className="flex w-full justify-between">
<div className="mr-4 flex min-w-0 flex-1 items-center">
<h1
className={twMerge(
- "truncate text-2xl font-medium text-white underline decoration-2 underline-offset-4",
+ "truncate text-2xl font-medium text-white underline underline-offset-4",
scope === "org" && "decoration-org/90",
scope === "instance" && "decoration-neutral/90",
scope === "namespace" && "decoration-sub-org/90",
diff --git a/frontend/src/components/v3/generic/Accordion/Accordion.tsx b/frontend/src/components/v3/generic/Accordion/Accordion.tsx
index c952b6d29f..15f9cb4028 100644
--- a/frontend/src/components/v3/generic/Accordion/Accordion.tsx
+++ b/frontend/src/components/v3/generic/Accordion/Accordion.tsx
@@ -10,7 +10,7 @@ function UnstableAccordion({ ...props }: React.ComponentProps<typeof AccordionPr
return (
<AccordionPrimitive.Root
data-slot="accordion"
- className="overflow-clip rounded-md border border-border bg-container"
+ className="overflow-clip rounded-md border border-border bg-container text-foreground"
{...props}
/>
);
diff --git a/frontend/src/components/v3/generic/Alert/Alert.tsx b/frontend/src/components/v3/generic/Alert/Alert.tsx
index af5fd7a498..09c0d6a911 100644
--- a/frontend/src/components/v3/generic/Alert/Alert.tsx
+++ b/frontend/src/components/v3/generic/Alert/Alert.tsx
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from "cva";
import { cn } from "../../utils";
const alertVariants = cva(
- "relative w-full border px-4 rounded-md py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
+ "relative w-full rounded-md border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
{
variants: {
variant: {
diff --git a/frontend/src/components/v3/generic/Table/Table.tsx b/frontend/src/components/v3/generic/Table/Table.tsx
index 4f006a5bc1..9ff6c4e063 100644
--- a/frontend/src/components/v3/generic/Table/Table.tsx
+++ b/frontend/src/components/v3/generic/Table/Table.tsx
@@ -51,6 +51,7 @@ function UnstableTableRow({ className, ...props }: React.ComponentProps<"tr">) {
data-slot="table-row"
className={cn(
"border-b border-border transition-colors hover:bg-foreground/5 data-[state=selected]:bg-foreground/5",
+ props.onClick && "cursor-pointer",
className
)}
{...props}
diff --git a/frontend/src/context/ProjectPermissionContext/index.tsx b/frontend/src/context/ProjectPermissionContext/index.tsx
index 08d3600f6b..eda8685193 100644
--- a/frontend/src/context/ProjectPermissionContext/index.tsx
+++ b/frontend/src/context/ProjectPermissionContext/index.tsx
@@ -11,11 +11,11 @@ export {
ProjectPermissionGroupActions,
ProjectPermissionIdentityActions,
ProjectPermissionKmipActions,
+ ProjectPermissionMcpEndpointActions,
ProjectPermissionMemberActions,
ProjectPermissionPkiSubscriberActions,
ProjectPermissionPkiSyncActions,
ProjectPermissionPkiTemplateActions,
ProjectPermissionSshHostActions,
- ProjectPermissionMcpEndpointActions,
ProjectPermissionSub
} from "./types";
diff --git a/frontend/src/context/index.tsx b/frontend/src/context/index.tsx
index 17c846ab97..99e621298a 100644
--- a/frontend/src/context/index.tsx
+++ b/frontend/src/context/index.tsx
@@ -22,12 +22,12 @@ export {
ProjectPermissionGroupActions,
ProjectPermissionIdentityActions,
ProjectPermissionKmipActions,
+ ProjectPermissionMcpEndpointActions,
ProjectPermissionMemberActions,
ProjectPermissionPkiSubscriberActions,
ProjectPermissionPkiSyncActions,
ProjectPermissionPkiTemplateActions,
ProjectPermissionSshHostActions,
- ProjectPermissionMcpEndpointActions,
ProjectPermissionSub,
useProjectPermission
} from "./ProjectPermissionContext";
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
index f1533dacb1..b74d0300df 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/IdentityDetailsByIDPage.tsx
@@ -1,13 +1,28 @@
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
-import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Link, useNavigate, useParams } from "@tanstack/react-router";
+import { ChevronLeftIcon, EllipsisIcon } from "lucide-react";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
-import { Button, DeleteActionModal, Modal, ModalContent, PageHeader } from "@app/components/v2";
+import { DeleteActionModal, Modal, ModalContent, PageHeader } from "@app/components/v2";
+import {
+ OrgIcon,
+ UnstableAlert,
+ UnstableAlertDescription,
+ UnstableAlertTitle,
+ UnstableButton,
+ UnstableCard,
+ UnstableCardContent,
+ UnstableCardDescription,
+ UnstableCardHeader,
+ UnstableCardTitle,
+ UnstableDropdownMenu,
+ UnstableDropdownMenuContent,
+ UnstableDropdownMenuItem,
+ UnstableDropdownMenuTrigger
+} from "@app/components/v3";
import { ROUTE_PATHS } from "@app/const/routes";
import {
OrgPermissionActions,
@@ -36,7 +51,7 @@ const Page = () => {
const { currentOrg, isSubOrganization } = useOrganization();
const orgId = currentOrg?.id || "";
const { data } = useGetOrgIdentityMembershipById(identityId);
- const { mutateAsync: deleteIdentity, isPending: isDeletingIdentity } = useDeleteOrgIdentity();
+ const { mutateAsync: deleteIdentity } = useDeleteOrgIdentity();
const isAuthHidden = orgId !== data?.identity?.orgId;
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
@@ -68,41 +83,55 @@ const Page = () => {
});
};
+ const isScopeIdentity = data?.identity.orgId === currentOrg.id;
+
return (
- <div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
+ <div className="mx-auto flex max-w-8xl flex-col">
{data && (
- <div className="mx-auto w-full max-w-8xl">
+ <>
<Link
to="/organizations/$orgId/access-management"
params={{ orgId }}
search={{
selectedTab: OrgAccessControlTabSections.Identities
}}
- className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
+ className="mb-4 flex w-fit items-center gap-x-1 text-sm text-mineshaft-400 transition duration-100 hover:text-mineshaft-400/80"
>
- <FontAwesomeIcon icon={faChevronLeft} />
- Organization Machine Identities
+ <ChevronLeftIcon size={16} />
+ {isSubOrganization ? "Sub-" : ""}Organization Machine Identities
</Link>
<PageHeader
scope={isSubOrganization ? "namespace" : "org"}
- description={`${isSubOrganization ? "Sub-" : ""}Organization Machine Identity`}
+ description={`Configure and manage${isScopeIdentity ? " machine identity and " : " "}${isSubOrganization ? "sub-" : ""}organization access control`}
title={data.identity.name}
>
- <div className="flex items-center gap-2">
- {isSubOrganization && data.identity.orgId !== currentOrg.id && (
+ <UnstableDropdownMenu>
+ <UnstableDropdownMenuTrigger asChild>
+ <UnstableButton variant="outline">
+ Options
+ <EllipsisIcon />
+ </UnstableButton>
+ </UnstableDropdownMenuTrigger>
+ <UnstableDropdownMenuContent align="end">
+ <UnstableDropdownMenuItem
+ onClick={() => {
+ navigator.clipboard.writeText(data.identity.id);
+ createNotification({
+ text: "Machine identity ID copied to clipboard",
+ type: "info"
+ });
+ }}
+ >
+ Copy Machine Identity ID
+ </UnstableDropdownMenuItem>
<OrgPermissionCan
I={OrgPermissionActions.Delete}
a={OrgPermissionSubjects.Identity}
- renderTooltip
- allowedLabel="Remove from sub-organization"
>
{(isAllowed) => (
- <Button
- colorSchema="danger"
- variant="outline_bg"
- size="xs"
+ <UnstableDropdownMenuItem
+ variant="danger"
isDisabled={!isAllowed}
- isLoading={isDeletingIdentity}
onClick={() =>
handlePopUpOpen("deleteIdentity", {
identityId: data.identity.id,
@@ -110,23 +139,64 @@ const Page = () => {
})
}
>
- Unlink Machine Identity
- </Button>
+ {isScopeIdentity ? "Delete Machine Identity" : "Remove From Sub-Organization"}
+ </UnstableDropdownMenuItem>
)}
</OrgPermissionCan>
- )}
- </div>
+ </UnstableDropdownMenuContent>
+ </UnstableDropdownMenu>
</PageHeader>
- <div className="flex flex-col gap-4 md:flex-row">
- <div className="w-full md:w-96">
- <IdentityDetailsSection
- isOrgIdentity={data.identity.orgId === currentOrg.id}
- identityId={identityId}
- handlePopUpOpen={handlePopUpOpen}
- />
- </div>
- <div className="flex flex-1 flex-col gap-y-4">
- {!isAuthHidden && (
+ <div className="flex flex-col gap-5 lg:flex-row">
+ <IdentityDetailsSection
+ isCurrentOrgIdentity={data.identity.orgId === currentOrg.id}
+ identityId={identityId}
+ handlePopUpOpen={handlePopUpOpen}
+ />
+ <div className="flex flex-1 flex-col gap-y-5">
+ {isAuthHidden ? (
+ <UnstableCard>
+ <UnstableCardHeader>
+ <UnstableCardTitle>Authentication</UnstableCardTitle>
+ <UnstableCardDescription>
+ Configure authentication methods
+ </UnstableCardDescription>
+ </UnstableCardHeader>
+ <UnstableCardContent>
+ <UnstableAlert variant="org">
+ <OrgIcon />
+ <UnstableAlertTitle>
+ Machine identity managed by organization
+ </UnstableAlertTitle>
+ <UnstableAlertDescription>
+ <p>
+ This machine identity&apos;s authentication methods are managed by your
+ organization. <br /> To make changes,{" "}
+ <OrgPermissionCan
+ I={OrgPermissionIdentityActions.Read}
+ an={OrgPermissionSubjects.Identity}
+ >
+ {(isAllowed) =>
+ isAllowed ? (
+ <Link
+ to="/organizations/$orgId/identities/$identityId"
+ className="inline-block cursor-pointer text-foreground underline underline-offset-2"
+ params={{
+ identityId,
+ orgId: data.identity.orgId
+ }}
+ >
+ go to organization access control
+ </Link>
+ ) : null
+ }
+ </OrgPermissionCan>
+ .
+ </p>
+ </UnstableAlertDescription>
+ </UnstableAlert>
+ </UnstableCardContent>
+ </UnstableCard>
+ ) : (
<IdentityAuthenticationSection
identityId={identityId}
handlePopUpOpen={handlePopUpOpen}
@@ -135,7 +205,7 @@ const Page = () => {
<IdentityProjectsSection identityId={identityId} />
</div>
</div>
- </div>
+ </>
)}
<Modal
isOpen={popUp?.identity?.isOpen}
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityAuthenticationSection.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityAuthenticationSection.tsx
index aeed2af506..1b71b15410 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityAuthenticationSection.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityAuthenticationSection/IdentityAuthenticationSection.tsx
@@ -1,9 +1,21 @@
-import { faPlus } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { PlusIcon } from "lucide-react";
import { OrgPermissionCan } from "@app/components/permissions";
-import { Button } from "@app/components/v2";
-import { OrgPermissionIdentityActions, OrgPermissionSubjects } from "@app/context";
+import {
+ UnstableButton,
+ UnstableCard,
+ UnstableCardAction,
+ UnstableCardContent,
+ UnstableCardDescription,
+ UnstableCardHeader,
+ UnstableCardTitle,
+ UnstableEmpty,
+ UnstableEmptyContent,
+ UnstableEmptyDescription,
+ UnstableEmptyHeader,
+ UnstableEmptyTitle
+} from "@app/components/v3";
+import { OrgPermissionIdentityActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import { IdentityAuthMethod, useGetOrgIdentityMembershipById } from "@app/hooks/api";
import { UsePopUpState } from "@app/hooks/usePopUp";
@@ -20,51 +32,92 @@ type Props = {
export const IdentityAuthenticationSection = ({ identityId, handlePopUpOpen }: Props) => {
const { data, refetch } = useGetOrgIdentityMembershipById(identityId);
+ const { isSubOrganization } = useOrganization();
+
+ const hasAuthMethods = Boolean(data?.identity.authMethods.length);
+
return data ? (
- <div className="rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="mb-4 flex items-center justify-between border-b border-mineshaft-400 pb-4">
- <h3 className="text-lg font-medium text-mineshaft-100">Authentication</h3>
- {!Object.values(IdentityAuthMethod).every((method) =>
- data.identity.authMethods.includes(method)
- ) && (
- <OrgPermissionCan
- I={OrgPermissionIdentityActions.Edit}
- a={OrgPermissionSubjects.Identity}
- >
- {(isAllowed) => (
- <Button
- isDisabled={!isAllowed}
- onClick={() => {
- handlePopUpOpen("identityAuthMethod", {
- identityId,
- name: data.identity.name,
- allAuthMethods: data.identity.authMethods
- });
- }}
- variant="outline_bg"
- leftIcon={<FontAwesomeIcon icon={faPlus} />}
+ <UnstableCard>
+ <UnstableCardHeader>
+ <UnstableCardTitle>Authentication</UnstableCardTitle>
+ <UnstableCardDescription>Configure authentication methods</UnstableCardDescription>
+ {hasAuthMethods &&
+ !Object.values(IdentityAuthMethod).every((method) =>
+ data.identity.authMethods.includes(method)
+ ) && (
+ <UnstableCardAction>
+ <OrgPermissionCan
+ I={OrgPermissionIdentityActions.Edit}
+ a={OrgPermissionSubjects.Identity}
+ >
+ {(isAllowed) => (
+ <UnstableButton
+ variant="outline"
+ isFullWidth
+ size="xs"
+ isDisabled={!isAllowed}
+ onClick={() => {
+ handlePopUpOpen("identityAuthMethod", {
+ identityId: data.identity.id,
+ name: data.identity.name,
+ allAuthMethods: data.identity.authMethods
+ });
+ }}
+ >
+ <PlusIcon />
+ Add Auth Method
+ </UnstableButton>
+ )}
+ </OrgPermissionCan>
+ </UnstableCardAction>
+ )}
+ </UnstableCardHeader>
+ <UnstableCardContent>
+ {data.identity.authMethods.length > 0 ? (
+ <ViewIdentityAuth
+ activeLockoutAuthMethods={data.identity.activeLockoutAuthMethods}
+ identityId={identityId}
+ authMethods={data.identity.authMethods}
+ onResetAllLockouts={refetch}
+ />
+ ) : (
+ <UnstableEmpty className="border">
+ <UnstableEmptyHeader>
+ <UnstableEmptyTitle>
+ This machine identity has no auth methods configured
+ </UnstableEmptyTitle>
+ <UnstableEmptyDescription>
+ Add an auth method to use this machine identity
+ </UnstableEmptyDescription>
+ </UnstableEmptyHeader>
+ <UnstableEmptyContent>
+ <OrgPermissionCan
+ I={OrgPermissionIdentityActions.Edit}
+ a={OrgPermissionSubjects.Identity}
>
- {data.identity.authMethods.length ? "Add" : "Create"} Auth Method
- </Button>
- )}
- </OrgPermissionCan>
+ {(isAllowed) => (
+ <UnstableButton
+ variant={isSubOrganization ? "sub-org" : "org"}
+ size="xs"
+ isDisabled={!isAllowed}
+ onClick={() => {
+ handlePopUpOpen("identityAuthMethod", {
+ identityId,
+ name: data.identity.name,
+ allAuthMethods: data.identity.authMethods
+ });
+ }}
+ >
+ <PlusIcon />
+ Add Auth Method
+ </UnstableButton>
+ )}
+ </OrgPermissionCan>
+ </UnstableEmptyContent>
+ </UnstableEmpty>
)}
- </div>
- {data.identity.authMethods.length > 0 ? (
- <ViewIdentityAuth
- activeLockoutAuthMethods={data.identity.activeLockoutAuthMethods}
- identityId={identityId}
- authMethods={data.identity.authMethods}
- onResetAllLockouts={refetch}
- />
- ) : (
- <div className="w-full space-y-2 pt-2">
- <p className="text-sm text-mineshaft-300">
- No authentication methods configured. Get started by creating a new auth method.
- </p>
- </div>
- )}
- </div>
+ </UnstableCardContent>
+ </UnstableCard>
) : (
<div />
);
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
index f9bbdce9db..71d15aeefd 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityDetailsSection.tsx
@@ -1,26 +1,25 @@
-import {
- faCheck,
- faChevronDown,
- faCopy,
- faEdit,
- faKey,
- faTrash
-} from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { format } from "date-fns";
-import { twMerge } from "tailwind-merge";
+import { BanIcon, CheckIcon, ClipboardListIcon, PencilIcon } from "lucide-react";
import { OrgPermissionCan } from "@app/components/permissions";
+import { Tooltip } from "@app/components/v2";
import {
- Button,
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuTrigger,
- IconButton,
- Tag,
- Tooltip
-} from "@app/components/v2";
+ Badge,
+ Detail,
+ DetailGroup,
+ DetailLabel,
+ DetailValue,
+ OrgIcon,
+ SubOrgIcon,
+ UnstableButtonGroup,
+ UnstableCard,
+ UnstableCardAction,
+ UnstableCardContent,
+ UnstableCardDescription,
+ UnstableCardHeader,
+ UnstableCardTitle,
+ UnstableIconButton
+} from "@app/components/v3";
import { OrgPermissionIdentityActions, OrgPermissionSubjects, useOrganization } from "@app/context";
import { useTimedReset } from "@app/hooks";
import { identityAuthToNameMap, useGetOrgIdentityMembershipById } from "@app/hooks/api";
@@ -28,187 +27,171 @@ import { UsePopUpState } from "@app/hooks/usePopUp";
type Props = {
identityId: string;
- isOrgIdentity?: boolean;
+ isCurrentOrgIdentity?: boolean;
handlePopUpOpen: (
popUpName: keyof UsePopUpState<["identity", "identityAuthMethod", "deleteIdentity"]>,
data?: object
) => void;
};
-export const IdentityDetailsSection = ({ identityId, handlePopUpOpen, isOrgIdentity }: Props) => {
- const [copyTextId, isCopyingId, setCopyTextId] = useTimedReset<string>({
+export const IdentityDetailsSection = ({
+ identityId,
+ handlePopUpOpen,
+ isCurrentOrgIdentity
+}: Props) => {
+ const [, isCopyingId, setCopyTextId] = useTimedReset<string>({
initialState: "Copy ID to clipboard"
});
const { isSubOrganization } = useOrganization();
const { data } = useGetOrgIdentityMembershipById(identityId);
+
return data ? (
- <div className="rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
- <h3 className="text-lg font-medium text-mineshaft-100">Details</h3>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button
- size="xs"
- rightIcon={
- <FontAwesomeIcon
- className="ml-1 transition-transform duration-200 group-data-[state=open]:rotate-180"
- icon={faChevronDown}
- />
- }
- colorSchema="secondary"
- className="group select-none"
- >
- Options
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent className="mt-3 min-w-[120px]" align="end">
- <OrgPermissionCan
- I={OrgPermissionIdentityActions.Edit}
- a={OrgPermissionSubjects.Identity}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- className={twMerge(
- !isAllowed && "pointer-events-none cursor-not-allowed opacity-50"
- )}
- icon={<FontAwesomeIcon icon={faEdit} />}
- onClick={async () => {
- handlePopUpOpen("identity", {
- identityId,
- name: data.identity.name,
- orgId: data.identity.orgId,
- hasDeleteProtection: data.identity.hasDeleteProtection,
- role: data.role,
- customRole: data.customRole,
- metadata: data.metadata
- });
- }}
- disabled={!isAllowed}
- >
- {isOrgIdentity ? "Edit Machine Identity" : "Edit Machine Identity Role"}
- </DropdownMenuItem>
- )}
- </OrgPermissionCan>
- <OrgPermissionCan
- I={OrgPermissionIdentityActions.Delete}
- a={OrgPermissionSubjects.Identity}
- >
- {(isAllowed) => (
- <DropdownMenuItem
- className={twMerge(
- isAllowed
- ? "hover:bg-red-500! hover:text-white!"
- : "pointer-events-none cursor-not-allowed opacity-50"
- )}
- onClick={async () => {
- handlePopUpOpen("deleteIdentity", {
- identityId,
- name: data.identity.name
- });
- }}
- icon={<FontAwesomeIcon icon={faTrash} />}
- disabled={!isAllowed}
- >
- {!isOrgIdentity ? "Remove From Sub-Organization" : "Delete Machine Identity"}
- </DropdownMenuItem>
- )}
- </OrgPermissionCan>
- </DropdownMenuContent>
- </DropdownMenu>
- </div>
- <div className="pt-4">
- <div className="mb-4">
- <p className="text-sm font-medium text-mineshaft-300">Machine Identity ID</p>
- <div className="group flex align-top">
- <p className="text-sm text-mineshaft-300">{data.identity.id}</p>
- <div className="opacity-0 transition-opacity duration-300 group-hover:opacity-100">
- <Tooltip content={copyTextId}>
- <IconButton
- ariaLabel="copy icon"
- variant="plain"
- className="group relative ml-2"
+ <UnstableCard className="w-full lg:max-w-[24rem]">
+ <UnstableCardHeader className="border-b">
+ <UnstableCardTitle>Details</UnstableCardTitle>
+ <UnstableCardDescription>Machine identity details</UnstableCardDescription>
+ <UnstableCardAction>
+ <OrgPermissionCan
+ I={OrgPermissionIdentityActions.Edit}
+ a={OrgPermissionSubjects.Identity}
+ >
+ {(isAllowed) => (
+ <UnstableIconButton
+ isDisabled={!isAllowed}
+ onClick={() => {
+ handlePopUpOpen("identity", {
+ identityId,
+ name: data.identity.name,
+ orgId: data.identity.orgId,
+ hasDeleteProtection: data.identity.hasDeleteProtection,
+ role: data.role,
+ customRole: data.customRole,
+ metadata: data.metadata
+ });
+ }}
+ size="xs"
+ variant="outline"
+ >
+ <PencilIcon />
+ </UnstableIconButton>
+ )}
+ </OrgPermissionCan>
+ </UnstableCardAction>
+ </UnstableCardHeader>
+ <UnstableCardContent>
+ <DetailGroup>
+ <Detail>
+ <DetailLabel>Name</DetailLabel>
+ <DetailValue>{data.identity.name}</DetailValue>
+ </Detail>
+ <Detail>
+ <DetailLabel>ID</DetailLabel>
+ <DetailValue className="flex items-center gap-x-1">
+ {data.identity.id}
+ <Tooltip content="Copy machine identity ID to clipboard">
+ <UnstableIconButton
onClick={() => {
navigator.clipboard.writeText(data.identity.id);
setCopyTextId("Copied");
}}
+ variant="ghost"
+ size="xs"
>
- <FontAwesomeIcon icon={isCopyingId ? faCheck : faCopy} />
- </IconButton>
+ {/* TODO(scott): color this should be a button variant and create re-usable copy button */}
+ {isCopyingId ? <CheckIcon /> : <ClipboardListIcon className="text-label" />}
+ </UnstableIconButton>
</Tooltip>
- </div>
- </div>
- </div>
- <div className="mb-4">
- <p className="text-sm font-medium text-mineshaft-300">Name</p>
- <p className="text-sm text-mineshaft-300">{data.identity.name}</p>
- </div>
- {isSubOrganization && (
- <div className="mb-4">
- <p className="text-sm font-medium text-mineshaft-300">Managed By</p>
- <p className="text-sm text-mineshaft-300">
- {isOrgIdentity ? "Organization" : "Root Organization"}
- </p>
- </div>
- )}
- {isOrgIdentity && (
- <div className="mb-4">
- <p className="text-sm font-medium text-mineshaft-300">Last Login Auth Method</p>
- <p className="text-sm text-mineshaft-300">
- {data.lastLoginAuthMethod ? identityAuthToNameMap[data.lastLoginAuthMethod] : "-"}
- </p>
- </div>
- )}
- {isOrgIdentity && (
- <div className="mb-4">
- <p className="text-sm font-medium text-mineshaft-300">Last Login Time</p>
- <p className="text-sm text-mineshaft-300">
- {data.lastLoginTime ? format(data.lastLoginTime, "PPpp") : "-"}
- </p>
- </div>
- )}
- {isOrgIdentity && (
- <div className="mb-4">
- <p className="text-sm font-medium text-mineshaft-300">Delete Protection</p>
- <p className="text-sm text-mineshaft-300">
- {data.identity.hasDeleteProtection ? "On" : "Off"}
- </p>
- </div>
- )}
- <div className="mb-4">
- <p className="text-sm font-medium text-mineshaft-300">Organization Role</p>
- <p className="text-sm text-mineshaft-300">{data.role}</p>
- </div>
- <div>
- <p className="text-sm font-medium text-mineshaft-300">Metadata</p>
- {data?.metadata?.length ? (
- <div className="mt-1 flex flex-wrap gap-2 text-sm text-mineshaft-300">
- {data.metadata?.map((el) => (
- <div key={el.id} className="flex items-center">
- <Tag
- size="xs"
- className="mr-0 flex items-center rounded-r-none border border-mineshaft-500"
- >
- <FontAwesomeIcon icon={faKey} size="xs" className="mr-1" />
- <div>{el.key}</div>
- </Tag>
- <Tag
- size="xs"
- className="flex items-center rounded-l-none border border-mineshaft-500 bg-mineshaft-900 pl-1"
- >
- <div className="max-w-[150px] overflow-hidden text-ellipsis whitespace-nowrap">
- {el.value}
- </div>
- </Tag>
- </div>
- ))}
- </div>
- ) : (
- <p className="text-sm text-mineshaft-300">-</p>
+ </DetailValue>
+ </Detail>
+ <Detail>
+ <DetailLabel>Managed by</DetailLabel>
+ <DetailValue>
+ {isSubOrganization && isCurrentOrgIdentity ? (
+ <Badge variant="sub-org">
+ <SubOrgIcon />
+ Sub-Organization
+ </Badge>
+ ) : (
+ <Badge variant="org">
+ <OrgIcon />
+ Organization
+ </Badge>
+ )}
+ </DetailValue>
+ </Detail>
+ <Detail>
+ <DetailLabel>Organization Role</DetailLabel>
+ <DetailValue>{data.role}</DetailValue>
+ </Detail>
+ <Detail>
+ <DetailLabel>Metadata</DetailLabel>
+ <DetailValue className="flex flex-wrap gap-2">
+ {data.identity?.metadata?.length ? (
+ data.identity.metadata?.map((el) => (
+ <UnstableButtonGroup className="min-w-0" key={el.id}>
+ <Badge isTruncatable>
+ <span>{el.key}</span>
+ </Badge>
+ <Badge variant="outline" isTruncatable>
+ <span>{el.value}</span>
+ </Badge>
+ </UnstableButtonGroup>
+ ))
+ ) : (
+ <span className="text-muted">—</span>
+ )}
+ </DetailValue>
+ </Detail>
+ <Detail>
+ <DetailLabel>
+ {isSubOrganization && !isCurrentOrgIdentity ? "Joined sub-organization" : "Created"}
+ </DetailLabel>
+ <DetailValue>{format(data.createdAt, "PPpp")}</DetailValue>
+ </Detail>
+ {isCurrentOrgIdentity && (
+ <>
+ <Detail>
+ <DetailLabel>Last Login Method</DetailLabel>
+ <DetailValue>
+ {data.lastLoginAuthMethod ? (
+ identityAuthToNameMap[data.lastLoginAuthMethod]
+ ) : (
+ <span className="text-muted">—</span>
+ )}
+ </DetailValue>
+ </Detail>
+ <Detail>
+ <DetailLabel>Last Logged In</DetailLabel>
+ <DetailValue>
+ {data.lastLoginTime ? (
+ format(data.lastLoginTime, "PPpp")
+ ) : (
+ <span className="text-muted">—</span>
+ )}
+ </DetailValue>
+ </Detail>
+ <Detail>
+ <DetailLabel>Delete protection</DetailLabel>
+ <DetailValue>
+ {data.identity.hasDeleteProtection ? (
+ <Badge variant="success">
+ <CheckIcon />
+ Enabled
+ </Badge>
+ ) : (
+ <Badge variant="neutral">
+ <BanIcon />
+ Disabled
+ </Badge>
+ )}
+ </DetailValue>
+ </Detail>
+ </>
)}
- </div>
- </div>
- </div>
+ </DetailGroup>
+ </UnstableCardContent>
+ </UnstableCard>
) : (
<div />
);
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectRow.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectRow.tsx
index fe62a79025..649fb36ed8 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectRow.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectRow.tsx
@@ -1,11 +1,18 @@
import { useMemo } from "react";
-import { faTrash } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useNavigate } from "@tanstack/react-router";
import { format } from "date-fns";
+import { MoreHorizontalIcon } from "lucide-react";
import { createNotification } from "@app/components/notifications";
-import { IconButton, Td, Tooltip, Tr } from "@app/components/v2";
+import {
+ UnstableDropdownMenu,
+ UnstableDropdownMenuContent,
+ UnstableDropdownMenuItem,
+ UnstableDropdownMenuTrigger,
+ UnstableIconButton,
+ UnstableTableCell,
+ UnstableTableRow
+} from "@app/components/v3";
import { useOrganization } from "@app/context";
import { getProjectBaseURL } from "@app/helpers/project";
import { formatProjectRoleName } from "@app/helpers/roles";
@@ -47,8 +54,7 @@ export const IdentityProjectRow = ({
}, [workspaces, project]);
return (
- <Tr
- className="group h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
+ <UnstableTableRow
key={`identity-project-membership-${id}`}
onClick={() => {
if (isAccessible) {
@@ -71,36 +77,55 @@ export const IdentityProjectRow = ({
});
}}
>
- <Td className="max-w-0 truncate">{project.name}</Td>
- <Td>{`${formatProjectRoleName(roles[0].role, roles[0].customRoleName)}${
+ <UnstableTableCell className="max-w-0 truncate">{project.name}</UnstableTableCell>
+ <UnstableTableCell>{`${formatProjectRoleName(roles[0].role, roles[0].customRoleName)}${
roles.length > 1 ? ` (+${roles.length - 1})` : ""
- }`}</Td>
- <Td>{format(new Date(createdAt), "yyyy-MM-dd")}</Td>
- <Td>
- {isAccessible && (
- <div className="opacity-0 transition-opacity duration-300 group-hover:opacity-100">
- <Tooltip content="Remove">
- <IconButton
- colorSchema="danger"
- ariaLabel="copy icon"
- variant="plain"
- className="group relative"
- onClick={(e) => {
- e.stopPropagation();
- handlePopUpOpen("removeIdentityFromProject", {
- identityId: identity.id,
- identityName: identity.name,
- projectId: project.id,
- projectName: project.name
- });
- }}
- >
- <FontAwesomeIcon icon={faTrash} />
- </IconButton>
- </Tooltip>
- </div>
- )}
- </Td>
- </Tr>
+ }`}</UnstableTableCell>
+ <UnstableTableCell>{format(new Date(createdAt), "yyyy-MM-dd")}</UnstableTableCell>
+ <UnstableTableCell>
+ <UnstableDropdownMenu>
+ <UnstableDropdownMenuTrigger>
+ <UnstableIconButton variant="ghost" size="xs">
+ <MoreHorizontalIcon />
+ </UnstableIconButton>
+ </UnstableDropdownMenuTrigger>
+ <UnstableDropdownMenuContent align="end">
+ <UnstableDropdownMenuItem
+ isDisabled={!isAccessible}
+ onClick={(e) => {
+ e.stopPropagation();
+ navigate({
+ to: `${getProjectBaseURL(project.type)}/access-management` as const,
+ params: {
+ orgId: currentOrg?.id || "",
+ projectId: project.id
+ },
+ search: {
+ selectedTab: TabSections.Identities
+ }
+ });
+ }}
+ >
+ Access Project
+ </UnstableDropdownMenuItem>
+ <UnstableDropdownMenuItem
+ variant="danger"
+ isDisabled={!isAccessible}
+ onClick={(e) => {
+ e.stopPropagation();
+ handlePopUpOpen("removeIdentityFromProject", {
+ identityId: identity.id,
+ identityName: identity.name,
+ projectId: project.id,
+ projectName: project.name
+ });
+ }}
+ >
+ Remove From Project
+ </UnstableDropdownMenuItem>
+ </UnstableDropdownMenuContent>
+ </UnstableDropdownMenu>
+ </UnstableTableCell>
+ </UnstableTableRow>
);
};
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsSection.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsSection.tsx
index 542ed1486c..05b499c80c 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsSection.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsSection.tsx
@@ -1,9 +1,20 @@
-import { faPlus } from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { PlusIcon } from "lucide-react";
import { createNotification } from "@app/components/notifications";
-import { DeleteActionModal, IconButton } from "@app/components/v2";
-import { useDeleteProjectIdentityMembership } from "@app/hooks/api";
+import { DeleteActionModal } from "@app/components/v2";
+import {
+ UnstableButton,
+ UnstableCard,
+ UnstableCardAction,
+ UnstableCardContent,
+ UnstableCardDescription,
+ UnstableCardHeader,
+ UnstableCardTitle
+} from "@app/components/v3";
+import {
+ useDeleteProjectIdentityMembership,
+ useGetIdentityProjectMemberships
+} from "@app/hooks/api";
import { usePopUp } from "@app/hooks/usePopUp";
import { IdentityAddToProjectModal } from "./IdentityAddToProjectModal";
@@ -35,24 +46,35 @@ export const IdentityProjectsSection = ({ identityId }: Props) => {
handlePopUpClose("removeIdentityFromProject");
};
+ const { data: projectMemberships } = useGetIdentityProjectMemberships(identityId);
+
return (
- <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
- <h3 className="text-lg font-medium text-mineshaft-100">Projects</h3>
- <IconButton
- ariaLabel="copy icon"
- variant="plain"
- className="group relative"
- onClick={() => {
- handlePopUpOpen("addIdentityToProject");
- }}
- >
- <FontAwesomeIcon icon={faPlus} />
- </IconButton>
- </div>
- <div className="py-4">
- <IdentityProjectsTable identityId={identityId} handlePopUpOpen={handlePopUpOpen} />
- </div>
+ <>
+ <UnstableCard>
+ <UnstableCardHeader>
+ <UnstableCardTitle>Projects</UnstableCardTitle>
+ <UnstableCardDescription>
+ Manage machine identity project memberships
+ </UnstableCardDescription>
+ {Boolean(projectMemberships?.length) && (
+ <UnstableCardAction>
+ <UnstableButton
+ onClick={() => {
+ handlePopUpOpen("addIdentityToProject");
+ }}
+ size="xs"
+ variant="outline"
+ >
+ <PlusIcon />
+ Add to Project
+ </UnstableButton>
+ </UnstableCardAction>
+ )}
+ </UnstableCardHeader>
+ <UnstableCardContent>
+ <IdentityProjectsTable identityId={identityId} handlePopUpOpen={handlePopUpOpen} />
+ </UnstableCardContent>
+ </UnstableCard>
<DeleteActionModal
isOpen={popUp.removeIdentityFromProject.isOpen}
title={`Are you sure you want to remove ${
@@ -76,6 +98,6 @@ export const IdentityProjectsSection = ({ identityId }: Props) => {
popUp={popUp}
handlePopUpToggle={handlePopUpToggle}
/>
- </div>
+ </>
);
};
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsTable.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsTable.tsx
index daf40c21ba..6d0ddd203d 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsTable.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityProjectsTable.tsx
@@ -1,26 +1,24 @@
import { useMemo } from "react";
-import {
- faArrowDown,
- faArrowUp,
- faFolder,
- faMagnifyingGlass,
- faSearch
-} from "@fortawesome/free-solid-svg-icons";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { ChevronDownIcon, PlusIcon } from "lucide-react";
+import { twMerge } from "tailwind-merge";
+import { Lottie } from "@app/components/v2";
import {
- EmptyState,
- IconButton,
- Input,
- Pagination,
- Table,
- TableContainer,
- TableSkeleton,
- TBody,
- Th,
- THead,
- Tr
-} from "@app/components/v2";
+ UnstableButton,
+ UnstableEmpty,
+ UnstableEmptyContent,
+ UnstableEmptyDescription,
+ UnstableEmptyHeader,
+ UnstableEmptyTitle,
+ UnstableInput,
+ UnstablePagination,
+ UnstableTable,
+ UnstableTableBody,
+ UnstableTableHead,
+ UnstableTableHeader,
+ UnstableTableRow
+} from "@app/components/v3";
+import { useOrganization } from "@app/context";
import {
getUserTablePreference,
PreferenceKey,
@@ -36,7 +34,7 @@ import { IdentityProjectRow } from "./IdentityProjectRow";
type Props = {
identityId: string;
handlePopUpOpen: (
- popUpName: keyof UsePopUpState<["removeIdentityFromProject"]>,
+ popUpName: keyof UsePopUpState<["removeIdentityFromProject", "addIdentityToProject"]>,
data?: object
) => void;
};
@@ -48,6 +46,8 @@ enum IdentityProjectsOrderBy {
export const IdentityProjectsTable = ({ identityId, handlePopUpOpen }: Props) => {
const { data: projectMemberships = [], isPending } = useGetIdentityProjectMemberships(identityId);
+ const { isSubOrganization } = useOrganization();
+
const {
search,
setSearch,
@@ -90,41 +90,43 @@ export const IdentityProjectsTable = ({ identityId, handlePopUpOpen }: Props) =>
setPage
});
+ if (isPending) {
+ return (
+ // scott: todo proper loader
+ <div className="flex h-40 w-full items-center justify-center">
+ <Lottie icon="infisical_loading_white" isAutoPlay className="w-16" />
+ </div>
+ );
+ }
+
return (
- <div>
- <Input
+ <>
+ <UnstableInput
+ className="mb-4"
value={search}
onChange={(e) => setSearch(e.target.value)}
- leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
placeholder="Search projects..."
/>
- <TableContainer className="mt-4">
- <Table>
- <THead>
- <Tr>
- <Th className="w-2/3">
- <div className="flex items-center">
- Name
- <IconButton
- variant="plain"
- className="ml-2"
- ariaLabel="sort"
- onClick={toggleOrderDirection}
- >
- <FontAwesomeIcon
- icon={orderDirection === OrderByDirection.DESC ? faArrowUp : faArrowDown}
- />
- </IconButton>
- </div>
- </Th>
+ {filteredProjectMemberships.length ? (
+ <UnstableTable>
+ <UnstableTableHeader>
+ <UnstableTableRow>
+ <UnstableTableHead onClick={toggleOrderDirection} className="w-1/3">
+ Name
+ <ChevronDownIcon
+ className={twMerge(
+ orderDirection === OrderByDirection.DESC && "rotate-180",
+ "transition-transform"
+ )}
+ />
+ </UnstableTableHead>
- <Th>Role</Th>
- <Th>Added On</Th>
- <Th className="w-5" />
- </Tr>
- </THead>
- <TBody>
- {isPending && <TableSkeleton columns={4} innerKey="identity-project-memberships" />}
+ <UnstableTableHead>Role</UnstableTableHead>
+ <UnstableTableHead>Added On</UnstableTableHead>
+ <UnstableTableHead className="w-5" />
+ </UnstableTableRow>
+ </UnstableTableHeader>
+ <UnstableTableBody>
{!isPending &&
filteredProjectMemberships.slice(offset, perPage * page).map((membership) => {
return (
@@ -135,28 +137,45 @@ export const IdentityProjectsTable = ({ identityId, handlePopUpOpen }: Props) =>
/>
);
})}
- </TBody>
- </Table>
- {Boolean(filteredProjectMemberships.length) && (
- <Pagination
- count={filteredProjectMemberships.length}
- page={page}
- perPage={perPage}
- onChangePage={setPage}
- onChangePerPage={handlePerPageChange}
- />
- )}
- {!isPending && !filteredProjectMemberships?.length && (
- <EmptyState
- title={
- projectMemberships.length
- ? "No projects match search..."
- : "This machine identity has not been assigned to any projects"
- }
- icon={projectMemberships.length ? faSearch : faFolder}
- />
- )}
- </TableContainer>
- </div>
+ </UnstableTableBody>
+ </UnstableTable>
+ ) : (
+ <UnstableEmpty className="border">
+ <UnstableEmptyHeader>
+ <UnstableEmptyTitle>
+ {projectMemberships.length
+ ? "No projects match this search"
+ : "This machine identity is not a member of any projects"}
+ </UnstableEmptyTitle>
+ <UnstableEmptyDescription>
+ {projectMemberships.length
+ ? "Adjust search filters to view project memberships."
+ : "Assign this machine identity to a project."}
+ </UnstableEmptyDescription>
+ {!projectMemberships.length && (
+ <UnstableEmptyContent>
+ <UnstableButton
+ variant={isSubOrganization ? "sub-org" : "org"}
+ size="xs"
+ onClick={() => handlePopUpOpen("addIdentityToProject")}
+ >
+ <PlusIcon />
+ Add to Project
+ </UnstableButton>
+ </UnstableEmptyContent>
+ )}
+ </UnstableEmptyHeader>
+ </UnstableEmpty>
+ )}
+ {Boolean(filteredProjectMemberships.length) && (
+ <UnstablePagination
+ count={filteredProjectMemberships.length}
+ page={page}
+ perPage={perPage}
+ onChangePage={setPage}
+ onChangePerPage={handlePerPageChange}
+ />
+ )}
+ </>
);
};
diff --git a/frontend/src/pages/project/GroupDetailsByIDPage/components/GroupDetailsSection.tsx b/frontend/src/pages/project/GroupDetailsByIDPage/components/GroupDetailsSection.tsx
index f45de9bd37..9e345f2af2 100644
--- a/frontend/src/pages/project/GroupDetailsByIDPage/components/GroupDetailsSection.tsx
+++ b/frontend/src/pages/project/GroupDetailsByIDPage/components/GroupDetailsSection.tsx
@@ -34,7 +34,7 @@ export const GroupDetailsSection = ({ groupMembership }: Props) => {
return (
<UnstableCard className="w-full lg:max-w-[24rem]">
- <UnstableCardHeader>
+ <UnstableCardHeader className="border-b">
<UnstableCardTitle>Details</UnstableCardTitle>
<UnstableCardDescription>Group details</UnstableCardDescription>
</UnstableCardHeader>
diff --git a/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityAuthSection.tsx b/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityAuthSection.tsx
index f7cfb585c8..0bd5c83142 100644
--- a/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityAuthSection.tsx
+++ b/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityAuthSection.tsx
@@ -85,7 +85,7 @@ export const ProjectIdentityAuthenticationSection = ({ identity, refetchIdentity
activeLockoutAuthMethods={identity.activeLockoutAuthMethods}
/>
) : (
- <UnstableEmpty className="rounded-sm border bg-mineshaft-800/50">
+ <UnstableEmpty className="border">
<UnstableEmptyHeader>
<UnstableEmptyTitle>
This machine identity has no auth methods configured
diff --git a/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityDetailsSection.tsx b/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityDetailsSection.tsx
index fab2d8574c..5e2c149a25 100644
--- a/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityDetailsSection.tsx
+++ b/frontend/src/pages/project/IdentityDetailsByIDPage/components/ProjectIdentityDetailsSection.tsx
@@ -51,7 +51,7 @@ export const ProjectIdentityDetailsSection = ({
return (
<>
<UnstableCard className="w-full lg:max-w-[24rem]">
- <UnstableCardHeader>
+ <UnstableCardHeader className="border-b">
<UnstableCardTitle>Details</UnstableCardTitle>
<UnstableCardDescription>Machine identity details</UnstableCardDescription>
{!isOrgIdentity && (
diff --git a/frontend/src/pages/project/MemberDetailsByIDPage/components/ProjectMemberDetailsSection.tsx b/frontend/src/pages/project/MemberDetailsByIDPage/components/ProjectMemberDetailsSection.tsx
index 8695d00226..3fd22db31c 100644
--- a/frontend/src/pages/project/MemberDetailsByIDPage/components/ProjectMemberDetailsSection.tsx
+++ b/frontend/src/pages/project/MemberDetailsByIDPage/components/ProjectMemberDetailsSection.tsx
@@ -40,7 +40,7 @@ export const ProjectMemberDetailsSection = ({ membership }: Props) => {
return (
<UnstableCard className="w-full lg:max-w-[24rem]">
- <UnstableCardHeader>
+ <UnstableCardHeader className="border-b">
<UnstableCardTitle>Details</UnstableCardTitle>
<UnstableCardDescription>User membership details</UnstableCardDescription>
</UnstableCardHeader>