@backstage/plugin-auth-backend 0.22.4-next.1 → 0.22.5-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/dist/index.d.ts CHANGED
@@ -1,20 +1,23 @@
1
1
  import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
2
2
  import { LoggerService, AuthService, HttpAuthService, DiscoveryService } from '@backstage/backend-plugin-api';
3
3
  import express from 'express';
4
+ import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
5
+ import { TokenParams as TokenParams$1, AuthProviderFactory as AuthProviderFactory$1, AuthOwnershipResolver, 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';
4
6
  import { PluginDatabaseManager, PluginEndpointDiscovery, TokenManager } from '@backstage/backend-common';
5
7
  import { CatalogApi } from '@backstage/catalog-client';
6
8
  import { Config } from '@backstage/config';
7
- import * as _backstage_plugin_auth_node from '@backstage/plugin-auth-node';
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';
12
+ import * as _backstage_plugin_auth_backend_module_azure_easyauth_provider from '@backstage/plugin-auth-backend-module-azure-easyauth-provider';
13
+ import { AzureEasyAuthResult } from '@backstage/plugin-auth-backend-module-azure-easyauth-provider';
12
14
  import * as _backstage_plugin_auth_backend_module_oauth2_proxy_provider from '@backstage/plugin-auth-backend-module-oauth2-proxy-provider';
13
15
  import { OAuth2ProxyResult as OAuth2ProxyResult$1 } from '@backstage/plugin-auth-backend-module-oauth2-proxy-provider';
14
16
  import * as _backstage_plugin_auth_backend_module_oidc_provider from '@backstage/plugin-auth-backend-module-oidc-provider';
15
17
  import { OidcAuthResult as OidcAuthResult$1 } from '@backstage/plugin-auth-backend-module-oidc-provider';
16
18
  import * as _backstage_plugin_auth_backend_module_gcp_iap_provider from '@backstage/plugin-auth-backend-module-gcp-iap-provider';
17
19
  import { GcpIapTokenInfo as GcpIapTokenInfo$1, GcpIapResult as GcpIapResult$1 } from '@backstage/plugin-auth-backend-module-gcp-iap-provider';
20
+ import * as _backstage_plugin_auth_backend_module_cloudflare_access_provider from '@backstage/plugin-auth-backend-module-cloudflare-access-provider';
18
21
  import { UserEntity, Entity } from '@backstage/catalog-model';
19
22
 
20
23
  /**
@@ -50,6 +53,7 @@ interface RouterOptions {
50
53
  providerFactories?: ProviderFactories;
51
54
  disableDefaultProviderFactories?: boolean;
52
55
  catalogApi?: CatalogApi;
56
+ ownershipResolver?: AuthOwnershipResolver;
53
57
  }
54
58
  /** @public */
55
59
  declare function createRouter(options: RouterOptions): Promise<express.Router>;
@@ -283,11 +287,11 @@ type StateEncoder = (req: OAuthStartRequest) => Promise<{
283
287
  */
284
288
  type AwsAlbResult = AwsAlbResult$1;
285
289
 
286
- /** @public */
287
- type EasyAuthResult = {
288
- fullProfile: Profile;
289
- accessToken?: string;
290
- };
290
+ /**
291
+ * @public
292
+ * @deprecated import AzureEasyAuthResult from `@backstage/plugin-auth-backend-module-azure-easyauth-provider` instead
293
+ */
294
+ type EasyAuthResult = AzureEasyAuthResult;
291
295
 
292
296
  /**
293
297
  * @public
@@ -352,7 +356,10 @@ declare const encodeState: typeof encodeOAuthState;
352
356
  */
353
357
  declare const verifyNonce: (req: express.Request, providerId: string) => void;
354
358
 
355
- /** @public */
359
+ /**
360
+ * @public
361
+ * @deprecated The Bitbucket auth provider was extracted to `@backstage/plugin-auth-backend-module-bitbucket-provider`.
362
+ */
356
363
  type BitbucketOAuthResult = {
357
364
  fullProfile: BitbucketPassportProfile;
358
365
  params: {
@@ -363,7 +370,10 @@ type BitbucketOAuthResult = {
363
370
  accessToken: string;
364
371
  refreshToken?: string;
365
372
  };
366
- /** @public */
373
+ /**
374
+ * @public
375
+ * @deprecated The Bitbucket auth provider was extracted to `@backstage/plugin-auth-backend-module-bitbucket-provider`.
376
+ */
367
377
  type BitbucketPassportProfile = Profile & {
368
378
  id?: string;
369
379
  displayName?: string;
@@ -398,6 +408,7 @@ type BitbucketServerOAuthResult = {
398
408
  * enrich user profile for sign-in user entity
399
409
  *
400
410
  * @public
411
+ * @deprecated import from `@backstage/plugin-auth-backend-module-cloudflare-access-provider` instead
401
412
  */
402
413
  type CloudflareAccessClaims = {
403
414
  /**
@@ -440,6 +451,7 @@ type CloudflareAccessClaims = {
440
451
  * CloudflareAccessGroup
441
452
  *
442
453
  * @public
454
+ * @deprecated import from `@backstage/plugin-auth-backend-module-cloudflare-access-provider` instead
443
455
  */
444
456
  type CloudflareAccessGroup = {
445
457
  /**
@@ -462,6 +474,7 @@ type CloudflareAccessGroup = {
462
474
  * enrich user profile for sign-in user entity
463
475
  *
464
476
  * @public
477
+ * @deprecated import from `@backstage/plugin-auth-backend-module-cloudflare-access-provider` instead
465
478
  */
466
479
  type CloudflareAccessIdentityProfile = {
467
480
  id: string;
@@ -471,6 +484,7 @@ type CloudflareAccessIdentityProfile = {
471
484
  };
472
485
  /**
473
486
  * @public
487
+ * @deprecated import from `@backstage/plugin-auth-backend-module-cloudflare-access-provider` instead
474
488
  */
475
489
  type CloudflareAccessResult = {
476
490
  claims: CloudflareAccessClaims;
@@ -565,8 +579,8 @@ declare const providers: Readonly<{
565
579
  } | undefined;
566
580
  } | undefined) => AuthProviderFactory$1;
567
581
  resolvers: Readonly<{
568
- usernameMatchingUserEntityAnnotation(): _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
569
- userIdMatchingUserEntityAnnotation(): _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
582
+ userIdMatchingUserEntityAnnotation: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
583
+ usernameMatchingUserEntityAnnotation: () => _backstage_plugin_auth_node.SignInResolver<OAuthResult>;
570
584
  }>;
571
585
  }>;
572
586
  bitbucketServer: Readonly<{
@@ -588,9 +602,7 @@ declare const providers: Readonly<{
588
602
  };
589
603
  cache?: _backstage_backend_plugin_api.CacheService | undefined;
590
604
  }) => AuthProviderFactory$1;
591
- resolvers: Readonly<{
592
- emailMatchingUserEntityProfileEmail: () => _backstage_plugin_auth_node.SignInResolver<unknown>;
593
- }>;
605
+ resolvers: Readonly<typeof _backstage_plugin_auth_backend_module_cloudflare_access_provider.cloudflareAccessSignInResolvers>;
594
606
  }>;
595
607
  gcpIap: Readonly<{
596
608
  create: (options: {
@@ -713,9 +725,9 @@ declare const providers: Readonly<{
713
725
  }>;
714
726
  easyAuth: Readonly<{
715
727
  create: (options?: {
716
- authHandler?: AuthHandler<EasyAuthResult> | undefined;
728
+ authHandler?: AuthHandler<_backstage_plugin_auth_backend_module_azure_easyauth_provider.AzureEasyAuthResult> | undefined;
717
729
  signIn: {
718
- resolver: _backstage_plugin_auth_node.SignInResolver<EasyAuthResult>;
730
+ resolver: _backstage_plugin_auth_node.SignInResolver<_backstage_plugin_auth_backend_module_azure_easyauth_provider.AzureEasyAuthResult>;
719
731
  };
720
732
  } | undefined) => AuthProviderFactory$1;
721
733
  resolvers: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-auth-backend",
3
- "version": "0.22.4-next.1",
3
+ "version": "0.22.5-next.0",
4
4
  "description": "A Backstage backend plugin that handles authentication",
5
5
  "backstage": {
6
6
  "role": "backend-plugin"
@@ -37,25 +37,28 @@
37
37
  "test": "backstage-cli package test"
38
38
  },
39
39
  "dependencies": {
40
- "@backstage/backend-common": "^0.21.7-next.1",
41
- "@backstage/backend-plugin-api": "^0.6.17-next.1",
42
- "@backstage/catalog-client": "^1.6.4-next.0",
43
- "@backstage/catalog-model": "^1.4.5",
40
+ "@backstage/backend-common": "^0.21.8-next.0",
41
+ "@backstage/backend-plugin-api": "^0.6.18-next.0",
42
+ "@backstage/catalog-client": "^1.6.5-next.0",
43
+ "@backstage/catalog-model": "^1.5.0-next.0",
44
44
  "@backstage/config": "^1.2.0",
45
45
  "@backstage/errors": "^1.2.4",
46
- "@backstage/plugin-auth-backend-module-atlassian-provider": "^0.1.9-next.1",
47
- "@backstage/plugin-auth-backend-module-aws-alb-provider": "^0.1.9-next.1",
48
- "@backstage/plugin-auth-backend-module-gcp-iap-provider": "^0.2.12-next.1",
49
- "@backstage/plugin-auth-backend-module-github-provider": "^0.1.14-next.1",
50
- "@backstage/plugin-auth-backend-module-gitlab-provider": "^0.1.14-next.1",
51
- "@backstage/plugin-auth-backend-module-google-provider": "^0.1.14-next.1",
52
- "@backstage/plugin-auth-backend-module-microsoft-provider": "^0.1.12-next.1",
53
- "@backstage/plugin-auth-backend-module-oauth2-provider": "^0.1.14-next.1",
54
- "@backstage/plugin-auth-backend-module-oauth2-proxy-provider": "^0.1.10-next.1",
55
- "@backstage/plugin-auth-backend-module-oidc-provider": "^0.1.8-next.1",
56
- "@backstage/plugin-auth-backend-module-okta-provider": "^0.0.10-next.1",
57
- "@backstage/plugin-auth-node": "^0.4.12-next.1",
58
- "@backstage/plugin-catalog-node": "^1.11.1-next.1",
46
+ "@backstage/plugin-auth-backend-module-atlassian-provider": "^0.1.10-next.0",
47
+ "@backstage/plugin-auth-backend-module-aws-alb-provider": "^0.1.10-next.0",
48
+ "@backstage/plugin-auth-backend-module-azure-easyauth-provider": "^0.1.1-next.0",
49
+ "@backstage/plugin-auth-backend-module-bitbucket-provider": "^0.1.1-next.0",
50
+ "@backstage/plugin-auth-backend-module-cloudflare-access-provider": "^0.1.1-next.0",
51
+ "@backstage/plugin-auth-backend-module-gcp-iap-provider": "^0.2.13-next.0",
52
+ "@backstage/plugin-auth-backend-module-github-provider": "^0.1.15-next.0",
53
+ "@backstage/plugin-auth-backend-module-gitlab-provider": "^0.1.15-next.0",
54
+ "@backstage/plugin-auth-backend-module-google-provider": "^0.1.15-next.0",
55
+ "@backstage/plugin-auth-backend-module-microsoft-provider": "^0.1.13-next.0",
56
+ "@backstage/plugin-auth-backend-module-oauth2-provider": "^0.1.15-next.0",
57
+ "@backstage/plugin-auth-backend-module-oauth2-proxy-provider": "^0.1.11-next.0",
58
+ "@backstage/plugin-auth-backend-module-oidc-provider": "^0.1.9-next.0",
59
+ "@backstage/plugin-auth-backend-module-okta-provider": "^0.0.11-next.0",
60
+ "@backstage/plugin-auth-node": "^0.4.13-next.0",
61
+ "@backstage/plugin-catalog-node": "^1.11.2-next.0",
59
62
  "@backstage/types": "^1.1.1",
60
63
  "@google-cloud/firestore": "^7.0.0",
61
64
  "@node-saml/passport-saml": "^4.0.4",
@@ -81,7 +84,6 @@
81
84
  "openid-client": "^5.2.1",
82
85
  "passport": "^0.7.0",
83
86
  "passport-auth0": "^1.4.3",
84
- "passport-bitbucket-oauth2": "^0.1.2",
85
87
  "passport-github2": "^0.1.12",
86
88
  "passport-google-oauth20": "^2.0.0",
87
89
  "passport-microsoft": "^1.0.0",
@@ -92,9 +94,9 @@
92
94
  "yn": "^4.0.0"
93
95
  },
94
96
  "devDependencies": {
95
- "@backstage/backend-defaults": "^0.2.17-next.1",
96
- "@backstage/backend-test-utils": "^0.3.7-next.1",
97
- "@backstage/cli": "^0.26.3-next.1",
97
+ "@backstage/backend-defaults": "^0.2.18-next.0",
98
+ "@backstage/backend-test-utils": "^0.3.8-next.0",
99
+ "@backstage/cli": "^0.26.5-next.0",
98
100
  "@types/body-parser": "^1.19.0",
99
101
  "@types/cookie-parser": "^1.4.2",
100
102
  "@types/express-session": "^1.17.2",