@backstage/plugin-auth-backend 0.21.1 → 0.22.0-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 +36 -20
- package/config.d.ts +5 -0
- package/dist/index.cjs.js +362 -284
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +17 -11
- package/package.json +43 -43
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
-
import { LoggerService } from '@backstage/backend-plugin-api';
|
|
2
|
+
import { LoggerService, AuthService, HttpAuthService, DiscoveryService } from '@backstage/backend-plugin-api';
|
|
3
3
|
import express from 'express';
|
|
4
4
|
import { PluginDatabaseManager, PluginEndpointDiscovery, TokenManager } from '@backstage/backend-common';
|
|
5
5
|
import { CatalogApi } from '@backstage/catalog-client';
|
|
6
6
|
import { Config } from '@backstage/config';
|
|
7
7
|
import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
|
|
8
|
-
import {
|
|
8
|
+
import { TokenParams as TokenParams$1, AuthProviderFactory as AuthProviderFactory$1, ProfileInfo as ProfileInfo$1, BackstageSignInResult, OAuthState as OAuthState$1, AuthResolverCatalogUserQuery as AuthResolverCatalogUserQuery$1, AuthResolverContext as AuthResolverContext$1, CookieConfigurer as CookieConfigurer$1, AuthProviderConfig as AuthProviderConfig$1, AuthProviderRouteHandlers as AuthProviderRouteHandlers$1, ClientAuthResponse, SignInInfo as SignInInfo$1, SignInResolver as SignInResolver$1, OAuthEnvironmentHandler as OAuthEnvironmentHandler$1, decodeOAuthState, encodeOAuthState, prepareBackstageIdentityResponse as prepareBackstageIdentityResponse$1, WebMessageResponse as WebMessageResponse$1 } from '@backstage/plugin-auth-node';
|
|
9
9
|
import { Profile } from 'passport';
|
|
10
10
|
import * as _backstage_plugin_auth_backend_module_aws_alb_provider from '@backstage/plugin-auth-backend-module-aws-alb-provider';
|
|
11
11
|
import { AwsAlbResult as AwsAlbResult$1 } from '@backstage/plugin-auth-backend-module-aws-alb-provider';
|
|
@@ -24,10 +24,19 @@ import { UserEntity, Entity } from '@backstage/catalog-model';
|
|
|
24
24
|
*/
|
|
25
25
|
declare const authPlugin: () => _backstage_backend_plugin_api.BackendFeature;
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* @public
|
|
29
|
+
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
30
|
+
*/
|
|
31
|
+
type TokenParams = TokenParams$1;
|
|
32
|
+
|
|
27
33
|
/** @public */
|
|
28
34
|
type ProviderFactories = {
|
|
29
35
|
[s: string]: AuthProviderFactory$1;
|
|
30
36
|
};
|
|
37
|
+
/** @public */
|
|
38
|
+
declare function createOriginFilter(config: Config): (origin: string) => boolean;
|
|
39
|
+
|
|
31
40
|
/** @public */
|
|
32
41
|
interface RouterOptions {
|
|
33
42
|
logger: LoggerService;
|
|
@@ -35,6 +44,8 @@ interface RouterOptions {
|
|
|
35
44
|
config: Config;
|
|
36
45
|
discovery: PluginEndpointDiscovery;
|
|
37
46
|
tokenManager: TokenManager;
|
|
47
|
+
auth?: AuthService;
|
|
48
|
+
httpAuth?: HttpAuthService;
|
|
38
49
|
tokenFactoryAlgorithm?: string;
|
|
39
50
|
providerFactories?: ProviderFactories;
|
|
40
51
|
disableDefaultProviderFactories?: boolean;
|
|
@@ -42,14 +53,6 @@ interface RouterOptions {
|
|
|
42
53
|
}
|
|
43
54
|
/** @public */
|
|
44
55
|
declare function createRouter(options: RouterOptions): Promise<express.Router>;
|
|
45
|
-
/** @public */
|
|
46
|
-
declare function createOriginFilter(config: Config): (origin: string) => boolean;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @public
|
|
50
|
-
* @deprecated import from `@backstage/plugin-auth-node` instead
|
|
51
|
-
*/
|
|
52
|
-
type TokenParams = TokenParams$1;
|
|
53
56
|
|
|
54
57
|
/**
|
|
55
58
|
* Common options for passport.js-based OAuth providers
|
|
@@ -776,10 +779,13 @@ declare const ensuresXRequestedWith: (req: express.Request) => boolean;
|
|
|
776
779
|
*/
|
|
777
780
|
declare class CatalogIdentityClient {
|
|
778
781
|
private readonly catalogApi;
|
|
779
|
-
private readonly
|
|
782
|
+
private readonly auth;
|
|
780
783
|
constructor(options: {
|
|
781
784
|
catalogApi: CatalogApi;
|
|
782
785
|
tokenManager: TokenManager;
|
|
786
|
+
discovery: DiscoveryService;
|
|
787
|
+
auth?: AuthService;
|
|
788
|
+
httpAuth?: HttpAuthService;
|
|
783
789
|
});
|
|
784
790
|
/**
|
|
785
791
|
* Looks up a single user using a query.
|
package/package.json
CHANGED
|
@@ -1,56 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-auth-backend",
|
|
3
|
+
"version": "0.22.0-next.0",
|
|
3
4
|
"description": "A Backstage backend plugin that handles authentication",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"license": "Apache-2.0",
|
|
5
|
+
"backstage": {
|
|
6
|
+
"role": "backend-plugin"
|
|
7
|
+
},
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public",
|
|
10
10
|
"main": "dist/index.cjs.js",
|
|
11
11
|
"types": "dist/index.d.ts"
|
|
12
12
|
},
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
13
|
+
"keywords": [
|
|
14
|
+
"backstage"
|
|
15
|
+
],
|
|
16
16
|
"homepage": "https://backstage.io",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "https://github.com/backstage/backstage",
|
|
20
20
|
"directory": "plugins/auth-backend"
|
|
21
21
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
|
+
"main": "dist/index.cjs.js",
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"migrations",
|
|
28
|
+
"config.d.ts"
|
|
24
29
|
],
|
|
25
30
|
"scripts": {
|
|
26
|
-
"start": "backstage-cli package start",
|
|
27
31
|
"build": "backstage-cli package build",
|
|
32
|
+
"clean": "backstage-cli package clean",
|
|
28
33
|
"lint": "backstage-cli package lint",
|
|
29
|
-
"test": "backstage-cli package test",
|
|
30
34
|
"prepack": "backstage-cli package prepack",
|
|
31
35
|
"postpack": "backstage-cli package postpack",
|
|
32
|
-
"
|
|
36
|
+
"start": "backstage-cli package start",
|
|
37
|
+
"test": "backstage-cli package test"
|
|
33
38
|
},
|
|
34
39
|
"dependencies": {
|
|
35
|
-
"@backstage/backend-common": "^0.21.
|
|
36
|
-
"@backstage/backend-plugin-api": "^0.6.
|
|
37
|
-
"@backstage/catalog-client": "^1.6.0",
|
|
38
|
-
"@backstage/catalog-model": "^1.4.
|
|
39
|
-
"@backstage/config": "^1.1.
|
|
40
|
-
"@backstage/errors": "^1.2.
|
|
41
|
-
"@backstage/plugin-auth-backend-module-atlassian-provider": "^0.1.
|
|
42
|
-
"@backstage/plugin-auth-backend-module-aws-alb-provider": "^0.1.
|
|
43
|
-
"@backstage/plugin-auth-backend-module-gcp-iap-provider": "^0.2.
|
|
44
|
-
"@backstage/plugin-auth-backend-module-github-provider": "^0.1.
|
|
45
|
-
"@backstage/plugin-auth-backend-module-gitlab-provider": "^0.1.
|
|
46
|
-
"@backstage/plugin-auth-backend-module-google-provider": "^0.1.
|
|
47
|
-
"@backstage/plugin-auth-backend-module-microsoft-provider": "^0.1.
|
|
48
|
-
"@backstage/plugin-auth-backend-module-oauth2-provider": "^0.1.
|
|
49
|
-
"@backstage/plugin-auth-backend-module-oauth2-proxy-provider": "^0.1.
|
|
50
|
-
"@backstage/plugin-auth-backend-module-oidc-provider": "^0.1.
|
|
51
|
-
"@backstage/plugin-auth-backend-module-okta-provider": "^0.0.
|
|
52
|
-
"@backstage/plugin-auth-node": "^0.4.
|
|
53
|
-
"@backstage/plugin-catalog-node": "^1.
|
|
40
|
+
"@backstage/backend-common": "^0.21.3-next.0",
|
|
41
|
+
"@backstage/backend-plugin-api": "^0.6.13-next.0",
|
|
42
|
+
"@backstage/catalog-client": "^1.6.1-next.0",
|
|
43
|
+
"@backstage/catalog-model": "^1.4.5-next.0",
|
|
44
|
+
"@backstage/config": "^1.1.2-next.0",
|
|
45
|
+
"@backstage/errors": "^1.2.4-next.0",
|
|
46
|
+
"@backstage/plugin-auth-backend-module-atlassian-provider": "^0.1.5-next.0",
|
|
47
|
+
"@backstage/plugin-auth-backend-module-aws-alb-provider": "^0.1.4-next.0",
|
|
48
|
+
"@backstage/plugin-auth-backend-module-gcp-iap-provider": "^0.2.8-next.0",
|
|
49
|
+
"@backstage/plugin-auth-backend-module-github-provider": "^0.1.10-next.0",
|
|
50
|
+
"@backstage/plugin-auth-backend-module-gitlab-provider": "^0.1.10-next.0",
|
|
51
|
+
"@backstage/plugin-auth-backend-module-google-provider": "^0.1.10-next.0",
|
|
52
|
+
"@backstage/plugin-auth-backend-module-microsoft-provider": "^0.1.8-next.0",
|
|
53
|
+
"@backstage/plugin-auth-backend-module-oauth2-provider": "^0.1.10-next.0",
|
|
54
|
+
"@backstage/plugin-auth-backend-module-oauth2-proxy-provider": "^0.1.6-next.0",
|
|
55
|
+
"@backstage/plugin-auth-backend-module-oidc-provider": "^0.1.3-next.0",
|
|
56
|
+
"@backstage/plugin-auth-backend-module-okta-provider": "^0.0.6-next.0",
|
|
57
|
+
"@backstage/plugin-auth-node": "^0.4.8-next.0",
|
|
58
|
+
"@backstage/plugin-catalog-node": "^1.8.0-next.0",
|
|
54
59
|
"@backstage/types": "^1.1.1",
|
|
55
60
|
"@google-cloud/firestore": "^7.0.0",
|
|
56
61
|
"@node-saml/passport-saml": "^4.0.4",
|
|
@@ -64,12 +69,12 @@
|
|
|
64
69
|
"express-promise-router": "^4.1.0",
|
|
65
70
|
"express-session": "^1.17.1",
|
|
66
71
|
"fs-extra": "^11.2.0",
|
|
67
|
-
"google-auth-library": "^
|
|
68
|
-
"jose": "^
|
|
72
|
+
"google-auth-library": "^9.0.0",
|
|
73
|
+
"jose": "^5.0.0",
|
|
69
74
|
"knex": "^3.0.0",
|
|
70
75
|
"lodash": "^4.17.21",
|
|
71
76
|
"luxon": "^3.0.0",
|
|
72
|
-
"minimatch": "^
|
|
77
|
+
"minimatch": "^9.0.0",
|
|
73
78
|
"morgan": "^1.10.0",
|
|
74
79
|
"node-cache": "^5.1.2",
|
|
75
80
|
"node-fetch": "^2.6.7",
|
|
@@ -82,14 +87,14 @@
|
|
|
82
87
|
"passport-microsoft": "^1.0.0",
|
|
83
88
|
"passport-oauth2": "^1.6.1",
|
|
84
89
|
"passport-onelogin-oauth": "^0.0.1",
|
|
85
|
-
"uuid": "^
|
|
90
|
+
"uuid": "^9.0.0",
|
|
86
91
|
"winston": "^3.2.1",
|
|
87
92
|
"yn": "^4.0.0"
|
|
88
93
|
},
|
|
89
94
|
"devDependencies": {
|
|
90
|
-
"@backstage/backend-defaults": "^0.2.
|
|
91
|
-
"@backstage/backend-test-utils": "^0.3.
|
|
92
|
-
"@backstage/cli": "^0.25.
|
|
95
|
+
"@backstage/backend-defaults": "^0.2.13-next.0",
|
|
96
|
+
"@backstage/backend-test-utils": "^0.3.3-next.0",
|
|
97
|
+
"@backstage/cli": "^0.25.3-next.0",
|
|
93
98
|
"@types/body-parser": "^1.19.0",
|
|
94
99
|
"@types/cookie-parser": "^1.4.2",
|
|
95
100
|
"@types/express-session": "^1.17.2",
|
|
@@ -103,10 +108,5 @@
|
|
|
103
108
|
"msw": "^1.0.0",
|
|
104
109
|
"supertest": "^6.1.3"
|
|
105
110
|
},
|
|
106
|
-
"files": [
|
|
107
|
-
"dist",
|
|
108
|
-
"migrations",
|
|
109
|
-
"config.d.ts"
|
|
110
|
-
],
|
|
111
111
|
"configSchema": "config.d.ts"
|
|
112
112
|
}
|