Skip to content
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

Add RPC WS options to specify password file for keystore and truststore #7970

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

pullurib
Copy link
Contributor

@pullurib pullurib commented Dec 2, 2024

PR Description

  • Introduces options to provide keystore and truststore password files.
  • Add new options
  • Validate options
  • Modify WebSocket configuration
  • Update test cases

Fixed Issue(s)

#7931

Copy link
Contributor

@fab-10 fab-10 left a comment

Choose a reason for hiding this comment

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

Looks good, just update the CHANGELOG

@fab-10 fab-10 added the doc-change-required Indicates an issue or PR that requires doc to be updated label Dec 3, 2024
Bhanu Pulluri and others added 2 commits December 3, 2024 12:57
Signed-off-by: Bhanu Pulluri <[email protected]>
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Dec 3, 2024
rpc-ws-ssl-keystore-type="none"
rpc-ws-ssl-client-auth-enabled=false
rpc-ws-ssl-truststore-file="none.pfx"
rpc-ws-ssl-truststore-password="none.passwd"
rpc-ws-ssl-truststore-password-file="none.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

does it make sense to specify both password and password-file or should we only allow one or the other?

Copy link
Contributor

@fab-10 fab-10 Dec 4, 2024

Choose a reason for hiding this comment

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

that is handled by @CommandLine.ArgGroup(exclusive = true, multiplicity = "1")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's the intent using ArgGroup to make them exclusive but it doesn't seem to work when I tested. Right now , password takes precedence over password file if both are specified. I'll track this in a new issue

@fab-10 fab-10 enabled auto-merge (squash) December 4, 2024 09:54
@fab-10
Copy link
Contributor

fab-10 commented Dec 4, 2024

@pullurib please check if this failing test is related to your change

BesuCommandWithRequiredOptionsTest > presentRequiredOptionShouldPass() FAILED
    java.lang.AssertionError at BesuCommandWithRequiredOptionsTest.java:31

@pullurib
Copy link
Contributor Author

pullurib commented Dec 4, 2024

They pass when I sync my local branch and run the tests locally. I do see an error log though

2024-12-04 10:15:30.291-05:00 | Test worker | INFO  | VersionMetadata | Existing version data detected. Besu version 00.0-develop-xxxxxxxx
2024-12-04 10:15:30.777-05:00 | Test worker | INFO  | KZGPointEvalPrecompiledContract | Loading network trusted setup from classpath resource /kzg-trusted-setups/mainnet.txt
2024-12-04 10:15:30.894-05:00 | Test worker | INFO  | CommandTestAbstract | Standard output 
2024-12-04 10:15:30.895-05:00 | Test worker | INFO  | CommandTestAbstract | Standard error 
2024-12-04 10:15:31.060-05:00 | Test worker | INFO  | CommandTestAbstract | Standard output 
2024-12-04 10:15:31.060-05:00 | Test worker | INFO  | CommandTestAbstract | Standard error Missing required option: '--accept-terms-and-conditions=<acceptTermsAndConditions>'

To display full help:
besu [COMMAND] --help

2024-12-04 10:15:31.098-05:00 | Test worker | INFO  | CommandTestAbstract | Standard output 
2024-12-04 10:15:31.098-05:00 | Test worker | INFO  | CommandTestAbstract | Standard error Missing required option: '--accept-terms-and-conditions=<acceptTermsAndConditions>'

To display full help:
besu [COMMAND] --help

Looks like that is expected by the tests

@fab-10 fab-10 merged commit 1b7b6e8 into hyperledger:main Dec 4, 2024
43 checks passed
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.

4 participants