Restrict --remote flag to opt-in sensitive API calls instead of opt-out
A few days ago some of us on Slack discussed a potential issue with the handling of --remote flag of IRI. By default it opens the door to getNeighbors, addNeighbors and removeNeighbors if you don't set to restrict them by --remote-limit-api. We came to the conclusion that it might be better to opt-in those sensitive API calls for --remote instead of opt-out them because the average user does not know or care about it and opens unintentionally the door for potential harmful operations (gathering IPs, tampering with neighbors). Additionally a lot of users post their IPs on slack despite the warning not to do so. We think that most users of --remote don't use those API calls and the low effort to change this is worth the improvement of security.
Created the following pull request: https://github.com/iotaledger/iri/pull/320
I agree. @th0br0 what do you think?
We'll look at creating a secure default remote limit API parameter to address this issue.
instead of --remote, i suggest --remote-open-api, or similar. --remote is very arbitrary.
@GalRogozinski @jakubcech For the actual implementation, I will make a whitelist like the following:
API:process ->
if (config.defaultClosedApi().contains(command) && !config.remoteOpenApi.contains(command))
The defaultClosedApi will be from a list
Let's talk about the proposal on the sync today