-
Notifications
You must be signed in to change notification settings - Fork 26
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
RPC authentication #86
Conversation
…ed for certain monerod rpc calls
+1 for builder Also it would be nice to have a feature flag for this, to avoid pulling |
Agree, a feature would be nice to only pull dependencies when needed. Given that this one, #77 and #81 are all changing the way we could instantiate a client, a builder pattern that contains everything is the best approach IMO. |
Also much in favour of using the builder pattern. |
00100c1
to
30eeca8
Compare
…is only compiled when the feature is needed
30eeca8
to
df26564
Compare
Added a feature "rpc_authentication" however when using the "dep:diqwest" notation in cargo.toml the tests fail because of using rust 1.56 and the "dep:" syntax only got added in rust 1.60. Also, should I make a separate PR for the builder pattern ? |
I think that would make things a bit easier to review, yes. I'll let @h4sh3d weigh in first on bumping the msrv. |
Included in #92 |
This PR implements #43 for both monerod rpc and wallet rpc
Docker containers with --rpc-login enabled have been added for both monerod and monero-wallet-rpc, tests are included as well.
Currently I added a new constructor RpcClient::with_authentication() but seeing that both #77 and #81 are using the current RpcClient::new() in a backwards incompatible way I also made a branch with a new RpcClient builder called RpcClientBuilder which would allow for backwards compatibility and enable all three new features to be used together.
This is can be seen at https://github.com/monero-ecosystem/monero-rpc-rs/compare/master...refactor-ring:rpc-client-builder-merged?expand=1
UPDATE
Had to change the github actions setup a bit to make the tests pass with the new containers, instead of redefining the containers in the github actions config it now spins up the containers through docker-compose up using the existing docker-compose.yml