feat(exousia): authentication and authorization (P2-04)#48
Merged
forkwright merged 1 commit intomainfrom Mar 12, 2026
Merged
Conversation
Implements the exousia crate — identity, authentication, and authorization
for Harmonia. Household model with Admin/Member tiers, JWT access tokens
(15 min HS256), rotated refresh tokens (30 day, SHA-256 stored), and
prefixed API keys (hmn_{short}_{long} format, long token SHA-256 stored).
08bfd4f to
dd5af7b
Compare
This was referenced Mar 18, 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
crates/exousia/— identity, authentication, and authorization for HarmoniaClaimsstruct per auth.md spechmn_{8-char-short}_{24-char-long}format; long token stored as SHA-256 hash; renderer varianthmn_rnd_*)ExousiaServiceImplimplementing theAuthServicetrait — login, refresh, logout, validate_bearer, validate_api_key, create_user, create_api_key, revoke_api_keyAuthenticatedUser(Bearer → X-Api-Key → query param priority) andRequireAdmin; bothFromRequestPartsreturning structured{ error, code, correlation_id }JSON on failureTest plan
cargo fmt --all -- --check✓cargo clippy -p exousia -- -D warnings✓cargo test -p exousia✓ (29/29)Covered: