pub struct MemoryRevocationStore(/* private fields */);Expand description
In-process revocation log — tests, and single-process deployments that do not need the set to survive a restart. Clones share one log, so an authority-side writer and an edge-side reader see the same set.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryRevocationStore
impl Clone for MemoryRevocationStore
Source§impl Debug for MemoryRevocationStore
impl Debug for MemoryRevocationStore
Source§impl Default for MemoryRevocationStore
impl Default for MemoryRevocationStore
Source§impl RevocationReader for MemoryRevocationStore
impl RevocationReader for MemoryRevocationStore
Source§fn is_membership_revoked<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_key: &'life1 RevocationKey,
kind: &'life2 str,
id: &'life3 str,
principal: &'life4 PrincipalId,
snapshot_epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn is_membership_revoked<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_key: &'life1 RevocationKey,
kind: &'life2 str,
id: &'life3 str,
principal: &'life4 PrincipalId,
snapshot_epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Plaintext rows: key is not needed.
Source§fn is_revoked<'life0, 'life1, 'async_trait>(
&'life0 self,
jti: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_revoked<'life0, 'life1, 'async_trait>(
&'life0 self,
jti: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
true if the credential with this jti has been revoked
(Revoked::Jti). Cryptographic expiry is enforced separately by the
TokenVerifier. Read moreSource§fn is_device_revoked<'life0, 'life1, 'async_trait>(
&'life0 self,
device: &'life1 DeviceId,
seq: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_device_revoked<'life0, 'life1, 'async_trait>(
&'life0 self,
device: &'life1 DeviceId,
seq: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
true if a standing binding of device at sequence seq is revoked:
a Revoked::Device entry exists with seq < at_seq — the check a
standing node binding (R732-F5) makes. A binding minted after the
revoke (re-enrollment) carries a higher seq and reads false.Source§impl RevocationWriter for MemoryRevocationStore
impl RevocationWriter for MemoryRevocationStore
Source§fn revoke<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 Revoked,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn revoke<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 Revoked,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add
entry to the set, advancing the epoch (next_epoch) in the same
atomic write. An identity already present keeps the larger bound
(Revoked::cmp_bound); the epoch advances only when a row was
inserted or its bound rose. Idempotent — re-revoking with an equal
or lower bound is a no-op, not an error, and leaves the epoch alone. Propagation to edge
cheers_verify::RevocationReaders is asynchronous (see the module
contract).Source§fn snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RevocationSnapshot, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn snapshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RevocationSnapshot, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The current epoch and entries, read as one consistent view: the
contents are exactly those the epoch was advanced to. Includes lapsed
jtis that gc has not yet removed;
RevocationPublisher::current
filters those.Auto Trait Implementations§
impl Freeze for MemoryRevocationStore
impl RefUnwindSafe for MemoryRevocationStore
impl Send for MemoryRevocationStore
impl Sync for MemoryRevocationStore
impl Unpin for MemoryRevocationStore
impl UnsafeUnpin for MemoryRevocationStore
impl UnwindSafe for MemoryRevocationStore
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
Mutably borrows from an owned value. Read more