-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat(rpc): Cookie auth system for the RPC endpoint #8900
Conversation
Requests from a remote host that don't have the cookie generated at startup will be rejected. In zcashd, the |
We had a chat today about this with @upbqdn and @arya2, i am adding some more research here. About the cookie auth method:
https://bitcoin.org/en/release/v0.12.0#rpc-random-cookie-rpc-authentication That means the cookie method is actually for local access. I think we should focus on that in this PR. For remote access, we thought in username/password over TLS/SSL as an option. Bitcoin supported this for its RPC endpoint in the past however they don't do it anymore claiming that the RPC access should only be shared with trusted environments. It seems that the remote access should be a combination of username and password, with the additional |
Continuing with the cookie auth method, the zcash-cli sends the cookie content as basic HTTP credentials to the server: https://github.com/zcash/zcash/blob/master/src/bitcoin-cli.cpp#L251 We want to do that but just with I got confused thinking the cookie method will work for remote access, my apologies for that. |
Do we have any use cases that require authentication for local access, though? |
It's a security measure. You can't access the resources if you don't have read access to the cookie, even if you are in the same machine. |
e734e39
to
f02159e
Compare
Can this be merged once approved? |
Nope. |
9bb5716
to
7708294
Compare
This PR is missing a priority label. |
* Refactor the cookie-based RPC authentication * Rephrase docs * Apply suggestions from code review Co-authored-by: Arya <[email protected]> --------- Co-authored-by: Arya <[email protected]>
Should we also update user docs and describe where users can find the cookie and how to use it? |
Motivation
We want to authenticate the RPC method by the zcashd cookie method.
Close #8864
Solution
enable_cookie_auth
config field to use cookie authentication, enabled by default.Tests
Follow-up Work
PR Author's Checklist
PR Reviewer's Checklist