@backstage/plugin-auth-backend-module-cloudflare-access-provider 0.0.0-nightly-20250114022708 → 0.0.0-nightly-20250117022919

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,14 +1,25 @@
1
1
  # @backstage/plugin-auth-backend-module-cloudflare-access-provider
2
2
 
3
- ## 0.0.0-nightly-20250114022708
3
+ ## 0.0.0-nightly-20250117022919
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies
8
- - @backstage/plugin-auth-node@0.0.0-nightly-20250114022708
9
- - @backstage/backend-plugin-api@0.0.0-nightly-20250114022708
10
- - @backstage/config@0.0.0-nightly-20250114022708
11
- - @backstage/errors@0.0.0-nightly-20250114022708
8
+ - @backstage/backend-plugin-api@0.0.0-nightly-20250117022919
9
+ - @backstage/config@1.3.2
10
+ - @backstage/errors@1.2.7
11
+ - @backstage/plugin-auth-node@0.0.0-nightly-20250117022919
12
+
13
+ ## 0.3.4
14
+
15
+ ### Patch Changes
16
+
17
+ - d4a8246: Use the email from `cfIdentity` instead of `claims` when constructing user profile in order to support Cloudflare Service Tokens.
18
+ - Updated dependencies
19
+ - @backstage/plugin-auth-node@0.5.6
20
+ - @backstage/backend-plugin-api@1.1.1
21
+ - @backstage/config@1.3.2
22
+ - @backstage/errors@1.2.7
12
23
 
13
24
  ## 0.3.4-next.1
14
25
 
@@ -8,7 +8,7 @@ function createCloudflareAccessAuthenticator(options) {
8
8
  async defaultProfileTransform(result) {
9
9
  return {
10
10
  profile: {
11
- email: result.claims.email,
11
+ email: result.cfIdentity.email,
12
12
  displayName: result.cfIdentity.name
13
13
  }
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"authenticator.cjs.js","sources":["../src/authenticator.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 */\n\nimport { CacheService } from '@backstage/backend-plugin-api';\nimport {\n ProxyAuthenticator,\n createProxyAuthenticator,\n} from '@backstage/plugin-auth-node';\nimport { AuthHelper } from './helpers';\nimport { CloudflareAccessResult } from './types';\n\n/**\n * Implements Cloudflare Access authentication.\n *\n * @public\n */\nexport function createCloudflareAccessAuthenticator(options?: {\n cache?: CacheService;\n}): ProxyAuthenticator<\n unknown,\n CloudflareAccessResult,\n CloudflareAccessResult\n> {\n return createProxyAuthenticator({\n async defaultProfileTransform(result: CloudflareAccessResult) {\n return {\n profile: {\n email: result.claims.email,\n displayName: result.cfIdentity.name,\n },\n };\n },\n initialize({ config }) {\n return {\n helper: AuthHelper.fromConfig(config, { cache: options?.cache }),\n };\n },\n async authenticate({ req }, { helper }) {\n const result = await helper.authenticate(req);\n return {\n result,\n providerInfo: result,\n };\n },\n });\n}\n"],"names":["createProxyAuthenticator","AuthHelper"],"mappings":";;;;;AA6BO,SAAS,oCAAoC,OAMlD,EAAA;AACA,EAAA,OAAOA,uCAAyB,CAAA;AAAA,IAC9B,MAAM,wBAAwB,MAAgC,EAAA;AAC5D,MAAO,OAAA;AAAA,QACL,OAAS,EAAA;AAAA,UACP,KAAA,EAAO,OAAO,MAAO,CAAA,KAAA;AAAA,UACrB,WAAA,EAAa,OAAO,UAAW,CAAA;AAAA;AACjC,OACF;AAAA,KACF;AAAA,IACA,UAAA,CAAW,EAAE,MAAA,EAAU,EAAA;AACrB,MAAO,OAAA;AAAA,QACL,MAAA,EAAQC,mBAAW,UAAW,CAAA,MAAA,EAAQ,EAAE,KAAO,EAAA,OAAA,EAAS,OAAO;AAAA,OACjE;AAAA,KACF;AAAA,IACA,MAAM,YAAa,CAAA,EAAE,KAAO,EAAA,EAAE,QAAU,EAAA;AACtC,MAAA,MAAM,MAAS,GAAA,MAAM,MAAO,CAAA,YAAA,CAAa,GAAG,CAAA;AAC5C,MAAO,OAAA;AAAA,QACL,MAAA;AAAA,QACA,YAAc,EAAA;AAAA,OAChB;AAAA;AACF,GACD,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"authenticator.cjs.js","sources":["../src/authenticator.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 */\n\nimport { CacheService } from '@backstage/backend-plugin-api';\nimport {\n ProxyAuthenticator,\n createProxyAuthenticator,\n} from '@backstage/plugin-auth-node';\nimport { AuthHelper } from './helpers';\nimport { CloudflareAccessResult } from './types';\n\n/**\n * Implements Cloudflare Access authentication.\n *\n * @public\n */\nexport function createCloudflareAccessAuthenticator(options?: {\n cache?: CacheService;\n}): ProxyAuthenticator<\n unknown,\n CloudflareAccessResult,\n CloudflareAccessResult\n> {\n return createProxyAuthenticator({\n async defaultProfileTransform(result: CloudflareAccessResult) {\n return {\n profile: {\n email: result.cfIdentity.email,\n displayName: result.cfIdentity.name,\n },\n };\n },\n initialize({ config }) {\n return {\n helper: AuthHelper.fromConfig(config, { cache: options?.cache }),\n };\n },\n async authenticate({ req }, { helper }) {\n const result = await helper.authenticate(req);\n return {\n result,\n providerInfo: result,\n };\n },\n });\n}\n"],"names":["createProxyAuthenticator","AuthHelper"],"mappings":";;;;;AA6BO,SAAS,oCAAoC,OAMlD,EAAA;AACA,EAAA,OAAOA,uCAAyB,CAAA;AAAA,IAC9B,MAAM,wBAAwB,MAAgC,EAAA;AAC5D,MAAO,OAAA;AAAA,QACL,OAAS,EAAA;AAAA,UACP,KAAA,EAAO,OAAO,UAAW,CAAA,KAAA;AAAA,UACzB,WAAA,EAAa,OAAO,UAAW,CAAA;AAAA;AACjC,OACF;AAAA,KACF;AAAA,IACA,UAAA,CAAW,EAAE,MAAA,EAAU,EAAA;AACrB,MAAO,OAAA;AAAA,QACL,MAAA,EAAQC,mBAAW,UAAW,CAAA,MAAA,EAAQ,EAAE,KAAO,EAAA,OAAA,EAAS,OAAO;AAAA,OACjE;AAAA,KACF;AAAA,IACA,MAAM,YAAa,CAAA,EAAE,KAAO,EAAA,EAAE,QAAU,EAAA;AACtC,MAAA,MAAM,MAAS,GAAA,MAAM,MAAO,CAAA,YAAA,CAAa,GAAG,CAAA;AAC5C,MAAO,OAAA;AAAA,QACL,MAAA;AAAA,QACA,YAAc,EAAA;AAAA,OAChB;AAAA;AACF,GACD,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-auth-backend-module-cloudflare-access-provider",
3
- "version": "0.0.0-nightly-20250114022708",
3
+ "version": "0.0.0-nightly-20250117022919",
4
4
  "description": "The cloudflare-access-provider backend module for the auth plugin.",
5
5
  "backstage": {
6
6
  "role": "backend-plugin-module",
@@ -34,19 +34,19 @@
34
34
  "test": "backstage-cli package test"
35
35
  },
36
36
  "dependencies": {
37
- "@backstage/backend-plugin-api": "0.0.0-nightly-20250114022708",
38
- "@backstage/config": "0.0.0-nightly-20250114022708",
39
- "@backstage/errors": "0.0.0-nightly-20250114022708",
40
- "@backstage/plugin-auth-node": "0.0.0-nightly-20250114022708",
37
+ "@backstage/backend-plugin-api": "0.0.0-nightly-20250117022919",
38
+ "@backstage/config": "1.3.2",
39
+ "@backstage/errors": "1.2.7",
40
+ "@backstage/plugin-auth-node": "0.0.0-nightly-20250117022919",
41
41
  "express": "^4.18.2",
42
42
  "jose": "^5.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@backstage/backend-defaults": "0.0.0-nightly-20250114022708",
46
- "@backstage/backend-test-utils": "0.0.0-nightly-20250114022708",
47
- "@backstage/cli": "0.0.0-nightly-20250114022708",
48
- "@backstage/plugin-auth-backend": "0.0.0-nightly-20250114022708",
49
- "@backstage/types": "0.0.0-nightly-20250114022708",
45
+ "@backstage/backend-defaults": "0.0.0-nightly-20250117022919",
46
+ "@backstage/backend-test-utils": "0.0.0-nightly-20250117022919",
47
+ "@backstage/cli": "0.0.0-nightly-20250117022919",
48
+ "@backstage/plugin-auth-backend": "0.0.0-nightly-20250117022919",
49
+ "@backstage/types": "1.2.1",
50
50
  "msw": "^2.0.0",
51
51
  "node-mocks-http": "^1.0.0",
52
52
  "uuid": "^11.0.0"