pub enum SecurityError {
Show 34 variants
InvalidSignature(String),
ChallengeExpired(u64),
NonceMismatch {
expected: String,
actual: String,
},
InvalidPublicKey(String),
InvalidDeviceId(String),
KeypairError(String),
PeerNotAuthenticated(String),
AuthenticationFailed(String),
IoError(Error),
SerializationError(String),
Internal(String),
PeerNotFound(String),
PermissionDenied {
permission: String,
entity_id: String,
roles: Vec<String>,
},
CertificateError(String),
InvalidCertificateChain(String),
CertificateExpired(String),
CertificateRevoked(String),
UserNotFound {
username: String,
},
UserAlreadyExists {
username: String,
},
InvalidCredential {
username: String,
},
InvalidMfaCode,
AccountLocked {
username: String,
},
AccountDisabled {
username: String,
},
AccountPending {
username: String,
},
SessionNotFound,
SessionExpired,
UnsupportedAuthMethod {
method: String,
},
PasswordHashError {
message: String,
},
TotpError {
message: String,
},
EncryptionError(String),
DecryptionError(String),
KeyExchangeError(String),
NoGroupKey {
cell_id: String,
},
KeyGenerationMismatch {
expected: u64,
actual: u64,
},
}Expand description
Errors that can occur during security operations.
Variants§
InvalidSignature(String)
Invalid signature - verification failed
ChallengeExpired(u64)
Challenge has expired
NonceMismatch
Challenge nonce mismatch
InvalidPublicKey(String)
Invalid public key format
InvalidDeviceId(String)
Invalid device ID format
KeypairError(String)
Keypair error (generation, loading, saving)
PeerNotAuthenticated(String)
Peer not authenticated
AuthenticationFailed(String)
Authentication failed
IoError(Error)
IO error (file operations)
SerializationError(String)
Serialization error
Internal(String)
Internal error
PeerNotFound(String)
Peer not found
PermissionDenied
Permission denied for operation
CertificateError(String)
Certificate validation failed
InvalidCertificateChain(String)
Certificate chain invalid
CertificateExpired(String)
Certificate expired
CertificateRevoked(String)
Certificate revoked
UserNotFound
User not found in database
UserAlreadyExists
User already exists
InvalidCredential
Invalid credential (wrong password)
InvalidMfaCode
Invalid MFA code (TOTP)
AccountLocked
Account is locked (too many failed attempts)
AccountDisabled
Account is disabled by admin
AccountPending
Account is pending activation
SessionNotFound
Session not found
SessionExpired
Session expired
UnsupportedAuthMethod
Unsupported authentication method
PasswordHashError
Password hashing error
TotpError
TOTP generation/verification error
EncryptionError(String)
Encryption operation failed
DecryptionError(String)
Decryption operation failed
KeyExchangeError(String)
Key exchange failed
NoGroupKey
No group key for cell
KeyGenerationMismatch
Key generation mismatch