Skip to content

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

Merged
fab-10 merged 4 commits intobesu-eth:mainfrom
pullurib:7931-ws-password
Dec 4, 2024
Merged

Add RPC WS options to specify password file for keystore and truststore#7970
fab-10 merged 4 commits intobesu-eth:mainfrom
pullurib:7931-ws-password

Conversation

@pullurib
Copy link
Copy Markdown
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

Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Copy link
Copy Markdown
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 <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
@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-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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

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