Skip to content

✨ server: add signup ip to sardine - #1216

Merged
cruzdanilo merged 1 commit into
mainfrom
sardine-ip
Aug 12, 2026
Merged

✨ server: add signup ip to sardine#1216
cruzdanilo merged 1 commit into
mainfrom
sardine-ip

Conversation

@aguxez

@aguxez aguxez commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
  • ✨ server: add signup ip to sardine
  • ✅ server: fix maturity test collision

Summary by CodeRabbit

  • New Features

    • Signup security data now includes the client’s validated IPv4 or IPv6 address when available.
    • Sardine receives the signup device IP for improved fraud and risk assessment.
  • Bug Fixes

    • Desktop WebAuthn registration now completes successfully.
    • iOS WebAuthn registration no longer incorrectly issues a wallet-extension token.
    • Invalid IP address data is rejected instead of being forwarded.

@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f65df3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@exactly/server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@aguxez, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 45a4d1f5-3495-4803-8f48-a524cff845ee

📥 Commits

Reviewing files that changed from the base of the PR and between 85a8be9 and f65df3d.

📒 Files selected for processing (1)
  • server/test/api/auth.test.ts

Walkthrough

The registration endpoint validates an optional connecting IP, passes it to createCredential, and includes it in the Sardine device payload. Tests cover IPv4, IPv6, invalid IPs, and updated platform behavior.

Changes

Signup IP forwarding

Layer / File(s) Summary
IP validation contract
server/utils/sardine.ts
Adds the branded IpAddress schema and applies it to Sardine device IP validation.
Registration credential flow
server/api/auth/registration.ts, server/utils/createCredential.ts, .changeset/calm-falcons-register.md
Validates request metadata and passes the IP and client identifier to createCredential, which adds the IP to the Sardine payload. Adds a patch changeset.
Registration and fixture validation
server/test/api/auth.test.ts, server/test/utils/maturity.test.ts
Tests IPv4, IPv6, invalid IP input, platform responses, Sardine metadata, and updated planner-retry fixtures.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RegistrationHandler
  participant createCredential
  participant Sardine
  RegistrationHandler->>RegistrationHandler: Validate do-connecting-ip
  RegistrationHandler->>createCredential: Pass validated ip and source
  createCredential->>Sardine: Include device.ip in customer payload
Loading

Possibly related PRs

  • exactly/exa#1175: Modifies the same registration, credential, Sardine validation, and authentication test code for signup IP forwarding.
  • exactly/exa#594: Introduces the Sardine signup integration extended here with validated client IP forwarding.
  • exactly/exa#674: Updates the same registration and credential flow with related Sardine signup metadata.

Suggested reviewers: nfmelendez, cruzdanilo

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the signup IP address to Sardine.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sardine-ip
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch sardine-ip

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4afde328-607d-496a-a096-ce7dcb06cd28

📥 Commits

Reviewing files that changed from the base of the PR and between 6bdc56c and 85a8be9.

📒 Files selected for processing (6)
  • .changeset/calm-falcons-register.md
  • server/api/auth/registration.ts
  • server/test/api/auth.test.ts
  • server/test/utils/maturity.test.ts
  • server/utils/createCredential.ts
  • server/utils/sardine.ts

Comment thread server/api/auth/registration.ts
Comment thread server/api/auth/registration.ts
@aguxez
aguxez marked this pull request as ready for review August 12, 2026 11:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f65df3d2be

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/api/auth/registration.ts
Comment thread server/utils/createCredential.ts
@cruzdanilo
cruzdanilo merged commit f65df3d into main Aug 12, 2026
12 checks passed
@cruzdanilo
cruzdanilo deleted the sardine-ip branch August 12, 2026 11:41
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.15%. Comparing base (6bdc56c) to head (f65df3d).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
server/utils/sardine.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1216      +/-   ##
==========================================
- Coverage   70.22%   70.15%   -0.08%     
==========================================
  Files         259      259              
  Lines       11799    11850      +51     
  Branches     4015     4035      +20     
==========================================
+ Hits         8286     8313      +27     
- Misses       3211     3235      +24     
  Partials      302      302              
Flag Coverage Δ
e2e 70.15% <75.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants