Skip to content

Conversation

@harding
Copy link
Contributor

@harding harding commented Jan 21, 2019

This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt. I think it should fit in well with #14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

@harding harding force-pushed the 2019-01-rpc-security branch from 5e7f598 to 54e3035 Compare January 21, 2019 21:16
@fanquake fanquake added the Docs label Jan 21, 2019
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if it is necessary but could mention ssh forwarding of the RPC port, as an option that does provide encryption and and can be used over the internet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add sub-section titles; ports, escaping, remote access … so that it's easier to navigate this text for people looking for a specific thing

@laanwj
Copy link
Member

laanwj commented Jan 22, 2019

Looks good, thanks!
ACK

@harding harding force-pushed the 2019-01-rpc-security branch from 54e3035 to 65e20d7 Compare January 22, 2019 18:24
@harding
Copy link
Contributor Author

harding commented Jan 22, 2019

Forced pushed updates for @laanwj's suggestions:

  • Converted to a descriptive list, with each bullet point briefly describing the contents of that point ("securing the executable", "securing local network access", "securing remote network access", "secure authentication", and "secure string handling")

  • Added a note about VPNs and ssh port forwarding being acceptable alternatives to (local) secure private network

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK, and after brief read LGTM. Maybe also mention stunnel after VPN and SSH port?

Copy link
Contributor

@promag promag Jan 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, SSH.

@Sjors
Copy link
Member

Sjors commented Jan 23, 2019

ACK 65e20d7

@harding harding force-pushed the 2019-01-rpc-security branch from 65e20d7 to 5a5ea93 Compare January 23, 2019 23:27
@laanwj laanwj merged commit 5a5ea93 into bitcoin:master Jan 24, 2019
laanwj added a commit that referenced this pull request Jan 24, 2019
5a5ea93 Doc: add information about security to the JSON-RPC doc (David A. Harding)

Pull request description:

  This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt.  I think it should fit in well with #14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

Tree-SHA512: e09d82c3029ed17a8bcf50722ea25a8c6c514731f3bce01908cbb6fe48bc96a3068a025beabebc602d18e1bc0dc3f2602848abc05dca1d3efe2a988ee50068c0
@andronoob
Copy link

I once read this: https://www.reddit.com/r/Bitcoin/comments/7ooack/critical_electrum_vulnerability/

Is there any similarity?

@Sjors
Copy link
Member

Sjors commented Jan 24, 2019

@andronoob not for RPC, because (non ancient) browsers will refuse to communicate due to lacking CORS headers. Electrum, from I remember, does have those CORS headers, because it consists of a "server" and a (javascript based) GUI "client". The problem there was that not just the client could talk to the server, but any website could.

Because of these missing headers, websites can't communicate with the RPC. Even if they could, they would need to know the username & password.

There's also a REST API which is unauthenticated, but only shows public info like blocks; it doesn't expose the wallet. It currently doesn't have CORS headers and probably shouldn't, but not so much for security reasons as for scope creep. See the discussion in #12040 for more context.

jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 6, 2020
Summary:
Backport of Core [[bitcoin/bitcoin#15223 | PR15223]]
Depends on D7765

Test Plan:
Replaced mentions of "Core" by "ABC".
Visual inspection in a markdown viewer.

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7766
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…RPC doc

5a5ea93 Doc: add information about security to the JSON-RPC doc (David A. Harding)

Pull request description:

  This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt.  I think it should fit in well with bitcoin#14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

Tree-SHA512: e09d82c3029ed17a8bcf50722ea25a8c6c514731f3bce01908cbb6fe48bc96a3068a025beabebc602d18e1bc0dc3f2602848abc05dca1d3efe2a988ee50068c0
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 11, 2021
…RPC doc

5a5ea93 Doc: add information about security to the JSON-RPC doc (David A. Harding)

Pull request description:

  This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt.  I think it should fit in well with bitcoin#14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

Tree-SHA512: e09d82c3029ed17a8bcf50722ea25a8c6c514731f3bce01908cbb6fe48bc96a3068a025beabebc602d18e1bc0dc3f2602848abc05dca1d3efe2a988ee50068c0
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Sep 12, 2021
…RPC doc

5a5ea93 Doc: add information about security to the JSON-RPC doc (David A. Harding)

Pull request description:

  This documents some information about using the RPC interface securely, as suggested in bitcoin-core/bitcoincore.org#637 by @luke-jr and @TheBlueMatt.  I think it should fit in well with bitcoin#14458, but is not dependent on it (and shouldn't have any significant merge conflicts with it).

Tree-SHA512: e09d82c3029ed17a8bcf50722ea25a8c6c514731f3bce01908cbb6fe48bc96a3068a025beabebc602d18e1bc0dc3f2602848abc05dca1d3efe2a988ee50068c0
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants