Compare commits

..
13 Commits
35 changed files with 150 additions and 63 deletions
+7
View File
@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
### Bug Fixes
* 非企业模式下禁止API密钥指定项目ID并校验权限【安全加强】 ([f50651e](https://github.com/certd/certd/commit/f50651ef91813b529b8498ddefe0f66b8b7946da))
* **authority:** 修复权限校验时角色值错误的问题 ([5326d7d](https://github.com/certd/certd/commit/5326d7dff3967974d70090b45f8580a155c1a032))
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
### Bug Fixes
+14
View File
@@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
### Bug Fixes
* 非企业模式下禁止API密钥指定项目ID并校验权限【安全加强】 ([f50651e](https://github.com/certd/certd/commit/f50651ef91813b529b8498ddefe0f66b8b7946da))
* **authority:** 修复权限校验时角色值错误的问题 ([5326d7d](https://github.com/certd/certd/commit/5326d7dff3967974d70090b45f8580a155c1a032))
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
### Bug Fixes
* **docker:** 将构建和运行镜像的 Node.js 固定到 22.23.4 安全版本 ([#817](https://github.com/certd/certd/issues/817)) ([113c96b](https://github.com/certd/certd/commit/113c96b866e2ec5c85e37e42150445ed8b0eefbe))
* **pipeline:** 修复定时触发器cron归一化截取位置错误导致日期字段被吃掉的问题 ([#813](https://github.com/certd/certd/issues/813)) ([7ac9101](https://github.com/certd/certd/commit/7ac9101266f2821fb13ff68ea6d36969c9485675))
## [1.45.3](https://github.com/certd/certd/compare/v1.45.2...v1.45.3) (2026-10-19)
### Bug Fixes
+1 -1
View File
@@ -9,5 +9,5 @@
}
},
"npmClient": "pnpm",
"version": "1.45.4"
"version": "1.45.5"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/publishlab/node-acme-client/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/acme-client
## [1.45.4](https://github.com/publishlab/node-acme-client/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/acme-client
+3 -3
View File
@@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.45.4",
"version": "1.45.5",
"type": "module",
"module": "./dist/index.js",
"main": "./dist/index.js",
@@ -18,7 +18,7 @@
"types"
],
"dependencies": {
"@certd/basic": "^1.45.4",
"@certd/basic": "^1.45.5",
"@peculiar/x509": "^1.11.0",
"asn1js": "^3.0.5",
"axios": "^1.9.0",
@@ -77,5 +77,5 @@
"bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/basic
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/basic
+1 -1
View File
@@ -1 +1 @@
14:09
15:24
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/basic",
"private": false,
"version": "1.45.4",
"version": "1.45.5",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -54,5 +54,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/pipeline
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/pipeline
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/pipeline",
"private": false,
"version": "1.45.4",
"version": "1.45.5",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -21,8 +21,8 @@
"lint": "eslint --fix --ext .ts src"
},
"dependencies": {
"@certd/basic": "^1.45.4",
"@certd/plus-core": "^1.45.4",
"@certd/basic": "^1.45.5",
"@certd/plus-core": "^1.45.5",
"dayjs": "^1.11.7",
"lodash-es": "^4.17.21",
"reflect-metadata": "^0.2.2"
@@ -51,5 +51,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/lib-huawei
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/lib-huawei
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/lib-huawei",
"private": false,
"version": "1.45.4",
"version": "1.45.5",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
"types": "./dist/d/index.d.ts",
@@ -31,5 +31,5 @@
"prettier": "3.3.3",
"tslib": "^2.8.1"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/lib-iframe
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/lib-iframe
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/lib-iframe",
"private": false,
"version": "1.45.4",
"version": "1.45.5",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -37,5 +37,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/jdcloud
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/jdcloud
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/jdcloud",
"version": "1.45.4",
"version": "1.45.5",
"description": "jdcloud openApi sdk",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
@@ -63,5 +63,5 @@
"fetch"
]
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/lib-k8s
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/lib-k8s
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/lib-k8s",
"private": false,
"version": "1.45.4",
"version": "1.45.5",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -21,7 +21,7 @@
"lint": "eslint --fix --ext .ts src"
},
"dependencies": {
"@certd/basic": "^1.45.4",
"@certd/basic": "^1.45.5",
"@kubernetes/client-node": "0.21.0"
},
"devDependencies": {
@@ -38,5 +38,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/lib-server
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/lib-server
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/lib-server",
"version": "1.45.4",
"version": "1.45.5",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -29,11 +29,11 @@
],
"license": "AGPL",
"dependencies": {
"@certd/acme-client": "^1.45.4",
"@certd/basic": "^1.45.4",
"@certd/pipeline": "^1.45.4",
"@certd/plugin-lib": "^1.45.4",
"@certd/plus-core": "^1.45.4",
"@certd/acme-client": "^1.45.5",
"@certd/basic": "^1.45.5",
"@certd/pipeline": "^1.45.5",
"@certd/plugin-lib": "^1.45.5",
"@certd/plus-core": "^1.45.5",
"@midwayjs/cache": "3.14.0",
"@midwayjs/core": "3.20.11",
"@midwayjs/i18n": "3.20.13",
@@ -69,5 +69,5 @@
"typeorm": "^0.3.20",
"typescript": "^5.4.2"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/midway-flyway-js
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/midway-flyway-js",
"version": "1.45.4",
"version": "1.45.5",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -52,5 +52,5 @@
"typeorm": "^0.3.20",
"typescript": "^5.4.2"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/plugin-cert
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/plugin-cert
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-cert",
"private": false,
"version": "1.45.4",
"version": "1.45.5",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -20,7 +20,7 @@
"lint": "eslint --fix --ext .ts src"
},
"dependencies": {
"@certd/plugin-lib": "^1.45.4"
"@certd/plugin-lib": "^1.45.5"
},
"devDependencies": {
"@types/chai": "^4.3.12",
@@ -38,5 +38,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/plugin-lib
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/plugin-lib
+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-lib",
"private": false,
"version": "1.45.4",
"version": "1.45.5",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -17,9 +17,9 @@
"lint": "eslint --fix --ext .ts src"
},
"dependencies": {
"@certd/acme-client": "^1.45.4",
"@certd/basic": "^1.45.4",
"@certd/pipeline": "^1.45.4",
"@certd/acme-client": "^1.45.5",
"@certd/basic": "^1.45.5",
"@certd/pipeline": "^1.45.5",
"dayjs": "^1.11.7",
"jszip": "^3.10.1",
"lodash-es": "^4.17.21",
@@ -45,5 +45,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "9b1cf353b968712172622e30633a0311a1662a28"
"gitHead": "5e3958f67a1249b372ebebf45540a655a12a4824"
}
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
**Note:** Version bump only for package @certd/ui-client
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
**Note:** Version bump only for package @certd/ui-client
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/ui-client",
"version": "1.45.4",
"version": "1.45.5",
"private": true,
"scripts": {
"dev": "vite --open",
@@ -104,8 +104,8 @@
"zod-defaults": "^0.1.3"
},
"devDependencies": {
"@certd/lib-iframe": "^1.45.4",
"@certd/pipeline": "^1.45.4",
"@certd/lib-iframe": "^1.45.5",
"@certd/pipeline": "^1.45.5",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12",
+7
View File
@@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.45.5](https://github.com/certd/certd/compare/v1.45.4...v1.45.5) (2026-10-22)
### Bug Fixes
* 非企业模式下禁止API密钥指定项目ID并校验权限【安全加强】 ([f50651e](https://github.com/certd/certd/commit/f50651ef91813b529b8498ddefe0f66b8b7946da))
* **authority:** 修复权限校验时角色值错误的问题 ([5326d7d](https://github.com/certd/certd/commit/5326d7dff3967974d70090b45f8580a155c1a032))
## [1.45.4](https://github.com/certd/certd/compare/v1.45.3...v1.45.4) (2026-10-22)
### Bug Fixes
+14 -14
View File
@@ -1,6 +1,6 @@
{
"name": "@certd/ui-server",
"version": "1.45.4",
"version": "1.45.5",
"description": "fast-server base midway",
"private": true,
"type": "module",
@@ -43,20 +43,20 @@
"lint1": "eslint --fix --ext .ts src"
},
"dependencies": {
"@certd/acme-client": "^1.45.4",
"@certd/basic": "^1.45.4",
"@certd/commercial-core": "^1.45.4",
"@certd/acme-client": "^1.45.5",
"@certd/basic": "^1.45.5",
"@certd/commercial-core": "^1.45.5",
"@certd/cv4pve-api-javascript": "^8.4.2",
"@certd/jdcloud": "^1.45.4",
"@certd/lib-huawei": "^1.45.4",
"@certd/lib-k8s": "^1.45.4",
"@certd/lib-server": "^1.45.4",
"@certd/midway-flyway-js": "^1.45.4",
"@certd/pipeline": "^1.45.4",
"@certd/plugin-cert": "^1.45.4",
"@certd/plugin-lib": "^1.45.4",
"@certd/plugin-plus": "^1.45.4",
"@certd/plus-core": "^1.45.4",
"@certd/jdcloud": "^1.45.5",
"@certd/lib-huawei": "^1.45.5",
"@certd/lib-k8s": "^1.45.5",
"@certd/lib-server": "^1.45.5",
"@certd/midway-flyway-js": "^1.45.5",
"@certd/pipeline": "^1.45.5",
"@certd/plugin-cert": "^1.45.5",
"@certd/plugin-lib": "^1.45.5",
"@certd/plugin-plus": "^1.45.5",
"@certd/plus-core": "^1.45.5",
"@koa/cors": "^5.0.0",
"@midwayjs/bootstrap": "3.20.11",
"@midwayjs/cache": "3.14.0",
@@ -62,8 +62,8 @@ export class RoleController extends CrudController<RoleService> {
@Query("id")
id: number
) {
if (id === 1) {
throw new Error("不能删除默认的管理员角色");
if (id <= 3) {
throw new Error("不能删除系统默认角色");
}
const res = await super.delete(id);
await this.auditLog({
@@ -1,5 +1,5 @@
import { ALL, Body, Controller, Inject, Post, Provide, Query } from "@midwayjs/core";
import { Constants, CrudController } from "@certd/lib-server";
import { Constants, CrudController, isEnterprise } from "@certd/lib-server";
import { AuthService } from "../../../modules/sys/authority/service/auth-service.js";
import { OpenKeyService } from "../../../modules/open/service/open-key-service.js";
import { ApiTags } from "@midwayjs/swagger";
@@ -60,6 +60,10 @@ export class OpenKeyController extends CrudController<OpenKeyService> {
const { projectId, userId } = await this.getProjectUserIdRead();
body.projectId = projectId;
body.userId = userId;
if (!isEnterprise()) {
//如果是非企业模式,禁止指定projectId
delete body.projectId;
}
const res = await this.service.add(body);
this.auditLog({
content: `新增了API密钥(ID:${res.id}, scope:${body.scope}, remark:${body.remark})`,
@@ -1,7 +1,7 @@
import { Init, Inject, MidwayWebRouterService, Provide, Scope, ScopeEnum } from "@midwayjs/core";
import { IMidwayKoaContext, IWebMiddleware, NextFunction } from "@midwayjs/koa";
import jwt from "jsonwebtoken";
import { Constants, SysPrivateSettings, SysSettingsService } from "@certd/lib-server";
import { Constants, isEnterprise, SysPrivateSettings, SysSettingsService } from "@certd/lib-server";
import { logger } from "@certd/basic";
import { AuthService } from "../modules/sys/authority/service/auth-service.js";
import { OpenKeyService } from "../modules/open/service/open-key-service.js";
@@ -183,11 +183,18 @@ export class AuthorityMiddleware implements IWebMiddleware {
if (!openKey) {
return null;
}
//校验 openKey
const openKeyRes = await this.openKeyService.verifyOpenKey(openKey);
let roles = [1];
if (!openKeyRes.projectId || openKeyRes.projectId <= 0) {
let roles = []
if (isEnterprise()) {
if (!openKeyRes.projectId || openKeyRes.projectId <= 0) {
throw new Error("projectId不能为空");
}
roles = [3]
}else {
if (openKeyRes.projectId !=null) {
throw new Error("对不起,您无权进行此操作");
}
roles = await this.roleService.getRoleIdsByUserId(openKeyRes.userId);
}
ctx.user = { id: openKeyRes.userId, roles, projectId: openKeyRes.projectId };
+1 -1
View File
@@ -1 +1 @@
10:35
15:43
+1 -1
View File
@@ -1 +1 @@
10:38
15:37