fix(relay): enforce scalar-only claims and surface untracked privacy budget - #632
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d05c573d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8d05c57 to
92d4eb1
Compare
|
Force-pushed: rebased onto current main plus two review fixes amended into their ticket commits (warn-once dedupe into the #88 commit, dataset-level-only gate fact into the #585 commit). About the earlier "Immutable docs archives" / "Docs" failures: the change classifier diffs Worth a maintainer's attention separately: any docs-content PR that also happens to trip the |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92d4eb108a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
92d4eb1 to
3f39b07
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f39b07978
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3f39b07 to
e87e283
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e87e283eeb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e87e283 to
26bb8cc
Compare
|
Force-pushed again: rebased onto current main to resolve a |
3d1f865 to
234ec6f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 234ec6f69b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
234ec6f to
79037b3
Compare
Attribute-release profiles could accidentally release structured object/array values through a direct source-field read or a CEL expression. Hold both claim kinds to the same scalar contract the subject side already enforces: a non-scalar value is unavailable, so a required claim denies the release and an optional one is omitted, with a value-free warn naming only the profile, claim, and JSON type tag. The contract is enforced at every layer, not just the HTTP handler: evaluate_release_scalar rejects structured results as a TypeMismatch, config validation (and registryctl check, via the shared validator) rejects expressions that always produce a list or map, and the warn-once dedupe lives on the per-snapshot evaluator so a registry-wide reload re-arms it. Marked BREAKING in the changelog with a migration pointer to Registry Evidence assertions, per the issue triage decision. Document the contract in the OpenAPI schemas, the API guide, and the API reference. Closes #88 Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
A dataset classified personal, confidential, or secret that declares a dataset-level access.aggregate_only_execution aggregate now raises the relay.aggregates.privacy_budget_untracked deployment finding, bound finding_warn under hosted_lab, production, and evidence_grade. Only dataset-level declarations count: the aggregate query routes resolve aggregates through dataset.aggregates alone, so table-level and entity-level declarations have no runtime route and raise no finding. Aggregate routes apply per-result minimum cell-size suppression but track no longitudinal query budget; this is the documented accepted limitation from the known-limitations page, so the gate warns everywhere rather than blocking startup or readiness. The docs present leaving the warning active as a legitimate steady state, with a deployment waiver as the optional dated acknowledgement, since waivers carry a mandatory expiry and the limitation is not fixable. Boot is loud: an active finding emits a dedicated deployment.privacy_budget_untracked warn line; a waived one reports through the existing deployment.gate_waived line. The finding reaches the posture endpoint and registryctl doctor through the existing catalog plumbing. Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
79037b3 to
d146c8c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d146c8c97b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ctness Signed-off-by: Jeremi Joslin <jeremi@joslin.fr> # Conflicts: # crates/registry-relay/CHANGELOG.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b4d32a6842
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ctness Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48ffe4cacf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Relay-correctness group from the 1.0 milestone. One commit per ticket so review can split or drop them independently.
#88 — scalar-only attribute-release claims (
fix(relay))Attribute-release claim values are now scalar-only (string, number, boolean), mirroring the existing
scalar_subject_valuerule on the subject side. A claim whose projected (source_field) or computed (CEL) value is an object or an array is treated as unavailable instead of passed through: a required claim of that shape denies the release (release.subject_denied, no values leaked), an optional one is omitted. A computednullis omitted rather than released as a JSONnullliteral. Claim selection stays top-level-only; a dotted path likeaddress.regiondoes not select into a structured column.attribute_release.claim.non_scalar_valuewarn line carries profile id, claim name, and a JSON type tag only.claimsresponse property is nowadditionalProperties: { "type": ["string", "number", "boolean"] }with matching descriptions. The committed spec is regenerated by the documented generator command; oasdiff breaking + stability filter pass againstmain.#585 — surface the untracked privacy budget on sensitive aggregates (
feat(relay))A dataset classified
personal,confidential, orsecretwith anaccess.aggregate_only_executionaggregate (dataset-, table-, or entity-level) now raises therelay.aggregates.privacy_budget_untrackeddeployment finding, boundfinding_warnunderhosted_lab,production, andevidence_grade. Aggregate routes apply per-result k-anonymity suppression but track no longitudinal query budget (query_budget.trackedis alwaysfalse); this is the documented accepted limitation ("Aggregates are not privacy-budgeted" in known limitations), not a fixable misconfiguration, so the gate warns everywhere rather than blocking startup or readiness. A deployment waiver naming the finding records the operator's acknowledgement.deployment.privacy_budget_untrackedwarn line with the waiver remediation; a waived one reports through the existingdeployment.gate_waivedline, not a duplicate.GET /admin/v1/postureandregistryctl doctorthrough the existing catalog plumbing; no registryctl changes.crates/registry-relay/docs/configuration.md, and one bullet in the hardening checklist.#75 — thrift RUSTSEC advisory triage (no commit)
Triage-only; conclusion posted on the issue: #75 (comment). No tagged DataFusion release currently clears the advisory (54.1.0 still pins parquet ^58.3.0, which pins thrift 0.17; parquet 59.x drops thrift).
cargo deny checkpasses with the scoped ignore already recorded indeny.toml.Security review notes (per AGENTS.md)
localprofile unaffected.Verification
cargo fmt --check,cargo check --locked --workspace --all-targets,cargo clippy --workspace --all-targets -- -D warnings,cargo test --locked --workspace,cargo deny check: pass.just openapi-contractvsorigin/main: pass.docs/site:npm testandnpm run check: pass.Closes #88. Closes #585.