pub struct VerifiedSubnetContext {
pub authority: EntityId,
pub attachment: TopologySubnetId,
pub scope: TopologySubnetId,
pub topology_epoch: u32,
pub subject: EntityId,
pub subject_node: u64,
pub session_id: u64,
pub rights: SubnetRights,
pub generation: u32,
pub subnet_auth_epoch: u64,
pub expires_at: u64,
pub credential_set_hash: [u8; 32],
}Expand description
Immutable per-session authority compiled once at admission and read by the packet path (SUBNET_AUTH_PLAN.md D5/D6).
Forwarding consumes only this: authority equality, one fixed-width prefix comparison, two epoch comparisons, an expiry check, and a rights-bit test. No signature verification, chain walk, string parse, allocation, or online lookup.
Fields§
Authority the credentials verified under.
attachment: TopologySubnetIdThe exact admitted topology point — presentation.target.path,
verified to lie inside scope.
This, not Self::scope, is where the peer is. A grant
scoped at vehicle and presented for
vehicle/perception/camera-domain admits the camera domain
only; treating scope as the peer’s location would place that
one peer everywhere beneath vehicle at once and let a
gateway mistake an internal transition for a boundary
crossing (or the reverse). Forwarding reads attachment.
scope: TopologySubnetIdCeiling: the root of the subtree the credential permits. Bounds
what attachment may be and what a re-presentation may claim;
it is never itself a location.
topology_epoch: u32Topology epoch verified against.
subject: EntityIdFull subject entity, proven by signature this session.
subject_node: u64Routing derivative of subject, derived once after
verification (never used to establish identity).
session_id: u64Session incarnation this context belongs to.
rights: SubnetRightsRights granted for this session.
generation: u32Leaf generation at verification time.
subnet_auth_epoch: u64Authority auth epoch at verification time.
expires_at: u64Leaf expiry (unix seconds, exclusive).
credential_set_hash: [u8; 32]Hash binding the exact credentials that produced this context.
Implementations§
Source§impl VerifiedSubnetContext
impl VerifiedSubnetContext
Sourcepub fn allows(
&self,
current_topology_epoch: u32,
current_subnet_auth_epoch: u64,
now_secs: u64,
target: TopologySubnetId,
right: SubnetRights,
) -> bool
pub fn allows( &self, current_topology_epoch: u32, current_subnet_auth_epoch: u64, now_secs: u64, target: TopologySubnetId, right: SubnetRights, ) -> bool
The D6 hot-path check: is right authorized for target
right now? Pure integer work over immutable state.
Trait Implementations§
Source§impl Clone for VerifiedSubnetContext
impl Clone for VerifiedSubnetContext
Source§fn clone(&self) -> VerifiedSubnetContext
fn clone(&self) -> VerifiedSubnetContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VerifiedSubnetContext
impl Debug for VerifiedSubnetContext
impl Eq for VerifiedSubnetContext
Source§impl PartialEq for VerifiedSubnetContext
impl PartialEq for VerifiedSubnetContext
impl StructuralPartialEq for VerifiedSubnetContext
Auto Trait Implementations§
impl Freeze for VerifiedSubnetContext
impl RefUnwindSafe for VerifiedSubnetContext
impl Send for VerifiedSubnetContext
impl Sync for VerifiedSubnetContext
impl Unpin for VerifiedSubnetContext
impl UnsafeUnpin for VerifiedSubnetContext
impl UnwindSafe for VerifiedSubnetContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.