Phase 0: Capability edge representation #47
No reviewers
Labels
No labels
bug
cli
core
docs
event
experiment
figure
invariant
metrics
oracle
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
provenance
revocation
tests
workload
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erikinkinen/AES!47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "0-capability-edge-representation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #5
Summary
This PR introduces capabilities as first-class graph edges with stable identity. Capabilities are now represented explicitly as
CapabilityEdgestructures containing an edge identity (EdgeId), a source subject (SubjectId), a target object (ObjectId), and a set of rights (Rights). The implementation provides complete lifecycle management throughEdgeStore, which handles creation, storage, deletion, and lookup of capability edges.This establishes the foundational representation for the capability-based access control model in AES, making authority relationships explicit, queryable, and independently identifiable entities in the system.
Scope
Included
CapabilityEdgestruct definition withid,from,to,rightsfieldsEdgeStoreclass for managing the edge collectioncreate(),add(),remove()get(),exists(),find_from(),find_to(),find_between()CapabilityEdgeExplicitly excluded
SubjectStoreorObjectStorevalidationDesign intent
The design establishes capabilities as independent, identifiable entities rather than implicit relationships. This supports several key architectural goals:
EdgeId, enabling precise reference, audit trails, and revocation without ambiguityfrom/to/rightstriple makes authority relationships queryable and introspectableEdgeStoremanages edges independently from subjects and objects, maintaining clean boundariesfind_from,find_to,find_between) support different access patterns without privileging any particular use caseThe store maintains basic invariants (no duplicate IDs, no invalid IDs), but deliberately defers validation of
SubjectId/ObjectIdexistence to higher layers, keeping the edge store focused and composable.Debug labels are conditionally compiled to provide human-readable context during development without impacting production performance or memory footprint.
Phase discipline
This belongs to Phase 0 and establishes the core graph edge representation.
Design choices aligned with phase discipline:
The
CapabilityEdgestructure is intentionally minimal, with room for future extension (e.g., capability metadata, creation timestamps, or lineage tracking) without breaking existing code.Verification
Notes
find_*methods returnconst CapabilityEdge*to maintain store ownership while enabling efficient queryingIdsgenerator, maintaining consistency with subject/object ID allocationCapabilityEdge { from, to, rights }(#5)