Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
token creation improvements on UI/UX
Matheus Nogueira5518d318c079
diff --git a/frontend/src/components/honey-tokens/CreateHoneyTokenModal.tsx b/frontend/src/components/honey-tokens/CreateHoneyTokenModal.tsxindex 5ab51710f2..ab1199c752 100644--- a/frontend/src/components/honey-tokens/CreateHoneyTokenModal.tsx+++ b/frontend/src/components/honey-tokens/CreateHoneyTokenModal.tsx@@ -57,9 +57,7 @@ export const CreateHoneyTokenModal = ({ onOpenChange, isOpen, ...props }: Props)onOpenChange(open);}}>- <DialogContent- className={selectedType ? "max-w-2xl overflow-visible" : "max-w-3xl overflow-visible"}- >+ <DialogContent className="max-w-3xl overflow-visible"><DialogHeader><DialogTitle>{selectedType ? (diff --git a/frontend/src/components/honey-tokens/HoneyTokenModalHeader.tsx b/frontend/src/components/honey-tokens/HoneyTokenModalHeader.tsxindex 5675cdcf8b..daffc40ea6 100644--- a/frontend/src/components/honey-tokens/HoneyTokenModalHeader.tsx+++ b/frontend/src/components/honey-tokens/HoneyTokenModalHeader.tsx@@ -11,11 +11,11 @@ export const HoneyTokenModalHeader = ({ type, isEdit }: Props) => {const details = HONEY_TOKEN_MAP[type];return (- <div className="flex w-full items-start gap-2">+ <div className="flex w-full items-center gap-3"><imgalt={`${details.name} logo`}src={`/images/integrations/${details.image}`}- className="h-12 w-12 rounded-md bg-bunker-500 p-2"+ className="h-10 w-10"/><div><div className="flex items-center gap-x-2 text-mineshaft-300">diff --git a/frontend/src/components/honey-tokens/HoneyTokenSelect.tsx b/frontend/src/components/honey-tokens/HoneyTokenSelect.tsxindex fc7bf008de..bcbb6c8810 100644--- a/frontend/src/components/honey-tokens/HoneyTokenSelect.tsx+++ b/frontend/src/components/honey-tokens/HoneyTokenSelect.tsx@@ -1,3 +1,4 @@+import { Item, ItemContent, ItemMedia, ItemTitle } from "@app/components/v3";import { HONEY_TOKEN_MAP } from "@app/helpers/honeyTokens";import { HoneyTokenType } from "@app/hooks/api/honeyTokens/enums";@@ -15,22 +16,27 @@ export const HoneyTokenSelect = ({ onSelect }: Props) => {const { image, name, size } = HONEY_TOKEN_MAP[type];return (- <button- type="button"+ <Itemkey={type}+ variant="outline"+ className="cursor-pointer flex-col items-center justify-center py-4 hover:bg-foreground/5"+ role="button"+ tabIndex={0}onClick={() => onSelect(type)}- className="group relative flex h-28 cursor-pointer flex-col items-center justify-center rounded-md border border-mineshaft-600 bg-mineshaft-700 p-4 duration-200 hover:bg-mineshaft-600"+ onKeyDown={(e) => {+ if (e.key === "Enter" || e.key === " ") {+ e.preventDefault();+ onSelect(type);+ }+ }}>- <img- src={`/images/integrations/${image}`}- width={size}- className="mt-auto"- alt={`${name} logo`}- />- <div className="mt-auto max-w-xs text-center text-xs font-medium text-gray-300 duration-200 group-hover:text-gray-200">- {name}- </div>- </button>+ <ItemMedia variant="image" className="size-12">+ <img src={`/images/integrations/${image}`} width={size} alt={`${name} logo`} />+ </ItemMedia>+ <ItemContent className="items-center">+ <ItemTitle>{name}</ItemTitle>+ </ItemContent>+ </Item>);})}</div>diff --git a/frontend/src/components/honey-tokens/forms/HoneyTokenForm.tsx b/frontend/src/components/honey-tokens/forms/HoneyTokenForm.tsxindex db52aa66e9..fc133baf2d 100644--- a/frontend/src/components/honey-tokens/forms/HoneyTokenForm.tsx+++ b/frontend/src/components/honey-tokens/forms/HoneyTokenForm.tsx@@ -14,7 +14,6 @@ import { ProjectEnv } from "@app/hooks/api/projects/types";import { fetchProjectSecrets } from "@app/hooks/api/secrets/queries";import { HoneyTokenMappingFields } from "./HoneyTokenMappingFields/HoneyTokenMappingFields";-import { HoneyTokenReviewFields } from "./HoneyTokenReviewFields/HoneyTokenReviewFields";import { HoneyTokenConfigurationFields } from "./HoneyTokenConfigurationFields";import { HoneyTokenDetailsFields } from "./HoneyTokenDetailsFields";import { HoneyTokenFormSchema, THoneyTokenForm } from "./schemas";@@ -36,8 +35,7 @@ const FORM_TABS: { name: string; key: string; fields: (keyof THoneyTokenForm)[]fields: ["environment"]},{ name: "Mapping", key: "mapping", fields: ["secretsMapping"] },- { name: "Details", key: "details", fields: ["name", "description"] },- { name: "Review", key: "review", fields: [] }+ { name: "Details", key: "details", fields: ["name", "description"] }];export const HoneyTokenForm = ({@@ -236,9 +234,6 @@ export const HoneyTokenForm = ({<Tab.Panel><HoneyTokenDetailsFields /></Tab.Panel>- <Tab.Panel>- <HoneyTokenReviewFields />- </Tab.Panel></Tab.Panels></Tab.Group></FormProvider>@@ -248,7 +243,7 @@ export const HoneyTokenForm = ({onClick={handleNext}isPending={isSubmitting || isValidating}isDisabled={isSubmitting || isValidating}- variant="outline"+ variant={isFinalStep ? "org" : "outline"}>{isFinalStep ? `${honeyToken ? "Update" : "Create"} Honey Token` : "Next"}</Button>diff --git a/frontend/src/components/honey-tokens/forms/HoneyTokenMappingFields/AwsHoneyTokenMappingFields.tsx b/frontend/src/components/honey-tokens/forms/HoneyTokenMappingFields/AwsHoneyTokenMappingFields.tsxindex 32ee873641..ef32a6b75c 100644--- a/frontend/src/components/honey-tokens/forms/HoneyTokenMappingFields/AwsHoneyTokenMappingFields.tsx+++ b/frontend/src/components/honey-tokens/forms/HoneyTokenMappingFields/AwsHoneyTokenMappingFields.tsx@@ -1,7 +1,5 @@import { Controller, useFormContext } from "react-hook-form";-import { faArrowRight, faKey, faLock } from "@fortawesome/free-solid-svg-icons";-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";-import { InfoIcon } from "lucide-react";+import { ArrowRightIcon, InfoIcon, KeyIcon, LockIcon } from "lucide-react";import {Badge,@@ -30,13 +28,13 @@ export const AwsHoneyTokenMappingFields = () => {const items = [{name: "Access Key ID",- icon: faKey,+ icon: <KeyIcon />,fieldName: "secretsMapping.accessKeyId" as const,placeholder: defaults.accessKeyId},{name: "Secret Access Key",- icon: faLock,+ icon: <LockIcon />,fieldName: "secretsMapping.secretAccessKey" as const,placeholder: defaults.secretAccessKey}@@ -73,14 +71,14 @@ export const AwsHoneyTokenMappingFields = () => {<td className="whitespace-nowrap"><div className="mb-4 flex h-full items-start justify-center"><Badge variant="neutral" className="h-[36px] w-full justify-center text-xs">- <FontAwesomeIcon icon={icon} />+ {icon}{name}</Badge></div></td><td className="pr-5 pl-5 whitespace-nowrap"><div className="mb-4 flex items-center justify-center">- <FontAwesomeIcon className="text-mineshaft-400" icon={faArrowRight} />+ <ArrowRightIcon className="size-5 text-accent" /></div></td><td className="w-full">@@ -116,7 +114,8 @@ export const AwsHoneyTokenMappingFields = () => {{mappingError}</div>)}- <div className="mt-2 rounded-sm border border-yellow/40 bg-yellow/10 p-3 text-xs text-mineshaft-200">+ <div className="mt-2 flex items-start gap-2 rounded-sm border border-info/40 bg-info/10 p-3 text-xs text-mineshaft-200">+ <InfoIcon className="mt-0.5 size-3.5 shrink-0 text-info" />These keys will appear as normal secrets in your project but are tied to a sandboxed IAMuser with zero permissions. Any API call made with these credentials triggers an alert.</div>diff --git a/frontend/src/pages/secret-manager/HoneyTokenDetailsByIDPage/HoneyTokenDetailsByIDPage.tsx b/frontend/src/pages/secret-manager/HoneyTokenDetailsByIDPage/HoneyTokenDetailsByIDPage.tsxindex 3f4a75eaad..41303ab475 100644--- a/frontend/src/pages/secret-manager/HoneyTokenDetailsByIDPage/HoneyTokenDetailsByIDPage.tsx+++ b/frontend/src/pages/secret-manager/HoneyTokenDetailsByIDPage/HoneyTokenDetailsByIDPage.tsx@@ -11,7 +11,7 @@ import {KeyIcon,MapPinIcon,RotateCcw,- SirenIcon+ HexagonIcon} from "lucide-react";import { twMerge } from "tailwind-merge";@@ -163,7 +163,7 @@ const PageContent = () => {<div className="flex items-start justify-between"><div className="flex items-center gap-3"><div className="flex h-11 w-11 items-center justify-center rounded-lg border border-mineshaft-600 bg-mineshaft-800">- <SirenIcon+ <HexagonIconclassName={twMerge(isTriggered && "text-red-500",isRevoked && "text-mineshaft-400",@@ -238,7 +238,7 @@ const PageContent = () => {</div>)}<div className="flex items-center gap-1.5">- <SirenIcon size={13} />+ <HexagonIcon size={13} /><span>{honeyToken.openEvents} open event{honeyToken.openEvents !== 1 && "s"}</span>diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/AddResourceButtons/AddResourceButtons.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/AddResourceButtons/AddResourceButtons.tsxindex b14c253cef..a19801d95d 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/AddResourceButtons/AddResourceButtons.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/AddResourceButtons/AddResourceButtons.tsx@@ -6,7 +6,7 @@ import {ImportIcon,PlusIcon,RefreshCwIcon,- SirenIcon,+ HexagonIcon,UploadIcon} from "lucide-react";@@ -144,7 +144,7 @@ export function AddResourceButtons({<Tooltip open={!isHoneyTokenAvailable ? undefined : false}><TooltipTrigger className="block w-full"><DropdownMenuItem onClick={onAddHoneyToken} isDisabled={!isHoneyTokenAvailable}>- <SirenIcon className="text-yellow" />+ <HexagonIcon className="text-yellow" />Add Honey Token</DropdownMenuItem></TooltipTrigger>diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsxindex 21b89171a8..092b5d68d1 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx@@ -6,7 +6,7 @@ import {EditIcon,ExternalLinkIcon,InfoIcon,- SirenIcon+ HexagonIcon} from "lucide-react";import { twMerge } from "tailwind-merge";@@ -234,7 +234,7 @@ export const HoneyTokenTableRow = ({{!isSingleEnvView && isExpanded ? (<ChevronDownIcon />) : (- <SirenIcon+ <HexagonIconclassName={twMerge(isTriggered && "text-red",!isTriggered && !isAllRevoked && "text-yellow",diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/HoneyTokenListView/HoneyTokenItem.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/HoneyTokenListView/HoneyTokenItem.tsxindex 3d4ffcf36c..9eee55b456 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/HoneyTokenListView/HoneyTokenItem.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/HoneyTokenListView/HoneyTokenItem.tsx@@ -7,7 +7,7 @@ import {ExternalLinkIcon,InfoIcon,PencilIcon,- SirenIcon+ HexagonIcon} from "lucide-react";import { twMerge } from "tailwind-merge";@@ -70,7 +70,7 @@ export const HoneyTokenItem = ({ honeyToken, onEdit, onRevoke, onViewCredentialsstatus === HoneyTokenStatus.Revoked && "text-mineshaft-400")}>- <SirenIcon className="size-4" />+ <HexagonIcon className="size-4" /></div><div className="flex grow items-center py-2 pr-2 pl-4"><div className="flex w-full flex-wrap items-center">