iri icon indicating copy to clipboard operation
iri copied to clipboard

Restrict --remote flag to opt-in sensitive API calls instead of opt-out

Open cyclux opened this issue 9 years ago • 5 comments

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.

cyclux avatar Sep 18 '17 11:09 cyclux

Created the following pull request: https://github.com/iotaledger/iri/pull/320

scott79 avatar Oct 12 '17 07:10 scott79

I agree. @th0br0 what do you think?

paulhandy avatar Jan 08 '18 23:01 paulhandy

We'll look at creating a secure default remote limit API parameter to address this issue.

jakubcech avatar Aug 13 '18 14:08 jakubcech

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 in BaseIotaConfig.Defaults, without options to set them in a config

kwek20 avatar Aug 19 '18 17:08 kwek20

Let's talk about the proposal on the sync today

jakubcech avatar Aug 20 '18 12:08 jakubcech