Skip to content

http: processing of headers with underscores in names#10611

Merged
mattklein123 merged 6 commits intoenvoyproxy:masterfrom
yanavlasov:underscores
Apr 5, 2020
Merged

http: processing of headers with underscores in names#10611
mattklein123 merged 6 commits intoenvoyproxy:masterfrom
yanavlasov:underscores

Conversation

@yanavlasov
Copy link
Contributor

  • add config option to either allow, drop header or reject request
  • applies to client request headers only

Risk Level: Low (default behavior unchanged)
Testing: Unit+Integration Tests
Docs Changes: Yes
Release Notes: Yes

Signed-off-by: Yan Avlasov yavlasov@google.com

* add config option to either allow, drop header or reject request
* applies to client request headers only

Signed-off-by: Yan Avlasov <yavlasov@google.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #10611 was opened by yanavlasov.

see: more, trace.

@yanavlasov yanavlasov changed the title http: processing of headers with undderscores in names http: processing of headers with underscores in names Apr 1, 2020
Signed-off-by: Yan Avlasov <yavlasov@google.com>
@mattklein123 mattklein123 self-assigned this Apr 1, 2020
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Awesome work, thanks. Just a few small comments.

/wait

return [](Http::FilterChainFactoryCallbacks& callbacks) -> void {
callbacks.addStreamDecoderFilter(
std::make_shared<HeaderToFilterStateFilter>("jwt_selector", "jwt_selector"));
std::make_shared<HeaderToFilterStateFilter>("jwt-selector", "jwt-selector"));
Copy link
Member

Choose a reason for hiding this comment

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

Given that we decided to keep the default as allow, maybe revert all of these test changes that we don't need?

Signed-off-by: Yan Avlasov <yavlasov@google.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
Signed-off-by: Yan Avlasov <yavlasov@google.com>
mattklein123
mattklein123 previously approved these changes Apr 2, 2020
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Awesome, thank you. Can you do me a favor and open a tech debt issue to follow up on unifying all of the checks between the codecs into a single piece of code somehow? We need to also get this implemented for HTTP/3 before we call that finished so that would be a good opportunity to do that unification. cc @danzh2010

@repokitteh-read-only repokitteh-read-only bot removed the api label Apr 2, 2020
@mattklein123
Copy link
Member

Oops compile error looks legit.

/wait

@mattklein123
Copy link
Member

/azp run envoy-presubmit

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yanavlasov
Copy link
Contributor Author

clang-tidy error seems to be bogus. It looks like include search directories may be not set correctly.

https://dev.azure.com/cncf/envoy/_build/results?buildId=36689&view=logs&j=3bf5ec37-bb6f-5fb6-2cf1-5134dc6106d6&t=41d571fe-3811-578d-07de-68468f467dae&l=1570

@mattklein123
Copy link
Member

@yanavlasov can you make sure that the bazel deps are correct for that target? Sometimes there are issues with that. Also can you merge master and open the follow up issue re: unification and QUIC? Thank you!

/wait

@yanavlasov
Copy link
Contributor Author

Will do. Header validation issue: #10646

Signed-off-by: Yan Avlasov <yavlasov@google.com>
@mattklein123
Copy link
Member

I will go ahead and merge this as we need to do a full master pass over clang-tidy anyway. Thank you!

@repokitteh-read-only repokitteh-read-only bot removed the api label Apr 5, 2020
@mattklein123 mattklein123 merged commit 4449939 into envoyproxy:master Apr 5, 2020
@PiotrSikora
Copy link
Contributor

/backport

@repokitteh-read-only repokitteh-read-only bot added the backport/review Request to backport to stable releases label Apr 6, 2020
@PiotrSikora
Copy link
Contributor

@mattklein123 @yanavlasov @lizan any thoughts on whether we should backport this to stable branches or not?

@mattklein123
Copy link
Member

@PiotrSikora I would defer to you. Given that we ultimately agreed with your original assessment that it is a feature request, I think it makes sense either way.

PiotrSikora pushed a commit to PiotrSikora/envoy that referenced this pull request Jun 5, 2020
Signed-off-by: Yan Avlasov <yavlasov@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
PiotrSikora pushed a commit to PiotrSikora/envoy that referenced this pull request Jun 5, 2020
Signed-off-by: Yan Avlasov <yavlasov@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
PiotrSikora added a commit that referenced this pull request Jun 6, 2020
Signed-off-by: Yan Avlasov <yavlasov@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
PiotrSikora added a commit that referenced this pull request Jun 6, 2020
Signed-off-by: Yan Avlasov <yavlasov@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora PiotrSikora added backport/approved Approved backports to stable releases and removed backport/review Request to backport to stable releases labels Jul 18, 2020
@yanavlasov yanavlasov deleted the underscores branch July 30, 2020 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/approved Approved backports to stable releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants