-
Notifications
You must be signed in to change notification settings - Fork 139
[BESU-163] Add inbound and outbound TLS information. #124
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
97297aa
BESU-163: Add inbound TLS information.
bgravenorst 42cb941
Implement reviewer feedback..
bgravenorst 20fff7b
Add privacy CLI options.
bgravenorst 0ca75dd
Add privact CLI options.
bgravenorst cff8a40
Added privacy CLI commands.
bgravenorst d8d928a
Add Privacy CLI options.
bgravenorst dfe6a61
Implement reviewer feedback.
bgravenorst e50dabf
Implement reviewer feedback.
bgravenorst 5ce0688
Merge branch 'master' into BESU-163
bgravenorst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| description: TLS overview | ||
| <!--- END of page meta data --> | ||
|
|
||
| # TLS Communication | ||
|
|
||
| Hyperledger Besu supports TLS to secure client and server communication. The | ||
| client (EthSigner) or server (Orion) must also be configured for TLS | ||
|
|
||
|  | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest raising an issue so we don't forget to update this image with Jake's version |
||
|
|
||
|
|
||
| Private keys and certificates must be stored in a password-protected PKCS #12 | ||
| keystore files. | ||
|
|
||
| Use the command line options to [enable and configure](../HowTo/Configure/Configure-TLS.md) TLS. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| description: Configure TLS | ||
|
bgravenorst marked this conversation as resolved.
|
||
| <!--- END of page meta data --> | ||
|
|
||
| # Configure TLS | ||
|
|
||
| Hyperledger Besu supports TLS for client and server communication. For example, you can | ||
| [configure TLS](../../Concepts/TLS.md) for communication between EthSigner and Besu, and Besu and Orion. | ||
|
|
||
| Configure TLS communication from the command line. | ||
|
|
||
| **Prerequisites**: | ||
|
bgravenorst marked this conversation as resolved.
|
||
|
|
||
| * Besu's password-protected PKSC #12 keystore. | ||
|
bgravenorst marked this conversation as resolved.
Outdated
|
||
| * File containing the keystore password | ||
|
|
||
| ## Configure Client TLS | ||
|
|
||
| Allow clients (for example a dApp, curl, or EthSigner) to send and receive | ||
| secure HTTP JSON-RPCs. | ||
|
|
||
| **Prerequisites**: | ||
|
|
||
| * The client must be configured for TLS. | ||
| * Client's PKSC #12 keystore information. | ||
|
bgravenorst marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Create the Known Clients File | ||
|
|
||
| The known clients file allows clients with self-signed certificates or | ||
| non-public certificates to connect to Besu. | ||
|
|
||
| Create a file (in this example, `knownClients`) that lists one or more trusted | ||
| clients. Use the format`<common_name> <hex-string>` where: | ||
|
|
||
| * `<common_name>` is the Common Name specified in the client certificate. | ||
| * `<hex-string>` is the SHA-256 fingerprint of the client certificate. | ||
|
|
||
| !!! example | ||
| ``` | ||
| ethsigner 8E:E0:85:9F:FC:2E:2F:21:31:46:0B:82:4C:A6:88:AB:30:34:9A:C6:EA:4F:04:31:ED:0F:69:A7:B5:C2:2F:A7 | ||
| curl FC:18:BF:39:45:45:9A:15:46:76:A6:E7:C3:94:64:B8:34:84:A3:8E:B8:EA:67:DC:61:C0:29:E6:38:B8:B7:99 | ||
| ``` | ||
|
|
||
| You can use `openssl` or `keytool` to display the SHA256 fingerprint. | ||
|
bgravenorst marked this conversation as resolved.
Outdated
|
||
|
|
||
| !!! example | ||
| ``` | ||
| keytool -list -v -keystore <keystore> -storetype PKCS12 -storepass <MY_PASSWORD>`. | ||
| ``` | ||
|
|
||
| ### Start Besu | ||
|
|
||
| ```bash | ||
| besu --rpc-http-enabled --rpc-http-tls-enabled --rpc-http-tls-client-auth-enabled --rpc-http-tls-keystore-file=/Users/me/my_node/keystore.pfx --rpc-http-tls-keystore-password-file=/Users/me/my_node/keystorePassword --rpc-http-tls-known-clients-file=/Users/me/my_node/knownClients | ||
| ``` | ||
|
|
||
| The command line: | ||
|
|
||
| * Enables the HTTP JSON-RPC service using the [`--rpc-http-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-enabled) option. | ||
| * Enables TLS for the HTTP JSON-RPC service using the [`--rpc-http-tls-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-enabled) | ||
| option. | ||
| * Enables TLS client authentication using the [`--rpc-http-tls-client-auth-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-client-auth-enabled) option. | ||
| * Specifies the keystore using the [`--rpc-http-tls-keystore-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-keystore-file) option. | ||
| * Specifies the file that contains the password to decrypt the keystore using | ||
| the [`--rpc-http-tls-keystore-password-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-keystore-password-file) option. | ||
| * [Specify the clients](#create-the-known-clients-file) that are allowed to connect to Besu using the | ||
|
bgravenorst marked this conversation as resolved.
Outdated
|
||
| [`--rpc-http-tls-known-clients-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-known-clients-file) option. | ||
|
|
||
| !!! note | ||
| Set [`--rpc-http-tls-ca-clients-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-ca-clients-enabled) | ||
| to `true` to allow access to clients with signed and trusted root CAs. | ||
|
|
||
| ## Configure Server TLS | ||
|
|
||
| Allow Besu to securely communicate with the server (Orion) | ||
|
bgravenorst marked this conversation as resolved.
Outdated
|
||
|
|
||
| **Prerequisites**: | ||
|
|
||
| * The server must be configured to allow TLS communication | ||
| * Server's certificate information. | ||
|
|
||
| ### Create the Known Servers file | ||
|
|
||
| Create a file (in this example, `knownServers`) that lists one or more trusted | ||
| servers. The file contents use the format `<hostame>:<port> <hex-string>` | ||
| where: | ||
|
|
||
| * `<hostname>` is the server hostname | ||
| * `<port>` is the port used for communication | ||
| * `<hex-string>` is the SHA-256 fingerprint of the server's certificate. | ||
|
|
||
| !!! example | ||
| ``` | ||
| localhost:8888 3C:B4:5A:F9:88:43:5E:62:69:9F:A9:9D:41:14:03:BA:83:24:AC:04:CE:BD:92:49:1B:8D:B2:A4:86:39:4C:AC | ||
| 127.0.0.1:8888 3C:B4:5A:F9:88:43:5E:62:69:9F:A9:9D:41:14:03:BA:83:24:AC:04:CE:BD:92:49:1B:8D:B2:A4:86:39:4C:AC | ||
| ``` | ||
|
|
||
| !!! note | ||
| Specify both hostname and IP address in the file if unsure which is used in | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which is -> which one is? |
||
| requests. | ||
|
|
||
| ### Start Besu | ||
|
|
||
| ```bash | ||
| besu --privacy-tls-enabled --privacy-tls-keystore-file=/Users/me/my_node/keystore.pfx --privacy-tls-keystore-password-file=/Users/me/my_node/keystorePassword --privacy-tls-known-enclave-file=/Users/me/my_node/knownServers | ||
| ``` | ||
|
|
||
| The command line: | ||
|
|
||
| * Enables TLS with the server using the [`--privacy-tls-enabled`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-enabled) option. | ||
| * Specifies the keystore using the [`--privacy-tls-keystore-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-keystore-file) option. | ||
| * Specifies the file that contains the password to decrypt the keystore using | ||
| the [`--privacy-tls-keystore-password-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-keystore-password-file) option. | ||
| * Specifies the trusted servers using the [`--privacy-tls-known-enclave-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-known-enclave-file) option. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.