@backstage/plugin-auth-backend 0.15.0-next.3 → 0.15.1-next.1

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
@@ -6,6 +6,7 @@ import { Entity, UserEntity } from '@backstage/catalog-model';
6
6
  import { Config } from '@backstage/config';
7
7
  import { BackstageSignInResult, BackstageIdentityResponse } from '@backstage/plugin-auth-node';
8
8
  import { Profile } from 'passport';
9
+ import * as _backstage_backend_common from '@backstage/backend-common';
9
10
  import { PluginDatabaseManager, PluginEndpointDiscovery, TokenManager } from '@backstage/backend-common';
10
11
  import { IncomingHttpHeaders } from 'http';
11
12
  import { TokenSet, UserinfoResponse } from 'openid-client';
@@ -474,6 +475,94 @@ declare type BitbucketPassportProfile = Profile & {
474
475
  };
475
476
  };
476
477
 
478
+ /**
479
+ * CloudflareAccessClaims
480
+ *
481
+ * Can be used in externally provided auth handler or sign in resolver to
482
+ * enrich user profile for sign-in user entity
483
+ *
484
+ * @public
485
+ */
486
+ declare type CloudflareAccessClaims = {
487
+ /**
488
+ * `aud` identifies the application to which the JWT is issued.
489
+ */
490
+ aud: string[];
491
+ /**
492
+ * `email` contains the email address of the authenticated user.
493
+ */
494
+ email: string;
495
+ /**
496
+ * iat and exp are the issuance and expiration timestamps.
497
+ */
498
+ exp: number;
499
+ iat: number;
500
+ /**
501
+ * `nonce` is the session identifier.
502
+ */
503
+ nonce: string;
504
+ /**
505
+ * `identity_nonce` is available in the Application Token and can be used to
506
+ * query all group membership for a given user.
507
+ */
508
+ identity_nonce: string;
509
+ /**
510
+ * `sub` contains the identifier of the authenticated user.
511
+ */
512
+ sub: string;
513
+ /**
514
+ * `iss` the issuer is the application’s Cloudflare Access Domain URL.
515
+ */
516
+ iss: string;
517
+ /**
518
+ * `custom` contains SAML attributes in the Application Token specified by an
519
+ * administrator in the identity provider configuration.
520
+ */
521
+ custom: string;
522
+ };
523
+ /**
524
+ * CloudflareAccessGroup
525
+ *
526
+ * @public
527
+ */
528
+ declare type CloudflareAccessGroup = {
529
+ /**
530
+ * Group id
531
+ */
532
+ id: string;
533
+ /**
534
+ * Name of group as defined in Cloudflare zero trust dashboard
535
+ */
536
+ name: string;
537
+ /**
538
+ * Access group email address
539
+ */
540
+ email: string;
541
+ };
542
+ /**
543
+ * CloudflareAccessIdentityProfile
544
+ *
545
+ * Can be used in externally provided auth handler or sign in resolver to
546
+ * enrich user profile for sign-in user entity
547
+ *
548
+ * @public
549
+ */
550
+ declare type CloudflareAccessIdentityProfile = {
551
+ id: string;
552
+ name: string;
553
+ email: string;
554
+ groups: CloudflareAccessGroup[];
555
+ };
556
+ /**
557
+ *
558
+ * @public
559
+ */
560
+ declare type CloudflareAccessResult = {
561
+ claims: CloudflareAccessClaims;
562
+ cfIdentity: CloudflareAccessIdentityProfile;
563
+ expiresInSeconds?: number;
564
+ };
565
+
477
566
  declare type GithubOAuthResult = {
478
567
  fullProfile: Profile;
479
568
  params: {
@@ -616,6 +705,18 @@ declare const providers: Readonly<{
616
705
  userIdMatchingUserEntityAnnotation(): SignInResolver<OAuthResult>;
617
706
  }>;
618
707
  }>;
708
+ cfAccess: Readonly<{
709
+ create: (options: {
710
+ authHandler?: AuthHandler<CloudflareAccessResult> | undefined;
711
+ signIn: {
712
+ resolver: SignInResolver<CloudflareAccessResult>;
713
+ };
714
+ cache?: _backstage_backend_common.CacheClient | undefined;
715
+ }) => AuthProviderFactory;
716
+ resolvers: Readonly<{
717
+ emailMatchingUserEntityProfileEmail: () => SignInResolver<unknown>;
718
+ }>;
719
+ }>;
619
720
  gcpIap: Readonly<{
620
721
  create: (options: {
621
722
  authHandler?: AuthHandler<GcpIapResult> | undefined;
@@ -841,4 +942,4 @@ declare class CatalogIdentityClient {
841
942
  */
842
943
  declare function getDefaultOwnershipEntityRefs(entity: Entity): string[];
843
944
 
844
- export { AtlassianAuthProvider, AuthHandler, AuthHandlerResult, AuthProviderConfig, AuthProviderFactory, AuthProviderRouteHandlers, AuthResolverCatalogUserQuery, AuthResolverContext, AuthResponse, AwsAlbResult, BitbucketOAuthResult, BitbucketPassportProfile, CatalogIdentityClient, CookieConfigurer, GcpIapResult, GcpIapTokenInfo, GithubOAuthResult, OAuth2ProxyResult, OAuthAdapter, OAuthEnvironmentHandler, OAuthHandlers, OAuthProviderInfo, OAuthProviderOptions, OAuthRefreshRequest, OAuthResponse, OAuthResult, OAuthStartRequest, OAuthState, OidcAuthResult, ProfileInfo, RouterOptions, SamlAuthResult, SignInInfo, SignInResolver, StateEncoder, TokenParams, WebMessageResponse, createAuthProviderIntegration, createOriginFilter, createRouter, defaultAuthProviderFactories, encodeState, ensuresXRequestedWith, getDefaultOwnershipEntityRefs, postMessageResponse, prepareBackstageIdentityResponse, providers, readState, verifyNonce };
945
+ export { AtlassianAuthProvider, AuthHandler, AuthHandlerResult, AuthProviderConfig, AuthProviderFactory, AuthProviderRouteHandlers, AuthResolverCatalogUserQuery, AuthResolverContext, AuthResponse, AwsAlbResult, BitbucketOAuthResult, BitbucketPassportProfile, CatalogIdentityClient, CloudflareAccessClaims, CloudflareAccessGroup, CloudflareAccessIdentityProfile, CloudflareAccessResult, CookieConfigurer, GcpIapResult, GcpIapTokenInfo, GithubOAuthResult, OAuth2ProxyResult, OAuthAdapter, OAuthEnvironmentHandler, OAuthHandlers, OAuthProviderInfo, OAuthProviderOptions, OAuthRefreshRequest, OAuthResponse, OAuthResult, OAuthStartRequest, OAuthState, OidcAuthResult, ProfileInfo, RouterOptions, SamlAuthResult, SignInInfo, SignInResolver, StateEncoder, TokenParams, WebMessageResponse, createAuthProviderIntegration, createOriginFilter, createRouter, defaultAuthProviderFactories, encodeState, ensuresXRequestedWith, getDefaultOwnershipEntityRefs, postMessageResponse, prepareBackstageIdentityResponse, providers, readState, verifyNonce };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-auth-backend",
3
3
  "description": "A Backstage backend plugin that handles authentication",
4
- "version": "0.15.0-next.3",
4
+ "version": "0.15.1-next.1",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -33,15 +33,15 @@
33
33
  "clean": "backstage-cli package clean"
34
34
  },
35
35
  "dependencies": {
36
- "@backstage/backend-common": "^0.14.1-next.3",
37
- "@backstage/catalog-client": "^1.0.4-next.2",
38
- "@backstage/catalog-model": "^1.1.0-next.3",
36
+ "@backstage/backend-common": "^0.15.0-next.0",
37
+ "@backstage/catalog-client": "^1.0.4",
38
+ "@backstage/catalog-model": "^1.1.0",
39
39
  "@backstage/config": "^1.0.1",
40
- "@backstage/errors": "^1.1.0-next.0",
41
- "@backstage/plugin-auth-node": "^0.2.3-next.2",
40
+ "@backstage/errors": "^1.1.0",
41
+ "@backstage/plugin-auth-node": "^0.2.4-next.0",
42
42
  "@backstage/types": "^1.0.0",
43
43
  "@davidzemon/passport-okta-oauth": "^0.0.5",
44
- "@google-cloud/firestore": "^5.0.2",
44
+ "@google-cloud/firestore": "^6.0.0",
45
45
  "@types/express": "^4.17.6",
46
46
  "@types/passport": "^1.0.3",
47
47
  "compression": "^1.7.4",
@@ -76,8 +76,8 @@
76
76
  "yn": "^4.0.0"
77
77
  },
78
78
  "devDependencies": {
79
- "@backstage/backend-test-utils": "^0.1.26-next.3",
80
- "@backstage/cli": "^0.18.0-next.3",
79
+ "@backstage/backend-test-utils": "^0.1.27-next.0",
80
+ "@backstage/cli": "^0.18.1-next.1",
81
81
  "@types/body-parser": "^1.19.0",
82
82
  "@types/cookie-parser": "^1.4.2",
83
83
  "@types/express-session": "^1.17.2",
@@ -88,7 +88,7 @@
88
88
  "@types/passport-saml": "^1.1.3",
89
89
  "@types/passport-strategy": "^0.2.35",
90
90
  "@types/xml2js": "^0.4.7",
91
- "msw": "^0.43.0",
91
+ "msw": "^0.44.0",
92
92
  "supertest": "^6.1.3"
93
93
  },
94
94
  "files": [
@@ -97,5 +97,5 @@
97
97
  "config.d.ts"
98
98
  ],
99
99
  "configSchema": "config.d.ts",
100
- "gitHead": "291b3a07233061266d9f3ce431345bf19fa4bbd5"
100
+ "gitHead": "9b7d23351cdbe29fb16060f6f9e8442932d3fa29"
101
101
  }