Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impr(proxy): Decouple ip_allowlist from the CancelClosure #10199

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

awarus
Copy link
Contributor

@awarus awarus commented Dec 19, 2024

This PR removes the direct dependency of the IP allowlist from CancelClosure, allowing for more scalable and flexible IP restrictions and enabling the future use of Redis-based CancelMap storage.

Changes:

  • Introduce a new BackendAuth async trait that retrieves the IP allowlist through existing authentication methods;
  • Improve cancellation error handling by instrument() async cancel_sesion() rather than dropping it.
  • Set and store IP allowlist for SCRAM Proxy to consistently perform IP allowance check

Relates to #9660

@awarus awarus marked this pull request as ready for review December 19, 2024 15:03
@awarus awarus requested a review from a team as a code owner December 19, 2024 15:03
Copy link

github-actions bot commented Dec 19, 2024

7238 tests run: 6880 passed, 0 failed, 358 skipped (full report)


Code coverage* (full report)

  • functions: 31.2% (8411 of 26981 functions)
  • lines: 47.9% (66785 of 139413 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
8b0c600 at 2025-01-08T19:43:08.943Z :recycle:

proxy/src/auth/backend/console_redirect.rs Outdated Show resolved Hide resolved
proxy/src/auth/backend/console_redirect.rs Outdated Show resolved Hide resolved
proxy/src/auth/backend/mod.rs Outdated Show resolved Hide resolved
proxy/src/auth/backend/mod.rs Outdated Show resolved Hide resolved
proxy/src/control_plane/client/cplane_proxy_v1.rs Outdated Show resolved Hide resolved
proxy/src/control_plane/client/cplane_proxy_v1.rs Outdated Show resolved Hide resolved
@awarus awarus force-pushed the cancel-new-ip branch 4 times, most recently from 372d860 to 6c40868 Compare January 7, 2025 08:23
@awarus awarus requested a review from conradludgate January 7, 2025 08:29
@conradludgate
Copy link
Contributor

This is looking good now, thanks. Will give it a proper review later today

proxy/src/cancellation.rs Outdated Show resolved Hide resolved
This PR removes the direct dependency of the IP allowlist from CancelClosure,
allowing for more scalable and flexible IP restrictions
and enabling the future use of Redis-based CancelMap storage.

Changes:
 - Introduce a new BackendAuth async trait that retrieves the IP allowlist
   through existing authentication methods;
 - Improve cancellation error handling by instrumtent() async
   cancel_sesion() rather than dropping it.
 - Set and store IP allowlist for SCRAM Proxy to consistently perform
   ip allowance check
@awarus awarus enabled auto-merge January 8, 2025 16:23
@awarus awarus added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit fcfff72 Jan 8, 2025
93 of 97 checks passed
@awarus awarus deleted the cancel-new-ip branch January 8, 2025 19:35
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