pub struct ReplicatedRevocations { /* private fields */ }Expand description
An offline replica of one issuer’s revocation set (R732-F6).
adopt verifies a signed set against the IssuerTrust
(pinned key, or JWKS with only issuer-role keys accepted) and keeps it only
if its epoch is higher than the one held. Readers never block on an adopt:
the held set is an Arc swapped under a short write lock, after the
signature work is done.
Persistence. export returns the held set as the signed
token itself; an edge writes those bytes to disk and, after a restart, hands
them back to adopt, which re-verifies them. Gossip carries
the same bytes between peers. Transport and storage are the consumer’s.
Implementations§
Source§impl ReplicatedRevocations
impl ReplicatedRevocations
Sourcepub fn new(trust: IssuerTrust) -> ReplicatedRevocations
pub fn new(trust: IssuerTrust) -> ReplicatedRevocations
An empty replica. Until a set is adopted every query answers false.
pub fn issuer(&self) -> &str
Sourcepub async fn adopt(&self, token: &str) -> Result<Adopted, AdoptError>
pub async fn adopt(&self, token: &str) -> Result<Adopted, AdoptError>
Verify token as a RevocationSet for the trusted issuer and adopt
it if its epoch is higher than the one held.
An equal epoch is Adopted::Unchanged; a lower one is
AdoptError::Stale. Concurrent adopts are linearised on the epoch:
whatever order they finish in, the highest epoch wins.
Trait Implementations§
Source§impl Debug for ReplicatedRevocations
impl Debug for ReplicatedRevocations
Source§impl RevocationReader for ReplicatedRevocations
impl RevocationReader for ReplicatedRevocations
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
'life0: 'async_trait,
'life1: 'async_trait,
ReplicatedRevocations: '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
'life0: 'async_trait,
'life1: 'async_trait,
ReplicatedRevocations: '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
'life0: 'async_trait,
'life1: 'async_trait,
ReplicatedRevocations: '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
'life0: 'async_trait,
'life1: 'async_trait,
ReplicatedRevocations: '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§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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
ReplicatedRevocations: '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
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
ReplicatedRevocations: 'async_trait,
true if principal’s membership of resource (kind, id) in a
snapshot at snapshot_epoch is revoked: a membership entry exists with
snapshot_epoch < at_epoch — the check a membership snapshot (R732-F4)
makes per member. Any principal kind, a Key included. Read more