jayakasadev opened a new pull request, #3562:
URL: https://github.com/apache/iggy/pull/3562

   ### What
   Moves the password crypto helpers (`hash_password`, `verify_password`, 
`generate_secret`) out of `core/server` into the shared `server_common` crate, 
and repoints `server-ng` at the new home.
   
   ### Why
   `core/server-ng` imported `server::streaming::utils::crypto`, a compile-time 
dependency on the legacy binary it is meant to replace. The module is three 
free functions over `argon2` + `rand` with no `server`-internal state, so it 
relocates cleanly. One of the remaining `use server::*` clusters tracked in 
#3315.
   
   ### Changes
   - `crypto.rs` moved verbatim to `server_common` (rename, zero body changes — 
argon2 cost params and secret charset unchanged).
   - `server_common`: `pub mod crypto;`; `argon2` + `rand` added (they were 
`crypto`'s only consumer in `server`, so they move with it — `cargo machete` 
confirms `server` no longer needs them).
   - `server`: keeps a back-compat re-export at `streaming::utils::crypto`, so 
its in-crate call sites (`http_server`, `shard/execution`, 
`shard/system/users`, `user.rs`) are untouched.
   - `server-ng`: `auth.rs` and `users.rs` now `use server_common::crypto`.
   
   ### Verification
   - `cargo fmt --all`, `cargo sort --no-format --workspace` — clean
   - `cargo clippy --all-features --all-targets -- -D warnings` on `server`, 
`server_common`, `server-ng` — clean
   - `cargo machete` — no unused deps
   - `cargo check` — `server`, `server_common`, `server-ng` build
   - `cargo test -p server_common` — 62 passed
   - `rg '^use server::streaming::utils::crypto' core/server-ng/` — no matches
   
   No behavior change: existing password hashes still verify; legacy `server` 
builds via the re-export.
   
   Refs #3315.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to