Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Document multi-value claims with rowBoundaries operator:in (and their per-record application)

Đang mở Phù hợp với người mới
#2,431 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
70/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown, rust, yaml
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu bằng cách đọc crates/registry-breg/src/api/mod.rs (~2849) và authority.rs (~190) để xác nhận xử lý đa giá trị của In, sau đó auth.rs và context.rs cho per-record AND. Tìm tài liệu authoring (vd. docs/) và thêm một phần về các claim đa giá trị với operator: in, hành vi fail-closed, và đề cập bregctl explain access. Done nghĩa là docs bao phủ rõ ràng cú pháp dev-clients và các chế độ thất bại thầm lặng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

documentation

Summary

rowBoundaries supports operator: in with multi-value claims, and the boundary applies independently to every referenced record of that type. This is the only way we found to model a caller authorized over several records of the same type in one action (e.g. a representative filing a merger over two companies), but it does not appear to be documented anywhere we looked, and the failure modes are silent.

Proven behaviour (live, origin/main 634eba0b2)

dev-clients.yaml accepts an array claim:

claims:
  registry_represented_brns: [SAMPLE-LR-A, SAMPLE-LR-B]

and a target boundary:

targets:
  - recordType: company
    rowBoundaries: [{field: brn, claim: registry_represented_brns, operator: in}]
  • an action with two company reference inputs is authorized only when both referenced records match the claim set → a caller holding only [SAMPLE-LR-A] is refused at proposal start when the second company is SAMPLE-LR-B (exactly the "one-company representation is insufficient" authority check our benchmark needed)
  • a missing claim fails closed (row-claim-missing-or-wrong-cardinality / concealed)
  • equals + an array claim is denied; only in accepts multi-value
  • one dev client per access profile may be claim-free (the "default"); a second client with different claims needs explicit testBindings or dev session start refuses with "a shared local access profile needs at most one default client"

Source pointers

  • crates/registry-breg/src/api/mod.rs verified_row_boundaries_from_sources (~2849) — Equals requires exactly one claim value; In carries all values
  • crates/registry-breg/src/authority.rs ~190 — multi_value set for BoundaryOperator::In
  • crates/registry-breg/src/auth.rs map_authority_claim (~799) — array claims mapped per entry
  • crates/registry-breg/src/postgres/context.rs snapshot_matches_boundaries (~1243) — per-record AND semantics

Ask

Document multi-value claims + operator: in (dev-clients syntax, per-record application, fail-closed behaviour) in the authoring docs; a bregctl explain access mention would also help. If per-record application is not intended semantics for multi-reference actions, that is worth stating explicitly too.

Ngôn ngữ chính
Rust
Star
2
Fork
0
Merge trung bình
8 giờ 49 phút
Pull request đã merge (30 ngày)
264

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của registrystack/registry-stack

Tất cả issue của registrystack/registry-stack

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.