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 option to send SNI header in TLS ClientHello message [#4894] #5439

Merged
merged 2 commits into from
May 10, 2023

Conversation

megglos
Copy link
Contributor

@megglos megglos commented May 5, 2023

PR description

Adds an option to send an SNI header on a TLS ClientHello message. Given the existing exposed options for the TLSConfiguration, I went for the --Xp2p-tls-* prefix for the new sni header option, instead of p2p-tls-clienthello-sni as it was stated in #4894 . Please let me know if you prefer otherwise.

  • add --Xp2p-tls-clienthello-sni option to enable the SNI header

Fixed Issue(s)

fixes #4894

@github-actions
Copy link

github-actions bot commented May 5, 2023

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I have considered running ./gradlew acceptanceTestNonMainnet locally if my PR affects non-mainnet modules.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

@megglos megglos force-pushed the 4894-tls-sni-header branch 2 times, most recently from ed54779 to 941a489 Compare May 5, 2023 19:07
…#4894)

* add --Xp2p-tls-clienthello-sni option to enable the SNI header

Issue hyperledger#4894

Signed-off-by: Sebastian Bathke <sebastian.bathke@gmail.com>
@megglos megglos marked this pull request as ready for review May 6, 2023 12:32
@megglos
Copy link
Contributor Author

megglos commented May 6, 2023

it needs the label doc-change-required as well (somehow I can't add labels)

@macfarla macfarla added the doc-change-required Indicates an issue or PR that requires doc to be updated label May 7, 2023
Copy link
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.

LGTM

Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
@macfarla macfarla enabled auto-merge (squash) May 10, 2023 05:30
@macfarla macfarla merged commit 18405fc into hyperledger:main May 10, 2023
fab-10 pushed a commit to fab-10/besu that referenced this pull request May 10, 2023
* Update dependencies - commons-net (hyperledger#5444)

* update antlr and commons-net dependencies

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* revert antlr uprev

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* comment

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* Add option to send SNI header in TLS ClientHello message (hyperledger#4894) (hyperledger#5439)

* add --Xp2p-tls-clienthello-sni option to enable the SNI header

Issue hyperledger#4894

Signed-off-by: Sebastian Bathke <sebastian.bathke@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sebastian Bathke <sebastian.bathke@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>

* ZkTrieLogFactoryImpl, rebased off of main

Signed-off-by: garyschulte <garyschulte@gmail.com>

* code before account

Signed-off-by: garyschulte <garyschulte@gmail.com>

* trielog shipping observer

Signed-off-by: garyschulte <garyschulte@gmail.com>

* use hex encoding in trielog shipping, add a TESTING default ZkTrieLogObserver to AbstractTrieLogManager

Signed-off-by: garyschulte <garyschulte@gmail.com>

* fix unintended recursion

Signed-off-by: garyschulte <garyschulte@gmail.com>

* filter out self destruct storage changes in ZkTrieLogImpl

Signed-off-by: garyschulte <garyschulte@gmail.com>

* store both slotHash and slotKey, defer to shomei to handle it as it sees fit

Signed-off-by: garyschulte <garyschulte@gmail.com>

* reorder trielog storage to differentiate between ZERO slot key and null slot key

Signed-off-by: garyschulte <garyschulte@gmail.com>

* do not filter unchanged accounts for zktrielogfactory

Signed-off-by: garyschulte <garyschulte@gmail.com>

* use blockHeader during trielog construction, add blockNumber to trielog, add blockHeader to trielogaddedevent

Signed-off-by: garyschulte <garyschulte@gmail.com>

* add blockNumber to rpc call to shomei

Signed-off-by: garyschulte <garyschulte@gmail.com>

* add isSyncing to the trieLogParameter and ZkTrieLogObserver

Signed-off-by: garyschulte <garyschulte@gmail.com>

* initial plumbing for trielog shipping plugin

Signed-off-by: garyschulte <garyschulte@gmail.com>

* halfway through generics hell

Signed-off-by: garyschulte <garyschulte@gmail.com>

* TrieLogs in plugin data

Signed-off-by: garyschulte <garyschulte@gmail.com>

* end of friday, green build with plugin refactoring, still need to add TrieLog Plugin Service

Signed-off-by: garyschulte <garyschulte@gmail.com>

* remove errant reference to ZkTrieLogFactory

Signed-off-by: garyschulte <garyschulte@gmail.com>

* adding dagger-wired plugincontext and TrieLogService

Signed-off-by: garyschulte <garyschulte@gmail.com>

* javadoc and fixes

Signed-off-by: garyschulte <garyschulte@gmail.com>

* add plugin observer subscription

Signed-off-by: garyschulte <garyschulte@gmail.com>

* plugin-api hash

Signed-off-by: garyschulte <garyschulte@gmail.com>

* fix besuComponent ref, move addService up into BesuContext

Signed-off-by: garyschulte <garyschulte@gmail.com>

* add TrieLogRangePair composition of blocknumber and TrieLog, use that for getTrieLogByRange return

Signed-off-by: garyschulte <garyschulte@gmail.com>

* javadoc

Signed-off-by: garyschulte <garyschulte@gmail.com>

* move TrieLog from datatypes to plugin-api

Signed-off-by: garyschulte <garyschulte@gmail.com>

* add blockHash to TrieLogRangeTuple

Signed-off-by: garyschulte <garyschulte@gmail.com>

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sebastian Bathke <sebastian.bathke@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sebastian Bathke <sebastian.bathke@camunda.com>
Co-authored-by: Sebastian Bathke <sebastian.bathke@gmail.com>
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label May 19, 2023
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
…#4894) (hyperledger#5439)

* add --Xp2p-tls-clienthello-sni option to enable the SNI header

Issue hyperledger#4894

Signed-off-by: Sebastian Bathke <sebastian.bathke@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sebastian Bathke <sebastian.bathke@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…#4894) (hyperledger#5439)

* add --Xp2p-tls-clienthello-sni option to enable the SNI header

Issue hyperledger#4894

Signed-off-by: Sebastian Bathke <sebastian.bathke@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sebastian Bathke <sebastian.bathke@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
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.

Ability to add SNI header in TLS ClientHello message
4 participants