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

[api] Fix header validations #10335

Merged
merged 1 commit into from
Mar 12, 2020
Merged

[api] Fix header validations #10335

merged 1 commit into from
Mar 12, 2020

Conversation

asraa
Copy link
Contributor

@asraa asraa commented Mar 11, 2020

This enables "non-strict" header validations, that match the ones in place with Envoy's ASSERT(valid()) code. The default strict: true checks checked for RFC-compliance, which may break previously valid configs.

Part of #10318

Signed-off-by: Asra Ali asraa@google.com

Signed-off-by: Asra Ali <asraa@google.com>
@repokitteh-read-only
Copy link

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

🐱

Caused by: #10335 was opened by asraa.

see: more, trace.

@asraa
Copy link
Contributor Author

asraa commented Mar 11, 2020

@asraa
Copy link
Contributor Author

asraa commented Mar 11, 2020

I wanted to get this patch ready ASAP as a fix, but TODO to find the appropriate way to flip the strict validations. Thoughts? Deprecation and new wrapped message? Add hook (with flag to flip) to make strict in a newer version/log message about it MessageUtility::Validate?

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM. I don't think we can feature flip strict validation, as that is basically feature flipping API features. This violates the "PGV is stable like the proto" property.

@alyssawilk
Copy link
Contributor

@htuch, are we comfortable with this from a stable API perspective?

@asraa
Copy link
Contributor Author

asraa commented Mar 12, 2020

@htuch, are we comfortable with this from a stable API perspective?

The goal was to align them to stable API policy :) the checks here mimic those done in debug asserts, which provides the implied contract we don't expect to have \r\n\0 in header names/values

@htuch
Copy link
Member

htuch commented Mar 12, 2020

@alyssawilk yeah, this basically undoes the API breaking change in #10093 by replacing it with something that was strongly implied in the API.

@htuch htuch merged commit 97a76d9 into envoyproxy:master Mar 12, 2020
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.

3 participants