Skip to content

feat: v2.11.0 — Authorization & Admission-Control Rebind (§Phase 14 milestone 55) - #50

Merged
SoundMatt merged 1 commit into
mainfrom
m55-authz-admission-rebind-v2.11.0
Jul 28, 2026
Merged

SoundMatt merged 1 commit into
mainfrom
m55-authz-admission-rebind-v2.11.0

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Summary

  • ADAPTs rcp/authz.hpp and rcp/ratelimit.hpp per the Satellite Package Disposition table's entries for these two files (ROADMAP.md milestone 55) — the AccessPolicy/PolicyEntry/AuthzErrc and Config/token-bucket shapes survive; only their keying axes change.
  • authz.hpp now keys on (Identity, target stream, target endpoint, request kind) instead of (Identity, Zone, CommandType) — target stream is the opaque uint64_t per-connection key regmap.hpp's Ep0/watchdog.hpp's Manager already use, target endpoint is an avtp::ByteBusId, request kind is rcp::request::RequestCategory (v2.5.0). This package adds a policy gate on top of regmap.hpp's existing root-client/per-endpoint-owner access model (v2.1.0), not a replacement — it has no dependency on regmap.hpp. The old AuthController wrapper is dropped (no unified Controller::send() chokepoint remains); permit()/check() are standalone primitives a dispatch call site invokes directly.
  • ratelimit.hpp's token bucket is now one per (target stream, target endpoint) domain instead of one per Controller/Zone, multiplexed lazily by ratelimit::Manager (mirroring watchdog::Manager). The Priority::Critical bypass (no TC18 analog, DEPRECATEd) is replaced by an explicit is_safety_tagged argument sourced from rcp::request::is_safety_variant (v2.6.0).
  • tests/test_authz.cpp (REQ-AUTH-001..008) and tests/test_ratelimit.cpp (REQ-RL-001..008) entirely rewritten against the new signatures; .fusa-reqs.json entries updated to match.
  • Bumps kVersion/project version to 2.11.0. Updates ROADMAP.md with a Done (v2.11.0) summary for milestone 55.

Test plan

  • cmake --build (Release, clang, -DRELAY_BUILD_CLI=ON) — full build succeeds
  • ctest — 59/59 tests pass, including rewritten rcp_authz/rcp_ratelimit
  • cpfusa check / lint / cyber / trace --req-coverage 100 (cpp-FuSa, built from source) — all exit 0, no new findings introduced by this change beyond pre-existing baseline
  • relay conform --strict against the built cpp-rcp CLI (RELAY §12) — PASS
  • Note: a full build on this machine's local GCC 16 toolchain fails in sim.hpp (missing #include <algorithm>, unrelated to this change and confirmed present on origin/main before this PR too — mock.hpp/sim.hpp are explicitly out of scope for this milestone, deferred to v2.12.0). Verified with clang instead, matching the CI matrix's clang-14/macOS clang legs.

🤖 Generated with Claude Code

…ilestone 55)

ADAPTs rcp/authz.hpp and rcp/ratelimit.hpp in place per the Satellite
Package Disposition table's entries for these two files: the
AccessPolicy/PolicyEntry/AuthzErrc and Config/token-bucket shapes
survive, only their keying axes change.

authz.hpp's PolicyEntry and AccessPolicy::permit now key on (Identity,
target stream, target endpoint, request kind) instead of (Identity,
Zone, CommandType):

- A target stream is the same opaque uint64_t per-connection key
  rcp/regmap.hpp's Ep0 and rcp/watchdog.hpp's Manager already use
  (typically avtp::StreamId::to_u64()).
- A target endpoint is an avtp::ByteBusId.
- A request kind is rcp::request::RequestCategory (v2.5.0), already the
  single taxonomy spanning the mandatory standard kind and every
  conditional/cancellation kind.

This package adds an independent policy gate a dispatch call site
consults in addition to regmap.hpp's own root-client/per-endpoint-owner
access model (v2.1.0), not a replacement for it — it has no dependency
on regmap.hpp at all. The pre-replacement AuthController wrapper is
dropped outright rather than rebound: there is no longer a single
unified Controller::send() chokepoint to wrap, so permit()/check() are
standalone primitives a dispatch call site invokes directly, the same
"primitives driven by the embedding application" pattern
e2e.hpp/watchdog.hpp/request.hpp already established.

ratelimit.hpp's token bucket is now one per (target stream, target
endpoint) admission-control domain instead of one per Controller
instance/Zone; ratelimit::Manager multiplexes domains lazily, mirroring
watchdog.hpp's Manager. The pre-replacement Priority::Critical bypass
(Priority has no TC18 analog and is marked DEPRECATE) is replaced by
an explicit is_safety_tagged argument callers derive from
rcp::request::is_safety_variant (v2.6.0) — the traffic class that
drives an endpoint through its safe state is the closest real analog
to "must not be dropped by an admission-control layer" here.
TokenBucket::take/Manager::admit take an explicit now_ms rather than
reading a clock internally, matching e2e::RxWatchdog's convention.

Nothing else in this tree depended on the old AuthController/
ratelimit::Controller APIs (only their own tests did), so no legacy
shim was needed. tests/test_authz.cpp (REQ-AUTH-001..008) and
tests/test_ratelimit.cpp (REQ-RL-001..008) are entirely rewritten
against the new signatures and traced in .fusa-reqs.json. Bumps
kVersion/project version to 2.11.0. Updates ROADMAP.md with a Done
(v2.11.0) summary for milestone 55.

Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
@SoundMatt
SoundMatt merged commit d7d1fcf into main Jul 28, 2026
38 of 39 checks passed
@SoundMatt
SoundMatt deleted the m55-authz-admission-rebind-v2.11.0 branch July 28, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant