CIP 0121 - remove whitelists - #1
Conversation
martinflorian-da
left a comment
There was a problem hiding this comment.
Thanks a lot! I do have a fair amount of comments it seems...
On the highest level I wonder about whether we should also start the CIP for permissioning the sync sooner rather than later.
| maintained IP whitelist that each Super Validator (SV) applies. Every new validator, address change, or additional egress range requires a central request-and-approval step | ||
| before that validator can reach the network. This CIP proposes to remove the IP whitelist so that validators can join a genuinely public network without a whitelisting process. | ||
|
|
||
| The whitelist cannot simply be dropped: it currently provides two protections incidentally — a bound on who can consume node resources, and a bound on who can reach the synchronizer. |
There was a problem hiding this comment.
Hm this is valid but IMO the main problem is:
- with whitelists, it's trivial to block an attacker once they start messing around
- without that option, we need protection mechanisms that don't depend on some form of identity (IP addresses are cheap)
There was a problem hiding this comment.
Isn't that where rate limit come into force? Though realistically an attacker that's sophisticated enough can in theory consume the entire global capacity, but that requires intervention on a per case basis.
|
|
||
| In front of its public endpoints, every SV must operate: | ||
|
|
||
| - Global rate limiting across all Scan and all sequencer endpoints. |
There was a problem hiding this comment.
Dumb question: what does "rate limiting" actually mean?
For scan we see to mean "limit rate of requests" (might be worth to make that explicit, dunno).
Does this map 1:1 also to the sequencer?
And we ignore aspects such as payload sizes, number of parallel connections, HTTP2- or TCP-level things that attackers might try?
There was a problem hiding this comment.
Possibly we can just ignore the questions about sequencers because there "blocking" works quite well, by unpermissioning malicious actors?
There was a problem hiding this comment.
For scan just requests.
For the sequencer we currently have active requests, confirmation requests and the plan is to add requests as well.
There was a problem hiding this comment.
For the sequencer we currently have active requests, confirmation requests and the plan is to add requests as well.
But on the infra side?
There was a problem hiding this comment.
We specifically say that on the infra level all public endpoints must have rate limits in front of them, so sequencer included. Should we make it more explicit?
There was a problem hiding this comment.
I think here specifically it's clear that we want infra-base rate limiting in front of sequencers, I'm just not sure if it's going to be clear to everyone what this exactly means, i.e., rate of what needs to be limited here.
Could also be too much detail for a CIP and/or obvious to whoever it matters; just thinking aloud.
| - throttled requests receive the expected response; | ||
| - client IPs are correctly identified and limited, even when forwarded through a trusted proxy; | ||
|
|
||
| ## Motivation |
There was a problem hiding this comment.
Shouldn't that be very close to the top as well?
There was a problem hiding this comment.
I just followed the template 🤷
There was a problem hiding this comment.
I never found the template to make sense, but got pushback when I proposed to change it. Let's stick with it as it is.
| ## Rationale | ||
|
|
||
| With the synchronizer being permissioned, the IP whitelist is no longer needed to have control over the participants that can connect to the synchronizer. | ||
| The rate limiting and DDoS protection provide a bound on resource consumption and protect against denial-of-service attacks, so that the network can remain available even when under load. |
There was a problem hiding this comment.
I think we should mention also here that "permissioned synchronizer" doesn't help scan.
moritzkiefer-da
left a comment
There was a problem hiding this comment.
Thanks! This lgtm. I suspect the obvious question we will get though is
What audits have you done to make this safe?
So we likely need to have some answer as to what properties have been audited (could be as simple as "check for bounded resource consumption on endpoints and that synchronizer permissioning works properly") and plan at least an internal audit (and we probably want to confirm upfront with the SVs what they would be willing to acceptr
martinflorian-da
left a comment
There was a problem hiding this comment.
Thanks! Let's loop in @isegall-da for the next iteration!
|
|
||
| In front of its public endpoints, every SV must operate: | ||
|
|
||
| - Global rate limiting across all Scan and all sequencer endpoints. |
There was a problem hiding this comment.
I think here specifically it's clear that we want infra-base rate limiting in front of sequencers, I'm just not sure if it's going to be clear to everyone what this exactly means, i.e., rate of what needs to be limited here.
Could also be too much detail for a CIP and/or obvious to whoever it matters; just thinking aloud.
|
|
||
| #### Audit | ||
|
|
||
| An internal audit of all the endpoints that will be exposed to the public will be performed to ensure that they are not vulnerable to abuse or denial-of-service attacks. |
There was a problem hiding this comment.
| An internal audit of all the endpoints that will be exposed to the public will be performed to ensure that they are not vulnerable to abuse or denial-of-service attacks. | |
| An internal audit of the APIs that will be exposed to the public will be performed to ensure that they are not vulnerable to abuse or denial-of-service attacks. |
The framing "all the endpoints" matches what we plan to provide for scan, but I'm not sure how the audit results for the sequencer can be presented with reasonable effort. And I see no downside to keeping the promise a bit more fuzzy here...
|
|
||
| ### Preconditions for Removal | ||
|
|
||
| 1. **A traffic-based onboarding gate is in place.** Synchronizer access must be gated so that participants incur a traffic cost to onboard, and allow the blocking of nodes at a protocol level. |
There was a problem hiding this comment.
We need to add that this will be handled in a separate CIP and that this CIP focuses on the remaining aspects only.
| - The same type of limits, configurable per OpenAPI operation, allowing for more restrictive rate limits for certain operations. | ||
| - Bounded per-IP-address-range overrides, so that a known high-volume consumer can be granted a higher limit without being exempted from limiting. | ||
|
|
||
| Throttled requests must return `HTTP 429`. |
There was a problem hiding this comment.
(and similarly for RESOURCE_EXHAUSTED below)
|
|
||
| ### Infrastructure Requirements | ||
|
|
||
| In front of its public endpoints, every SV must operate: |
There was a problem hiding this comment.
Probably wanna say explicitly that this will be documented in public docs
| ### Scope | ||
|
|
||
| The removal of the whitelists applies only to the validator-facing public endpoints of Scan and the sequencers. | ||
| No changes are made to the non-public endpoints, or to the whitelists that handle traffic that occurs only between SV nodes. |
There was a problem hiding this comment.
Maybe be more explicit on "non-public" is here, i.e. who these are exposed to.
|
|
||
| #### Audit | ||
|
|
||
| An internal audit of all the endpoints that will be exposed to the public will be performed to ensure that they are not vulnerable to abuse or denial-of-service attacks. |
There was a problem hiding this comment.
an internal audit .. will be performed
.. And its results will be made available to all SV operators.
|
|
||
| ## Rationale | ||
|
|
||
| With a traffic-based onboarding gate in place, the IP whitelist is no longer needed to have control over the participants that can connect to the synchronizer (this has no impact on Scan). |
There was a problem hiding this comment.
this has no impact on Scan
I don't understand what "this" refers to here.
No description provided.