@backstage/plugin-permission-backend 0.5.28 → 0.5.29
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 +42 -10
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +3 -1
- package/dist/alpha.cjs.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,56 @@
|
|
|
1
1
|
# @backstage/plugin-permission-backend
|
|
2
2
|
|
|
3
|
-
## 0.5.
|
|
3
|
+
## 0.5.29
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Updated dependencies
|
|
8
|
-
- @backstage/
|
|
9
|
-
- @backstage/
|
|
10
|
-
- @backstage/
|
|
11
|
-
- @backstage/backend-
|
|
8
|
+
- @backstage/backend-common@0.19.8
|
|
9
|
+
- @backstage/plugin-auth-node@0.4.0
|
|
10
|
+
- @backstage/errors@1.2.3
|
|
11
|
+
- @backstage/backend-plugin-api@0.6.6
|
|
12
|
+
- @backstage/plugin-permission-node@0.7.17
|
|
13
|
+
- @backstage/config@1.1.1
|
|
14
|
+
- @backstage/plugin-permission-common@0.7.9
|
|
12
15
|
|
|
13
|
-
## 0.5.
|
|
16
|
+
## 0.5.29-next.2
|
|
14
17
|
|
|
15
18
|
### Patch Changes
|
|
16
19
|
|
|
17
20
|
- Updated dependencies
|
|
18
|
-
- @backstage/
|
|
19
|
-
- @backstage/
|
|
20
|
-
- @backstage/
|
|
21
|
-
- @backstage/
|
|
21
|
+
- @backstage/backend-common@0.19.8-next.2
|
|
22
|
+
- @backstage/plugin-auth-node@0.4.0-next.2
|
|
23
|
+
- @backstage/errors@1.2.3-next.0
|
|
24
|
+
- @backstage/plugin-permission-node@0.7.17-next.2
|
|
25
|
+
- @backstage/backend-plugin-api@0.6.6-next.2
|
|
26
|
+
- @backstage/config@1.1.1-next.0
|
|
27
|
+
- @backstage/plugin-permission-common@0.7.9-next.0
|
|
28
|
+
|
|
29
|
+
## 0.5.28-next.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
- @backstage/backend-common@0.19.7-next.1
|
|
35
|
+
- @backstage/backend-plugin-api@0.6.5-next.1
|
|
36
|
+
- @backstage/plugin-auth-node@0.3.2-next.1
|
|
37
|
+
- @backstage/plugin-permission-node@0.7.16-next.1
|
|
38
|
+
- @backstage/config@1.1.0
|
|
39
|
+
- @backstage/errors@1.2.2
|
|
40
|
+
- @backstage/plugin-permission-common@0.7.8
|
|
41
|
+
|
|
42
|
+
## 0.5.28-next.0
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies
|
|
47
|
+
- @backstage/plugin-auth-node@0.3.2-next.0
|
|
48
|
+
- @backstage/backend-common@0.19.7-next.0
|
|
49
|
+
- @backstage/config@1.1.0
|
|
50
|
+
- @backstage/backend-plugin-api@0.6.5-next.0
|
|
51
|
+
- @backstage/errors@1.2.2
|
|
52
|
+
- @backstage/plugin-permission-common@0.7.8
|
|
53
|
+
- @backstage/plugin-permission-node@0.7.16-next.0
|
|
22
54
|
|
|
23
55
|
## 0.5.26
|
|
24
56
|
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var backendCommon = require('@backstage/backend-common');
|
|
4
6
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
5
7
|
var alpha = require('@backstage/plugin-permission-node/alpha');
|
|
@@ -64,5 +66,5 @@ const permissionPlugin = backendPluginApi.createBackendPlugin({
|
|
|
64
66
|
}
|
|
65
67
|
});
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
exports["default"] = permissionPlugin;
|
|
68
70
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { loggerToWinstonLogger } from '@backstage/backend-common';\nimport {\n coreServices,\n createBackendPlugin,\n} from '@backstage/backend-plugin-api';\nimport { PermissionPolicy } from '@backstage/plugin-permission-node';\nimport {\n policyExtensionPoint,\n PolicyExtensionPoint,\n} from '@backstage/plugin-permission-node/alpha';\nimport { createRouter } from './service';\n\nclass PolicyExtensionPointImpl implements PolicyExtensionPoint {\n public policy: PermissionPolicy | undefined;\n\n setPolicy(policy: PermissionPolicy): void {\n if (this.policy) {\n throw new Error('Policy already set');\n }\n this.policy = policy;\n }\n}\n\n/**\n * Permission plugin\n *\n * @alpha\n */\nexport const permissionPlugin = createBackendPlugin({\n pluginId: 'permission',\n register(env) {\n const policies = new PolicyExtensionPointImpl();\n\n env.registerExtensionPoint(policyExtensionPoint, policies);\n\n env.registerInit({\n deps: {\n http: coreServices.httpRouter,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n discovery: coreServices.discovery,\n identity: coreServices.identity,\n },\n async init({ http, config, logger, discovery, identity }) {\n const winstonLogger = loggerToWinstonLogger(logger);\n if (!policies.policy) {\n throw new Error(\n 'No policy module installed! Please install a policy module. If you want to allow all requests, use @backstage/plugin-permission-backend-module-allow-all-policy permissionModuleAllowAllPolicy',\n );\n }\n\n http.use(\n await createRouter({\n config,\n discovery,\n identity,\n logger: winstonLogger,\n policy: policies.policy,\n }),\n );\n },\n });\n },\n});\n"],"names":["createBackendPlugin","policyExtensionPoint","coreServices","loggerToWinstonLogger","createRouter"],"mappings":"
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { loggerToWinstonLogger } from '@backstage/backend-common';\nimport {\n coreServices,\n createBackendPlugin,\n} from '@backstage/backend-plugin-api';\nimport { PermissionPolicy } from '@backstage/plugin-permission-node';\nimport {\n policyExtensionPoint,\n PolicyExtensionPoint,\n} from '@backstage/plugin-permission-node/alpha';\nimport { createRouter } from './service';\n\nclass PolicyExtensionPointImpl implements PolicyExtensionPoint {\n public policy: PermissionPolicy | undefined;\n\n setPolicy(policy: PermissionPolicy): void {\n if (this.policy) {\n throw new Error('Policy already set');\n }\n this.policy = policy;\n }\n}\n\n/**\n * Permission plugin\n *\n * @alpha\n */\nexport const permissionPlugin = createBackendPlugin({\n pluginId: 'permission',\n register(env) {\n const policies = new PolicyExtensionPointImpl();\n\n env.registerExtensionPoint(policyExtensionPoint, policies);\n\n env.registerInit({\n deps: {\n http: coreServices.httpRouter,\n config: coreServices.rootConfig,\n logger: coreServices.logger,\n discovery: coreServices.discovery,\n identity: coreServices.identity,\n },\n async init({ http, config, logger, discovery, identity }) {\n const winstonLogger = loggerToWinstonLogger(logger);\n if (!policies.policy) {\n throw new Error(\n 'No policy module installed! Please install a policy module. If you want to allow all requests, use @backstage/plugin-permission-backend-module-allow-all-policy permissionModuleAllowAllPolicy',\n );\n }\n\n http.use(\n await createRouter({\n config,\n discovery,\n identity,\n logger: winstonLogger,\n policy: policies.policy,\n }),\n );\n },\n });\n },\n});\n"],"names":["createBackendPlugin","policyExtensionPoint","coreServices","loggerToWinstonLogger","createRouter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,wBAAyD,CAAA;AAAA,EAA/D,WAAA,GAAA;AACE,IAAO,aAAA,CAAA,IAAA,EAAA,QAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAEP,UAAU,MAAgC,EAAA;AACxC,IAAA,IAAI,KAAK,MAAQ,EAAA;AACf,MAAM,MAAA,IAAI,MAAM,oBAAoB,CAAA,CAAA;AAAA,KACtC;AACA,IAAA,IAAA,CAAK,MAAS,GAAA,MAAA,CAAA;AAAA,GAChB;AACF,CAAA;AAOO,MAAM,mBAAmBA,oCAAoB,CAAA;AAAA,EAClD,QAAU,EAAA,YAAA;AAAA,EACV,SAAS,GAAK,EAAA;AACZ,IAAM,MAAA,QAAA,GAAW,IAAI,wBAAyB,EAAA,CAAA;AAE9C,IAAI,GAAA,CAAA,sBAAA,CAAuBC,4BAAsB,QAAQ,CAAA,CAAA;AAEzD,IAAA,GAAA,CAAI,YAAa,CAAA;AAAA,MACf,IAAM,EAAA;AAAA,QACJ,MAAMC,6BAAa,CAAA,UAAA;AAAA,QACnB,QAAQA,6BAAa,CAAA,UAAA;AAAA,QACrB,QAAQA,6BAAa,CAAA,MAAA;AAAA,QACrB,WAAWA,6BAAa,CAAA,SAAA;AAAA,QACxB,UAAUA,6BAAa,CAAA,QAAA;AAAA,OACzB;AAAA,MACA,MAAM,KAAK,EAAE,IAAA,EAAM,QAAQ,MAAQ,EAAA,SAAA,EAAW,UAAY,EAAA;AACxD,QAAM,MAAA,aAAA,GAAgBC,oCAAsB,MAAM,CAAA,CAAA;AAClD,QAAI,IAAA,CAAC,SAAS,MAAQ,EAAA;AACpB,UAAA,MAAM,IAAI,KAAA;AAAA,YACR,gMAAA;AAAA,WACF,CAAA;AAAA,SACF;AAEA,QAAK,IAAA,CAAA,GAAA;AAAA,UACH,MAAMC,mBAAa,CAAA;AAAA,YACjB,MAAA;AAAA,YACA,SAAA;AAAA,YACA,QAAA;AAAA,YACA,MAAQ,EAAA,aAAA;AAAA,YACR,QAAQ,QAAS,CAAA,MAAA;AAAA,WAClB,CAAA;AAAA,SACH,CAAA;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-permission-backend",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.29",
|
|
4
4
|
"main": "./dist/index.cjs.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"clean": "backstage-cli package clean"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@backstage/backend-common": "^0.19.
|
|
43
|
-
"@backstage/backend-plugin-api": "^0.6.
|
|
44
|
-
"@backstage/config": "^1.1.
|
|
45
|
-
"@backstage/errors": "^1.2.
|
|
46
|
-
"@backstage/plugin-auth-node": "^0.
|
|
47
|
-
"@backstage/plugin-permission-common": "^0.7.
|
|
48
|
-
"@backstage/plugin-permission-node": "^0.7.
|
|
42
|
+
"@backstage/backend-common": "^0.19.8",
|
|
43
|
+
"@backstage/backend-plugin-api": "^0.6.6",
|
|
44
|
+
"@backstage/config": "^1.1.1",
|
|
45
|
+
"@backstage/errors": "^1.2.3",
|
|
46
|
+
"@backstage/plugin-auth-node": "^0.4.0",
|
|
47
|
+
"@backstage/plugin-permission-common": "^0.7.9",
|
|
48
|
+
"@backstage/plugin-permission-node": "^0.7.17",
|
|
49
49
|
"@types/express": "*",
|
|
50
50
|
"dataloader": "^2.0.0",
|
|
51
51
|
"express": "^4.17.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"zod": "^3.21.4"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@backstage/cli": "^0.
|
|
60
|
+
"@backstage/cli": "^0.23.0",
|
|
61
61
|
"@types/lodash": "^4.14.151",
|
|
62
62
|
"@types/supertest": "^2.0.8",
|
|
63
63
|
"msw": "^1.0.0",
|