@backstage/integration 1.5.0-next.0 → 1.5.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 +20 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @backstage/integration
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a316d226c780: Add credential provider for GitLab.
|
|
8
|
+
- c7f848bcea3c: Support authentication with a service principal or managed identity for Azure DevOps
|
|
9
|
+
|
|
10
|
+
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.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 3c83550fdb62: Renamed ClientSecret to AzureClientSecretCredential and ManagedIdentity to AzureManagedIdentityCredential
|
|
15
|
+
- 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`
|
|
16
|
+
|
|
17
|
+
Upgrade octokit introduces some breaking changes.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/errors@1.2.0
|
|
21
|
+
- @backstage/config@1.0.8
|
|
22
|
+
|
|
3
23
|
## 1.5.0-next.0
|
|
4
24
|
|
|
5
25
|
### 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
|
|
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
|
|
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 && !
|
|
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 (
|
|
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 (
|
|
472
|
+
} else if (isAzureManagedIdentityCredential(credential)) {
|
|
473
473
|
const managedIdentity = new identity.ManagedIdentityCredential(
|
|
474
474
|
credential.clientId
|
|
475
475
|
);
|