Skip to content

Add RPC HTTP options to specify custom truststore and password#7978

Merged
macfarla merged 18 commits intobesu-eth:mainfrom
pullurib:7932-rpc-http-truststore
Dec 18, 2024
Merged

Add RPC HTTP options to specify custom truststore and password#7978
macfarla merged 18 commits intobesu-eth:mainfrom
pullurib:7932-rpc-http-truststore

Conversation

@pullurib
Copy link
Copy Markdown
Contributor

@pullurib pullurib commented Dec 3, 2024

PR description

  • Introduce a new option to specify the truststore for the JSON-RPC HTTP client.
  • Support passing a password file for the truststore through a new option to avoid exposing the password in logs or the CLI.
  • Ensure the client certificates are validated successfully using the provided truststore - added test cases
  • Added testcase to verify option use

Fixed Issue(s)

#7932

Bhanu Pulluri added 3 commits December 3, 2024 12:51
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
pullurib and others added 4 commits December 4, 2024 12:56
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
@macfarla macfarla added the doc-change-required Indicates an issue or PR that requires doc to be updated label Dec 5, 2024
@macfarla macfarla changed the title Add RPC HTTP options to specify custom truststore and it's password Add RPC HTTP options to specify custom truststore and its password Dec 5, 2024
Copy link
Copy Markdown
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

with the error messages, it's helpful for the user to indicate exactly which CLI option is missing or required. Otherwise i think it's looking good

Bhanu Pulluri added 2 commits December 6, 2024 13:40
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
pullurib and others added 4 commits December 9, 2024 09:23
…pOptions.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
…pOptions.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
@macfarla macfarla marked this pull request as draft December 11, 2024 05:17
@macfarla
Copy link
Copy Markdown
Contributor

There is a unit test failing. You can run these tests locally, this will benefit your time and reviewers. You'll get feedback waaaayy faster. converting to draft since it's not ready to review

JsonRpcHttpOptionsTest > rpcHttpTlsClientAuthWithTrustStoreAndKnownClientsFileReportsError() FAILED
    java.lang.AssertionError at JsonRpcHttpOptionsTest.java:508

@macfarla macfarla self-assigned this Dec 11, 2024
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
@pullurib pullurib marked this pull request as ready for review December 11, 2024 20:59
@pullurib
Copy link
Copy Markdown
Contributor Author

There is a unit test failing. You can run these tests locally, this will benefit your time and reviewers. You'll get feedback waaaayy faster. converting to draft since it's not ready to review

JsonRpcHttpOptionsTest > rpcHttpTlsClientAuthWithTrustStoreAndKnownClientsFileReportsError() FAILED
    java.lang.AssertionError at JsonRpcHttpOptionsTest.java:508

I agree, no change is too small to skip running local tests. Fixed and ran the tests locally.

@macfarla macfarla changed the title Add RPC HTTP options to specify custom truststore and its password Add RPC HTTP options to specify custom truststore and password Dec 18, 2024
@macfarla macfarla merged commit 43c8a6a into besu-eth:main Dec 18, 2024
daniellehrner pushed a commit to daniellehrner/besu that referenced this pull request Dec 18, 2024
…eth#7978)

* Add RPC HTTP options to specify custom truststore and it's password

* Update error logs to indicate options to use

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

---------

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
Co-authored-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Jan 16, 2025
pullurib added a commit to pullurib/besu that referenced this pull request Feb 6, 2025
…eth#7978)

* Add RPC HTTP options to specify custom truststore and it's password

* Update error logs to indicate options to use

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>

---------

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
Co-authored-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants