Repository navigation
feat: v2.11.0 — Authorization & Admission-Control Rebind (§Phase 14 milestone 55) - #50
Merged
Merged
Conversation
…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>
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.
Summary
rcp/authz.hppandrcp/ratelimit.hppper the Satellite Package Disposition table's entries for these two files (ROADMAP.md milestone 55) — theAccessPolicy/PolicyEntry/AuthzErrcandConfig/token-bucket shapes survive; only their keying axes change.authz.hppnow keys on (Identity, target stream, target endpoint, request kind) instead of (Identity,Zone,CommandType) — target stream is the opaqueuint64_tper-connection keyregmap.hpp'sEp0/watchdog.hpp'sManageralready use, target endpoint is anavtp::ByteBusId, request kind isrcp::request::RequestCategory(v2.5.0). This package adds a policy gate on top ofregmap.hpp's existing root-client/per-endpoint-owner access model (v2.1.0), not a replacement — it has no dependency onregmap.hpp. The oldAuthControllerwrapper is dropped (no unifiedController::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 perController/Zone, multiplexed lazily byratelimit::Manager(mirroringwatchdog::Manager). ThePriority::Criticalbypass (no TC18 analog, DEPRECATEd) is replaced by an explicitis_safety_taggedargument sourced fromrcp::request::is_safety_variant(v2.6.0).tests/test_authz.cpp(REQ-AUTH-001..008) andtests/test_ratelimit.cpp(REQ-RL-001..008) entirely rewritten against the new signatures;.fusa-reqs.jsonentries updated to match.kVersion/project version to 2.11.0. Updates ROADMAP.md with aDone (v2.11.0)summary for milestone 55.Test plan
cmake --build(Release, clang,-DRELAY_BUILD_CLI=ON) — full build succeedsctest— 59/59 tests pass, including rewrittenrcp_authz/rcp_ratelimitcpfusa 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 baselinerelay conform --strictagainst the builtcpp-rcpCLI (RELAY §12) — PASSsim.hpp(missing#include <algorithm>, unrelated to this change and confirmed present onorigin/mainbefore this PR too —mock.hpp/sim.hppare 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