#[non_exhaustive]pub enum KeylessReason {
Show 20 variants
IssuerNotAccepted,
TokenInvalid,
AudienceMismatch,
ConfirmationMismatch,
TokenReplayed,
IdentityNotAuthorized,
PopInvalid,
AttestationMissing,
AttestationForeign,
AttestationNotFound,
AttestationMismatch,
AttestationWithdrawn,
OutsideAttestationWindow,
KeylessIdentityMismatch,
AttestationInvalid,
UntrustedAttester,
Unplaceable,
InvalidSignature,
Revoked,
ControllerUnreachable,
}Expand description
Why a keyless step refused: the registry details.reason tokens
(§5.2, §6.3, §7) and the consumer verification results (§8.1).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IssuerNotAccepted
§5.2 step 2: the token’s issuer (or SPIFFE trust domain) is not accepted by the registry.
TokenInvalid
§5.2 step 3: the token fails verification.
AudienceMismatch
§5.2 step 3: the token’s aud lacks the registry’s DID.
ConfirmationMismatch
§5.2 step 3: cnf.jkt is not the presented key’s thumbprint.
TokenReplayed
§5.2 step 3: the token was already used.
IdentityNotAuthorized
§5.2 step 6, §6.3 step 7: the controller does not list the identity.
PopInvalid
§5.2 step 4: the proof of possession does not verify.
AttestationMissing
§6.3 step 1: a keyless key id with no key_attestation.
AttestationForeign
§6.3 step 2: the attestation is on another registry.
AttestationNotFound
§6.3 step 3: no attestation at key_attestation.ctx_id.
AttestationMismatch
§6.3 steps 3–4, §8.1 step 3: the attestation’s bytes or bindings differ.
AttestationWithdrawn
§6.3 step 5, §8.1 step 7: the attestation was retracted.
OutsideAttestationWindow
§6.3 step 6, §8.1 step 5: the placing time is outside the window.
KeylessIdentityMismatch
§7: the successor’s identity may not supersede the predecessor.
AttestationInvalid
§8.1 step 1: the attestation does not verify or breaks §5.3.
UntrustedAttester
§8.1 step 2: the consumer does not accept the attesting registry.
Unplaceable
§8.1 step 4: no receipt by the attester places the signature.
InvalidSignature
§8.1 step 6: the signature does not verify under the attested key.
Revoked
§8.1 step 8: a revocation of the attested key applies.
ControllerUnreachable
§8.1 step 9: the controller’s DID document could not be fetched.
Implementations§
Source§impl KeylessReason
impl KeylessReason
Sourcepub const ALL: [KeylessReason; 20]
pub const ALL: [KeylessReason; 20]
Every reason, in declaration order.
Sourcepub fn parse(token: &str) -> Option<KeylessReason>
pub fn parse(token: &str) -> Option<KeylessReason>
Parse a token.
Sourcepub fn is_registry_token(self) -> bool
pub fn is_registry_token(self) -> bool
True for the tokens registries/error-codes.md lists as registry
details.reason values (the rest are consumer results, §13.3).
Sourcepub fn error(self, message: impl Display) -> AcdpError
pub fn error(self, message: impl Display) -> AcdpError
The consumer-side error for this reason (§8.1, §8.2): the
existing variant whose meaning fits, with the reason prefix.
controller_unreachable is the one transient refusal.
Sourcepub fn of(error: &AcdpError) -> Option<KeylessReason>
pub fn of(error: &AcdpError) -> Option<KeylessReason>
The keyless reason an error carries, if any. A
AcdpError::KeyRevoked reads as Self::Revoked: keyless
verification refuses a revoked key with that typed error.
Trait Implementations§
Source§impl Clone for KeylessReason
impl Clone for KeylessReason
Source§fn clone(&self) -> KeylessReason
fn clone(&self) -> KeylessReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for KeylessReason
Source§impl Debug for KeylessReason
impl Debug for KeylessReason
Source§impl<'de> Deserialize<'de> for KeylessReason
impl<'de> Deserialize<'de> for KeylessReason
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeylessReason, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<KeylessReason, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for KeylessReason
impl Display for KeylessReason
impl Eq for KeylessReason
Source§impl Hash for KeylessReason
impl Hash for KeylessReason
Source§impl PartialEq for KeylessReason
impl PartialEq for KeylessReason
Source§impl Serialize for KeylessReason
impl Serialize for KeylessReason
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for KeylessReason
Auto Trait Implementations§
impl Freeze for KeylessReason
impl RefUnwindSafe for KeylessReason
impl Send for KeylessReason
impl Sync for KeylessReason
impl Unpin for KeylessReason
impl UnsafeUnpin for KeylessReason
impl UnwindSafe for KeylessReason
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.