@backstage/integration 1.5.0-next.0 → 1.5.1-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @backstage/integration
2
2
 
3
+ ## 1.5.1-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/errors@1.2.1-next.0
9
+ - @backstage/config@1.0.8
10
+
11
+ ## 1.5.0
12
+
13
+ ### Minor Changes
14
+
15
+ - a316d226c780: Add credential provider for GitLab.
16
+ - c7f848bcea3c: Support authentication with a service principal or managed identity for Azure DevOps
17
+
18
+ Azure DevOps recently released support, in public preview, for authenticating with a service principal or managed identity instead of a personal access token (PAT): https://devblogs.microsoft.com/devops/introducing-service-principal-and-managed-identity-support-on-azure-devops/. With this change the Azure integration now supports service principals and managed identities for Azure AD backed Azure DevOps organizations. Service principal and managed identity authentication is not supported on Azure DevOps Server (on-premises) organizations.
19
+
20
+ ### Patch Changes
21
+
22
+ - 3c83550fdb62: Renamed ClientSecret to AzureClientSecretCredential and ManagedIdentity to AzureManagedIdentityCredential
23
+ - df8411779da1: Add support for Repository Variables and Secrets to the `publish:github` and `github:repo:create` scaffolder actions. You will need to add `read/write` permissions to your GITHUB_TOKEN and/or Github Backstage App for Repository `Secrets` and `Variables`
24
+
25
+ Upgrade octokit introduces some breaking changes.
26
+
27
+ - Updated dependencies
28
+ - @backstage/errors@1.2.0
29
+ - @backstage/config@1.0.8
30
+
3
31
  ## 1.5.0-next.0
4
32
 
5
33
  ### Minor Changes
package/dist/index.cjs.js CHANGED
@@ -344,11 +344,11 @@ _ref = new WeakMap();
344
344
  _baseUrl = new WeakMap();
345
345
 
346
346
  const AZURE_HOST = "dev.azure.com";
347
- const isServicePrincipal = (credential) => {
347
+ const isAzureClientSecretCredential = (credential) => {
348
348
  const clientSecretCredential = credential;
349
349
  return Object.keys(credential).length === 3 && clientSecretCredential.clientId !== void 0 && clientSecretCredential.clientSecret !== void 0 && clientSecretCredential.tenantId !== void 0;
350
350
  };
351
- const isManagedIdentity = (credential) => {
351
+ const isAzureManagedIdentityCredential = (credential) => {
352
352
  return Object.keys(credential).length === 1 && credential.clientId !== void 0;
353
353
  };
354
354
  function readAzureIntegrationConfig(config) {
@@ -365,7 +365,7 @@ function readAzureIntegrationConfig(config) {
365
365
  `Invalid Azure integration config, '${host}' is not a valid host`
366
366
  );
367
367
  }
368
- if (credential && !isServicePrincipal(credential) && !isManagedIdentity(credential)) {
368
+ if (credential && !isAzureClientSecretCredential(credential) && !isAzureManagedIdentityCredential(credential)) {
369
369
  throw new Error(
370
370
  `Invalid Azure integration config, credential is not valid`
371
371
  );
@@ -461,7 +461,7 @@ async function getAzureRequestOptions(config, additionalHeaders) {
461
461
  const headers = additionalHeaders ? { ...additionalHeaders } : {};
462
462
  const { token, credential } = config;
463
463
  if (credential) {
464
- if (isServicePrincipal(credential)) {
464
+ if (isAzureClientSecretCredential(credential)) {
465
465
  const servicePrincipal = new identity.ClientSecretCredential(
466
466
  credential.tenantId,
467
467
  credential.clientId,
@@ -469,7 +469,7 @@ async function getAzureRequestOptions(config, additionalHeaders) {
469
469
  );
470
470
  const accessToken = await servicePrincipal.getToken(azureDevOpsScope);
471
471
  headers.Authorization = `Bearer ${accessToken.token}`;
472
- } else if (isManagedIdentity(credential)) {
472
+ } else if (isAzureManagedIdentityCredential(credential)) {
473
473
  const managedIdentity = new identity.ManagedIdentityCredential(
474
474
  credential.clientId
475
475
  );