Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
0646709
update envoy
kyessenov Jul 3, 2018
5b05f36
Merge pull request #1838 from kyessenov/extra_field
hklai Jul 3, 2018
0bfb526
update Envoy's SHA to latest
vadimeisenbergibm Jul 4, 2018
eb2afdd
Merge branch 'release-1.0' into update_envoy_sha_3b05bffcbaedaf6d112b…
vadimeisenbergibm Jul 8, 2018
09a0919
Merge pull request #1839 from vadimeisenbergibm/update_envoy_sha_3b05…
hklai Jul 9, 2018
f004f04
implement destination.principal
kyessenov Jul 9, 2018
0bbb1a0
missing test
kyessenov Jul 9, 2018
ff0bddd
review
kyessenov Jul 9, 2018
93e6641
add AttributeName::kConnectionRequestedServerName
vadimeisenbergibm Jul 10, 2018
777b38f
fix format
vadimeisenbergibm Jul 10, 2018
cb543c1
add GetRequestedServerName() to TCP CheckData
vadimeisenbergibm Jul 10, 2018
2ead919
add building attribute ConnectionRequestedServerName
vadimeisenbergibm Jul 10, 2018
b45b25d
test building attribute ConnectionRequestedServerName
vadimeisenbergibm Jul 10, 2018
83dd6a0
add GetRequestedServerName() to tcp mixer filter
vadimeisenbergibm Jul 10, 2018
0091e10
fix compilation errors
vadimeisenbergibm Jul 10, 2018
79fa89f
use explicit conversion from absl::string_view to std::string
vadimeisenbergibm Jul 10, 2018
336a0f0
check that the requested server name is not emtpy in attributes builder
vadimeisenbergibm Jul 10, 2018
1389681
fixed a compilation error
vadimeisenbergibm Jul 10, 2018
a129dbf
add GetRequestedServerName to http mixer filters (check_data)
vadimeisenbergibm Jul 10, 2018
b1967a2
add GetRequestedServerName to http MockCheckData
vadimeisenbergibm Jul 10, 2018
b874c59
specify the class of a method
vadimeisenbergibm Jul 10, 2018
43e4bea
add setting connection.requested_server_name to the http attributes
vadimeisenbergibm Jul 10, 2018
715ce48
qualify Return by testing::
vadimeisenbergibm Jul 10, 2018
c3ab69c
use connection_ as a pointer
vadimeisenbergibm Jul 10, 2018
76fe1d8
add explicit conversion from absl::string_view to std::string
vadimeisenbergibm Jul 10, 2018
3da5327
add missing mock call
vadimeisenbergibm Jul 10, 2018
1464e5e
Merge pull request #1843 from vadimeisenbergibm/add_connection_reques…
hklai Jul 10, 2018
4ea0ea0
Revert "Add connection requested server name attribute to TCP read fi…
hklai Jul 10, 2018
1a62f8b
Merge pull request #1844 from istio/revert-1843-add_connection_reques…
hklai Jul 10, 2018
4a02b92
update the API SHA (https://github.com/istio/api/pull/575)
vadimeisenbergibm Jul 11, 2018
5aab569
Merge pull request #1846 from vadimeisenbergibm/update_api_sha_294a44…
hklai Jul 11, 2018
d7ec5e0
add the connection.requested_server_name attribute to tcp and http fi…
vadimeisenbergibm Jul 11, 2018
74ea402
add missing parentheses
vadimeisenbergibm Jul 11, 2018
8f73bfd
add AttributeName::kConnectionRequestedServerName
vadimeisenbergibm Jul 11, 2018
1c88ca6
fix cardinality of a mock method
vadimeisenbergibm Jul 11, 2018
eab545d
fix the signature of TCP Filter::GetRequestedServerName()
vadimeisenbergibm Jul 11, 2018
5c1a000
add declarations of GetRequestedServerName() to tcp Filter/http Check…
vadimeisenbergibm Jul 11, 2018
dd2b0ea
Merge pull request #1848 from vadimeisenbergibm/add_connection_reques…
hklai Jul 11, 2018
15115c6
add peer and local distinction
kyessenov Jul 11, 2018
817e3f9
Merge pull request #1842 from kyessenov/destination_user
hklai Jul 11, 2018
a5b4876
Add connection open event.
bianpengyuan Jul 12, 2018
6e4dc12
update comment.
bianpengyuan Jul 12, 2018
210783d
Replace boolean with enum.
bianpengyuan Jul 12, 2018
5122daa
Merge pull request #1849 from bianpengyuan/connection-open-report
hklai Jul 13, 2018
4c5d94b
extract origin IP
kyessenov Jul 13, 2018
f85f49c
Update Envoy SHA to latest. (#1852)
PiotrSikora Jul 13, 2018
91f9566
Merge pull request #1851 from kyessenov/origin_ip
hklai Jul 16, 2018
121faee
Revert "Update Envoy SHA to latest. (#1852)" (#1854)
mandarjog Jul 17, 2018
6eb534e
update api sha (#1855)
rkpagadala Jul 18, 2018
d259ac4
Update Envoy SHA to latest. (#1857)
PiotrSikora Jul 18, 2018
f47be07
Update Envoy SHA for WebSocket fix (#1859)
rshriram Jul 18, 2018
b4cbeb2
Revert "Update Envoy SHA for WebSocket fix (#1859)" (#1860)
rshriram Jul 18, 2018
01e1626
Update Envoy SHA to latest. (#1862)
PiotrSikora Jul 19, 2018
8f33827
Update istio.dep as valid json (#1863)
chxchx Jul 19, 2018
528ae4e
Merge pull request #1870 from rshriram/master
rshriram Jul 23, 2018
c09169a
Update software in the build image used by CircleCI. (#1874)
PiotrSikora Jul 25, 2018
9c21253
Improve build times on CircleCI. (#1875)
PiotrSikora Jul 25, 2018
82e0790
Install ninja in the build image used by CircleCI. (#1888)
PiotrSikora Jul 30, 2018
61f5a41
merge 1.0 branch to master (#1885)
rkpagadala Aug 1, 2018
c42e08b
Remove fallback for attribute builder when authn filter is not availa…
diemtvu Aug 2, 2018
1da6523
Update Envoy SHA to latest with ORIGINAL_DST_LB fix. (#1894)
PiotrSikora Aug 6, 2018
afc72d7
Using request dynamic metadata to pass data from JWT filter to authn …
diemtvu Aug 7, 2018
1d3e77f
Add the groups claim to the attribute request.auth.groups (#1896)
lei-tang Aug 7, 2018
3f528b4
add context.proxy_error_code to report attributes (#1897)
mandarjog Aug 7, 2018
74f0ee2
Add integration test with JWT+AuthN+Mixer filter chain (#1899)
diemtvu Aug 8, 2018
99229a8
send rbac shadow policies metrics to mixer (#1900)
quanjielin Aug 9, 2018
adea4d0
Use dynamic metadata to for authentication filter output. (#1901)
diemtvu Aug 9, 2018
5d09f41
Add two new attributes: request.url_path and request.queries (#1837)
bianpengyuan Aug 10, 2018
ec327ad
update ENVOY_SHA (#1904)
quanjielin Aug 10, 2018
7fde77a
skip empty sni (#1909)
kyessenov Aug 10, 2018
b1f4e7e
add rbac filter to istio http integration test. (#1907)
yangminzhu Aug 14, 2018
5d42471
Fix macOS build on CircleCI. (#1916)
PiotrSikora Aug 14, 2018
b49589a
Install clang-format in the build image used by CircleCI. (#1917)
PiotrSikora Aug 14, 2018
c63d841
Provide source version information in the binary. (#1915)
PiotrSikora Aug 14, 2018
585abec
fixed broken links to dev guide and contribution guide (#1913)
trabetti Aug 14, 2018
4ced9e7
Update clang to 6.0 and use it for release binaries. (#1914)
PiotrSikora Aug 14, 2018
c5282b6
Update Envoy SHA to latest with LcTrie optimizations. (#1918)
PiotrSikora Aug 15, 2018
1fc6253
add debug logs for collecting rbac attributes (#1922)
quanjielin Aug 15, 2018
4865583
populate source user without authn (#1926)
kyessenov Aug 17, 2018
4ee7e8e
update API sha. (#1927)
yangminzhu Aug 21, 2018
a32a587
Add a check cache test for string map sub keys (#1931)
qiwzhang Aug 21, 2018
c9d2230
Update Envoy SHA to latest with MetricImpl optimizations. (#1938)
PiotrSikora Aug 23, 2018
a56144b
Generate source.namespace in proxy. (#1912)
yangminzhu Aug 23, 2018
b993e07
Authn uses protobuf.Struct to store claims and add list support for R…
lei-tang Aug 23, 2018
2416e39
format it (#1923)
kyessenov Aug 24, 2018
a35b8f4
update envoy SHA (#1941)
quanjielin Aug 25, 2018
a5dd1aa
mixer: clear route cache on header update (#1946)
kyessenov Aug 29, 2018
cc6e58e
support per-path JWT validation. (#1928)
yangminzhu Sep 4, 2018
cf23357
Fix the peerIsOptional and originIsOptional for authn filter. (#1959)
yangminzhu Sep 5, 2018
4cc4b7c
Mixer Client uses Node metadata to populate Mixer attributes (#1961)
mandarjog Sep 7, 2018
490d26f
Update Envoy SHA to latest with TCP proxy fixes. (#1964)
PiotrSikora Sep 10, 2018
2c563c6
remove not used path patcher functions (#1966)
qiwzhang Sep 11, 2018
c352de0
Mixer Client: Add support for TCP local attributes (#1967)
mandarjog Sep 12, 2018
f498337
Fix a bug in origin authenticator that wrongly treats empty origin me…
yangminzhu Sep 12, 2018
afde635
Remove delta update in Report batch (#1970)
qiwzhang Sep 13, 2018
f2a3157
Optimize report sending by re-use protobuf (#1973)
qiwzhang Sep 13, 2018
b33ceb2
To share mixer client across listeners (#1972)
qiwzhang Sep 14, 2018
cf892b3
Fix a bug of not setting global_word_count (#1974)
qiwzhang Sep 15, 2018
9dd2de3
Update Envoy SHA. (#1975)
JimmyCYJ Sep 17, 2018
ce051fe
Optimize mixer client by using protobuf arena allocator. (#1977)
qiwzhang Sep 17, 2018
634dd62
Update Proxy SHA (#1978)
JimmyCYJ Sep 18, 2018
8c5d3c6
Remove obsolete v1 code (#1980)
qiwzhang Sep 21, 2018
5ea8571
Update README.md (#1979)
AdamDang Sep 22, 2018
fdacd94
Not to add check attributes if check is disabled (#1981)
qiwzhang Sep 22, 2018
ef5599a
Update Envoy SHA to a637506d (#1982)
venilnoronha Sep 28, 2018
cbc3ce4
Revert "To share mixer client across listeners (#1972)" (#1986)
JimmyCYJ Oct 3, 2018
ab70877
fix memory leak at report batching (#1988)
qiwzhang Oct 8, 2018
6215156
reuse report protobuf instead of using arena allocation (#1989)
qiwzhang Oct 9, 2018
fdffa13
Update software in the build image used by CircleCI. (#1994)
JimmyCYJ Oct 16, 2018
d94f3e4
Fix attribute constant (#1996)
venilnoronha Oct 17, 2018
98ba490
Update bazel for circleCI (#1997)
JimmyCYJ Oct 17, 2018
ea9e05a
Update dependencies and fix compile errors. (#1993)
JimmyCYJ Oct 17, 2018
46750e3
move tool/bazel.rc to .bazelrc (#1998)
qiwzhang Oct 17, 2018
10a8f30
update envoy SHA to point to json access log format functionality (#1…
GregHanson Oct 19, 2018
b30b958
bump Envoy SHA to latest (#2010)
rshriram Oct 30, 2018
490f743
Improve performance by removing MD5 for check cache keys (#2002)
qiwzhang Oct 26, 2018
26f5fc5
alts: remove ALTS (#2003)
lizan Oct 29, 2018
5225202
Use std::hash for check cache. (#2009)
qiwzhang Oct 30, 2018
2083abd
Send envoy dynamic metadata as part of reports
Oct 30, 2018
9be64ff
format
Oct 30, 2018
839d2fa
typos
Oct 30, 2018
8f3a97e
Merge pull request #2012 from rshriram/release-1.1
rshriram Oct 30, 2018
c40906c
Merge branch 'release-1.1' of https://github.com/istio/proxy into dyn…
Oct 30, 2018
8b766b3
http dynamic metadata
Oct 30, 2018
65216a1
format
Oct 30, 2018
5f06b8a
more formatting
Oct 30, 2018
696e943
Merge pull request #2013 from rshriram/dynamic_metadata
rshriram Oct 31, 2018
2003747
Use string map instead of opaque struct for dynamic metadata (#2014)
rshriram Nov 1, 2018
a004f90
Add a new TCP cluster rewrite filter (#2017) (#2018)
venilnoronha Nov 5, 2018
c9fad2b
Update TCP Cluster Rewrite filter name (#2019) (#2020)
venilnoronha Nov 5, 2018
872f6f0
Enable TCP Cluster Rewrite filter registration (#2021) (#2022)
venilnoronha Nov 5, 2018
c05efb5
Update Envoy SHA to 4ef8562b (#2023) (#2024)
venilnoronha Nov 6, 2018
65087d0
Update Envoy SHA to 74de08a0 (#2026)
venilnoronha Nov 7, 2018
4d8eb98
Merge master into release-1.1 (#2031)
rshriram Nov 8, 2018
9b91ac6
Merge master to release-1.1 (#2038)
JimmyCYJ Nov 14, 2018
d6b6213
Enable caching of dynamic metadata in mixer filter (#2040)
venilnoronha Nov 27, 2018
3538189
Update api sha to 1a7788d (#2044)
qiwzhang Nov 27, 2018
f032909
Bump enoy version to pickup json access log fix (#2047)
cmluciano Nov 29, 2018
2045ddc
update envoy sha (#2048)
GregHanson Dec 3, 2018
1bcee08
Add sni verifier filter (#2050)
ronenschafferibm Dec 4, 2018
4ceeb1e
Handle inflight request canceling properly (#2053)
qiwzhang Dec 7, 2018
f38395a
Fix build issue with bazel 0.20 (#2069)
mandarjog Dec 15, 2018
ebdf1d7
Clarify log messages (#2066) (#2067)
mandarjog Dec 15, 2018
0c9e54c
Authenticate an exchanged token (#2070)
lei-tang Dec 21, 2018
29cba9e
support extract token from customer http header with prefix (#2073)
quanjielin Jan 4, 2019
2378103
address comment (#2075)
quanjielin Jan 5, 2019
725d25e
update envoy sha (#2074)
GregHanson Jan 5, 2019
c98f781
rename rbac permissive related attributes key due to envoy recent cha…
quanjielin Jan 8, 2019
702ee43
Removes dangling pointer in capture list of lambda function. (#2080)
JimmyCYJ Jan 15, 2019
065e0dd
Use shared_ptr to protect members which are passed to capture list of…
JimmyCYJ Jan 16, 2019
d2d0c62
Update Envoy SHA to latest with protobuf.Any configs (release-1.1). (…
PiotrSikora Jan 17, 2019
cc6dc4a
Update Istio API to latest (1.1 branch) (#2084)
yangminzhu Jan 18, 2019
baf45ef
use route directive regardless of rpc status (#2087)
kyessenov Jan 23, 2019
7738fa3
Upgrade Envoy to b3be5713f (#2091)
venilnoronha Jan 24, 2019
c8a1bf5
Fix build on macOS. (#2090) (#2094)
lizan Jan 25, 2019
8f8c321
add mixer error details into metadata (#2093)
lizan Jan 26, 2019
b6b4b5d
Forwarded attributes override statically configured Local Attributes …
mandarjog Jan 30, 2019
6454835
Merge remote-tracking branch 'upstream/release-1.1' into quanlinmerge…
quanjielin Jan 31, 2019
3940135
comment out failed test case
quanjielin Jan 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copied from https://github.com/envoyproxy/envoy/blob/master/tools/bazel.rc
# Envoy specific Bazel build/test options.

build --workspace_status_command=tools/bazel_get_workspace_status

# Basic ASAN/UBSAN that works for gcc
build:asan --define ENVOY_CONFIG_ASAN=1
build:asan --copt -fsanitize=address,undefined
build:asan --linkopt -fsanitize=address,undefined
build:asan --copt -fno-sanitize=vptr
build:asan --linkopt -fno-sanitize=vptr
build:asan --linkopt -ldl
build:asan --define tcmalloc=disabled
build:asan --build_tag_filters=-no_asan
build:asan --test_tag_filters=-no_asan
build:asan --define signal_trace=disabled

# Clang 5.0 ASAN
build:clang-asan --define ENVOY_CONFIG_ASAN=1
build:clang-asan --copt -D__SANITIZE_ADDRESS__
build:clang-asan --copt -fsanitize=address,undefined
build:clang-asan --linkopt -fsanitize=address,undefined
build:clang-asan --copt -fno-sanitize=vptr
build:clang-asan --linkopt -fno-sanitize=vptr
build:clang-asan --copt -fno-sanitize-recover=all
build:clang-asan --linkopt -ldl
build:clang-asan --define tcmalloc=disabled
build:clang-asan --build_tag_filters=-no_asan
build:clang-asan --test_tag_filters=-no_asan
build:clang-asan --define signal_trace=disabled
build:clang-asan --test_env=ASAN_SYMBOLIZER_PATH

# Clang 5.0 TSAN
build:clang-tsan --define ENVOY_CONFIG_TSAN=1
build:clang-tsan --copt -fsanitize=thread
build:clang-tsan --linkopt -fsanitize=thread
build:clang-tsan --define tcmalloc=disabled

# Clang 5.0 MSAN - broken today since we need to rebuild lib[std]c++ and external deps with MSAN
# support (see https://github.com/envoyproxy/envoy/issues/443).
build:clang-msan --define ENVOY_CONFIG_MSAN=1
build:clang-msan --copt -fsanitize=memory
build:clang-msan --linkopt -fsanitize=memory
build:clang-msan --define tcmalloc=disabled
build:clang-msan --copt -fsanitize-memory-track-origins=2

# Test options
test --test_env=HEAPCHECK=normal --test_env=PPROF_PATH

# Release builds without debug symbols.
build:release -c opt
build:release --strip=always

# Release builds with debug symbols
build:release-symbol -c opt

# Add compile option for all C++ files
build --cxxopt -Wnon-virtual-dtor
build --cxxopt -Wformat
build --cxxopt -Wformat-security
4 changes: 4 additions & 0 deletions .circleci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ RUN sudo apt-get update && \
clang-6.0 clang-format-6.0 rsync ninja-build

# ~100M, depends on g++, zlib1g-dev, bash-completions
<<<<<<< HEAD
RUN curl -Lo /tmp/bazel.deb https://github.com/bazelbuild/bazel/releases/download/0.15.2/bazel_0.15.2-linux-x86_64.deb && \
=======
RUN curl -Lo /tmp/bazel.deb https://github.com/bazelbuild/bazel/releases/download/0.18.0/bazel_0.18.0-linux-x86_64.deb && \
>>>>>>> upstream/release-1.1
sudo dpkg -i /tmp/bazel.deb && rm /tmp/bazel.deb


Expand Down
4 changes: 4 additions & 0 deletions .circleci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ HUB ?=
PROJECT ?= istio

# Using same naming convention as istio/istio
<<<<<<< HEAD
VERSION ?= go1.10-bazel0.15-clang6.0
=======
VERSION ?= go1.10-bazel0.18-clang6.0
>>>>>>> upstream/release-1.1
IMG ?= ci

# Build a local image, can be used for testing with circleci command line.
Expand Down
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
jobs:
build:
docker:
- image: istio/ci:go1.10-bazel0.15-clang6.0
- image: istio/ci:go1.10-bazel0.18-clang6.0
environment:
- BAZEL_TEST_ARGS: "--test_env=ENVOY_IP_TEST_VERSIONS=v4only --test_output=all"
resource_class: xlarge
Expand All @@ -30,7 +30,7 @@ jobs:
destination: /proxy/bin
linux_asan:
docker:
- image: istio/ci:go1.10-bazel0.15-clang6.0
- image: istio/ci:go1.10-bazel0.18-clang6.0
environment:
- BAZEL_TEST_ARGS: "--test_env=ENVOY_IP_TEST_VERSIONS=v4only --test_output=all"
resource_class: xlarge
Expand All @@ -49,7 +49,7 @@ jobs:
- /home/circleci/.cache/bazel
linux_tsan:
docker:
- image: istio/ci:go1.10-bazel0.15-clang6.0
- image: istio/ci:go1.10-bazel0.18-clang6.0
environment:
- BAZEL_TEST_ARGS: "--test_env=ENVOY_IP_TEST_VERSIONS=v4only --test_output=all"
resource_class: xlarge
Expand Down Expand Up @@ -80,12 +80,12 @@ jobs:
- checkout
- restore_cache:
keys:
- macos_fastbuild_v2-bazel-cache-{{ checksum "WORKSPACE" }}
- macos_fastbuild-bazel-cache-{{ checksum "WORKSPACE" }}
- run: rm ~/.gitconfig
- run: make build_envoy
- run: make test
- save_cache:
key: macos_fastbuild_v2-bazel-cache-{{ checksum "WORKSPACE" }}
key: macos_fastbuild-bazel-cache-{{ checksum "WORKSPACE" }}
paths:
- /Users/distiller/.cache/bazel

Expand Down
3 changes: 0 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@ genrule(
visibility = ["//visibility:public"],
)

load("@io_bazel_rules_go//go:def.bzl", "go_prefix")

go_prefix("istio.io/proxy")
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ARTIFACTS_DIR ?= $(LOCAL_ARTIFACTS_DIR)
BAZEL_STARTUP_ARGS ?=
BAZEL_BUILD_ARGS ?=
BAZEL_TEST_ARGS ?=
BAZEL_TARGETS ?= //...
HUB ?=
TAG ?=
ifeq "$(origin CC)" "default"
Expand All @@ -30,7 +31,7 @@ CXX := clang++-6.0
endif

build:
CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) //...
CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) build $(BAZEL_BUILD_ARGS) $(BAZEL_TARGETS)
@bazel shutdown

# Build only envoy - fast
Expand All @@ -43,19 +44,20 @@ clean:
@bazel shutdown

test:
CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) //...
CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) $(BAZEL_TARGETS)
@bazel shutdown

test_asan:
CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-asan //...
CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-asan $(BAZEL_TARGETS)
@bazel shutdown

test_tsan:
CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-tsan //...
CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-tsan $(BAZEL_TARGETS)
@bazel shutdown

check:
@script/check-license-headers
@script/check-repositories
@script/check-style

artifacts: build
Expand Down
25 changes: 17 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
################################################################################
#

# http_archive is not a native function since bazel 0.19
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

load(
"//:repositories.bzl",
"googletest_repositories",
Expand All @@ -30,12 +33,16 @@ bind(
)

# When updating envoy sha manually please update the sha in istio.deps file also
ENVOY_SHA = "15577326dbb4ebacf34990d1686be6f706ac02e4"
#
# Determine SHA256 `wget https://github.com/envoyproxy/envoy/archive/COMMIT.tar.gz && sha256sum COMMIT.tar.gz`
ENVOY_SHA = "b3be5713f2100ab5c40316e73ce34581245bd26a"
ENVOY_SHA256 = "79629284ae143d66b873c08883dc6382fac2e8ed45f6f3521f7e7282b6650216"

http_archive(
name = "envoy",
strip_prefix = "envoy-" + ENVOY_SHA,
url = "https://github.com/istio/envoy/archive/" + ENVOY_SHA + ".zip",
url = "https://github.com/envoyproxy/envoy/archive/" + ENVOY_SHA + ".tar.gz",
sha256 = ENVOY_SHA256,
)

load("@envoy//bazel:repositories.bzl", "envoy_dependencies")
Expand All @@ -48,14 +55,16 @@ load("@envoy_api//bazel:repositories.bzl", "api_dependencies")
api_dependencies()

load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
load("@com_lyft_protoc_gen_validate//bazel:go_proto_library.bzl", "go_proto_repositories")
go_proto_repositories(shared=0)
go_rules_dependencies()
go_register_toolchains()

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
# Nov 28, 2017 (bazel 0.8.0 support)
RULES_PROTOBUF_SHA = "563b674a2ce6650d459732932ea2bc98c9c9a9bf"
RULES_PROTOBUF_SHA256 = "338e0d65cd709c6a6f9b5702466e641d536479be8b564d1e12a5d1de22a5cff6"

http_archive(
name = "org_pubref_rules_protobuf",
commit = "563b674a2ce6650d459732932ea2bc98c9c9a9bf", # Nov 28, 2017 (bazel 0.8.0 support)
remote = "https://github.com/pubref/rules_protobuf",
strip_prefix = "rules_protobuf-" + RULES_PROTOBUF_SHA,
url = "https://github.com/pubref/rules_protobuf/archive/" + RULES_PROTOBUF_SHA + ".tar.gz",
sha256 = RULES_PROTOBUF_SHA256,
)
11 changes: 7 additions & 4 deletions cc_gogo_protobuf.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
#
################################################################################
#
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
GOGO_PROTO_SHA = "100ba4e885062801d56799d78530b73b178a78f3"
GOGO_PROTO_SHA256 = "b04eb8eddd2d15d8b12d111d4ef7816fca6e5c5d495adf45fb8478278aa80f79"

def cc_gogoproto_repositories(bind=True):
BUILD = """
Expand Down Expand Up @@ -56,10 +58,11 @@ cc_proto_library(
],
)
"""
new_git_repository(
http_archive(
name = "gogoproto_git",
commit = "100ba4e885062801d56799d78530b73b178a78f3",
remote = "https://github.com/gogo/protobuf",
strip_prefix = "protobuf-" + GOGO_PROTO_SHA,
url = "https://github.com/gogo/protobuf/archive/" + GOGO_PROTO_SHA + ".tar.gz",
sha256 = GOGO_PROTO_SHA256,
build_file_content = BUILD,
)

Expand Down
12 changes: 8 additions & 4 deletions googleapis.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
#
################################################################################
#
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
# Oct 21, 2016 (only release pre-dates sha)
GOOGLEAPIS_SHA = "13ac2436c5e3d568bd0e938f6ed58b77a48aba15"
GOOGLEAPIS_SHA256 = "f48956fb8c55617ed052c20884465f06b9a57b807164431185be397ea46993ca"

def googleapis_repositories(bind=True):
GOOGLEAPIS_BUILD_FILE = """
Expand All @@ -37,11 +40,12 @@ cc_proto_library(
)

"""
new_git_repository(
http_archive(
name = "com_github_googleapis_googleapis",
build_file_content = GOOGLEAPIS_BUILD_FILE,
commit = "13ac2436c5e3d568bd0e938f6ed58b77a48aba15", # Oct 21, 2016 (only release pre-dates sha)
remote = "https://github.com/googleapis/googleapis.git",
strip_prefix = "googleapis-" + GOOGLEAPIS_SHA,
url = "https://github.com/googleapis/googleapis/archive/" + GOOGLEAPIS_SHA + ".tar.gz",
sha256 = GOOGLEAPIS_SHA256,
)

if bind:
Expand Down
9 changes: 7 additions & 2 deletions include/istio/control/http/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include "include/istio/control/http/request_handler.h"
#include "include/istio/mixerclient/client.h"
#include "include/istio/utils/attribute_names.h"
#include "include/istio/utils/local_attributes.h"
#include "mixer/v1/config/client/client_config.pb.h"

namespace istio {
Expand Down Expand Up @@ -69,8 +71,9 @@ class Controller {
// * some functions provided by the environment (Envoy)
// * optional service config cache size.
struct Options {
Options(const ::istio::mixer::v1::config::client::HttpClientConfig& config)
: config(config) {}
Options(const ::istio::mixer::v1::config::client::HttpClientConfig& config,
const ::istio::utils::LocalNode& local_node)
: config(config), local_node(local_node) {}

// Mixer filter config
const ::istio::mixer::v1::config::client::HttpClientConfig& config;
Expand All @@ -81,6 +84,8 @@ class Controller {
// The LRU cache size for service config.
// If not set or is 0 default value, the cache size is 1000.
int service_config_cache_size{};

const ::istio::utils::LocalNode& local_node;
};

// The factory function to create a new instance of the controller.
Expand Down
17 changes: 12 additions & 5 deletions include/istio/control/http/report_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <chrono>
#include <map>

#include "google/protobuf/struct.pb.h"

namespace istio {
namespace control {
namespace http {
Expand All @@ -42,27 +44,32 @@ class ReportData {
int response_code;
std::string response_flags;
};
virtual void GetReportInfo(ReportInfo* info) const = 0;
virtual void GetReportInfo(ReportInfo *info) const = 0;

// Get destination ip/port.
virtual bool GetDestinationIpPort(std::string* ip, int* port) const = 0;
virtual bool GetDestinationIpPort(std::string *ip, int *port) const = 0;

// Get Rbac attributes.
struct RbacReportInfo {
std::string permissive_resp_code;
std::string permissive_policy_id;
};
virtual bool GetRbacReportInfo(RbacReportInfo* report_info) const = 0;
virtual bool GetRbacReportInfo(RbacReportInfo *report_info) const = 0;

// Get upstream host UID. This value overrides the value in the report bag.
virtual bool GetDestinationUID(std::string* uid) const = 0;
virtual bool GetDestinationUID(std::string *uid) const = 0;

// gRPC status info
struct GrpcStatus {
std::string status;
std::string message;
};
virtual bool GetGrpcStatus(GrpcStatus* status) const = 0;
virtual bool GetGrpcStatus(GrpcStatus *status) const = 0;

// Get dynamic metadata generated by Envoy filters.
// Useful for logging info generated by custom codecs.
virtual const ::google::protobuf::Map<std::string, ::google::protobuf::Struct>
&GetDynamicFilterState() const = 0;
};

} // namespace http
Expand Down
18 changes: 2 additions & 16 deletions include/istio/control/http/request_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,10 @@ class RequestHandler {

// Make a Report call. It will:
// * check service config to see if Report is required
// * extract check attributes if not done yet.
// * extract more report attributes
// * make a Report call.
virtual void Report(ReportData* report_data) = 0;

// Extract the request attributes for Report() call.
// This is called at Report time when Check() is not called.
// Normally request attributes are extracted at Check() call.
// This is for cases the requests are rejected by http filters
// before mixer, such as fault injection, or auth.
//
// Usage: at Envoy filter::log() function
// if (!hander) {
// handle = control->CreateHandler();
// handler->ExtractRequestAttributes();
// }
// handler->Report();
//
virtual void ExtractRequestAttributes(CheckData* check_data) = 0;
virtual void Report(CheckData* check_data, ReportData* report_data) = 0;
};

} // namespace http
Expand Down
Loading