Skip to content

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

refactor

adilson9f57153376e8
diff --git a/backend/src/keystore/keystore.ts b/backend/src/keystore/keystore.ts
index e6d89b4cb6..d8629ecde5 100644
--- a/backend/src/keystore/keystore.ts
+++ b/backend/src/keystore/keystore.ts
@@ -178,7 +178,7 @@ export const KeyStorePrefixes = {
// period is a YYYY-MM stamp so the monthly notice can only go out once per org per month
NativeIntegrationDeprecationNotice: (orgId: string, period: string) =>
- `validation2-native-integration-deprecation-notice:${orgId}:${period}` as const
+ `native-integration-deprecation-notice:${orgId}:${period}` as const
};
export const KeyStoreTtls = {
diff --git a/backend/src/services/integration/integration-deprecation-queue.ts b/backend/src/services/integration/integration-deprecation-queue.ts
index 3fa1ab0438..8fd2595630 100644
--- a/backend/src/services/integration/integration-deprecation-queue.ts
+++ b/backend/src/services/integration/integration-deprecation-queue.ts
@@ -39,8 +39,11 @@ type TIntegrationDeprecationQueueFactoryDep = {
export type TIntegrationDeprecationQueueFactory = ReturnType<typeof integrationDeprecationQueueFactory>;
-const NOTICE = "Action required: move your native integrations to Secret Syncs";
-const NOTICE_BODY = `Recreate your native integrations as Secret Syncs before ${NATIVE_INTEGRATION_DEPRECATION_DATE} to keep your secrets syncing.`;
+const EMAIL_SUBJECT = "Action required: move your native integrations to Secret Syncs";
+// the notification dropdown renders the title on a single ellipsised line next to a timestamp, so this
+// stays shorter than the subject line and front-loads the part that matters
+const NOTIFICATION_TITLE = `Native integrations stop working ${NATIVE_INTEGRATION_DEPRECATION_DATE}`;
+const NOTIFICATION_BODY = `Recreate your native integrations as Secret Syncs before ${NATIVE_INTEGRATION_DEPRECATION_DATE} to keep your secrets syncing.`;
/**
* Monthly nudge toward Secret Syncs for every org still holding native integrations.
@@ -86,11 +89,10 @@ export const integrationDeprecationQueueFactory = ({
try {
await smtpService.sendMail({
template: SmtpTemplates.NativeIntegrationDeprecation,
- subjectLine: NOTICE,
+ subjectLine: EMAIL_SUBJECT,
recipients: recipients.map((recipient) => recipient.email),
substitutions: {
orgName,
- deprecationDate: NATIVE_INTEGRATION_DEPRECATION_DATE,
projects: projects.map((project) => ({
name: project.projectName,
integrations: project.integrations,
@@ -108,8 +110,8 @@ export const integrationDeprecationQueueFactory = ({
userId: recipient.userId,
orgId,
type: NotificationType.NATIVE_INTEGRATION_DEPRECATED,
- title: NOTICE,
- body: NOTICE_BODY,
+ title: NOTIFICATION_TITLE,
+ body: NOTIFICATION_BODY,
link
}))
);
diff --git a/backend/src/services/smtp/emails/NativeIntegrationDeprecationTemplate.tsx b/backend/src/services/smtp/emails/NativeIntegrationDeprecationTemplate.tsx
index 1147201d41..67d6a8a3f1 100644
--- a/backend/src/services/smtp/emails/NativeIntegrationDeprecationTemplate.tsx
+++ b/backend/src/services/smtp/emails/NativeIntegrationDeprecationTemplate.tsx
@@ -1,5 +1,7 @@
import { Heading, Section, Text } from "@react-email/components";
+import { NATIVE_INTEGRATION_DEPRECATION_DATE } from "@app/services/integration/integration-deprecation-fns";
+
import { BaseButton } from "./BaseButton";
import { BaseEmailWrapper, BaseEmailWrapperProps } from "./BaseEmailWrapper";
import { BaseLink } from "./BaseLink";
@@ -9,16 +11,14 @@ interface NativeIntegrationDeprecationTemplateProps
orgName: string;
// a single entry for the per-project email, every affected project for the org-wide email
projects: { name: string; integrations: string[]; url: string }[];
- // the cutoff date, passed in so the subject line and the body can't state different dates
- deprecationDate: string;
}
export const NativeIntegrationDeprecationTemplate = ({
siteUrl,
orgName,
- projects,
- deprecationDate
+ projects
}: NativeIntegrationDeprecationTemplateProps) => {
+ const deprecationDate = NATIVE_INTEGRATION_DEPRECATION_DATE;
const isSingleProject = projects.length === 1;
return (
@@ -50,17 +50,19 @@ export const NativeIntegrationDeprecationTemplate = ({
<Text className="text-[14px] font-semibold mb-[12px]">
{isSingleProject ? "Integrations to migrate" : "Projects using native integrations"}
</Text>
- {projects.map((project) => (
- <Section
- key={project.name}
- className="mb-[16px] p-[16px] border border-solid border-gray-200 rounded-md bg-gray-50"
- >
- <Text className="text-[14px] font-semibold m-0 mb-[4px]">
- <BaseLink href={project.url}>{project.name}</BaseLink>
- </Text>
- <Text className="text-[12px] text-gray-600 m-0">{project.integrations.join(", ")}</Text>
- </Section>
- ))}
+ <div style={{ maxHeight: "280px", overflowY: "auto" }}>
+ {projects.map((project) => (
+ <Section
+ key={project.name}
+ className="mb-[16px] p-[16px] border border-solid border-gray-200 rounded-md bg-gray-50"
+ >
+ <Text className="text-[14px] font-semibold m-0 mb-[4px]">
+ <BaseLink href={project.url}>{project.name}</BaseLink>
+ </Text>
+ <Text className="text-[12px] text-gray-600 m-0">{project.integrations.join(", ")}</Text>
+ </Section>
+ ))}
+ </div>
</Section>
<Section className="text-center">
<BaseButton href="https://infisical.com/docs/integrations/secret-syncs/overview">
@@ -76,7 +78,6 @@ export default NativeIntegrationDeprecationTemplate;
NativeIntegrationDeprecationTemplate.PreviewProps = {
siteUrl: "https://infisical.com",
orgName: "Example Organization",
- deprecationDate: "February 1, 2027",
projects: [
{
name: "backend-api",
@@ -87,6 +88,21 @@ NativeIntegrationDeprecationTemplate.PreviewProps = {
name: "web-app",
integrations: ["Netlify", "Cloudflare Pages"],
url: "https://infisical.com"
+ },
+ {
+ name: "mobile-app",
+ integrations: ["Firebase", "AWS Secrets Manager"],
+ url: "https://infisical.com"
+ },
+ {
+ name: "data-pipeline",
+ integrations: ["Databricks", "Snowflake"],
+ url: "https://infisical.com"
+ },
+ {
+ name: "infra",
+ integrations: ["Terraform Cloud", "Fly.io"],
+ url: "https://infisical.com"
}
]
} as NativeIntegrationDeprecationTemplateProps;
diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsDeprecationAlert.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsDeprecationAlert.tsx
index a2aa3a1431..19e94ff15a 100644
--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsDeprecationAlert.tsx
+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsDeprecationAlert.tsx
@@ -1,4 +1,4 @@
-import { useNavigate } from "@tanstack/react-router";
+import { Link } from "@tanstack/react-router";
import { TriangleAlertIcon } from "lucide-react";
import { Alert, AlertDescription, AlertTitle, Button } from "@app/components/v3";
@@ -10,22 +10,14 @@ import { IntegrationsListPageTabs } from "@app/types/integrations";
// Not dismissible: it is contextual to the deprecated tab rather than an interruption, so it stays
// visible while the user works through their integrations.
export const NativeIntegrationsDeprecationAlert = () => {
- const navigate = useNavigate();
const { currentOrg } = useOrganization();
const { currentProject } = useProject();
- const handleMigrate = () => {
- navigate({
- to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
- params: { orgId: currentOrg.id, projectId: currentProject.id },
- search: { selectedTab: IntegrationsListPageTabs.SecretSyncs }
- });
- };
-
return (
- <Alert variant="warning">
+ <Alert variant="warning" className="mb-4">
<TriangleAlertIcon />
- <AlertTitle>
+ {/* AlertTitle is line-clamp-1 by default, which would truncate the date on a narrow viewport */}
+ <AlertTitle className="line-clamp-none">
Native integrations stop working on {NATIVE_INTEGRATION_DEPRECATION_DATE}.
</AlertTitle>
<AlertDescription>
@@ -33,11 +25,15 @@ export const NativeIntegrationsDeprecationAlert = () => {
Recreate these as Secret Syncs before then to keep your secrets syncing. Secret Syncs
support all the same third-party services.
</p>
- <div className="mt-3 flex flex-wrap items-center gap-2">
- <Button variant="warning" size="xs" onClick={handleMigrate}>
+ <Button variant="warning" size="xs" className="mt-2" asChild>
+ <Link
+ to={ROUTE_PATHS.SecretManager.IntegrationsListPage.path}
+ params={{ orgId: currentOrg.id, projectId: currentProject.id }}
+ search={{ selectedTab: IntegrationsListPageTabs.SecretSyncs }}
+ >
Migrate to Secret Syncs
- </Button>
- </div>
+ </Link>
+ </Button>
</AlertDescription>
</Alert>
);
diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsTab.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsTab.tsx
index 5302c40099..643c7aedf0 100644
--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsTab.tsx
+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsTab.tsx
@@ -151,44 +151,42 @@ export const NativeIntegrationsTab = () => {
return (
<>
- <div className="flex flex-col gap-4">
- <NativeIntegrationsDeprecationAlert />
- {view === IntegrationView.List ? (
- <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
- <div className="mb-4 flex items-center justify-between">
- <p className="text-xl font-medium text-mineshaft-100">Native Integrations</p>
- <Button
- colorSchema="secondary"
- type="submit"
- leftIcon={<FontAwesomeIcon icon={faPlus} />}
- onClick={() => setView(IntegrationView.New)}
- >
- Add Integration
- </Button>
- </div>
- <IntegrationsTable
- cloudIntegrations={cloudIntegrations}
- integrations={integrations}
- isLoading={isIntegrationLoading}
- workspaceId={workspaceId}
- environments={environments}
- onDeleteIntegration={(integration) => {
- setShouldDeleteSecrets.off();
- handlePopUpOpen("deleteConfirmation", integration);
- }}
- />
+ <NativeIntegrationsDeprecationAlert />
+ {view === IntegrationView.List ? (
+ <div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
+ <div className="mb-4 flex items-center justify-between">
+ <p className="text-xl font-medium text-mineshaft-100">Native Integrations</p>
+ <Button
+ colorSchema="secondary"
+ type="submit"
+ leftIcon={<FontAwesomeIcon icon={faPlus} />}
+ onClick={() => setView(IntegrationView.New)}
+ >
+ Add Integration
+ </Button>
</div>
- ) : (
- <CloudIntegrationSection
- onIntegrationStart={handleProviderIntegrationStart}
- onIntegrationRevoke={handleIntegrationAuthRevoke}
- integrationAuths={integrationAuths}
+ <IntegrationsTable
cloudIntegrations={cloudIntegrations}
- isLoading={isIntegrationAuthLoading || isCloudIntegrationsLoading}
- onViewActiveIntegrations={() => setView(IntegrationView.List)}
+ integrations={integrations}
+ isLoading={isIntegrationLoading}
+ workspaceId={workspaceId}
+ environments={environments}
+ onDeleteIntegration={(integration) => {
+ setShouldDeleteSecrets.off();
+ handlePopUpOpen("deleteConfirmation", integration);
+ }}
/>
- )}
- </div>
+ </div>
+ ) : (
+ <CloudIntegrationSection
+ onIntegrationStart={handleProviderIntegrationStart}
+ onIntegrationRevoke={handleIntegrationAuthRevoke}
+ integrationAuths={integrationAuths}
+ cloudIntegrations={cloudIntegrations}
+ isLoading={isIntegrationAuthLoading || isCloudIntegrationsLoading}
+ onViewActiveIntegrations={() => setView(IntegrationView.List)}
+ />
+ )}
<DeleteActionModal
isOpen={popUp.deleteConfirmation.isOpen}
title={`Are you sure you want to remove ${