@backstage/plugin-auth-backend-module-cloudflare-access-provider 0.3.4-next.0 → 0.3.4
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 +21 -0
- package/dist/authenticator.cjs.js +1 -1
- package/dist/authenticator.cjs.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend-module-cloudflare-access-provider
|
|
2
2
|
|
|
3
|
+
## 0.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d4a8246: Use the email from `cfIdentity` instead of `claims` when constructing user profile in order to support Cloudflare Service Tokens.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/plugin-auth-node@0.5.6
|
|
10
|
+
- @backstage/backend-plugin-api@1.1.1
|
|
11
|
+
- @backstage/config@1.3.2
|
|
12
|
+
- @backstage/errors@1.2.7
|
|
13
|
+
|
|
14
|
+
## 0.3.4-next.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @backstage/backend-plugin-api@1.1.1-next.1
|
|
20
|
+
- @backstage/config@1.3.2-next.0
|
|
21
|
+
- @backstage/errors@1.2.7-next.0
|
|
22
|
+
- @backstage/plugin-auth-node@0.5.6-next.1
|
|
23
|
+
|
|
3
24
|
## 0.3.4-next.0
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -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.
|
|
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.3.4
|
|
3
|
+
"version": "0.3.4",
|
|
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": "1.1.1
|
|
38
|
-
"@backstage/config": "1.3.
|
|
39
|
-
"@backstage/errors": "1.2.
|
|
40
|
-
"@backstage/plugin-auth-node": "0.5.6
|
|
37
|
+
"@backstage/backend-plugin-api": "^1.1.1",
|
|
38
|
+
"@backstage/config": "^1.3.2",
|
|
39
|
+
"@backstage/errors": "^1.2.7",
|
|
40
|
+
"@backstage/plugin-auth-node": "^0.5.6",
|
|
41
41
|
"express": "^4.18.2",
|
|
42
42
|
"jose": "^5.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@backstage/backend-defaults": "0.7.0
|
|
46
|
-
"@backstage/backend-test-utils": "1.2.1
|
|
47
|
-
"@backstage/cli": "0.29.5
|
|
48
|
-
"@backstage/plugin-auth-backend": "0.24.2
|
|
49
|
-
"@backstage/types": "1.2.
|
|
45
|
+
"@backstage/backend-defaults": "^0.7.0",
|
|
46
|
+
"@backstage/backend-test-utils": "^1.2.1",
|
|
47
|
+
"@backstage/cli": "^0.29.5",
|
|
48
|
+
"@backstage/plugin-auth-backend": "^0.24.2",
|
|
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"
|