@backstage/plugin-auth-backend-module-oidc-provider 0.4.3-next.0 → 0.4.3-next.2

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 CHANGED
@@ -1,5 +1,28 @@
1
1
  # @backstage/plugin-auth-backend-module-oidc-provider
2
2
 
3
+ ## 0.4.3-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 5cc1f7f: Introduce `dangerouslyAllowSignInWithoutUserInCatalog` auth resolver config.
8
+ - Updated dependencies
9
+ - @backstage/plugin-auth-backend@0.25.0-next.2
10
+ - @backstage/plugin-auth-node@0.6.3-next.2
11
+ - @backstage/backend-plugin-api@1.3.1-next.2
12
+ - @backstage/config@1.3.2
13
+ - @backstage/types@1.2.1
14
+
15
+ ## 0.4.3-next.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+ - @backstage/plugin-auth-backend@0.25.0-next.1
21
+ - @backstage/plugin-auth-node@0.6.3-next.1
22
+ - @backstage/backend-plugin-api@1.3.1-next.1
23
+ - @backstage/config@1.3.2
24
+ - @backstage/types@1.2.1
25
+
3
26
  ## 0.4.3-next.0
4
27
 
5
28
  ### Patch Changes
package/config.d.ts CHANGED
@@ -38,8 +38,16 @@ export interface Config {
38
38
  | {
39
39
  resolver: 'emailLocalPartMatchingUserEntityName';
40
40
  allowedDomains?: string[];
41
+ dangerouslyAllowSignInWithoutUserInCatalog?: boolean;
42
+ }
43
+ | {
44
+ resolver: 'emailMatchingUserEntityProfileEmail';
45
+ dangerouslyAllowSignInWithoutUserInCatalog?: boolean;
46
+ }
47
+ | {
48
+ resolver: 'preferredUsernameMatchingUserEntityName';
49
+ dangerouslyAllowSignInWithoutUserInCatalog?: boolean;
41
50
  }
42
- | { resolver: 'emailMatchingUserEntityProfileEmail' }
43
51
  >;
44
52
  };
45
53
  sessionDuration?: HumanDuration | string;
package/dist/index.d.ts CHANGED
@@ -38,12 +38,16 @@ declare namespace oidcSignInResolvers {
38
38
  */
39
39
  const emailLocalPartMatchingUserEntityName: _backstage_plugin_auth_node.SignInResolverFactory<unknown, {
40
40
  allowedDomains?: string[] | undefined;
41
+ dangerouslyAllowSignInWithoutUserInCatalog?: boolean | undefined;
41
42
  } | undefined>;
42
43
  /**
43
44
  * A oidc resolver that looks up the user using their email address
44
45
  * as email of the entity.
45
46
  */
46
- const emailMatchingUserEntityProfileEmail: _backstage_plugin_auth_node.SignInResolverFactory<unknown, unknown>;
47
+ const emailMatchingUserEntityProfileEmail: _backstage_plugin_auth_node.SignInResolverFactory<unknown, {
48
+ allowedDomains?: string[] | undefined;
49
+ dangerouslyAllowSignInWithoutUserInCatalog?: boolean | undefined;
50
+ } | undefined>;
47
51
  }
48
52
 
49
53
  export { type OidcAuthResult, authModuleOidcProvider as default, oidcAuthenticator, oidcSignInResolvers };
@@ -19,8 +19,7 @@ const authModuleOidcProvider = backendPluginApi.createBackendModule({
19
19
  factory: pluginAuthNode.createOAuthProviderFactory({
20
20
  authenticator: authenticator.oidcAuthenticator,
21
21
  signInResolverFactories: {
22
- ...resolvers.oidcSignInResolvers,
23
- ...pluginAuthNode.commonSignInResolvers
22
+ ...resolvers.oidcSignInResolvers
24
23
  }
25
24
  })
26
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"module.cjs.js","sources":["../src/module.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 { createBackendModule } from '@backstage/backend-plugin-api';\nimport {\n authProvidersExtensionPoint,\n commonSignInResolvers,\n createOAuthProviderFactory,\n} from '@backstage/plugin-auth-node';\nimport { oidcAuthenticator } from './authenticator';\nimport { oidcSignInResolvers } from './resolvers';\n\n/** @public */\nexport const authModuleOidcProvider = createBackendModule({\n pluginId: 'auth',\n moduleId: 'oidc-provider',\n register(reg) {\n reg.registerInit({\n deps: {\n providers: authProvidersExtensionPoint,\n },\n async init({ providers }) {\n providers.registerProvider({\n providerId: 'oidc',\n factory: createOAuthProviderFactory({\n authenticator: oidcAuthenticator,\n signInResolverFactories: {\n ...oidcSignInResolvers,\n ...commonSignInResolvers,\n },\n }),\n });\n },\n });\n },\n});\n"],"names":["createBackendModule","authProvidersExtensionPoint","createOAuthProviderFactory","oidcAuthenticator","oidcSignInResolvers","commonSignInResolvers"],"mappings":";;;;;;;AAyBO,MAAM,yBAAyBA,oCAAoB,CAAA;AAAA,EACxD,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,eAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,SAAW,EAAAC;AAAA,OACb;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,SAAA,EAAa,EAAA;AACxB,QAAA,SAAA,CAAU,gBAAiB,CAAA;AAAA,UACzB,UAAY,EAAA,MAAA;AAAA,UACZ,SAASC,yCAA2B,CAAA;AAAA,YAClC,aAAe,EAAAC,+BAAA;AAAA,YACf,uBAAyB,EAAA;AAAA,cACvB,GAAGC,6BAAA;AAAA,cACH,GAAGC;AAAA;AACL,WACD;AAAA,SACF,CAAA;AAAA;AACH,KACD,CAAA;AAAA;AAEL,CAAC;;;;"}
1
+ {"version":3,"file":"module.cjs.js","sources":["../src/module.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 { createBackendModule } from '@backstage/backend-plugin-api';\nimport {\n authProvidersExtensionPoint,\n createOAuthProviderFactory,\n} from '@backstage/plugin-auth-node';\nimport { oidcAuthenticator } from './authenticator';\nimport { oidcSignInResolvers } from './resolvers';\n\n/** @public */\nexport const authModuleOidcProvider = createBackendModule({\n pluginId: 'auth',\n moduleId: 'oidc-provider',\n register(reg) {\n reg.registerInit({\n deps: {\n providers: authProvidersExtensionPoint,\n },\n async init({ providers }) {\n providers.registerProvider({\n providerId: 'oidc',\n factory: createOAuthProviderFactory({\n authenticator: oidcAuthenticator,\n signInResolverFactories: {\n ...oidcSignInResolvers,\n },\n }),\n });\n },\n });\n },\n});\n"],"names":["createBackendModule","authProvidersExtensionPoint","createOAuthProviderFactory","oidcAuthenticator","oidcSignInResolvers"],"mappings":";;;;;;;AAwBO,MAAM,yBAAyBA,oCAAoB,CAAA;AAAA,EACxD,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,eAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,SAAW,EAAAC;AAAA,OACb;AAAA,MACA,MAAM,IAAA,CAAK,EAAE,SAAA,EAAa,EAAA;AACxB,QAAA,SAAA,CAAU,gBAAiB,CAAA;AAAA,UACzB,UAAY,EAAA,MAAA;AAAA,UACZ,SAASC,yCAA2B,CAAA;AAAA,YAClC,aAAe,EAAAC,+BAAA;AAAA,YACf,uBAAyB,EAAA;AAAA,cACvB,GAAGC;AAAA;AACL,WACD;AAAA,SACF,CAAA;AAAA;AACH,KACD,CAAA;AAAA;AAEL,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-auth-backend-module-oidc-provider",
3
- "version": "0.4.3-next.0",
3
+ "version": "0.4.3-next.2",
4
4
  "description": "The oidc-provider backend module for the auth plugin.",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -37,19 +37,20 @@
37
37
  "test": "backstage-cli package test"
38
38
  },
39
39
  "dependencies": {
40
- "@backstage/backend-plugin-api": "1.3.1-next.0",
40
+ "@backstage/backend-plugin-api": "1.3.1-next.2",
41
41
  "@backstage/config": "1.3.2",
42
- "@backstage/plugin-auth-backend": "0.25.0-next.0",
43
- "@backstage/plugin-auth-node": "0.6.3-next.0",
42
+ "@backstage/plugin-auth-backend": "0.25.0-next.2",
43
+ "@backstage/plugin-auth-node": "0.6.3-next.2",
44
44
  "@backstage/types": "1.2.1",
45
45
  "express": "^4.18.2",
46
46
  "openid-client": "^5.5.0",
47
- "passport": "^0.7.0"
47
+ "passport": "^0.7.0",
48
+ "zod": "^3.22.4"
48
49
  },
49
50
  "devDependencies": {
50
- "@backstage/backend-defaults": "0.9.1-next.0",
51
- "@backstage/backend-test-utils": "1.5.0-next.0",
52
- "@backstage/cli": "0.32.1-next.0",
51
+ "@backstage/backend-defaults": "0.10.0-next.3",
52
+ "@backstage/backend-test-utils": "1.5.0-next.3",
53
+ "@backstage/cli": "0.32.1-next.3",
53
54
  "@backstage/config": "1.3.2",
54
55
  "@backstage/types": "1.2.1",
55
56
  "cookie-parser": "^1.4.6",