You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2020. It is now read-only.
IRI should behave according to API specs to allow validation of commands and make (D)DOS and accidental API misuse harder and punish clients that do not adhere to the API contract.
There are API docs but IRI does not follow the contract of this API and allows commands that are invalid according to docs. Furthermore the API docs are not accurate and not complete.
Motivation
On one hand the missing validation allows to (D)DOS IRI.
On the other hand clients (light-wallet, trinity) that rely on the current reference implementation do not need to make 'correct' requests and that leads to the problem that factual behavior differs from specification. 3rd party software isn't able to create an implementation that is compatible with these clients and does input validation.
Actual behavior
IRI does not punish input that violates the contract and/or doesn't make sense.
Expected behaviour
To make validation possible it is necessary to
Fix the API docs
Partly wrong
Not complete (some commands missing)
Inaccurate (does required mean not null or not empty?)
Do not allow certain commands that do not make sense, e.g. empty getTrytes command.
Make IRI validate some commands or document what validations should be done in a proxy in front of IRI.
To make some types of (D)DOS (distribution is not even necessary) harder it might be useful to
Find reasonable limits for parameters of certain commands. E.g. the number of values that can be passed as an array.
Am I planning to do it myself with a PR?
As this is a strategical issue I cannot make a PR for this without a lot of communication. Change needs to be synchronized with wallet development. Therefore I guess it would be better to solve this within the development team. But I am willing to help, if required/wanted.
Comment
I already tried to validate some input in my private proxy in front of my nodes but couldn't do it because of the gap between the API docs, IRI behaviour and wallet behaviour. My current validation can be found there: command package - from some comments in the code you can infer the gaps between wallet behaviour and API docs. Most invalid requests are made from wallets with new seeds.
The text was updated successfully, but these errors were encountered:
Bug description
IRI should behave according to API specs to allow validation of commands and make (D)DOS and accidental API misuse harder and punish clients that do not adhere to the API contract.
There are API docs but IRI does not follow the contract of this API and allows commands that are invalid according to docs. Furthermore the API docs are not accurate and not complete.
Motivation
On one hand the missing validation allows to (D)DOS IRI.
On the other hand clients (light-wallet, trinity) that rely on the current reference implementation do not need to make 'correct' requests and that leads to the problem that factual behavior differs from specification. 3rd party software isn't able to create an implementation that is compatible with these clients and does input validation.
Actual behavior
IRI does not punish input that violates the contract and/or doesn't make sense.
Expected behaviour
To make validation possible it is necessary to
To make some types of (D)DOS (distribution is not even necessary) harder it might be useful to
Am I planning to do it myself with a PR?
As this is a strategical issue I cannot make a PR for this without a lot of communication. Change needs to be synchronized with wallet development. Therefore I guess it would be better to solve this within the development team. But I am willing to help, if required/wanted.
Comment
I already tried to validate some input in my private proxy in front of my nodes but couldn't do it because of the gap between the API docs, IRI behaviour and wallet behaviour. My current validation can be found there: command package - from some comments in the code you can infer the gaps between wallet behaviour and API docs. Most invalid requests are made from wallets with new seeds.
The text was updated successfully, but these errors were encountered: