@backstage/core-app-api 1.15.5 → 1.16.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 +30 -0
- package/config.d.ts +1 -1
- package/dist/apis/implementations/DiscoveryApi/FrontendHostDiscovery.esm.js +4 -1
- package/dist/apis/implementations/DiscoveryApi/FrontendHostDiscovery.esm.js.map +1 -1
- package/dist/apis/implementations/FetchApi/IdentityAuthInjectorFetchMiddleware.esm.js +20 -1
- package/dist/apis/implementations/FetchApi/IdentityAuthInjectorFetchMiddleware.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +4 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @backstage/core-app-api
|
|
2
2
|
|
|
3
|
+
## 1.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9262001: The default auth injection middleware for the `FetchApi` will now also take configuration under `discovery.endpoints` into consideration when deciding whether to include credentials or not.
|
|
8
|
+
- 12f8e01: The `discovery.endpoints` configuration no longer requires both `internal` and `external` target when using the object form, instead falling back to the default.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/core-plugin-api@1.10.5
|
|
14
|
+
- @backstage/config@1.3.2
|
|
15
|
+
- @backstage/types@1.2.1
|
|
16
|
+
- @backstage/version-bridge@1.0.11
|
|
17
|
+
|
|
18
|
+
## 1.16.0-next.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- 9262001: The default auth injection middleware for the `FetchApi` will now also take configuration under `discovery.endpoints` into consideration when deciding whether to include credentials or not.
|
|
23
|
+
- 12f8e01: The `discovery.endpoints` configuration no longer requires both `internal` and `external` target when using the object form, instead falling back to the default.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @backstage/config@1.3.2
|
|
29
|
+
- @backstage/core-plugin-api@1.10.4
|
|
30
|
+
- @backstage/types@1.2.1
|
|
31
|
+
- @backstage/version-bridge@1.0.11
|
|
32
|
+
|
|
3
33
|
## 1.15.5
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
package/config.d.ts
CHANGED
|
@@ -30,7 +30,10 @@ class FrontendHostDiscovery {
|
|
|
30
30
|
const path = options?.pathPattern ?? "/api/{{ pluginId }}";
|
|
31
31
|
const baseUrl = config.getString("backend.baseUrl");
|
|
32
32
|
const endpoints = config.getOptionalConfigArray("discovery.endpoints")?.flatMap((e) => {
|
|
33
|
-
const target = typeof e.get("target") === "object" ? e.
|
|
33
|
+
const target = typeof e.get("target") === "object" ? e.getOptionalString("target.external") : e.getString("target");
|
|
34
|
+
if (!target) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
34
37
|
const discovery = UrlPatternDiscovery.compile(target);
|
|
35
38
|
return e.getStringArray("plugins").map((pluginId) => [pluginId, discovery]);
|
|
36
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontendHostDiscovery.esm.js","sources":["../../../../src/apis/implementations/DiscoveryApi/FrontendHostDiscovery.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Config } from '@backstage/config';\nimport { DiscoveryApi } from '@backstage/core-plugin-api';\nimport { UrlPatternDiscovery } from './UrlPatternDiscovery';\n\n/**\n * FrontendHostDiscovery is a config driven DiscoveryApi implementation.\n * It uses the app-config to determine the url for a plugin.\n *\n * @public\n */\nexport class FrontendHostDiscovery implements DiscoveryApi {\n /**\n * Creates a new FrontendHostDiscovery discovery instance by reading\n * the external target URL from the `discovery.endpoints` config section.\n *\n * eg.\n * ```yaml\n * discovery:\n * endpoints:\n * - target: https://internal.example.com/internal-catalog\n * plugins: [catalog]\n * - target: https://internal.example.com/secure/api/{{pluginId}}\n * plugins: [auth, permissions]\n * - target:\n * internal: https://internal.example.com/search\n * external: https://example.com/search\n * plugins: [search]\n * ```\n *\n * If a plugin is not declared in the config, the discovery will fall back to using the baseUrl with\n * the provided `pathPattern` appended. The default path pattern is `\"/api/{{ pluginId }}\"`.\n */\n static fromConfig(config: Config, options?: { pathPattern?: string }) {\n const path = options?.pathPattern ?? '/api/{{ pluginId }}';\n const baseUrl = config.getString('backend.baseUrl');\n\n const endpoints = config\n .getOptionalConfigArray('discovery.endpoints')\n ?.flatMap(e => {\n const target =\n typeof e.get('target') === 'object'\n ? e.
|
|
1
|
+
{"version":3,"file":"FrontendHostDiscovery.esm.js","sources":["../../../../src/apis/implementations/DiscoveryApi/FrontendHostDiscovery.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Config } from '@backstage/config';\nimport { DiscoveryApi } from '@backstage/core-plugin-api';\nimport { UrlPatternDiscovery } from './UrlPatternDiscovery';\n\n/**\n * FrontendHostDiscovery is a config driven DiscoveryApi implementation.\n * It uses the app-config to determine the url for a plugin.\n *\n * @public\n */\nexport class FrontendHostDiscovery implements DiscoveryApi {\n /**\n * Creates a new FrontendHostDiscovery discovery instance by reading\n * the external target URL from the `discovery.endpoints` config section.\n *\n * eg.\n * ```yaml\n * discovery:\n * endpoints:\n * - target: https://internal.example.com/internal-catalog\n * plugins: [catalog]\n * - target: https://internal.example.com/secure/api/{{pluginId}}\n * plugins: [auth, permissions]\n * - target:\n * internal: https://internal.example.com/search\n * external: https://example.com/search\n * plugins: [search]\n * ```\n *\n * If a plugin is not declared in the config, the discovery will fall back to using the baseUrl with\n * the provided `pathPattern` appended. The default path pattern is `\"/api/{{ pluginId }}\"`.\n */\n static fromConfig(config: Config, options?: { pathPattern?: string }) {\n const path = options?.pathPattern ?? '/api/{{ pluginId }}';\n const baseUrl = config.getString('backend.baseUrl');\n\n const endpoints = config\n .getOptionalConfigArray('discovery.endpoints')\n ?.flatMap(e => {\n const target =\n typeof e.get('target') === 'object'\n ? e.getOptionalString('target.external')\n : e.getString('target');\n if (!target) {\n return [];\n }\n const discovery = UrlPatternDiscovery.compile(target);\n return e\n .getStringArray('plugins')\n .map(pluginId => [pluginId, discovery] as const);\n });\n\n return new FrontendHostDiscovery(\n new Map(endpoints),\n UrlPatternDiscovery.compile(`${baseUrl}${path}`),\n );\n }\n\n private constructor(\n private readonly endpoints: Map<string, DiscoveryApi>,\n private readonly defaultEndpoint: DiscoveryApi,\n ) {}\n\n async getBaseUrl(pluginId: string): Promise<string> {\n const endpoint = this.endpoints.get(pluginId);\n if (endpoint) {\n return endpoint.getBaseUrl(pluginId);\n }\n return this.defaultEndpoint.getBaseUrl(pluginId);\n }\n}\n"],"names":[],"mappings":";;AAyBO,MAAM,qBAA8C,CAAA;AAAA,EAgDjD,WAAA,CACW,WACA,eACjB,EAAA;AAFiB,IAAA,IAAA,CAAA,SAAA,GAAA,SAAA;AACA,IAAA,IAAA,CAAA,eAAA,GAAA,eAAA;AAAA;AAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,E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erValue
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns an array of plugin URL prefixes derived from the static `discovery`
|
|
21
|
+
* configuration, to be used as `urlPrefixAllowlist` option of {@link create}.
|
|
22
|
+
*/
|
|
23
|
+
static getDiscoveryUrlPrefixes(config) {
|
|
24
|
+
const endpointConfigs = config.getOptionalConfigArray("discovery.endpoints") || [];
|
|
25
|
+
return endpointConfigs.flatMap((c) => {
|
|
26
|
+
const target = typeof c.get("target") === "object" ? c.getString("target.external") : c.getString("target");
|
|
27
|
+
const plugins = c.getStringArray("plugins");
|
|
28
|
+
return plugins.map(
|
|
29
|
+
(pluginId) => target.replace(/\{\{\s*pluginId\s*\}\}/g, pluginId)
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
19
33
|
apply(next) {
|
|
20
34
|
return async (input, init) => {
|
|
21
35
|
const request = new Request(input, init);
|
|
@@ -34,7 +48,12 @@ function buildMatcher(options) {
|
|
|
34
48
|
} else if (options.urlPrefixAllowlist) {
|
|
35
49
|
return buildPrefixMatcher(options.urlPrefixAllowlist);
|
|
36
50
|
} else if (options.config) {
|
|
37
|
-
return buildPrefixMatcher([
|
|
51
|
+
return buildPrefixMatcher([
|
|
52
|
+
options.config.getString("backend.baseUrl"),
|
|
53
|
+
...IdentityAuthInjectorFetchMiddleware.getDiscoveryUrlPrefixes(
|
|
54
|
+
options.config
|
|
55
|
+
)
|
|
56
|
+
]);
|
|
38
57
|
}
|
|
39
58
|
return () => false;
|
|
40
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityAuthInjectorFetchMiddleware.esm.js","sources":["../../../../src/apis/implementations/FetchApi/IdentityAuthInjectorFetchMiddleware.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Config } from '@backstage/config';\nimport { IdentityApi } from '@backstage/core-plugin-api';\nimport { FetchMiddleware } from './types';\n\n/**\n * A fetch middleware, which injects a Backstage token header when the user is\n * signed in.\n */\nexport class IdentityAuthInjectorFetchMiddleware implements FetchMiddleware {\n static create(options: {\n identityApi: IdentityApi;\n config?: Config;\n urlPrefixAllowlist?: string[];\n allowUrl?: (url: string) => boolean;\n header?: {\n name: string;\n value: (backstageToken: string) => string;\n };\n }): IdentityAuthInjectorFetchMiddleware {\n const matcher = buildMatcher(options);\n const headerName = options.header?.name || 'authorization';\n const headerValue = options.header?.value || (token => `Bearer ${token}`);\n\n return new IdentityAuthInjectorFetchMiddleware(\n options.identityApi,\n matcher,\n headerName,\n headerValue,\n );\n }\n\n constructor(\n public readonly identityApi: IdentityApi,\n public readonly allowUrl: (url: string) => boolean,\n public readonly headerName: string,\n public readonly headerValue: (pluginId: string) => string,\n ) {}\n\n apply(next: typeof fetch): typeof fetch {\n return async (input, init) => {\n // Skip this middleware if the header already exists, or if the URL\n // doesn't match any of the allowlist items, or if there was no token.\n // NOTE(freben): The \"as any\" casts here and below are because of subtle\n // undici type differences that happened in a node types bump. Those are\n // immaterial to the code at hand at runtime, as the global fetch and\n // Request are always taken from the same place.\n const request = new Request(input as any, init);\n const { token } = await this.identityApi.getCredentials();\n if (\n request.headers.get(this.headerName) ||\n typeof token !== 'string' ||\n !token ||\n !this.allowUrl(request.url)\n ) {\n return next(input as any, init);\n }\n\n request.headers.set(this.headerName, this.headerValue(token));\n return next(request);\n };\n }\n}\n\nfunction buildMatcher(options: {\n config?: Config;\n urlPrefixAllowlist?: string[];\n allowUrl?: (url: string) => boolean;\n}): (url: string) => boolean {\n if (options.allowUrl) {\n return options.allowUrl;\n } else if (options.urlPrefixAllowlist) {\n return buildPrefixMatcher(options.urlPrefixAllowlist);\n } else if (options.config) {\n return buildPrefixMatcher([options.config.getString('backend.baseUrl')]);\n }\n return () => false;\n}\n\nfunction buildPrefixMatcher(prefixes: string[]): (url: string) => boolean {\n const trimmedPrefixes = prefixes.map(prefix => prefix.replace(/\\/$/, ''));\n return url =>\n trimmedPrefixes.some(\n prefix => url === prefix || url.startsWith(`${prefix}/`),\n );\n}\n"],"names":[],"mappings":"AAwBO,MAAM,mCAA+D,CAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"IdentityAuthInjectorFetchMiddleware.esm.js","sources":["../../../../src/apis/implementations/FetchApi/IdentityAuthInjectorFetchMiddleware.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Config } from '@backstage/config';\nimport { IdentityApi } from '@backstage/core-plugin-api';\nimport { FetchMiddleware } from './types';\n\n/**\n * A fetch middleware, which injects a Backstage token header when the user is\n * signed in.\n */\nexport class IdentityAuthInjectorFetchMiddleware implements FetchMiddleware {\n static create(options: {\n identityApi: IdentityApi;\n config?: Config;\n urlPrefixAllowlist?: string[];\n allowUrl?: (url: string) => boolean;\n header?: {\n name: string;\n value: (backstageToken: string) => string;\n };\n }): IdentityAuthInjectorFetchMiddleware {\n const matcher = buildMatcher(options);\n const headerName = options.header?.name || 'authorization';\n const headerValue = options.header?.value || (token => `Bearer ${token}`);\n\n return new IdentityAuthInjectorFetchMiddleware(\n options.identityApi,\n matcher,\n headerName,\n headerValue,\n );\n }\n\n /**\n * Returns an array of plugin URL prefixes derived from the static `discovery`\n * configuration, to be used as `urlPrefixAllowlist` option of {@link create}.\n */\n static getDiscoveryUrlPrefixes(config: Config): string[] {\n const endpointConfigs =\n config.getOptionalConfigArray('discovery.endpoints') || [];\n return endpointConfigs.flatMap(c => {\n const target =\n typeof c.get('target') === 'object'\n ? c.getString('target.external')\n : c.getString('target');\n const plugins = c.getStringArray('plugins');\n return plugins.map(pluginId =>\n target.replace(/\\{\\{\\s*pluginId\\s*\\}\\}/g, pluginId),\n );\n });\n }\n\n constructor(\n public readonly identityApi: IdentityApi,\n public readonly allowUrl: (url: string) => boolean,\n public readonly headerName: string,\n public readonly headerValue: (pluginId: string) => string,\n ) {}\n\n apply(next: typeof fetch): typeof fetch {\n return async (input, init) => {\n // Skip this middleware if the header already exists, or if the URL\n // doesn't match any of the allowlist items, or if there was no token.\n // NOTE(freben): The \"as any\" casts here and below are because of subtle\n // undici type differences that happened in a node types bump. Those are\n // immaterial to the code at hand at runtime, as the global fetch and\n // Request are always taken from the same place.\n const request = new Request(input as any, init);\n const { token } = await this.identityApi.getCredentials();\n if (\n request.headers.get(this.headerName) ||\n typeof token !== 'string' ||\n !token ||\n !this.allowUrl(request.url)\n ) {\n return next(input as any, init);\n }\n\n request.headers.set(this.headerName, this.headerValue(token));\n return next(request);\n };\n }\n}\n\nfunction buildMatcher(options: {\n config?: Config;\n urlPrefixAllowlist?: string[];\n allowUrl?: (url: string) => boolean;\n}): (url: string) => boolean {\n if (options.allowUrl) {\n return options.allowUrl;\n } else if (options.urlPrefixAllowlist) {\n return buildPrefixMatcher(options.urlPrefixAllowlist);\n } else if (options.config) {\n return buildPrefixMatcher([\n options.config.getString('backend.baseUrl'),\n ...IdentityAuthInjectorFetchMiddleware.getDiscoveryUrlPrefixes(\n options.config,\n ),\n ]);\n }\n return () => false;\n}\n\nfunction buildPrefixMatcher(prefixes: string[]): (url: string) => boolean {\n const trimmedPrefixes = prefixes.map(prefix => prefix.replace(/\\/$/, ''));\n return url =>\n trimmedP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AAA,eAAA,GAAkB,SAAS,GAAI,CAAA,CAAA,MAAA,KAAU,OAAO,OAAQ,CAAA,KAAA,EAAO,EAAE,CAAC,CAAA;AACxE,EAAA,OAAO,SACL,eAAgB,CAAA,IAAA;AAAA,IACd,YAAU,GAAQ,KAAA,MAAA,IAAU,IAAI,UAAW,CAAA,CAAA,EAAG,MAAM,CAAG,CAAA,CAAA;AAAA,GACzD;AACJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -487,7 +487,7 @@ declare class ErrorAlerter implements ErrorApi {
|
|
|
487
487
|
post(error: ErrorApiError, context?: ErrorApiErrorContext): void;
|
|
488
488
|
error$(): _backstage_types.Observable<{
|
|
489
489
|
error: ErrorApiError;
|
|
490
|
-
context?: ErrorApiErrorContext
|
|
490
|
+
context?: ErrorApiErrorContext;
|
|
491
491
|
}>;
|
|
492
492
|
}
|
|
493
493
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/core-app-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "Core app API used by Backstage apps",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library"
|
|
@@ -29,13 +29,6 @@
|
|
|
29
29
|
},
|
|
30
30
|
"main": "./dist/index.esm.js",
|
|
31
31
|
"types": "./dist/index.d.ts",
|
|
32
|
-
"typesVersions": {
|
|
33
|
-
"*": {
|
|
34
|
-
"index": [
|
|
35
|
-
"dist/index.d.ts"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
32
|
"files": [
|
|
40
33
|
"dist",
|
|
41
34
|
"config.d.ts"
|
|
@@ -51,7 +44,7 @@
|
|
|
51
44
|
},
|
|
52
45
|
"dependencies": {
|
|
53
46
|
"@backstage/config": "^1.3.2",
|
|
54
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
47
|
+
"@backstage/core-plugin-api": "^1.10.5",
|
|
55
48
|
"@backstage/types": "^1.2.1",
|
|
56
49
|
"@backstage/version-bridge": "^1.0.11",
|
|
57
50
|
"@types/prop-types": "^15.7.3",
|
|
@@ -64,8 +57,8 @@
|
|
|
64
57
|
"zod": "^3.22.4"
|
|
65
58
|
},
|
|
66
59
|
"devDependencies": {
|
|
67
|
-
"@backstage/cli": "^0.
|
|
68
|
-
"@backstage/test-utils": "^1.7.
|
|
60
|
+
"@backstage/cli": "^0.31.0",
|
|
61
|
+
"@backstage/test-utils": "^1.7.6",
|
|
69
62
|
"@testing-library/dom": "^10.0.0",
|
|
70
63
|
"@testing-library/jest-dom": "^6.0.0",
|
|
71
64
|
"@testing-library/react": "^16.0.0",
|