Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
78b931b
Simple TCP server to show how to retrieve original dest IP:port after…
enricoschiattarella Jan 10, 2017
8b3a442
Rebase Envoy (#41)
kyessenov Jan 12, 2017
c3abd2a
Update prototype to use iptables (#42)
kyessenov Jan 12, 2017
add363a
Rebase to fixed Envoy (#43)
kyessenov Jan 13, 2017
ee3cdee
Handle HEAD request. (#34)
chowchow316 Jan 13, 2017
efc32a2
Expose bazel target (#48)
kyessenov Jan 21, 2017
92541b7
Try again (#49)
kyessenov Jan 21, 2017
cea8827
Integrate with mixer client. (#55)
qiwzhang Jan 27, 2017
6d7f0ee
Add originIp and originHost attributes. (#56)
qiwzhang Jan 27, 2017
4cd5c9f
Add uuid-dev dependency in README.md (#45)
lizan Jan 28, 2017
bcdb75d
Extract originIp and OriginHost. (#57)
qiwzhang Jan 28, 2017
2c9c1af
Update buckets for UI. (#58)
chowchow316 Jan 30, 2017
2796209
Add targetService attribute. (#59)
qiwzhang Feb 1, 2017
8218f92
Use envoy new access_log handler for sending Report. (#60)
qiwzhang Feb 1, 2017
1d2d6a8
Update to the latest envoy with #396. (#61)
qiwzhang Feb 2, 2017
53fd026
Fix tclap dependency fetching error (#62)
kyessenov Feb 2, 2017
33f54ed
Integrate mixer client directly with envoy. (#66)
qiwzhang Feb 6, 2017
eb8bfcc
Add release binary script. (#68)
qiwzhang Feb 6, 2017
89f0fbf
Push tar.gz to GCS (#69)
kyessenov Feb 6, 2017
7635536
Remove mixer_client from api_manager. (#72)
qiwzhang Feb 8, 2017
a6a33fd
Update mixer client SHA. (#74)
chowchow316 Feb 8, 2017
d29a195
Update readme. (#73)
chowchow316 Feb 8, 2017
fdac61b
Adds Jenkinsfile and updates release-binary to create a SHA. (#71)
sebastienvas Feb 9, 2017
6e372fc
Update grpc and protobuf (#70)
lizan Feb 9, 2017
28105ca
Add sourceService. (#78)
qiwzhang Feb 9, 2017
21f1cb3
Add script to build docker image. (#77)
qiwzhang Feb 9, 2017
673b902
Use official attribute names (#80)
qiwzhang Feb 10, 2017
366f5ae
Creates a KEY for mixer client dep. Updates release-binary (#79)
sebastienvas Feb 10, 2017
a39d555
Update src/envoy/mixer/README. (#82)
qiwzhang Feb 10, 2017
88cfb24
Fix src/envoy/mixer/README.md (#85)
wattli Feb 10, 2017
d5a878a
Get attributes from envoy config. (#87)
chowchow316 Feb 14, 2017
25adae9
updated SHA to point to newer envoy with RDS API feature (#94)
GregHanson Feb 14, 2017
1cdc2ac
Disable travis on stable branches (#96)
sebastienvas Feb 15, 2017
2f69cc9
Publish debug binaries (no release yet) (#98)
kyessenov Feb 15, 2017
8488133
Copies the binary instead of linking for release (#102)
sebastienvas Feb 16, 2017
0804a07
Not to use api_key if its service is not actived. (#109)
qiwzhang Feb 21, 2017
7444da1
Update envoy and add c-ares (#107)
kyessenov Feb 22, 2017
d093254
Send StatusCode Attributes to Mixer. (#110)
chowchow316 Feb 22, 2017
ef1aecf
Add send_attribute filter. (#115)
qiwzhang Feb 22, 2017
20e19d2
Fail request if api_key is not valid. (#116)
chowchow316 Feb 22, 2017
7fe10df
Rename response.http.code (#125)
qiwzhang Feb 24, 2017
fdfb73f
Send headers as string map. (#129)
qiwzhang Feb 25, 2017
3d402e6
unify bazel's docker build targets with other istio repos (#127)
ayj Feb 25, 2017
d71d5f3
update base debug docker image reference (#133)
ayj Feb 28, 2017
f5281ad
Update postsubmit to create docker images (#132)
sebastienvas Feb 28, 2017
0c7c549
Adding config release for bazel build (#135)
sebastienvas Mar 1, 2017
fc9497a
Fix mixer client crash. (#136)
qiwzhang Mar 1, 2017
83e1d58
Get mixerclient with response parsing. (#138)
qiwzhang Mar 2, 2017
a118aea
Update nghttp2 to sync with envoy (#140)
wattli Mar 2, 2017
9d10adc
Populate origin.user attribute from the SAN field of client cert (#142)
wattli Mar 2, 2017
6e29abc
Update to latest mixer_client. (#145)
qiwzhang Mar 3, 2017
a5567b9
Not call report if decodeHeaders is not called. (#150)
qiwzhang Mar 7, 2017
c0c317d
Update mixerclient with sync-ed grpc write and fail-fast. (#155)
qiwzhang Mar 9, 2017
25f43e3
Update envoy to PR553 (#156)
qiwzhang Mar 10, 2017
5bf8276
Uses a specific version of the Shared Pipeline lib (#158)
sebastienvas Mar 13, 2017
f0e541f
Update lyft/envoy commit Id to latest. (#161)
sarvaniv Mar 13, 2017
76d96cd
Update repositories.bzl (#169)
kyessenov Mar 14, 2017
4d1dbe0
Always set response latency (#172)
qiwzhang Mar 15, 2017
52ef466
Update mixerclient to sync_transport change. (#178)
qiwzhang Mar 16, 2017
531cfa0
Use opaque config to turn on/off forward attribute and mixer filter (…
kyessenov Mar 17, 2017
95535f5
Fix a bug in opaque config change and test it out (#182)
kyessenov Mar 17, 2017
93ea507
Update mixer client to mixer api with gogoproto. (#184)
qiwzhang Mar 17, 2017
20c5bab
Move .bazelrc to tools/bazel.rc (#186)
lizan Mar 20, 2017
557d0c6
Support apikey based traffic restriction (#189)
mangchiandjjoe Mar 20, 2017
978b967
Fix crash in unreachable/overloaded RDS (#190)
kyessenov Mar 20, 2017
955d54a
Add mixer client end to end integration test. (#177)
qiwzhang Mar 20, 2017
57419f1
Fix broken link (#193)
wattli Mar 21, 2017
d2bc18a
Make quota call (#192)
qiwzhang Mar 22, 2017
61a53a4
Update envoy and update configs (#195)
lizan Mar 22, 2017
5e601ca
Enable check cache and refactory mixer config loading (#197)
qiwzhang Mar 23, 2017
3bcb6c4
Split into separate tests. (#201)
qiwzhang Mar 24, 2017
c93dcc5
Update README on how to enable check cache. (#204)
qiwzhang Mar 26, 2017
8c2bbce
build: support Envoy native Bazel build. (#210)
htuch Apr 1, 2017
2fae2d7
Fixes bazel.rc issues (#212)
sebastienvas Apr 1, 2017
f71ef23
Fix go build (#224)
lizan Apr 7, 2017
987223f
Use TranscoderInputStream to reduce confusion around ByteCount() (#225)
lizan Apr 7, 2017
1ef1b4a
Merge latest changes from rate_limiting to master (#221)
mangchiandjjoe Apr 7, 2017
1bcfab4
Send delta metrics for intermediate reports. (#219)
chowchow316 Apr 7, 2017
e47cfc3
Update attributes to match the canonical attribute list. (#232)
ZackButcher Apr 7, 2017
38a15cb
Add envoy Buffer based TranscoderInputStream (#231)
lizan Apr 8, 2017
71097de
A few doc changes for consistency across repos. (#235)
geeknoid Apr 9, 2017
030d8de
Merge branch 'master' of https://github.com/istio/proxy into firebase
sarvaniv Apr 10, 2017
f9eb106
Add repositories.bzl
sarvaniv Apr 10, 2017
d602c7a
Added missing export setting in bazel configuration (#236)
mangchiandjjoe Apr 10, 2017
42169bd
Merge branch 'master' of https://github.com/istio/proxy into firebase…
sarvaniv Apr 10, 2017
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
30 changes: 16 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
sudo: required
dist: xenial

dist: trusty

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9
- wget

branches:
except:
- stable

lang: go

go:
- 1.7.x
language: cpp

jdk:
- oraclejdk8

env:
- BAZEL_VERSION=0.4.3

addons:
apt:
packages:
- wget
- BAZEL_VERSION=0.4.5

cache:
directories:
Expand All @@ -35,12 +37,12 @@ before_install:
- sudo dpkg -i bazel_${BAZEL_VERSION}-linux-x86_64.deb
- sudo apt-get -f install -qqy uuid-dev
- cd ${TRAVIS_BUILD_DIR}
- mv .bazelrc .bazelrc.orig
- cat .bazelrc.travis .bazelrc.orig > .bazelrc
- mv tools/bazel.rc tools/bazel.rc.orig
- cat tools/bazel.rc.travis tools/bazel.rc.orig > tools/bazel.rc

script:
- script/check-style
- bazel --output_base=${HOME}/bazel/outbase test //...
- CC=/usr/bin/gcc-4.9 CXX=/usr/bin/g++-4.9 bazel --output_base=${HOME}/bazel/outbase test //...

notifications:
slack: istio-dev:wEEEbaabdP5ieCgDOFetA9nX
4 changes: 4 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ config_setting(
},
visibility = ["//visibility:public"],
)

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

go_prefix("istio.io/proxy")
40 changes: 4 additions & 36 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
# Contributing guidelines
# Contribution guidelines

So, you want to hack on the Istio Proxy? Yay!

- [Contributor license agreements](#contributor-license-agreements)
- [Contributing a patch](#contributing-a-patch)

## Contributor license agreements

We'd love to accept your patches! Before we can take them, you have to jump a
few legal hurdles.

Please fill out the [Google CLA](https://cla.developers.google.com).

Once you are CLA'ed, we'll be able to accept your pull requests. This is necessary
because you own the copyright to your changes, even after your contribution
becomes part of this project. So this agreement simply gives us permission
to use and redistribute your contributions as part of the project.

***NOTE***: Only original source code from you and other people that have
signed the CLA can be accepted into the repository. This policy does not
apply to [third_party](third_party/) and [vendor](vendor/).

## Contributing a patch

If you're working on an existing issue, simply respond to the issue and express
interest in working on it. This helps other people know that the issue is
active, and hopefully prevents duplicated efforts.

If you want to work on a new idea of relatively small scope:

1. Submit an issue describing your proposed change to the repo in question.
1. The repo owners will respond to your issue promptly.
1. If your proposed change is accepted, and you haven't already done so, sign a
Contributor License Agreement (see details above).
1. Fork the repo, develop, and test your changes.
1. Submit a pull request.
So, you want to hack on the Istio proxy? Yay! Please refer to Istio's overall
[contribution guidelines](https://github.com/istio/istio/blob/master/CONTRIBUTING.md)
to find out how you can help.
29 changes: 13 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!groovy

@Library('testutils')
@Library('testutils@stable-3e4d089')

import org.istio.testutils.Utilities
import org.istio.testutils.GitUtilities
Expand All @@ -12,20 +12,17 @@ def utils = new Utilities()
def bazel = new Bazel()

mainFlow(utils) {
pullRequest(utils) {
node {
gitUtils.initialize()
// Proxy does build work correctly with Hazelcast.
// Must use .bazelrc.jenkins
bazel.setVars('', '')
}

if (utils.runStage('PRESUBMIT')) {
presubmit(gitUtils, bazel)
}
if (utils.runStage('POSTSUBMIT')) {
postsubmit(gitUtils, bazel, utils)
}
node {
gitUtils.initialize()
// Proxy does build work correctly with Hazelcast.
// Must use .bazelrc.jenkins
bazel.setVars('', '')
}
if (utils.runStage('PRESUBMIT')) {
presubmit(gitUtils, bazel)
}
if (utils.runStage('POSTSUBMIT')) {
postsubmit(gitUtils, bazel, utils)
}
}

Expand Down Expand Up @@ -62,4 +59,4 @@ def postsubmit(gitUtils, bazel, utils) {
utils.publishDockerImages(images, tags, 'release')
}
}
}
}
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ Server Side Features:

- *Monitoring & Logging*. The Proxy can report server-side metrics and logs to the Mixer.

To learn more...

- User guide coming soon!
- [Contributing to the project](./CONTRIBUTING.md)

### Filing issues

If you have a question about an Istio proxy or have a problem using one, please
[file an issue](https://github.com/istio/proxy/issues/new).
Please see [istio.io](https://istio.io)
to learn about the overall Istio project and how to get in touch with us. To learn how you can
contribute to any of the Istio components, including the proxy, please
see the Istio [contribution guidelines](https://github.com/istio/istio/blob/master/CONTRIBUTING.md).
16 changes: 16 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,19 @@ http_file(
url = "https://storage.googleapis.com/istio-build/manager/ubuntu_xenial_debug-" + DEBUG_BASE_IMAGE_SHA + ".tar.gz",
sha256 = DEBUG_BASE_IMAGE_SHA,
)

# Following go repositories are for building go integration test for mixer filter.
git_repository(
name = "io_bazel_rules_go",
commit = "2d9f328a9723baf2d037ba9db28d9d0e30683938", # Apr 6, 2017 (buildifier fix)
remote = "https://github.com/bazelbuild/rules_go.git",
)

git_repository(
name = "org_pubref_rules_protobuf",
commit = "d42e895387c658eda90276aea018056fcdcb30e4", # Mar 07 2017 (gogo* support)
remote = "https://github.com/pubref/rules_protobuf",
)

load("//src/envoy/mixer/integration_test:repositories.bzl", "go_mixer_repositories")
go_mixer_repositories()
4 changes: 4 additions & 0 deletions contrib/endpoints/include/api_manager/method.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ class MethodInfo {

// Get the names of url system parameters
virtual const std::set<std::string> &system_query_parameter_names() const = 0;

// Get quota metric cost vector
virtual const std::vector<std::pair<std::string, int>> &metric_cost_vector()
const = 0;
};

} // namespace api_manager
Expand Down
21 changes: 15 additions & 6 deletions contrib/endpoints/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def googleapis_repositories(protobuf_repo="@protobuf_git//", bind=True):

licenses(["notice"])

load("{}:protobuf.bzl", "cc_proto_library")
load("@protobuf_git//:protobuf.bzl", "cc_proto_library")

exports_files(glob(["google/**"]))

Expand Down Expand Up @@ -254,16 +254,18 @@ cc_proto_library(
"google/api/control.proto",
"google/api/documentation.proto",
"google/api/endpoint.proto",
"google/api/experimental/authorization_config.proto",
"google/api/experimental/experimental.proto",
"google/api/http.proto",
"google/api/label.proto",
"google/api/log.proto",
"google/api/logging.proto",
"google/api/metric.proto",
"google/api/experimental/experimental.proto",
"google/api/experimental/authorization_config.proto",
"google/api/monitored_resource.proto",
"google/api/monitoring.proto",
"google/api/quota.proto",
"google/api/service.proto",
"google/api/source_info.proto",
"google/api/system_parameter.proto",
"google/api/usage.proto",
],
Expand Down Expand Up @@ -292,10 +294,9 @@ cc_proto_library(
)
""".format(protobuf_repo)


native.new_git_repository(
name = "googleapis_git",
commit = "412867fb105722fb9d2cd9af90af1f8f120de238",
commit = "2fe0050bd2a6d4c6ba798c0311f0b149b8997314",
remote = "https://github.com/googleapis/googleapis.git",
build_file_content = BUILD,
)
Expand Down Expand Up @@ -326,7 +327,7 @@ def servicecontrol_client_repositories(bind=True):

native.git_repository(
name = "servicecontrol_client_git",
commit = "d739d755365c6a13d0b4164506fd593f53932f5d",
commit = "3d1a30d9221e700542eeaaf20eab69faddb63894",
remote = "https://github.com/cloudendpoints/service-control-client-cxx.git",
)

Expand All @@ -335,3 +336,11 @@ def servicecontrol_client_repositories(bind=True):
name = "servicecontrol_client",
actual = "@servicecontrol_client_git//:service_control_client_lib",
)
native.bind(
name = "quotacontrol",
actual = "@servicecontrol_client_git//proto:quotacontrol",
)
native.bind(
name = "quotacontrol_genproto",
actual = "@servicecontrol_client_git//proto:quotacontrol_genproto",
)
2 changes: 2 additions & 0 deletions contrib/endpoints/src/api_manager/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ cc_library(
"method_impl.cc",
"path_matcher.cc",
"path_matcher_node.cc",
"quota_control.cc",
"quota_control.h",
"request_handler.cc",
],
linkopts = select({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class ServiceAccountToken {

// JWT token for accessing the http endpoints defined in Firebase Rules.
JWT_TOKEN_FOR_AUTHORIZATION_SERVICE,
JWT_TOKEN_FOR_QUOTA_CONTROL,
JWT_TOKEN_TYPE_MAX,
};
// Set audience. Only calcualtes JWT token with specified audience.
Expand Down
3 changes: 3 additions & 0 deletions contrib/endpoints/src/api_manager/check_workflow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "contrib/endpoints/src/api_manager/check_security_rules.h"
#include "contrib/endpoints/src/api_manager/check_service_control.h"
#include "contrib/endpoints/src/api_manager/fetch_metadata.h"
#include "contrib/endpoints/src/api_manager/quota_control.h"

using ::google::api_manager::utils::Status;

Expand All @@ -36,6 +37,8 @@ void CheckWorkflow::RegisterAll() {
Register(CheckServiceControl);
// Check Security Rules.
Register(CheckSecurityRules);
// Quota control
Register(QuotaControl);
}

void CheckWorkflow::Register(CheckHandler handler) {
Expand Down
20 changes: 20 additions & 0 deletions contrib/endpoints/src/api_manager/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,23 @@ MethodInfoImpl *Config::GetOrCreateMethodInfoImpl(const string &name,
return i->second.get();
}

bool Config::LoadQuotaRule(ApiManagerEnvInterface *env) {
for (const auto &rule : service_.quota().metric_rules()) {
auto method = utils::FindOrNull(method_map_, rule.selector());
if (method) {
for (auto &metric_cost : rule.metric_costs()) {
(*method)->add_metric_cost(metric_cost.first, metric_cost.second);
}
} else {
env->LogError("Metric rule with selector " + rule.selector() +
"is mismatched.");
return false;
}
}

return true;
}

bool Config::LoadHttpMethods(ApiManagerEnvInterface *env,
PathMatcherBuilder *pmb) {
std::set<std::string> all_urls, urls_with_options;
Expand Down Expand Up @@ -443,6 +460,9 @@ std::unique_ptr<Config> Config::Create(ApiManagerEnvInterface *env,
if (!config->LoadBackends(env)) {
return nullptr;
}
if (!config->LoadQuotaRule(env)) {
return nullptr;
}
return config;
}

Expand Down
3 changes: 3 additions & 0 deletions contrib/endpoints/src/api_manager/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "contrib/endpoints/src/api_manager/method_impl.h"
#include "contrib/endpoints/src/api_manager/path_matcher.h"
#include "contrib/endpoints/src/api_manager/proto/server_config.pb.h"
#include "google/api/quota.pb.h"
#include "google/api/service.pb.h"

namespace google {
Expand Down Expand Up @@ -113,6 +114,8 @@ class Config {
// Load SystemParameters info to MethodInfo.
bool LoadSystemParameters(ApiManagerEnvInterface *env);

bool LoadQuotaRule(ApiManagerEnvInterface *env);

// Gets the MethodInfoImpl creating it if necessary
MethodInfoImpl *GetOrCreateMethodInfoImpl(const std::string &name,
const std::string &api_name,
Expand Down
Loading