Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Sync with master (c5738e1f85). #204

Merged
merged 143 commits into from
Sep 24, 2019

Conversation

PiotrSikora
Copy link
Contributor

Redo #195, which was accidentally squashed and makes merging with upstream really painful.

Ben Plotnick and others added 30 commits August 19, 2019 23:08
This adds the ability to specify dynamic metadata (by namespace) to
send with the ext_authz check request. This allows one filter to
specify information that can be then used in evaluating an
authorization decision.

Risk Level: Medium. Optional feature/extension of existing filter
Testing: Unit testing
Docs Changes: Inline in attribute_context.proto and ext_authz.proto

Fixes #7699

Signed-off-by: Ben Plotnick <plotnick@yelp.com>
Some speed-ups and validations for codec impl fuzz test:

* validate actions aren't empty (another approach would be to scrub / clean these)
* limit actions to 1024
* require oneofs

Fixes OSS-Fuzz Issue:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16481
Testing: local asan/libfuzzer exec/sec go from 25 to 50

Signed-off-by: Asra Ali <asraa@google.com>
Risk Level: n/a (docs only)
Testing: n/a
Docs Changes: yes
Release Notes: no
#7945

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
… (#7958)

Description:
libc++ std::string may inline the data which results the memory is not
aligned to `void*`. Use vector instead to store the optval.

Detected by UBSAN with libc++ config. Preparation for #4251

Risk Level: Low
Testing: unittest locally
Docs Changes: N/A
Release Notes: N/A
Fixes #7968 

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
…977)

* security: some intra-entity and 3rd party embargo clarifications.

These came up in the last set of CVEs.

Signed-off-by: Harvey Tuch <htuch@google.com>
Include What You Use fix for source/common/protobuf/message_validator_impl.h.

Signed-off-by: Andres Guedez <aguedez@google.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Route config need deep validation for virtual host duplication check, regex check, per filter config validation etc, which PGV wasn't enough.

Risk Level: Low
Testing: regression test
Docs Changes: N/A
Release Notes: N/A

Fixes #7939

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
…n O(1… (#7979)

Signed-off-by: Xin Zhuang <stevenzzz@google.com>
…#7984)

Signed-off-by: Henry Yang <hyang@lyft.com>
Since binary proto won't have field names, report at least the field
numbers, as per
https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.unknown_field_set#UnknownField.

Also fix minor typo encountered while doing this work.

Risk level: Low
Testing: Unit tests added/updated.

Fixes #7937

Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Manish Kumar <manishjpiet@gmail.com>
…e command-line. (#7882)

* Add option to switch between fake and real symbol-tables on the command-line.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Some BUILD files are missing build rules to generate go protos. envoyproxy/go-control-plane depends on these protos, so they should be exposed publicly. Added build rules to generate *.pb.go files.

Risk Level: Low
Testing: These rules were copied to google3 and tested internally. Unfortunately, I am having a bit of trouble with bazel build directly on these targets ("Package is considered deleted due to --deleted_packages"). Please let me know if there is a better way to test this change.

Signed-off-by: Teju Nareddy <nareddyt@google.com>
Xcode 11 requires at least macOS 10.15 (upcoming) in order to use
either <experimental/filesystem> or C++17 <filesystem>.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
… (#7920)

Precursor to #7782
Adding scope tracking functionality to the basic alarm functions.

Risk Level: Medium (should be a no-op but is a large enough refactor)
Testing: new unit tests
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Adds support for DNS SAN in ext authz peer validation

Risk Level: Low
Testing: Added
Docs Changes: Added
Release Notes: N/A

Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Description:
File access log shouldn't need read access for a file.

Risk Level: Low
Testing: local in mac, CI
Docs Changes:
Release Notes:
Fixes #7997

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
…on. (#8002)

This is part of #7980; basically, we want to leverage the recursive pass
that already exists for the deprecated check. This PR does not implement
the recursive behavior yet for unknown fields though, because there is a
ton of churn, so this PR just has the mechanical bits. We switch
plumbing of validation visitor into places such as anyConvert() and
instead pass this to MessageUtil::validate.

There are a bunch of future followups planned in additional PRs:
* Combine the recursive pass for unknown/deprecated check in
  MessageUtil::validate().
* Add mitigation for #5965 by copying to a temporary before recursive
  expansion.
* [Future] consider moving deprecated reporting into a message
  validation visitor handler.

Risk level: Low
Testing: Some new //test/common/protobuf::utility_test unit test.

Signed-off-by: Harvey Tuch <htuch@google.com>
Trusting the x-forwarded-proto header from trusted proxies.
If Envoy is operating as an edge proxy but has a trusted hop in front, the trusted proxy should be allowed to set x-forwarded-proto and its x-forwarded-proto should be preserved.
Guarded by envoy.reloadable_features.trusted_forwarded_proto, default on.

Risk Level: Medium (L7 header changes) but guarded
Testing: new unit tests
Docs Changes: n/a
Release Notes: inline
Fixes #4496

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
…(#7962)

Adding a build option to default all deprecated protos off, and using it on the debug build.

Risk Level: Low
Testing: new UT
Docs Changes: inline
Release Notes: n/a
Fixes #7548

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Add a parallel native.cc_library to envoy_cc_library
for external projects that consume Envoy's libraries. This allows the consuming
project to disambiguate overlapping include paths when repository overlaying is used,
as it can now include envoy headers via external/envoy/...

Risk Level: Low
Testing: N/A

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Builds fuzz targets with asan+libfuzzer and runs them against their corpora. Our native bazel builds work, this PR integrates the asan+libfuzzer builds in to CI. The fuzz target binaries will be in your envoy docker build directory.

Invoke with the following for all fuzz targets, or a specified one.
./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.fuzz'
./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.fuzz //test/common/common:utility_fuzz_test'

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

Signed-off-by: Asra Ali <asraa@google.com>
This PR adds BoringSSL private key API abstraction, as discussed in #6248. All comments and discussion is welcomed to get the API sufficient for most private key API tasks.

The PR contains the proposed API and the way how it can be used from ssl_socket.h. Also there is some code showing how the PrivateKeyMethodProvider is coming from TLS certificate config. Two example private key method providers are included in the tests.

Description: tls: support BoringSSL private key async functionality
Risk Level: medium
Testing: two basic private key provider implementation
Docs Changes: TLS arch doc, cert.proto doc

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
stats: use SymbolTableCreator rather than fakes in a few stray places. (#8006)

Signed-off-by: Joshua Marantz <jmarantz@google.com>
This PR contains changes on the xRDS side for SRDS impl, cribbed from http://go/gh/stevenzzzz/envoy/pull/8/files#diff-2071ab0887162eac1fd177e89d83175a

* Add onConfigUpdate impl for SRDS subscription
* Remove scoped_config_manager as it's not used now.
* Move ScopedConfigInfo to scoped_config_impl.h/cc
* Add a hash to scopeKey and scopeKeyFragment, so we can look up scopekey by hash value in constant time when SRDS has many scopes.
* Add a initManager parameter to RDS createRdsRouteConfigProvider API interface, when creating RouteConfigProvider after listener/server warmed up, we need to specify a different initManager than the one from factoryContext to avoid an assertion failure. see related:#7617

This PR only latches a SRDS provider into the connection manager, the "conn manager using SRDS to make route decision" plus integration tests will be covered in a following PR.

Risk Level: LOW [not fully implemented].
Testing: unit tests

Signed-off-by: Xin Zhuang <stevenzzz@google.com>
Follow-up for #7995.

Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Bulk update of team to match envoyproxy organization. While at it, cleaned up some venv stuff in
shell_utils.sh.

Risk level: Low
Testing: Synced 157 members from envoyproxy to envoyproxy/assignable.

Signed-off-by: Harvey Tuch <htuch@google.com>
…ed. (#8018)

Signed-off-by: Henry Yang <hyang@lyft.com>
…(#8017)

This is a one-time movement of all UDPA content from envoyproxy/envoy to
cncf/udpa. The permanent home of UDPA will be
https://github.com/cncf/udpa.

Risk level: Low
Testing: Added UDPA service entry to build_test.

Signed-off-by: Harvey Tuch <htuch@google.com>
Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
Description:
Upgrade bazel to 0.29.1 and bazel-toolchains to corresponding version.

Risk Level: Low
Testing: CI
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Previously, when in a panic state, requests would be routed to all
hosts. In some cases it is instead preferable to not route any requests.
Add a configuration option for zone-aware load balancers which switches
from routing to all hosts to no hosts.

Closes #7550.

Signed-off-by: James Forcier jforcier@grubhub.com

Risk Level: Low
Testing: 2 new unit tests written; manual testing
Docs Changes: Note about new configuration option added
Release Notes: added

Signed-off-by: James Forcier <jforcier@grubhub.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Pengyuan Bian <bianpengyuan@google.com>
…(#8189)

Signed-off-by: Antonio Vicente <avd@google.com>
Description: Looks like the runtime docs moved under operations/. The PR fixes the link.
Risk Level: low
Testing: existing
Docs Changes: this
Release Notes: n/a

Signed-off-by: Derek Argueta <dereka@pinterest.com>
…llThreads interface to Slot. (#8135)

See the issue in #7902, this PR is to make the SlotImpl detachable from its owner, by introducing a Booker object wraps around a SlotImpl, which bookkeeps all the on-the-fly update callbacks. And on its destruction, if there are still on-the-fly callbacks, move the SlotImpl to an deferred-delete queue, instead of destructing the SlotImpl which may cause an SEGV error.

More importantly, introduce a new runOnAllThreads(ThreadLocal::UpdateCb cb) API to Slot, which requests a Slot Owner to not assume that the Slot or its owner will out-live (in Main thread) the fired on-the-fly update callbacks, and should not capture the Slot or its owner in the update_cb.

Picked RDS and config-providers-framework as examples to demonstrate that this change works. {i.e., changed from the runOnAllThreads(Event::PostCb) to the new runOnAllThreads(TLS::UpdateCb) interface. }

Risk Level: Medium
Testing: unit test
Docs Changes: N/A
Release Notes: N/A
[Optional Fixes #Issue] #7902

Signed-off-by: Xin Zhuang <stevenzzz@google.com>
Build the config programmatically to make future API changes less
onerous.

Risk Level: low (test change only)
Testing: n/a
Doc Changes: n/a
Release Notes: n/a

Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
…on (#8186)

Signed-off-by: Fred Douglas <fredlas@google.com>
… (#8166)

Signed-off-by: Henry Yang <hyang@lyft.com>
…ater than zero (#8089)

Signed-off-by: Nicolas Flacco <nflacco@lyft.com>
As well as being a nice cleanup, this fixes some issues I had with local
Docker use of fix_format as a non-root user.

Signed-off-by: Harvey Tuch <htuch@google.com>
…(#8179)

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Description: Add a new outlier detection mode which compares each host's rate of request failure to a configured fixed threshold.

Risk Level: Low
Testing: 2 new unit tests added.
Docs Changes: New mode and config options described.
Release Notes: white_check_mark
Fixes #8105

Signed-off-by: James Forcier <jforcier@grubhub.com>
Abseil thread annotation macros are now prefixed by ABSL_.

There is no semantic change; this is just a rename.

Signed-off-by: Yan Avlasov <yavlasov@google.com>
This picks up fixes for the Windows build and a C preprocessor defect

Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io>
Signed-off-by: William Rowe <wrowe@pivotal.io>
…#8221)

Signed-off-by: James Forcier <jforcier@grubhub.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Elisha Ziskind <eziskind@google.com>
Description: Make Redis example use catch_all_route.
Risk Level: Low.
Testing: Done. docker-compose up --build brings up envoy proxy and I was able to run Redis commands using redis-cli.

Signed-off-by: Raju Kadam <rkadam@atlassian.com>
Signed-off-by: Dan Zhang <danzh@google.com>
…ue #8236). (#8239)

Description: Allow a no-scope request to pass through the filter chain, so that some special queries (e.g., data plane health-check ) can be processed by the customized filter-chain. By default, the behavior is the same (404).
Risk Level: LOW
Testing: unit test and integration test.
Docs Changes: N/A
Release Notes: N/A
Fixes #8236
Signed-off-by: Xin Zhuang <stevenzzz@google.com>
This reverts commit 10bd762.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Contributor Author

Merging this directly to avoid squashing (there are no changes here anyway, only history rewrite).

cc @jplevyak

@PiotrSikora PiotrSikora merged commit 6fda375 into envoyproxy:master Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.