⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module auth

Module auth 

Source
Expand description

Authentication Framework

Provides user authentication, password hashing, and multi-factor authentication.

§Features

  • PBKDF2-HMAC-SHA256 password hashing with configurable iterations
  • Password complexity enforcement via configurable policy
  • Password history tracking (prevent reuse of last N passwords)
  • Account expiration with timestamp-based checks
  • Multi-factor authentication (TOTP-like)
  • Account lockout after configurable failed attempts

§No-Heap Design

All data structures use fixed-size stack/static buffers to avoid heap allocations during boot. This prevents corruption of the bump allocator on architectures (e.g., RISC-V) where the heap is not yet fully initialized when the auth module runs.

Structs§

AuthManager
Authentication manager
Credential
User credential
PasswordPolicy
Password complexity enforcement policy.
UserAccount
User account information (fixed-size, no heap allocation).

Enums§

AuthResult
Authentication result

Functions§

get_auth_manager
Get global authentication manager
init
Initialize authentication framework
validate_password
Validate a password against the default policy (convenience function).

Type Aliases§

UserId
User identifier