自举 + 对拍证明保真层数据权限真实现与物理事实逐行对齐:
- bootstrap-privilege.sql(幂等):建 SYS_FILTERRULE + 中间表 SYS_FILTERRULEROLE
(LIST 多值列经 REFERENCEVALUE→中间表落地)+ 自描述元数据;为 EIP4PT_TASK/
PROJECT/CUSTOMER 各配 1 条 "CREATEBY = {CURRENTUSERID}" 规则,并把 CREATEBY
重分区到 USER_ALICE/BOB/CAROL 使过滤可判别。
- ParityCli 增 --privilege 模式 + PrivilegeCheckRunner:被测侧经引擎
GET /list?asUser&roles 触发行级过滤,基线侧 JDBC 同语义 WHERE,RowDiff 逐行比。
- EngineHttpClient 增 asUser/roles 透传 + statusOf(负例取状态码)。
- EntityController.list 增可选 asUser/roles 构造非 ADMIN ctx(引擎仅非 ADMIN 才过滤)。
实测:正例 3 实体×3 用户=9 例 150 行 100% 逐行一致;负例错误角色 3/3 抛
PrivilegeException(HTTP 500)被拒;回归 ParityCli --all 21/21、1108 行 100%。
报告:platform-auth/C2实测报告.md + parity-reports/privilege-parity-*.{json,md}。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
262 lines
6.4 KiB
JSON
262 lines
6.4 KiB
JSON
{
|
|
"summary" : {
|
|
"entityCount" : 21,
|
|
"cleanEntities" : 21,
|
|
"totalRows" : 1108,
|
|
"entityConsistencyRate" : 1.0,
|
|
"allClean" : true
|
|
},
|
|
"reports" : [ {
|
|
"label" : "EIP4PT_ALLTYPE",
|
|
"keyColumns" : [ "EIP4PT_ALLTYPE_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_ASSET",
|
|
"keyColumns" : [ "EIP4PT_ASSET_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_COMBO",
|
|
"keyColumns" : [ "EIP4PT_COMBO_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_CONFIG",
|
|
"keyColumns" : [ "EIP4PT_CONFIG_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_CONTRACT",
|
|
"keyColumns" : [ "EIP4PT_CONTRACT_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_CUSTOMER",
|
|
"keyColumns" : [ "EIP4PT_CUSTOMER_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_DEPT",
|
|
"keyColumns" : [ "EIP4PT_DEPT_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_DEVICE",
|
|
"keyColumns" : [ "EIP4PT_DEVICE_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_EMPLOYEE",
|
|
"keyColumns" : [ "EIP4PT_EMPLOYEE_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_INVOICE",
|
|
"keyColumns" : [ "EIP4PT_INVOICE_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_LOG",
|
|
"keyColumns" : [ "EIP4PT_LOG_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_ORDER",
|
|
"keyColumns" : [ "EIP4PT_ORDER_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_ORDERLINE",
|
|
"keyColumns" : [ "EIP4PT_ORDERLINE_ID" ],
|
|
"leftRowCount" : 108,
|
|
"rightRowCount" : 108,
|
|
"matchedRows" : 108,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_PAYMENT",
|
|
"keyColumns" : [ "EIP4PT_PAYMENT_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_PRODUCT",
|
|
"keyColumns" : [ "EIP4PT_PRODUCT_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_PROJECT",
|
|
"keyColumns" : [ "EIP4PT_PROJECT_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_REFER",
|
|
"keyColumns" : [ "EIP4PT_REFER_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_STOCK",
|
|
"keyColumns" : [ "EIP4PT_STOCK_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_SUPPLIER",
|
|
"keyColumns" : [ "EIP4PT_SUPPLIER_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_TASK",
|
|
"keyColumns" : [ "EIP4PT_TASK_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
}, {
|
|
"label" : "EIP4PT_WAREHOUSE",
|
|
"keyColumns" : [ "EIP4PT_WAREHOUSE_ID" ],
|
|
"leftRowCount" : 50,
|
|
"rightRowCount" : 50,
|
|
"matchedRows" : 50,
|
|
"mismatchRows" : 0,
|
|
"onlyInLeft" : [ ],
|
|
"onlyInRight" : [ ],
|
|
"clean" : true,
|
|
"consistencyRate" : 1.0,
|
|
"mismatches" : [ ]
|
|
} ]
|
|
} |