Skip to content

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

fix: secret sync done

Piyush Guptacf00e3e45669
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index 7a2edc5362..1b70a8181d 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -2688,7 +2688,9 @@ export const SecretSyncs = {
},
OCTOPUS_DEPLOY: {
spaceId: "The ID of the Octopus Deploy space to sync secrets to.",
+ spaceName: "The name of the Octopus Deploy space to sync secrets to.",
projectId: "The ID of the Octopus Deploy project to sync secrets to.",
+ projectName: "The name of the Octopus Deploy project to sync secrets to.",
scope: "The Octopus Deploy scope that secrets should be synced to.",
scopeValues: "The Octopus Deploy scope values that secrets should be synced to."
},
diff --git a/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-fns.ts b/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-fns.ts
new file mode 100644
index 0000000000..8cc7596162
--- /dev/null
+++ b/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-fns.ts
@@ -0,0 +1,147 @@
+import { request } from "@app/lib/config/request";
+import { BadRequestError } from "@app/lib/errors";
+import { matchesSchema } from "@app/services/secret-sync/secret-sync-fns";
+import { TSecretMap } from "@app/services/secret-sync/secret-sync-types";
+
+import { SECRET_SYNC_NAME_MAP } from "../secret-sync-maps";
+import {
+ TOctopusDeploySyncWithCredentials,
+ TOctopusDeployVariable,
+ TOctopusDeployVariableSet
+} from "./octopus-deploy-sync-types";
+
+export const OctopusDeploySyncFns = {
+ getAuthHeader(apiKey: string): Record<string, string> {
+ return {
+ "X-NuGet-ApiKey": apiKey,
+ "X-Octopus-ApiKey": apiKey,
+ Accept: "application/json",
+ "Content-Type": "application/json"
+ };
+ },
+
+ buildVariableUrl(instanceUrl: string, spaceId: string, projectId: string, scope: string): string {
+ switch (scope) {
+ case "project":
+ return `${instanceUrl}/api/${spaceId}/projects/${projectId}/variables`;
+ default:
+ throw new BadRequestError({
+ message: `Unsupported Octopus Deploy scope: ${scope}`
+ });
+ }
+ },
+
+ async syncSecrets(secretSync: TOctopusDeploySyncWithCredentials, secretMap: TSecretMap) {
+ const {
+ connection,
+ environment,
+ syncOptions: { disableSecretDeletion, keySchema }
+ } = secretSync;
+ const { apiKey, instanceUrl } = connection.credentials;
+
+ const { spaceId, projectId, scope } = secretSync.destinationConfig;
+
+ const url = this.buildVariableUrl(instanceUrl, spaceId, projectId, scope);
+
+ const { data: variableSet } = await request.get<TOctopusDeployVariableSet>(url, {
+ headers: this.getAuthHeader(apiKey)
+ });
+
+ // Get scope values from destination config (if configured)
+ const scopeValues = secretSync.destinationConfig.scopeValues || {};
+
+ const nonSenstiveVariables: TOctopusDeployVariable[] = [];
+ let sensitiveVariables: TOctopusDeployVariable[] = [];
+
+ variableSet.Variables.forEach((variable) => {
+ if (!variable.IsSensitive && variable.Type !== "Sensitive") {
+ nonSenstiveVariables.push(variable);
+ } else {
+ // sensitve variables, this could contain infisical secrets
+ sensitiveVariables.push(variable);
+ }
+ });
+
+ // Build new variables array from secret map
+ const newVariables: TOctopusDeployVariable[] = Object.entries(secretMap).map(([key, secret]) => ({
+ Name: key,
+ Value: secret.value,
+ Description: secret.comment || "",
+ Scope: {
+ Environment: scopeValues.environments,
+ Role: scopeValues.roles,
+ Machine: scopeValues.machines,
+ ProcessOwner: scopeValues.processes,
+ Action: scopeValues.actions,
+ Channel: scopeValues.channels
+ },
+ IsEditable: false,
+ Prompt: null,
+ Type: "Sensitive",
+ IsSensitive: true
+ }));
+
+ const keysToDelete = new Set<string>();
+
+ if (!disableSecretDeletion) {
+ sensitiveVariables.forEach((variable) => {
+ if (!matchesSchema(variable.Name, environment?.slug || "", keySchema)) return;
+
+ if (!secretMap[variable.Name]) {
+ keysToDelete.add(variable.Name);
+ }
+ });
+ }
+
+ sensitiveVariables = sensitiveVariables.filter((variable) => !keysToDelete.has(variable.Name));
+
+ const newVariableKeys = newVariables.map((variable) => variable.Name);
+ // Keep sensitive variables that are not in the new variables array, to avoid duplication
+ sensitiveVariables = sensitiveVariables.filter((variable) => !newVariableKeys.includes(variable.Name));
+
+ await request.put(
+ url,
+ {
+ ...variableSet,
+ Variables: [...nonSenstiveVariables, ...sensitiveVariables, ...newVariables]
+ },
+ {
+ headers: this.getAuthHeader(apiKey)
+ }
+ );
+ },
+ async removeSecrets(secretSync: TOctopusDeploySyncWithCredentials, secretMap: TSecretMap) {
+ const {
+ credentials: { apiKey, instanceUrl }
+ } = secretSync.connection;
+
+ const { spaceId, projectId, scope } = secretSync.destinationConfig;
+
+ const url = this.buildVariableUrl(instanceUrl, spaceId, projectId, scope);
+
+ const { data: variableSet } = await request.get<TOctopusDeployVariableSet>(url, {
+ headers: this.getAuthHeader(apiKey)
+ });
+
+ const infisicalSecretKeys = Object.keys(secretMap);
+
+ const variablesToDelete = variableSet.Variables.filter(
+ (variable) =>
+ infisicalSecretKeys.includes(variable.Name) && variable.IsSensitive === true && variable.Type === "Sensitive"
+ ).map((variable) => variable.Id);
+
+ await request.put(
+ url,
+ {
+ ...variableSet,
+ Variables: variableSet.Variables.filter((variable) => !variablesToDelete.includes(variable.Id))
+ },
+ {
+ headers: this.getAuthHeader(apiKey)
+ }
+ );
+ },
+ async getSecrets(secretSync: TOctopusDeploySyncWithCredentials): Promise<TSecretMap> {
+ throw new Error(`${SECRET_SYNC_NAME_MAP[secretSync.destination]} does not support importing secrets.`);
+ }
+};
diff --git a/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-schemas.ts b/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-schemas.ts
index a8ea72d5aa..7750bbedaa 100644
--- a/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-schemas.ts
+++ b/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-schemas.ts
@@ -17,10 +17,11 @@ export enum OctopusDeploySyncScope {
}
const OctopusDeploySyncDestinationConfigBaseSchema = z.object({
- spaceId: z
+ spaceId: z.string().min(1, "Space ID is required").describe(SecretSyncs.DESTINATION_CONFIG.OCTOPUS_DEPLOY.spaceId),
+ spaceName: z
.string()
- .min(1, "Space ID required")
- .describe(SecretSyncs.DESTINATION_CONFIG.OCTOPUS_DEPLOY.spaceId || "Octopus Deploy Space ID"),
+ .min(1, "Space Name is required")
+ .describe(SecretSyncs.DESTINATION_CONFIG.OCTOPUS_DEPLOY.spaceName),
scope: z.nativeEnum(OctopusDeploySyncScope).default(OctopusDeploySyncScope.Project)
});
@@ -31,8 +32,12 @@ export const OctopusDeploySyncDestinationConfigSchema = z.intersection(
scope: z.literal(OctopusDeploySyncScope.Project),
projectId: z
.string()
- .min(1, "Project ID required")
+ .min(1, "Project ID is required")
.describe(SecretSyncs.DESTINATION_CONFIG.OCTOPUS_DEPLOY.projectId),
+ projectName: z
+ .string()
+ .min(1, "Project Name is required")
+ .describe(SecretSyncs.DESTINATION_CONFIG.OCTOPUS_DEPLOY.projectName),
scopeValues: z
.object({
environments: z.array(z.string()).optional(),
diff --git a/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-types.ts b/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-types.ts
new file mode 100644
index 0000000000..8cce9dae0c
--- /dev/null
+++ b/backend/src/services/secret-sync/octopus-deploy/octopus-deploy-sync-types.ts
@@ -0,0 +1,67 @@
+import z from "zod";
+
+import { TOctopusDeployConnection } from "@app/services/app-connection/octopus-deploy";
+
+import {
+ CreateOctopusDeploySyncSchema,
+ OctopusDeploySyncListItemSchema,
+ OctopusDeploySyncSchema
+} from "./octopus-deploy-sync-schemas";
+
+export type TOctopusDeploySyncListItem = z.infer<typeof OctopusDeploySyncListItemSchema>;
+export type TOctopusDeploySync = z.infer<typeof OctopusDeploySyncSchema>;
+export type TOctopusDeploySyncInput = z.infer<typeof CreateOctopusDeploySyncSchema>;
+
+export type TOctopusDeploySyncWithCredentials = Omit<TOctopusDeploySync, "connection"> & {
+ connection: TOctopusDeployConnection;
+};
+
+export type TOctopusDeployVariable = {
+ Id?: string;
+ Name: string;
+ Value: string;
+ Description: string;
+ Scope: {
+ Environment?: string[];
+ Machine?: string[];
+ Role?: string[];
+ Action?: string[];
+ Channel?: string[];
+ ProcessOwner?: string[];
+ Tenant?: string[];
+ TenantTag?: string[];
+ };
+ IsEditable: boolean;
+ Prompt: {
+ Description: string;
+ DisplaySettings: Record<string, string>;
+ Label: string;
+ Required: boolean;
+ } | null;
+ Type: "String" | "Sensitive";
+ IsSensitive: boolean;
+};
+
+export type TOctopusDeployVariableSet = {
+ Id: string;
+ OwnerId: string;
+ Version: number;
+ Variables: TOctopusDeployVariable[];
+ ScopeValues: {
+ Environments: { Id: string; Name: string }[];
+ Machines: { Id: string; Name: string }[];
+ Actions: { Id: string; Name: string }[];
+ Roles: { Id: string; Name: string }[];
+ Channels: { Id: string; Name: string }[];
+ TenantTags: { Id: string; Name: string }[];
+ Processes: {
+ ProcessType: string;
+ Id: string;
+ Name: string;
+ }[];
+ };
+ SpaceId: string;
+ Links: {
+ Self: string;
+ };
+};
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx
index 01fa046352..9a9e5a4c32 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/OctopusDeploySyncFields.tsx
@@ -31,7 +31,7 @@ import { OctopusDeploySyncScope } from "@app/hooks/api/secretSyncs/types/octopus
import { TSecretSyncForm } from "../schemas";
export const OctopusDeploySyncFields = () => {
- const { control, setValue, getValues } = useFormContext<
+ const { control, setValue } = useFormContext<
TSecretSyncForm & { destination: SecretSync.OctopusDeploy }
>();
@@ -47,8 +47,6 @@ export const OctopusDeploySyncFields = () => {
}
);
- console.log(getValues());
-
const { data: projects = [], isLoading: isProjectsLoading } =
useOctopusDeployConnectionListProjects(connectionId, spaceId, {
enabled: Boolean(connectionId && spaceId && scope)
@@ -97,7 +95,9 @@ export const OctopusDeploySyncFields = () => {
onChange={(option) => {
const selectedSpace = option as SingleValue<TOctopusDeploySpace>;
onChange(selectedSpace?.id ?? null);
+ setValue("destinationConfig.spaceName", selectedSpace?.name ?? "");
setValue("destinationConfig.projectId", "");
+ setValue("destinationConfig.projectName", "");
setValue("destinationConfig.scopeValues", undefined);
}}
options={spaces}
@@ -125,6 +125,7 @@ export const OctopusDeploySyncFields = () => {
onValueChange={(val) => {
onChange(val);
setValue("destinationConfig.projectId", "");
+ setValue("destinationConfig.projectName", "");
setValue("destinationConfig.scopeValues", undefined);
}}
className="w-full border border-mineshaft-500 capitalize"
@@ -169,7 +170,9 @@ export const OctopusDeploySyncFields = () => {
isDisabled={Boolean(!connectionId || !spaceId)}
value={projects?.find((project) => project.id === value) ?? null}
onChange={(option) => {
- onChange((option as SingleValue<TOctopusDeployProject>)?.id ?? null);
+ const selectedProject = option as SingleValue<TOctopusDeployProject>;
+ onChange(selectedProject?.id ?? null);
+ setValue("destinationConfig.projectName", selectedProject?.name ?? "");
setValue("destinationConfig.scopeValues", undefined);
}}
options={projects}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OctopusDeploySyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OctopusDeploySyncReviewFields.tsx
new file mode 100644
index 0000000000..0ff1ac5030
--- /dev/null
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/OctopusDeploySyncReviewFields.tsx
@@ -0,0 +1,27 @@
+import { useFormContext } from "react-hook-form";
+
+import { GenericFieldLabel } from "@app/components/secret-syncs";
+import { TSecretSyncForm } from "@app/components/secret-syncs/forms/schemas";
+import { SecretSync } from "@app/hooks/api/secretSyncs";
+import { OctopusDeploySyncScope } from "@app/hooks/api/secretSyncs/types/octopus-deploy-sync";
+
+export const OctopusDeploySyncReviewFields = () => {
+ const { watch } = useFormContext<TSecretSyncForm & { destination: SecretSync.OctopusDeploy }>();
+ const spaceName = watch("destinationConfig.spaceName");
+ const spaceId = watch("destinationConfig.spaceId");
+ const scope = watch("destinationConfig.scope");
+ const projectName = watch("destinationConfig.projectName");
+ const projectId = watch("destinationConfig.projectId");
+
+ return (
+ <>
+ <GenericFieldLabel label="Space">{spaceName || spaceId}</GenericFieldLabel>
+ <GenericFieldLabel label="Scope" className="capitalize">
+ {scope}
+ </GenericFieldLabel>
+ {scope === OctopusDeploySyncScope.Project && (
+ <GenericFieldLabel label="Project">{projectName || projectId}</GenericFieldLabel>
+ )}
+ </>
+ );
+};
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
index 940b3c173e..080022831f 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
@@ -40,6 +40,7 @@ import { LaravelForgeSyncReviewFields } from "./LaravelForgeSyncReviewFields";
import { NetlifySyncReviewFields } from "./NetlifySyncReviewFields";
import { NorthflankSyncReviewFields } from "./NorthflankSyncReviewFields";
import { OCIVaultSyncReviewFields } from "./OCIVaultSyncReviewFields";
+import { OctopusDeploySyncReviewFields } from "./OctopusDeploySyncReviewFields";
import { OnePassSyncReviewFields } from "./OnePassSyncReviewFields";
import { RailwaySyncReviewFields } from "./RailwaySyncReviewFields";
import { RenderSyncOptionsReviewFields, RenderSyncReviewFields } from "./RenderSyncReviewFields";
@@ -181,6 +182,9 @@ export const SecretSyncReviewFields = () => {
case SecretSync.Chef:
DestinationFieldsComponent = <ChefSyncReviewFields />;
break;
+ case SecretSync.OctopusDeploy:
+ DestinationFieldsComponent = <OctopusDeploySyncReviewFields />;
+ break;
default:
throw new Error(`Unhandled Destination Review Fields: ${destination}`);
}
diff --git a/frontend/src/components/secret-syncs/forms/schemas/octopus-deploy-sync-destination-schema.ts b/frontend/src/components/secret-syncs/forms/schemas/octopus-deploy-sync-destination-schema.ts
index 0dfbc81c1c..4c5daf357b 100644
--- a/frontend/src/components/secret-syncs/forms/schemas/octopus-deploy-sync-destination-schema.ts
+++ b/frontend/src/components/secret-syncs/forms/schemas/octopus-deploy-sync-destination-schema.ts
@@ -9,12 +9,14 @@ export const OctopusDeploySyncDestinationSchema = BaseSecretSyncSchema().merge(
destination: z.literal(SecretSync.OctopusDeploy),
destinationConfig: z.intersection(
z.object({
- spaceId: z.string().trim().min(1, { message: "Space ID is required" })
+ spaceId: z.string().trim().min(1, { message: "Space ID is required" }),
+ spaceName: z.string().trim().min(1, { message: "Space Name is required" })
}),
z.discriminatedUnion("scope", [
z.object({
scope: z.literal(OctopusDeploySyncScope.Project),
projectId: z.string().trim().min(1, { message: "Project ID is required" }),
+ projectName: z.string().trim().min(1, { message: "Project Name is required" }),
scopeValues: z
.object({
environments: z.array(z.string()).optional(),
diff --git a/frontend/src/hooks/api/secretSyncs/types/octopus-deploy-sync.ts b/frontend/src/hooks/api/secretSyncs/types/octopus-deploy-sync.ts
index 0a990f60d1..21a8c2e0f9 100644
--- a/frontend/src/hooks/api/secretSyncs/types/octopus-deploy-sync.ts
+++ b/frontend/src/hooks/api/secretSyncs/types/octopus-deploy-sync.ts
@@ -9,6 +9,7 @@ export enum OctopusDeploySyncScope {
type TOctopusDeploySyncDestinationConfigProject = {
scope: OctopusDeploySyncScope.Project;
projectId: string;
+ projectName: string;
scopeValues?: {
environments?: string[];
roles?: string[];
@@ -21,6 +22,7 @@ type TOctopusDeploySyncDestinationConfigProject = {
type TOctopusDeploySyncDestinationConfig = {
spaceId: string;
+ spaceName: string;
} & TOctopusDeploySyncDestinationConfigProject;
export type TOctopusDeploySync = TRootSecretSync & {
diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/OctopusDeploySyncDestinationCol.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/OctopusDeploySyncDestinationCol.tsx
new file mode 100644
index 0000000000..86b6d99ed7
--- /dev/null
+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/OctopusDeploySyncDestinationCol.tsx
@@ -0,0 +1,14 @@
+import { TOctopusDeploySync } from "@app/hooks/api/secretSyncs/types/octopus-deploy-sync";
+
+import { getSecretSyncDestinationColValues } from "../helpers";
+import { SecretSyncTableCell } from "../SecretSyncTableCell";
+
+type Props = {
+ secretSync: TOctopusDeploySync;
+};
+
+export const OctopusDeploySyncDestinationCol = ({ secretSync }: Props) => {
+ const { primaryText, secondaryText } = getSecretSyncDestinationColValues(secretSync);
+
+ return <SecretSyncTableCell primaryText={primaryText} secondaryText={secondaryText} />;
+};
diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/SecretSyncDestinationCol.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/SecretSyncDestinationCol.tsx
index 9857941443..d157453b30 100644
--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/SecretSyncDestinationCol.tsx
+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/SecretSyncDestinationCol.tsx
@@ -25,6 +25,7 @@ import { LaravelForgeSyncDestinationCol } from "./LaravelForgeSyncDestinationCol
import { NetlifySyncDestinationCol } from "./NetlifySyncDestinationCol";
import { NorthflankSyncDestinationCol } from "./NorthflankSyncDestinationCol";
import { OCIVaultSyncDestinationCol } from "./OCIVaultSyncDestinationCol";
+import { OctopusDeploySyncDestinationCol } from "./OctopusDeploySyncDestinationCol";
import { RailwaySyncDestinationCol } from "./RailwaySyncDestinationCol";
import { RenderSyncDestinationCol } from "./RenderSyncDestinationCol";
import { SupabaseSyncDestinationCol } from "./SupabaseSyncDestinationCol";
@@ -106,6 +107,8 @@ export const SecretSyncDestinationCol = ({ secretSync }: Props) => {
return <LaravelForgeSyncDestinationCol secretSync={secretSync} />;
case SecretSync.Chef:
return <ChefSyncDestinationCol secretSync={secretSync} />;
+ case SecretSync.OctopusDeploy:
+ return <OctopusDeploySyncDestinationCol secretSync={secretSync} />;
default:
throw new Error(
`Unhandled Secret Sync Destination Col: ${(secretSync as TSecretSync).destination}`
diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/helpers/index.ts b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/helpers/index.ts
index de0aad100b..967d8876a0 100644
--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/helpers/index.ts
+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/helpers/index.ts
@@ -8,6 +8,7 @@ import {
} from "@app/hooks/api/secretSyncs/types/github-sync";
import { GitLabSyncScope } from "@app/hooks/api/secretSyncs/types/gitlab-sync";
import { HumanitecSyncScope } from "@app/hooks/api/secretSyncs/types/humanitec-sync";
+import { OctopusDeploySyncScope } from "@app/hooks/api/secretSyncs/types/octopus-deploy-sync";
import { RenderSyncScope } from "@app/hooks/api/secretSyncs/types/render-sync";
// This functional ensures parity across what is displayed in the destination column
@@ -206,6 +207,13 @@ export const getSecretSyncDestinationColValues = (secretSync: TSecretSync) => {
primaryText = destinationConfig.dataBagName;
secondaryText = destinationConfig.dataBagItemName;
break;
+ case SecretSync.OctopusDeploy:
+ primaryText = destinationConfig.spaceName || destinationConfig.spaceId;
+ secondaryText = destinationConfig.scope;
+ if (destinationConfig.scope === OctopusDeploySyncScope.Project) {
+ secondaryText = destinationConfig.projectName || destinationConfig.projectId;
+ }
+ break;
default:
throw new Error(`Unhandled Destination Col Values ${destination}`);
}
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OctopusDeploySyncDestinationSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OctopusDeploySyncDestinationSection.tsx
new file mode 100644
index 0000000000..9dad1b9d08
--- /dev/null
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/OctopusDeploySyncDestinationSection.tsx
@@ -0,0 +1,29 @@
+import { GenericFieldLabel } from "@app/components/secret-syncs";
+import {
+ OctopusDeploySyncScope,
+ TOctopusDeploySync
+} from "@app/hooks/api/secretSyncs/types/octopus-deploy-sync";
+
+type Props = {
+ secretSync: TOctopusDeploySync;
+};
+
+export const OctopusDeploySyncDestinationSection = ({ secretSync }: Props) => {
+ const { destinationConfig } = secretSync;
+
+ return (
+ <>
+ <GenericFieldLabel label="Space">
+ {destinationConfig.spaceName || destinationConfig.spaceId}
+ </GenericFieldLabel>
+ <GenericFieldLabel label="Scope" className="capitalize">
+ {destinationConfig.scope}
+ </GenericFieldLabel>
+ {destinationConfig.scope === OctopusDeploySyncScope.Project && (
+ <GenericFieldLabel label="Project">
+ {destinationConfig.projectName || destinationConfig.projectId}
+ </GenericFieldLabel>
+ )}
+ </>
+ );
+};
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx
index de527d6c8a..d4727c4678 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx
@@ -36,6 +36,7 @@ import { LaravelForgeSyncDestinationSection } from "./LaravelForgeSyncDestinatio
import { NetlifySyncDestinationSection } from "./NetlifySyncDestinationSection";
import { NorthflankSyncDestinationSection } from "./NorthflankSyncDestinationSection";
import { OCIVaultSyncDestinationSection } from "./OCIVaultSyncDestinationSection";
+import { OctopusDeploySyncDestinationSection } from "./OctopusDeploySyncDestinationSection";
import { RailwaySyncDestinationSection } from "./RailwaySyncDestinationSection";
import { RenderSyncDestinationSection } from "./RenderSyncDestinationSection";
import { SupabaseSyncDestinationSection } from "./SupabaseSyncDestinationSection";
@@ -160,6 +161,9 @@ export const SecretSyncDestinationSection = ({ secretSync, onEditDestination }:
case SecretSync.Chef:
DestinationComponents = <ChefSyncDestinationSection secretSync={secretSync} />;
break;
+ case SecretSync.OctopusDeploy:
+ DestinationComponents = <OctopusDeploySyncDestinationSection secretSync={secretSync} />;
+ break;
default:
throw new Error(`Unhandled Destination Section components: ${destination}`);
}
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx
index a8de5b379f..923b20cf0a 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/SecretSyncOptionsSection.tsx
@@ -75,6 +75,7 @@ export const SecretSyncOptionsSection = ({ secretSync, onEditOptions }: Props) =
case SecretSync.Bitbucket:
case SecretSync.LaravelForge:
case SecretSync.Chef:
+ case SecretSync.OctopusDeploy:
AdditionalSyncOptionsComponent = null;
break;
default: