Phase 30: Remove hardcoded credentials and implement Argon2id authentication#70
Merged
infinityabundance merged 8 commits intomainfrom Feb 14, 2026
Merged
Conversation
…password validation Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
…better test diagnostics Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
…ling Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
…eration Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Co-authored-by: infinityabundance <255699974+infinityabundance@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix security issues for phase 30
Phase 30: Remove hardcoded credentials and implement Argon2id authentication
Feb 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Eliminates critical authentication vulnerabilities: hardcoded admin credentials, static demo token, and weak DJB2 password hashing. Implements Argon2id via libsodium with cryptographically secure token generation.
Details
What changed?
Authentication System (
src/web/auth_manager.c)admin:admindefault useruser_auth_hash_password()crypto_prim_random_bytes()(32 bytes → 64+ hex chars)API Routes (
src/web/api_routes.c)"demo_token_12345"from login endpointUser Model (
src/database/models/user_model.cpp)validatePassword()stub (was always returning false)crypto_pwhash_str_verify()Configuration
Documentation
Rationale
Web dashboard authentication was non-functional in production:
Argon2id is OWASP-recommended for password storage. Leverages existing libsodium infrastructure from Phase 21 security module.
Testing
make)tests/unit/test_phase30_security.cNotes
user_auth.c)attack_prevention.c)audit_log.c)💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.