Repository navigation
feat(data): add access labels and authorization cases as dataset v2, with a stricter security gate - #21
Merged
Conversation
…-aware visibility
… authorization cases as dataset v2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The decision table is enforced in SQL, but the demo corpus had no access labels. The evaluation security gate could therefore only exercise tenant isolation. This PR delivers milestone item 2.7: labelled data, hand-written visibility, authorization negatives and a stricter gate. The corpus changes, so the result is published as dataset v2.
Dataset v2
internal, and two of them staypublic. Alice, Bob and Carol therefore see them exactly as before.sales-pricing-guideversion 1 was readable by everyone internal. Version 2 changes the prices and restricts the document to sales and support.visibility.yamlwas written by reading the labels and the principals' attributes, not by running the policy compiler.The gate
ga-eval loadingests a document's history oldest version first, so version numbers match the labels.To confirm the gate catches real mistakes, the restricted document was relabelled as public on a running stack. The run failed with exit code 2, the listing check reported the document for all four Northstar principals, and the affected cases reported violations.
Evaluation result
These figures come from the CI evaluation run of this PR (Linux x86_64, dataset v2,
testsplit, 57 answerable cases).sparse-onlydense-onlyhybrid-rrfbm25-referenceThe published v2 report from the
mainCI run, with the README numbers, follows in a separate PR.背景
决策表已经在 SQL 里执行,但 demo 语料没有访问标签,所以评测的安全门禁此前只能检验租户隔离。本 PR 完成里程碑的 2.7 项:带标签的数据、人工编写的可见性标注、授权负例,以及更严格的门禁。语料发生了变化,所以结果作为数据集 v2 发布。
数据集 v2
目录变化见英文部分的 diff。
internal,其中 2 篇保持public。Alice、Bob、Carol 看到的内容和之前完全一样。sales-pricing-guide的第 1 版对所有 internal 身份可见。第 2 版改了价格,并把文档限制给销售和支持部门。visibility.yaml是对照标签和身份属性手写的,不是运行 policy compiler 得到的。门禁
门禁的逻辑见英文部分的伪代码。
ga-eval load会按从旧到新的顺序入库文档的历史版本,这样版本号和标注一致。为了确认门禁能抓住真实的错误,我在运行中的环境里把那篇 restricted 文档改标成 public。评测以退出码 2 失败,列表检查对 4 个 Northstar 身份都报出了这篇文档,受影响的用例也报出了越权。
评测结果
以下数字来自本 PR 的 CI 评测(Linux x86_64,数据集 v2,
test划分,57 条可回答用例)。指标见英文部分的表格。正式的 v2 报告会取自
main上的 CI 运行,连同 README 里的数字,放在另一个 PR 里。