mod callsign;
mod device_id;
mod encryption;
mod error;
mod formation_key;
mod keypair;
mod audit;
mod auth_state;
mod authenticator;
mod authorization;
mod membership;
mod transport;
mod user_auth;
pub use peat_mesh::security::{
CallsignError,
CallsignGenerator,
DeviceId,
DeviceKeypair,
EncryptedCellMessage,
EncryptedData,
EncryptedDocument,
EncryptionKeypair,
EncryptionManager,
FormationAuthResult,
FormationChallenge,
FormationChallengeResponse,
FormationKey,
GroupKey,
SecureChannel,
SecurityError,
SymmetricKey,
CHALLENGE_NONCE_SIZE,
DEFAULT_CHALLENGE_TIMEOUT_SECS,
FORMATION_CHALLENGE_SIZE,
FORMATION_RESPONSE_SIZE,
MAX_CALLSIGN_LENGTH,
NATO_ALPHABET,
NONCE_SIZE,
PUBLIC_KEY_SIZE,
SIGNATURE_SIZE,
SYMMETRIC_KEY_SIZE,
TOTAL_CALLSIGNS,
X25519_PUBLIC_KEY_SIZE,
};
pub use audit::{
AuditEventType, AuditLogEntry, AuditLogger, FileAuditLogger, MemoryAuditLogger,
NullAuditLogger, SecurityViolation,
};
pub use authenticator::{DeviceAuthenticator, VerifiedPeer};
pub use authorization::{
AuthenticatedEntity, AuthorizationContext, AuthorizationController, AuthorizationPolicy,
CellMembershipContext, DeviceIdentityInfo, DeviceType, HierarchyLevel, Permission, Role,
UserIdentityInfo,
};
pub use transport::{AuthenticatedConnection, AuthenticationChannel, SecureMeshTransport};
pub use user_auth::{
AccountStatus, AuthMethod, Credential, LocalUserStore, MilitaryRank, OrganizationUnit,
SecurityClearance, SessionId, UserAuthenticator, UserIdentity, UserIdentityBuilder, UserRecord,
UserSession, UserStore,
};
pub use membership::{
CertificateRegistry, MemberPermissions, MembershipCertificate, CERTIFICATE_BASE_SIZE,
MAX_CALLSIGN_LEN, MESH_ID_LEN,
};
pub use auth_state::{
AuthConfig, AuthStateEvent, AuthStateMonitor, AuthStateTracker, CertificateState,
};
pub use peat_schema::security::v1::{
Challenge, DeviceIdentity, DeviceType as ProtoDeviceType,
HierarchyLevel as ProtoHierarchyLevel, SecurityError as ProtoSecurityError, SignedBeacon,
SignedChallengeResponse,
};
impl From<peat_mesh::security::SecurityError> for crate::Error {
fn from(err: peat_mesh::security::SecurityError) -> Self {
crate::Error::Security(err.to_string())
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_module_exports() {
let _: fn() -> DeviceKeypair = DeviceKeypair::generate;
}
}