Skip to content

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

feat(secret-sync): Add Azure Devops PR suggestions

carlosmonastyrskibf726386007d
diff --git a/backend/src/services/app-connection/azure-devops/azure-devops-service.ts b/backend/src/services/app-connection/azure-devops/azure-devops-service.ts
index 4a0705e10a..a79a3e7ea6 100644
--- a/backend/src/services/app-connection/azure-devops/azure-devops-service.ts
+++ b/backend/src/services/app-connection/azure-devops/azure-devops-service.ts
@@ -70,7 +70,7 @@ const listAzureDevOpsProjects = async (
// Use the standard Azure DevOps Projects API endpoint
// This endpoint returns only projects that the authenticated user has access to
- const devOpsEndpoint = `${IntegrationUrls.AZURE_DEVOPS_API_URL}/${orgName}/_apis/projects?api-version=7.1`;
+ const devOpsEndpoint = `${IntegrationUrls.AZURE_DEVOPS_API_URL}/${encodeURIComponent(orgName)}/_apis/projects?api-version=7.1`;
try {
const { data } = await request.get<TAzureDevOpsProjectsResponse>(devOpsEndpoint, {
headers: getAuthHeaders(appConnection, accessToken)
diff --git a/backend/src/services/app-connection/azure-devops/azure-devops-types.ts b/backend/src/services/app-connection/azure-devops/azure-devops-types.ts
index 7e8ab80250..62a80c1c53 100644
--- a/backend/src/services/app-connection/azure-devops/azure-devops-types.ts
+++ b/backend/src/services/app-connection/azure-devops/azure-devops-types.ts
@@ -52,11 +52,3 @@ export interface TAzureListRegisteredAppsResponse {
"@odata.nextLink"?: string;
value: TAzureRegisteredApp[];
}
-
-export interface TAzureDevOps {
- keyId: string;
- displayName?: string;
- startDateTime: string;
- endDateTime: string;
- secretText?: string;
-}
diff --git a/backend/src/services/secret-sync/azure-devops/azure-devops-sync-fns.ts b/backend/src/services/secret-sync/azure-devops/azure-devops-sync-fns.ts
index 84e99857a0..3a2921fbdb 100644
--- a/backend/src/services/secret-sync/azure-devops/azure-devops-sync-fns.ts
+++ b/backend/src/services/secret-sync/azure-devops/azure-devops-sync-fns.ts
@@ -68,7 +68,7 @@ export const azureDevOpsSyncFactory = ({ kmsService, appConnectionDAL }: TAzureD
environmentName: string,
isOAuth: boolean
) => {
- const url = `${IntegrationUrls.AZURE_DEVOPS_API_URL}/${orgName}/${projectId}/_apis/distributedtask/variablegroups?api-version=7.1`;
+ const url = `${IntegrationUrls.AZURE_DEVOPS_API_URL}/${encodeURIComponent(orgName)}/${encodeURIComponent(projectId)}/_apis/distributedtask/variablegroups?api-version=7.1`;
const response = await request.get<AzureDevOpsVariableGroupList>(url, {
headers: {
Authorization: getAuthHeader(accessToken, isOAuth)
diff --git a/docs/integrations/app-connections/azure-devops.mdx b/docs/integrations/app-connections/azure-devops.mdx
index 378ab2a4c7..1eaa8e82bf 100644
--- a/docs/integrations/app-connections/azure-devops.mdx
+++ b/docs/integrations/app-connections/azure-devops.mdx
@@ -103,7 +103,7 @@ Infisical currently supports two methods for connecting to Azure DevOps, which a
<Tab title="Infisical UI">
<Steps>
<Step title="Fill in Connection Details">
- Fill in the **Tenant ID** field with the Directory (Tenant) ID you obtained in the previous step. And the organization name of the Azure DevOps organization you want to connect to.
+ Fill in the **Tenant ID** field with the Directory (Tenant) ID you obtained in the previous step. Also fill in the organization name of the Azure DevOps organization you want to connect to.
![Fill in Connection Details](/images/app-connections/azure/devops/fill-in-connection-details-oauth.png)
<Tip>
@@ -132,6 +132,6 @@ Infisical currently supports two methods for connecting to Azure DevOps, which a
</Tabs>
</Step>
<Step title="Connection Created">
- Your **Azure Client Secrets Connection** is now available for use. ![Azure Client Secrets](/images/app-connections/azure/devops/devops-connection.png)
+ Your **Azure DevOps Connection** is now available for use. ![Azure DevOps](/images/app-connections/azure/devops/devops-connection.png)
</Step>
</Steps>
diff --git a/docs/integrations/secret-syncs/azure-devops.mdx b/docs/integrations/secret-syncs/azure-devops.mdx
index 8021134841..751c0040fe 100644
--- a/docs/integrations/secret-syncs/azure-devops.mdx
+++ b/docs/integrations/secret-syncs/azure-devops.mdx
@@ -5,8 +5,8 @@ description: "Learn how to configure a Azure DevOps Sync for Infisical."
**Prerequisites:**
- - Set up and add secrets to [Infisical Cloud](https://app.infisical.com)
- - Create an [Azure DevOps Connection](/integrations/app-connections/azure-devops)
+- Set up and add secrets to [Infisical Cloud](https://app.infisical.com)
+- Create an [Azure DevOps Connection](/integrations/app-connections/azure-devops)
<Tabs>
<Tab title="Infisical UI">
@@ -31,7 +31,7 @@ description: "Learn how to configure a Azure DevOps Sync for Infisical."
- **Azure DevOps Connection**: The Azure DevOps Connection to authenticate with.
- **Project**: The Azure DevOps project to deploy secrets to.
- <p class="height:1px" />
+ <p class="height:1px"/>
5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.
![Configure Options](/images/secret-syncs/azure-devops/devops-options.png)
@@ -92,7 +92,7 @@ description: "Learn how to configure a Azure DevOps Sync for Infisical."
{
"secretSync": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
- "name": "my-key-vault-sync",
+ "name": "my-devops-sync",
"description": "an example sync",
"isEnabled": true,
"version": 1,
@@ -114,7 +114,7 @@ description: "Learn how to configure a Azure DevOps Sync for Infisical."
"lastRemovedAt": null,
"syncOptions": {
"initialSyncBehavior": "overwrite-destination",
- "keySchema": "PIPELINE_${key}",
+ "keySchema": "PIPELINE_${secretKey}",
"disableSecretDeletion": true
},
"connection": {
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SecretSyncDestinationFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SecretSyncDestinationFields.tsx
index 21866c4a64..71405c4489 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SecretSyncDestinationFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/SecretSyncDestinationFields.tsx
@@ -7,7 +7,7 @@ import { OnePassSyncFields } from "./1PasswordSyncFields";
import { AwsParameterStoreSyncFields } from "./AwsParameterStoreSyncFields";
import { AwsSecretsManagerSyncFields } from "./AwsSecretsManagerSyncFields";
import { AzureAppConfigurationSyncFields } from "./AzureAppConfigurationSyncFields";
-import { AzureDevOpsSyncFields } from "./AzureDevopsSyncFields";
+import { AzureDevOpsSyncFields } from "./AzureDevOpsSyncFields";
import { AzureKeyVaultSyncFields } from "./AzureKeyVaultSyncFields";
import { CamundaSyncFields } from "./CamundaSyncFields";
import { DatabricksSyncFields } from "./DatabricksSyncFields";
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
index 19988b7e16..854555ffb2 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncReviewFields/SecretSyncReviewFields.tsx
@@ -16,7 +16,7 @@ import {
AwsSecretsManagerSyncReviewFields
} from "./AwsSecretsManagerSyncReviewFields";
import { AzureAppConfigurationSyncReviewFields } from "./AzureAppConfigurationSyncReviewFields";
-import { AzureDevOpsSyncReviewFields } from "./AzureDevopsSyncReviewFields";
+import { AzureDevOpsSyncReviewFields } from "./AzureDevOpsSyncReviewFields";
import { AzureKeyVaultSyncReviewFields } from "./AzureKeyVaultSyncReviewFields";
import { CamundaSyncReviewFields } from "./CamundaSyncReviewFields";
import { DatabricksSyncReviewFields } from "./DatabricksSyncReviewFields";
diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/AzureDevopsDestinationCol.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/AzureDevOpsSyncDestinationCol.tsx
similarity index 100%
rename from frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/AzureDevopsDestinationCol.tsx
rename to frontend/src/pages/secret-manager/IntegrationsListPage/components/SecretSyncsTab/SecretSyncTable/SecretSyncDestinationCol/AzureDevOpsSyncDestinationCol.tsx
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 041d67e73a..f342c361ce 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
@@ -4,7 +4,7 @@ import { OnePassSyncDestinationCol } from "./1PasswordSyncDestinationCol";
import { AwsParameterStoreSyncDestinationCol } from "./AwsParameterStoreSyncDestinationCol";
import { AwsSecretsManagerSyncDestinationCol } from "./AwsSecretsManagerSyncDestinationCol";
import { AzureAppConfigurationDestinationSyncCol } from "./AzureAppConfigurationDestinationSyncCol";
-import { AzureDevOpsSyncDestinationCol } from "./AzureDevopsDestinationCol";
+import { AzureDevOpsSyncDestinationCol } from "./AzureDevOpsSyncDestinationCol";
import { AzureKeyVaultDestinationSyncCol } from "./AzureKeyVaultDestinationSyncCol";
import { CamundaSyncDestinationCol } from "./CamundaSyncDestinationCol";
import { DatabricksSyncDestinationCol } from "./DatabricksSyncDestinationCol";
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 3ed01a7bb2..dea219ee7c 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
@@ -112,6 +112,7 @@ export const getSecretSyncDestinationColValues = (secretSync: TSecretSync) => {
break;
case SecretSync.AzureDevOps:
primaryText = destinationConfig.devopsProjectName;
+ secondaryText = destinationConfig.devopsProjectId;
break;
default:
throw new Error(`Unhandled Destination Col Values ${destination}`);
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 3fdbfd5e96..24cc3908ad 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/SecretSyncDestinatonSection.tsx
@@ -14,7 +14,7 @@ import { OnePassSyncDestinationSection } from "./1PasswordSyncDestinationSection
import { AwsParameterStoreSyncDestinationSection } from "./AwsParameterStoreSyncDestinationSection";
import { AwsSecretsManagerSyncDestinationSection } from "./AwsSecretsManagerSyncDestinationSection";
import { AzureAppConfigurationSyncDestinationSection } from "./AzureAppConfigurationSyncDestinationSection";
-import { AzureDevOpsSyncDestinationSection } from "./AzureDevopsSyncDestinationSection";
+import { AzureDevOpsSyncDestinationSection } from "./AzureDevOpsSyncDestinationSection";
import { AzureKeyVaultSyncDestinationSection } from "./AzureKeyVaultSyncDestinationSection";
import { CamundaSyncDestinationSection } from "./CamundaSyncDestinationSection";
import { DatabricksSyncDestinationSection } from "./DatabricksSyncDestinationSection";