Skip to content

refactor: move password crypto into server_common#3562

Open
jayakasadev wants to merge 1 commit into
apache:masterfrom
jayakasadev:phase6-crypto-server-common
Open

refactor: move password crypto into server_common#3562
jayakasadev wants to merge 1 commit into
apache:masterfrom
jayakasadev:phase6-crypto-server-common

Conversation

@jayakasadev

@jayakasadev jayakasadev commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR address?

Relates to #3315

Rationale

  • decoupling core/server-ng from the legacy core/server crate

What changed?

  • crypto helpers were moved to server_common so I updated the imports in server-ng to use the new import paths instead of server::streaming::utils::crypto)
  • The argon2 and rand dependencies moved with crypto helpers to server_common

Local Execution

  • Passed (macos); Linux/musl builds left to CI
  • Pre-commit hooks ran

AI Usage

  1. Tools: Cursor (Claude)
  2. Scope: planned and performed the full relocation
  3. Verification:
  • ran fmt/sort/clippy + unit tests locally
  1. Yes, I can explain every line

@github-actions

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.06%. Comparing base (307fdb1) to head (5a84ad2).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3562       +/-   ##
=============================================
- Coverage     74.07%   61.06%   -13.01%     
  Complexity      937      937               
=============================================
  Files          1249     1247        -2     
  Lines        128248   117573    -10675     
  Branches     104116    93487    -10629     
=============================================
- Hits          94994    71791    -23203     
- Misses        30219    42585    +12366     
- Partials       3035     3197      +162     
Components Coverage Δ
Rust Core 58.28% <ø> (-16.43%) ⬇️
Java SDK 62.44% <ø> (ø)
C# SDK 71.40% <ø> (-0.66%) ⬇️
Python SDK 88.88% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 91.35% <ø> (ø)
Go SDK 40.14% <ø> (ø)
Files with missing lines Coverage Δ
core/server-ng/src/auth.rs 0.00% <ø> (ø)
core/server-ng/src/users.rs 0.00% <ø> (ø)
core/server_common/src/crypto.rs 100.00% <ø> (ø)

... and 231 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jayakasadev jayakasadev force-pushed the phase6-crypto-server-common branch from eb32f00 to 6b41184 Compare June 24, 2026 21:41
server-ng pulled password hashing and verification from the legacy server
crate, forcing a compile-time dependency on the binary it is meant to
replace. The crypto module is three free functions over argon2 and rand
with no server-internal state, so it relocates cleanly to the shared
server_common crate.

server keeps the symbols at their original module path via a re-export, so
its own call sites are untouched. The argon2 and rand dependencies move with
the code, since crypto was their only consumer in server.

Refs apache#3315.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jayakasadev jayakasadev force-pushed the phase6-crypto-server-common branch from 6b41184 to 5a84ad2 Compare June 26, 2026 17:10
@jayakasadev jayakasadev reopened this Jun 26, 2026
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Jun 26, 2026
@jayakasadev jayakasadev changed the title refactor(server-ng): move password crypto into server_common refactor: move password crypto into server_common Jun 28, 2026
@jayakasadev

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jun 29, 2026
@jayakasadev

Copy link
Copy Markdown
Contributor Author

/request-review @hubcio

@github-actions github-actions Bot requested a review from hubcio June 29, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant