-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
V7 Add transient error handling #2281
Comments
I think this is a good mechanism, but perhaps out of scope. There are many ways an app could be designed such that a sort of self-DoS could occur and there is not an immediate vector to abuse it. |
Very true! Though I suggest that this is DoSing an external system. For instance, if a web app keeps retrying an operation with no backoff time, that could impact the service's availability. |
potentially related: #1778 |
I rechecked, that this issue is not a duplicate of #1778, although related. From the issue description:
Point of view: "save 3rd party service from DoS". Based on this description I would say, that every service must defend itself and can not rely on the hope their users are nice. There are some risks for the application itself, when hammering other services - the application may get blocked from using the service - and this is a clear denial of service for the application itself (that is in scope for ASVS), not (only) for the external service (that is out of scope for ASVS). How to solve the problem - as it may be done and achieved in many different ways, we just can highlight the problem in a documentation requirement. We have a documentation requirement:
We can ask "Document how the connection to service should fail, and if retry is allowed, then retry strategy." In case there is need to create a new documentation requirement for #1778, it may fit there better. |
Ok. I have read back through this and I think that there are two main considerations here:
I actually think that the new 7.4.4 could handle both these situations with some tailoring. I would therefore suggest the following:
|
I don't think 7.4.4 should cover the retry issue. Retry actually works against it - for synchronous flow, as most of the HTTP request-responses are - having retry for connection is just increasing the risk that we try to solve here. |
Draft requirement:
Verify that transient errors are handled with a retry mechanism that includes backoff and jitter, ensuring retries are spaced effectively to prevent overwhelming the system or external service, and avoiding retries for errors that are not transient.
I propose this has an availability impact because without a retry and backoff strategy, clients may repeatedly hammer a server when transient errors (like timeouts or temporary unavailability) occur. This could overwhelm the target service or network, creating a DoS. As for the inverse-- there's no point retrying other kinds of errors (AuthN / AuthZ / 400 Bad Request) and doing so can also impact availability.
The text was updated successfully, but these errors were encountered: