diff --git a/CHANGELOG.md b/CHANGELOG.md index af3c5e3e5..f9158b253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,53 @@ +# Release 1.1.0 01-03-2017 + +- Start deprecation of OpenAPI x-security to security (#101) +- Stop using api_key if service is not activated. (#98) +- Fail request if api_key is not valid +- Basic GRPC request compression support (#94) +- Support HEAD request in transcoding (#74) +- Rename release GCR images to gcr.io/endpoints-release (#60) +- NGINX high connection usage optimizations (#57) +- Make TLS client certificate optional in start_esp +- Start using AuthProvider audiences +- Notable bug fixes: + * Fix ProxyFlow leak (#93) + * Do not report latency for streaming requests + * Validate if contents of x-jwks_uri contains a public key +- General improvements to testing and build infrastructure: + * Update GRPC to 1.1.1 + * Update grpc test service.json (#61) + * Add t test for fail wrong api key. (#104) + * Fix grpc interop stress test script. (#103) + * Use grpc-go for interop tests (#88) + * Fix debian jessie package issue + * Upgrade bazel to 0.4.4 (#92) + * t-test changes to check that x-endpoint-api-userinfo is received by grpc (#96) + service. + * Add transcoding metadata test + * Change scripts for new version file location. + * Move nginx_repositories close to its load. + * Fix start_esp main entry problem. + * Change script/release_tag_git to use upstream. (#44) + * Change release_tag_git to use absolute path. + * Not to save huge access.log for GCE. (#41) + * Fix bugs in script/release-publish. (#42) + * Use newer protobuf.bzl (#39) + * Use bazel to pull NGINX (#38) + * Fix GRPC interop test BUILD file (#37) + * Fix GRPC test BUILD file (#35) + +# Release 1.0.1 06-12-2016 + +- Use GOOGLE_APPLICATION_CREDENTIALS in start-up script +- service_control_client not to send large Report (<1MB) +- Add max_report_size to statistics +- Package start-up script with Python PEX +- ESP CLI use same version for ESP docker image +- A workaround for Proto2.MessageOptions.* options +- Not call Check if api_key not provided +- Respect allow_cors configuration +- Log a warning if service control replies with a different service config + # Release 1.0.0 11-11-2016 - Fix for rename version => config_id diff --git a/Jenkinsfile b/Jenkinsfile index 71358414d..ca9118f4a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -447,9 +447,9 @@ def buildPackages() { '//src/tools:auth_token_gen', '//test/grpc:grpc-test-client', '//test/grpc:interop-client', - '//test/grpc:interop-metrics-client', - '//test/grpc:interop-server', - '//test/grpc:interop-stress-client', + '@org_golang_google_grpc//stress/metrics_client', + '@org_golang_google_grpc//interop/server', + '@org_golang_google_grpc//stress/client', '//test/grpc:grpc-test_descriptor', '//test/grpc:grpc-interop_descriptor', ] @@ -457,9 +457,9 @@ def buildPackages() { 'bazel-bin/src/tools/auth_token_gen', 'bazel-bin/test/grpc/grpc-test-client', 'bazel-bin/test/grpc/interop-client', - 'bazel-bin/test/grpc/interop-metrics-client', - 'bazel-bin/test/grpc/interop-server', - 'bazel-bin/test/grpc/interop-stress-client', + 'bazel-bin/external/org_golang_google_grpc/stress/metrics_client/metrics_client', + 'bazel-bin/external/org_golang_google_grpc/interop/server/server', + 'bazel-bin/external/org_golang_google_grpc/stress/client/client', 'bazel-genfiles/test/grpc/grpc-test.descriptor', 'bazel-genfiles/test/grpc/grpc-interop.descriptor', ] @@ -887,4 +887,3 @@ def initialize() { // Updating submodules and cleaning files. sh('script/setup && script/obliterate') } - diff --git a/WORKSPACE b/WORKSPACE index 6f996bac6..e5f0f5119 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -26,7 +26,7 @@ # # A Bazel (http://bazel.io) workspace for the Google Cloud Endpoints runtime. -ISTIO_PROXY = "b27d4b9fe2e5c17f0c4cdf92c73ee92a76ac02f8" +ISTIO_PROXY = "df4b7e43aad8e8a25d83606389c41d06ecef32ac" git_repository( name = "nginx", @@ -57,7 +57,6 @@ load( "@istio_proxy_git//contrib/endpoints:repositories.bzl", "grpc_repositories", "servicecontrol_client_repositories", - "mixer_client_repositories", ) load( "@istio_proxy_git//:repositories.bzl", @@ -97,34 +96,12 @@ bind( servicecontrol_client_repositories() -mixer_client_repositories() - protobuf_repositories() googletest_repositories() grpc_repositories() -load( - "@mixerclient_git//:repositories.bzl", - "mixerapi_repositories", -) - -mixerapi_repositories(protobuf_repo="@protobuf_bzl//") - -# Though GRPC has BUILD file, our own BUILD.grpc file is needed since it contains -# more targets including testing server and client. -# To generate the BUILD.grpc file, cherry-pick -# https://github.com/grpc/grpc/pull/7556 -# and run ./tools/buildgen/generate_projects.sh in GRPC repo. -new_git_repository( - name = "grpc_test_git", - build_file = "third_party/BUILD.grpc", - commit = "d28417c856366df704200f544e72d31056931bce", - init_submodules = True, - remote = "https://github.com/grpc/grpc.git", -) - # Workaround for Bazel > 0.4.0 since it needs newer protobuf.bzl from: # https://github.com/google/protobuf/pull/2246 # Do not use this git_repository for anything else than protobuf.bzl @@ -149,7 +126,7 @@ bind( git_repository( name = "tools", - commit = "3327bae27498025ef8d33709f37182ae407fc517", + commit = "1bcac83ed2dc9c5e0be156a4c1801d435667f642", remote = "https://github.com/cloudendpoints/endpoints-tools", ) @@ -181,11 +158,11 @@ git_repository( # git_repository( name = "io_bazel_rules_go", - commit = "3b13b2dba81e09ec213ccbd4da56ad332cb5d3dc", + commit = "76c63b5cd0d47c1f2b47ab4953db96c574af1c1d", remote = "https://github.com/bazelbuild/rules_go.git", ) -load("@io_bazel_rules_go//go:def.bzl", "go_repositories", "go_repository") +load("@io_bazel_rules_go//go:def.bzl", "go_repositories", "go_repository", "new_go_repository") go_repositories() @@ -195,3 +172,7 @@ new_git_repository( commit = "8616e8ee5e20a1704615e6c8d7afcdac06087a67", remote = "https://github.com/golang/protobuf.git", ) + +load("//test/grpc:repositories.bzl", "grpc_go_repositories") + +grpc_go_repositories() diff --git a/doc/k8s/swagger.yaml b/doc/k8s/swagger.yaml index c893987ab..082d9bc4d 100644 --- a/doc/k8s/swagger.yaml +++ b/doc/k8s/swagger.yaml @@ -65,12 +65,8 @@ paths: description: "Authenication info." schema: $ref: "#/definitions/authInfoResponse" - x-security: - - google_jwt: - audiences: - # This must match the "aud" field in the JWT. You can add multiple - # audiences to accept JWTs from multiple clients. - - "echo.endpoints.sample.google.com" + security: + - {google_jwt: [], api_key: []} "/auth/info/googleidtoken": get: description: "Returns the requests' authentication information." @@ -82,12 +78,8 @@ paths: description: "Authenication info." schema: $ref: "#/definitions/authInfoResponse" - x-security: - - google_id_token: - audiences: - # Your OAuth2 client's Client ID must be added here. You can add - # multiple client IDs to accept tokens from multiple clients. - - "YOUR-CLIENT-ID" + security: + - {google_id_token: [], api_key: []} definitions: echoMessage: properties: @@ -116,9 +108,13 @@ securityDefinitions: flow: "implicit" type: "oauth2" # This must match the 'iss' field in the JWT. - x-issuer: "jwt-client.endpoints.sample.google.com" + x-google-issuer: "jwt-client.endpoints.sample.google.com" # Update this with your service account's email address. - x-jwks_uri: "https://www.googleapis.com/service_accounts/v1/jwk/YOUR-SERVICE-ACCOUNT-EMAIL" + x-google-jwks_uri: "https://www.googleapis.com/service_accounts/v1/jwk/YOUR-SERVICE-ACCOUNT-EMAIL" + x-google-audiences: + # This must match the "aud" field in the JWT. You can add multiple + # audiences to accept JWTs from multiple clients. + - "echo.endpoints.sample.google.com" # This section configures authentication using Google OAuth2 ID Tokens. # ID Tokens can be obtained using OAuth2 clients, and can be used to access # your API on behalf of a particular user. @@ -126,5 +122,9 @@ securityDefinitions: authorizationUrl: "" flow: "implicit" type: "oauth2" - x-issuer: "accounts.google.com" - x-jwks_uri: "https://www.googleapis.com/oauth2/v1/certs" + x-google-issuer: "accounts.google.com" + x-google-jwks_uri: "https://www.googleapis.com/oauth2/v1/certs" + x-google-audiences: + # Your OAuth2 client's Client ID must be added here. You can add + # multiple client IDs to accept tokens from multiple clients. + - "YOUR-CLIENT-ID" diff --git a/doc/testing.md b/doc/testing.md index bc9de07fd..a7db49aba 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -1,7 +1,7 @@ # Testing ESP with Bazel # ESP is built using [Bazel](http://bazel.io) build tool. Install -[Bazel](http://bazel.io) version 0.4.3, following the [Bazel +[Bazel](http://bazel.io) version 0.4.4, following the [Bazel documentation](http://bazel.io/docs/install.html). # Building ESP # diff --git a/doc/tutorial.md b/doc/tutorial.md index 55bfa0ac9..af5bf4ab8 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -23,12 +23,12 @@ On Linux, install: ## Bazel ## ESP is built using [Bazel](http://bazel.io) build tool. Install -[Bazel](http://bazel.io) version 0.4.3, following the [Bazel +[Bazel](http://bazel.io) version 0.4.4, following the [Bazel documentation](http://bazel.io/docs/install.html). *Note:* Bazel is under active development and from time to time, ESP continuous integration systems are upgraded to a new version of Bazel. Currently, ESP -requires Bazel 0.4.3. +requires Bazel 0.4.4. The version of Bazel used by ESP continuous integration systems can be found in the [linux-install-software](/script/linux-install-software) diff --git a/script/create-test-env-json b/script/create-test-env-json index 712f71ca9..d11415206 100755 --- a/script/create-test-env-json +++ b/script/create-test-env-json @@ -46,7 +46,7 @@ cat << EOF > "${TEST_ENV}" { "test": "${TEST}", "run_id": "${ID}", - "run_description": "${SUBJECT}", + "run_description": $(python -c "import json; a='${SUBJECT}'; print json.dumps(a)"), "owner": "${AUTHOR}" } EOF diff --git a/script/linux-test-vm-bookstore b/script/linux-test-vm-bookstore index 8e9897f33..19c75403f 100755 --- a/script/linux-test-vm-bookstore +++ b/script/linux-test-vm-bookstore @@ -69,7 +69,7 @@ function test_filename () { function cleanup() { # restore the original configs after we are done with the tests - git -C "${ROOT} checkout" \ + git -C "${ROOT}" checkout \ "${APP_DIR}/swagger.json" \ "${APP_DIR}/app_esp.yaml" \ "${APP_DIR}/bookstore.js" diff --git a/script/test-grpc-interop b/script/test-grpc-interop index fac0cdfed..d482d69b0 100755 --- a/script/test-grpc-interop +++ b/script/test-grpc-interop @@ -28,7 +28,12 @@ # # This script runs a grpc interop long-running test. -# It requires bazel build //test/grpc:all +# It requires bazel build following targets: +# //test/grpc:all +# @org_golang_google_grpc//stress/metrics_client +# @org_golang_google_grpc//interop/server +# @org_golang_google_grpc//stress/client +#set -x ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" . ${ROOT}/script/all-utilities \ @@ -36,9 +41,8 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" HOST='' DURATION_IN_HOUR=0 -RUN_LENGTH=120 TEST_CASES='empty_unary:10,large_unary:10,' -TEST_CASES+='empty_stream:10,client_streaming:10,half_duplex:10,ping_pong:20,server_streaming:10,' +TEST_CASES+='empty_stream:10,client_streaming:10,ping_pong:20,server_streaming:10,' TEST_CASES+='status_code_and_message:10,custom_metadata:10' while getopts :h:l:t: arg; do @@ -52,16 +56,6 @@ done [[ -n "${HOST}" ]] || error_exit 'Please specify a host with -h option.' -function print_test_metrics() { - local start_time=$(date +"%s") - while true; do - sleep 10 - local curr_time=$(date +"%s") - echo -n "QPS report at $((curr_time - start_time)) seconds:" - $ROOT/bazel-bin/test/grpc/interop-metrics-client --total_only - done -} - # Waits for the proxy and backend to start. HOST_IP=${HOST%:*} HOST_PORT=${HOST#*:} @@ -70,50 +64,52 @@ retry $ROOT/bazel-bin/test/grpc/interop-client --server_port "${HOST_PORT}" \ --server_host "${HOST_IP}" \ || error_exit 'Failed to send one request, the proxy did not start properly.' +DURATION_IN_SEC=$((DURATION_IN_HOUR * 60 * 60)) +[[ ${DURATION_IN_SEC} -gt 120 ]] || DURATION_IN_SEC=120 + echo "Starts interop stress test at $(date)." -echo "Test during is: $((DURATION_IN_SECONDS / 60)) minutes." +echo "Test during is: $((DURATION_IN_SEC / 60)) minutes." echo "Test cases are: ${TEST_CASES}" -# Start a background print job. -print_test_metrics& -PRINT_JOB=$! -trap "kill ${PRINT_JOB}" EXIT +# Start a background test client job. +$ROOT/bazel-bin/external/org_golang_google_grpc/stress/client/client \ + --server_addresses "${HOST}" \ + --num_channels_per_server 200 \ + --num_stubs_per_channel 1 \ + --test_cases "${TEST_CASES}" 2> /dev/null& +TEST_JOB=$! +trap "kill ${TEST_JOB}" EXIT START_TIME=$(date +"%s") -END_TIME=$((START_TIME + DURATION_IN_HOUR * 60 * 60)) +END_TIME=$((START_TIME + DURATION_IN_SEC)) RUN_COUNT=0 -SUCCESS_TIME=0 +FAIL_COUNT=0 detect_memory_leak_init "http://${HOST}" while true; do CURR_TIME=$(date +"%s") - echo "Test time: $((CURR_TIME - START_TIME)) seconds, success time: ${SUCCESS_TIME} seconds." ((RUN_COUNT++)) - timeout $((RUN_LENGTH + 10)) $ROOT/bazel-bin/test/grpc/interop-stress-client \ - --server_addresses "${HOST}" \ - --test_duration_secs "${RUN_LENGTH}" \ - --num_channels_per_server 200 \ - --num_stubs_per_channel 1 \ - --do_not_abort_on_transient_failures false \ - --test_cases "${TEST_CASES}" \ - && ((SUCCESS_TIME += RUN_LENGTH)) - - detect_memory_leak_check ${RUN_COUNT} + sleep 10 + METRIC_RESULT=$("$ROOT/bazel-bin/external/org_golang_google_grpc/stress/metrics_client/metrics_client" \ + --total_only --metrics_server_address=localhost:8081 2>&1) + QPS=$(echo ${METRIC_RESULT}|awk '{print $NF}') + echo "Metric report at $((CURR_TIME - START_TIME)) seconds: ${QPS} qps" + # Count non zero QPS as success. + [[ ${QPS} -gt 100 ]] || ((FAIL_COUNT++)) # Break if test has run long enough. [[ $(date +"%s") -lt ${END_TIME} ]] || break done -END_TIME=$(date +"%s") -echo "Total test time: $((END_TIME - START_TIME)) seconds, success time: ${SUCCESS_TIME} seconds at $(date)." +echo "Total test count: ${RUN_COUNT}, failed count: ${FAIL_COUNT}." -TOTAL_TIME=$((END_TIME - START_TIME)) -FAILURE_TIME=$((TOTAL_TIME - SUCCESS_TIME)) # If failure time is more than %5 of total test time, mark failed. RESULT=0 -[[ ${FAILURE_TIME} -gt $((TOTAL_TIME / 20)) ]] && RESULT=1 +if [[ ${FAIL_COUNT} -gt $((RUN_COUNT / 20)) && ${FAIL_COUNT} -gt 1 ]] ; then + RESULT=1 +fi # We fail the test if memory increase is large. detect_memory_leak_final && MEMORY_LEAK=0 || MEMORY_LEAK=1 diff --git a/script/tools/linux-install-bazel b/script/tools/linux-install-bazel index 9ec386c79..f18cce6fd 100755 --- a/script/tools/linux-install-bazel +++ b/script/tools/linux-install-bazel @@ -36,7 +36,7 @@ fi DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" . ${DIR}/all-utilities || { echo "Cannot load Bash utilities" ; exit 1 ; } -BAZEL_VERSION='0.4.3' +BAZEL_VERSION='0.4.4' BAZEL_BASE_URL='https://github.com/bazelbuild/bazel/releases/download' BAZEL_SH="bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" BAZEL_URL="${BAZEL_BASE_URL}/${BAZEL_VERSION}/${BAZEL_SH}" @@ -51,7 +51,7 @@ function update_bazel() { fi if [[ "${BAZEL_VERSION}" != "${bazel_current}" ]]; then - retry -n 3 wget -q -nc -P "${BAZEL_DIRECTORY}" "${BAZEL_URL}" \ + retry -n 3 ${SUDO} wget -q -nc -P "${BAZEL_DIRECTORY}" "${BAZEL_URL}" \ || error_exit "Could not download bazel" ${SUDO} chmod +x "${BAZEL_DIRECTORY}/${BAZEL_SH}" \ || error_exit "Could not mark bazel shell as executable" diff --git a/script/travis/install b/script/travis/install index d4204da35..631b66d9d 100755 --- a/script/travis/install +++ b/script/travis/install @@ -36,7 +36,7 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" ################################################## # Download (update the URL when upgrading Bazel) -BAZEL_INSTALLER_URL='https://github.com/bazelbuild/bazel/releases/download/0.4.3/bazel-0.4.3-installer-linux-x86_64.sh' +BAZEL_INSTALLER_URL='https://github.com/bazelbuild/bazel/releases/download/0.4.4/bazel-0.4.4-installer-linux-x86_64.sh' curl -L "${BAZEL_INSTALLER_URL}" -o ./bazel-installer.sh || \ error_exit "Failed to get the bazel installer from ${BAZEL_INSTALLER_URL}" chmod +x ./bazel-installer.sh diff --git a/src/grpc/proxy_flow.cc b/src/grpc/proxy_flow.cc index 009f37491..ef7f8ac22 100644 --- a/src/grpc/proxy_flow.cc +++ b/src/grpc/proxy_flow.cc @@ -31,6 +31,7 @@ #include "grpc/support/alloc.h" extern "C" { +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/security/util/b64.h" } @@ -127,10 +128,20 @@ namespace grpc { // transition to "DownstreamFinish" in case of error. namespace { + +const char kGrpcEncoding[] = "grpc-encoding"; +const char kGrpcAcceptEncoding[] = "grpc-accept-encoding"; + Status ProcessDownstreamHeaders( const std::multimap &headers, ::grpc::ClientContext *context) { + static grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + for (const auto &it : headers) { + if (it.first == kGrpcEncoding || it.first == kGrpcAcceptEncoding) { + // GRPC lib will add this header, so not adding it to client_context_ + continue; + } // GRPC runtime libraries use "-bin" suffix to detect binary headers and // properly apply base64 encoding & decoding as headers are sent and // received. So we decode here before passing it to GRPC runtime. @@ -140,8 +151,8 @@ Status ProcessDownstreamHeaders( continue; } ::grpc::Slice value_slice( - grpc_base64_decode_with_len(it.second.c_str(), it.second.length(), - false), + grpc_base64_decode_with_len(&exec_ctx, it.second.c_str(), + it.second.length(), false), ::grpc::Slice::STEAL_REF); std::string binary_value( reinterpret_cast(value_slice.begin()), @@ -277,11 +288,11 @@ void ProxyFlow::StartUpstreamWritesDone(std::shared_ptr flow, if (!ok) { // Upstream is not writable, call finish to get status and // and finish the call - StartUpstreamFinish(flow, Status::OK); + StartUpstreamFinish(flow); return; } if (!status.ok()) { - StartUpstreamFinish(flow, status); + StartDownstreamFinish(flow, status); return; } })); @@ -297,7 +308,7 @@ void ProxyFlow::StartUpstreamWriteMessage(std::shared_ptr flow) { if (!ok) { // Upstream is not writable, call finish to get status and // and finish the call - StartUpstreamFinish(flow, Status::OK); + StartUpstreamFinish(flow); return; } // Now that the write has completed, it's safe to start the @@ -359,7 +370,7 @@ void ProxyFlow::StartUpstreamReadMessage(std::shared_ptr flow) { &flow->upstream_to_downstream_buffer_, flow->async_grpc_queue_->MakeTag([flow](bool ok) { if (!ok) { - StartUpstreamFinish(flow, Status::OK); + StartUpstreamFinish(flow); return; } StartDownstreamWriteMessage(flow); @@ -389,8 +400,7 @@ void ProxyFlow::StartDownstreamWriteMessage(std::shared_ptr flow) { }); } -void ProxyFlow::StartUpstreamFinish(std::shared_ptr flow, - Status status) { +void ProxyFlow::StartUpstreamFinish(std::shared_ptr flow) { { std::lock_guard lock(flow->mu_); if (flow->started_upstream_finish_) { @@ -401,7 +411,7 @@ void ProxyFlow::StartUpstreamFinish(std::shared_ptr flow, flow->upstream_reader_writer_->Finish( &flow->status_from_upstream_, flow->async_grpc_queue_->MakeTag( - [flow, status](bool ok) { StartDownstreamFinish(flow, status); })); + [flow](bool ok) { StartDownstreamFinish(flow, Status::OK); })); } void ProxyFlow::StartDownstreamFinish(std::shared_ptr flow, diff --git a/src/grpc/proxy_flow.h b/src/grpc/proxy_flow.h index 3d8671cbe..33ed3b622 100644 --- a/src/grpc/proxy_flow.h +++ b/src/grpc/proxy_flow.h @@ -77,8 +77,7 @@ class ProxyFlow { std::shared_ptr flow); static void StartUpstreamReadMessage(std::shared_ptr flow); static void StartDownstreamWriteMessage(std::shared_ptr flow); - static void StartUpstreamFinish(std::shared_ptr flow, - utils::Status status); + static void StartUpstreamFinish(std::shared_ptr flow); static void StartDownstreamFinish(std::shared_ptr flow, utils::Status status); diff --git a/src/nginx/grpc_server_call.cc b/src/nginx/grpc_server_call.cc index 8ad492370..0b21958a8 100644 --- a/src/nginx/grpc_server_call.cc +++ b/src/nginx/grpc_server_call.cc @@ -26,17 +26,21 @@ #include "src/nginx/grpc_server_call.h" +#include #include #include #include "contrib/endpoints/include/api_manager/utils/status.h" #include "grpc++/support/byte_buffer.h" +#include "grpc/compression.h" #include "src/nginx/error.h" #include "src/nginx/grpc_finish.h" #include "src/nginx/module.h" #include "src/nginx/util.h" extern "C" { +#include "src/core/lib/compression/message_compress.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/http/v2/ngx_http_v2_module.h" } @@ -108,6 +112,31 @@ ngx_int_t ngx_esp_write_output(ngx_http_request_t *r, ngx_chain_t *out, return NGX_AGAIN; } +u_char kGrpcEncoding[] = "grpc-encoding"; + +grpc_compression_algorithm GetCompressionAlgorithm(ngx_http_request_t *r) { + auto header = + ngx_esp_find_headers_in(r, kGrpcEncoding, sizeof(kGrpcEncoding) - 1); + + if (header == nullptr) { + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "GetCompressionAlgorithm: algorithm not in header"); + + return grpc_compression_algorithm::GRPC_COMPRESS_NONE; + } + + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "GetCompressionAlgorithm: algorithm=%V", &header->value); + + grpc_compression_algorithm algorithm = + grpc_compression_algorithm::GRPC_COMPRESS_NONE; + grpc_compression_algorithm_parse( + reinterpret_cast(header->value.data), header->value.len, + &algorithm); + + return algorithm; +} + } // namespace NgxEspGrpcServerCall::NgxEspGrpcServerCall(ngx_http_request_t *r, @@ -488,6 +517,7 @@ void NgxEspGrpcServerCall::RunPendingRead() { } bool NgxEspGrpcServerCall::TryReadDownstreamMessage() { + static grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; // From http://www.grpc.io/docs/guides/wire.html, a GRPC message is: // * A one-byte compressed-flag // * A four-byte message length @@ -508,7 +538,7 @@ bool NgxEspGrpcServerCall::TryReadDownstreamMessage() { return false; } - // TODO: Implement compressed-flag + uint8_t compressed_flag = GetByte(downstream_slices_, 0); // Decode the length. Note that this is in network byte order. uint32_t msglen = 0; @@ -561,11 +591,43 @@ bool NgxEspGrpcServerCall::TryReadDownstreamMessage() { // the 'slices' vector (which will drop those reference counts as // the vector is destroyed). std::vector<::grpc::Slice> slices; - slices.reserve(it - downstream_slices_.begin()); - std::transform(downstream_slices_.begin(), it, std::back_inserter(slices), - [](gpr_slice &slice) { - return ::grpc::Slice(slice, ::grpc::Slice::STEAL_REF); - }); + + if (compressed_flag == 1) { + gpr_slice_buffer input; + gpr_slice_buffer_init(&input); + gpr_slice_buffer_addn(&input, downstream_slices_.data(), + it - downstream_slices_.begin()); + + gpr_slice_buffer output; + gpr_slice_buffer_init(&output); + + if (grpc_msg_decompress(&exec_ctx, GetCompressionAlgorithm(r_), &input, + &output) != 1) { + gpr_slice_buffer_destroy(&input); + gpr_slice_buffer_destroy(&output); + CompletePendingRead(false, + utils::Status(google::protobuf::util::error::INTERNAL, + "Failed to decompress GRPC message", + utils::Status::INTERNAL)); + + return true; + } + + slices.reserve(output.count); + std::transform(output.slices, output.slices + output.count, + std::back_inserter(slices), [](gpr_slice &slice) { + return ::grpc::Slice(slice, ::grpc::Slice::ADD_REF); + }); + + gpr_slice_buffer_destroy(&input); + gpr_slice_buffer_destroy(&output); + } else { + slices.reserve(it - downstream_slices_.begin()); + std::transform(downstream_slices_.begin(), it, std::back_inserter(slices), + [](gpr_slice &slice) { + return ::grpc::Slice(slice, ::grpc::Slice::STEAL_REF); + }); + } // Write the message byte buffer (giving the ByteBuffer its own // reference counts). diff --git a/src/nginx/t/ApiManager.pm b/src/nginx/t/ApiManager.pm index 94d5e021d..0f5318ab5 100644 --- a/src/nginx/t/ApiManager.pm +++ b/src/nginx/t/ApiManager.pm @@ -327,7 +327,7 @@ sub grpc_test_server { sub grpc_interop_server { my ($t, $port) = @_; - my $server = './test/grpc/interop-server'; + my $server = './external/org_golang_google_grpc/interop/server/server'; exec $server, "--port", $port; } diff --git a/src/nginx/t/BUILD b/src/nginx/t/BUILD index 02b2e5926..b0effdcd6 100644 --- a/src/nginx/t/BUILD +++ b/src/nginx/t/BUILD @@ -103,6 +103,7 @@ nginx_suite( "grpc_auth_pkey.t", "grpc_call_flow_control.t", "grpc_cloud_trace.t", + "grpc_compression.t", "grpc_config_addr.t", "grpc_downstream_flow_control.t", "grpc_errors.t", @@ -128,7 +129,7 @@ nginx_suite( size = "small", data = [ "//test/grpc:interop-client", - "//test/grpc:interop-server", + "@org_golang_google_grpc//interop/server", ], nginx = "//src/nginx/main:nginx-esp", tests = [ @@ -180,6 +181,7 @@ nginx_suite( "cors.t", "cors_disabled.t", "failed_check.t", + "fail_wrong_api_key.t", "metadata.t", "metadata_fail.t", "metadata_timeout.t", diff --git a/src/nginx/t/check_no_consumer.t b/src/nginx/t/check_no_consumer.t index c08f24f01..803e9f79b 100644 --- a/src/nginx/t/check_no_consumer.t +++ b/src/nginx/t/check_no_consumer.t @@ -131,7 +131,6 @@ my $expected_report_body = ServiceControl::gen_report_body({ 'serviceName' => 'endpoints-test.cloudendpointsapis.com', 'url' => '/shelves?key=this-is-an-api-key', 'location' => 'us-central1', - 'api_key' => 'this-is-an-api-key', 'api_method' => 'ListShelves', 'http_method' => 'GET', 'log_message' => 'Method: ListShelves', diff --git a/src/nginx/t/fail_wrong_api_key.t b/src/nginx/t/fail_wrong_api_key.t new file mode 100644 index 000000000..70810b13c --- /dev/null +++ b/src/nginx/t/fail_wrong_api_key.t @@ -0,0 +1,192 @@ +# Copyright (C) Extensible Service Proxy Authors +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +################################################################################ +# +use strict; +use warnings; + +################################################################################ + +use src::nginx::t::ApiManager; # Must be first (sets up import path to the Nginx test module) +use src::nginx::t::HttpServer; +use src::nginx::t::ServiceControl; +use Test::Nginx; # Imports Nginx's test module +use Test::More; # And the test framework + +################################################################################ + +# Port assignments +my $NginxPort = ApiManager::pick_port(); +my $BackendPort = ApiManager::pick_port(); +my $ServiceControlPort = ApiManager::pick_port(); + +my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(18); + +# Save service name in the service configuration protocol buffer file. +my $config = ApiManager::get_bookstore_service_config_allow_unregistered . <<"EOF"; +control { + environment: "http://127.0.0.1:${ServiceControlPort}" +} +EOF +$t->write_file('service.pb.txt', $config); + +ApiManager::write_file_expand($t, 'nginx.conf', <<"EOF"); +%%TEST_GLOBALS%% +daemon off; +events { + worker_connections 32; +} +http { + %%TEST_GLOBALS_HTTP%% + server_tokens off; + server { + listen 127.0.0.1:${NginxPort}; + server_name localhost; + location / { + endpoints { + api service.pb.txt; + %%TEST_CONFIG%% + on; + } + proxy_pass http://127.0.0.1:${BackendPort}; + } + } +} +EOF + +$t->run_daemon(\&bookstore, $t, $BackendPort, 'bookstore.log'); +$t->run_daemon(\&servicecontrol, $t, $ServiceControlPort, 'servicecontrol.log'); + +is($t->waitforsocket("127.0.0.1:${BackendPort}"), 1, 'Bookstore socket ready.'); +is($t->waitforsocket("127.0.0.1:${ServiceControlPort}"), 1, 'Service control socket ready.'); + +$t->run(); + +################################################################################ + +# Use different api_key so service_control will not use its cache. +my $response1 = ApiManager::http_get($NginxPort,'/shelves?key=this-is-an-api-key1'); +my $response2 = ApiManager::http_get($NginxPort,'/shelves?key=this-is-an-api-key2'); + +$t->stop_daemons(); + +like($response1, qr/HTTP\/1\.1 403 Forbidden/, 'Response1 returned HTTP 403.'); +like($response1, qr/content-type: application\/json/i, + 'Forbidden has application/json body.'); +like($response1, qr/API endpoints-test.cloudendpointsapis.com is not enabled for the project/i, + "Error body contains 'activation error'."); + +like($response2, qr/HTTP\/1\.1 400 Bad Request/, 'Response2 returned HTTP 400.'); +like($response2, qr/content-type: application\/json/i, + 'Forbidden has application/json body.'); +like($response2, qr/API key not valid/i, + "Error body contains 'API key error'."); + + +my $bookstore_requests = $t->read_file('bookstore.log'); +is($bookstore_requests, '', 'Request did not reach the backend.'); + +my @servicecontrol_requests = ApiManager::read_http_stream($t, 'servicecontrol.log'); +is(scalar @servicecontrol_requests, 2, 'Service control received 2 request.'); + +# :check #1 +my $r = shift @servicecontrol_requests; +is($r->{verb}, 'POST', ':check 1 was a post'); +is($r->{uri}, '/v1/services/endpoints-test.cloudendpointsapis.com:check', + ':check 1 uri is correct'); +is($r->{headers}->{host}, "127.0.0.1:${ServiceControlPort}", ':check 1 Host header was set.'); +is($r->{headers}->{'content-type'}, 'application/x-protobuf', ':check 1 Content-Type is protocol buffer.'); + +# :check #2 +$r = shift @servicecontrol_requests; +is($r->{verb}, 'POST', ':check 2 was a post'); +is($r->{uri}, '/v1/services/endpoints-test.cloudendpointsapis.com:check', + ':check 2 uri is correct'); +is($r->{headers}->{host}, "127.0.0.1:${ServiceControlPort}", ':check 2 Host header was set.'); +is($r->{headers}->{'content-type'}, 'application/x-protobuf', ':check 2 Content-Type is protocol buffer.'); + +################################################################################ + +sub bookstore { + my ($t, $port, $file) = @_; + my $server = HttpServer->new($port, $t->testdir() . '/' . $file) + or die "Can't create test server socket: $!\n"; + local $SIG{PIPE} = 'IGNORE'; + + # Do not initialize any server state, requests won't reach backend anyway. + + $server->run(); +} + +sub servicecontrol { + my ($t, $port, $file) = @_; + my $server = HttpServer->new($port, $t->testdir() . '/' . $file) + or die "Can't create test server socket: $!\n"; + local $SIG{PIPE} = 'IGNORE'; + + # This is normal 200 HTTP response with error in CheckResponse Json + my $proto_response1 = ServiceControl::convert_proto(<<'EOF', 'check_response', 'binary'); +{ + "operationId": "ListShelves:7b3f4c4f-f29c-4391-b35e-0a676427fec8", + "checkErrors": [ + { + "code": "SERVICE_NOT_ACTIVATED", + "detail": "Project has not activated the endpoints-test.cloudendpointsapis.com API." + } + ] +} +EOF + + $server->on('POST', '/v1/services/endpoints-test.cloudendpointsapis.com:check', <<'EOF' . $proto_response1); +HTTP/1.1 200 OK +Connection: close + +EOF + + # This is normal 200 HTTP response with error in api key + my $proto_response2 = ServiceControl::convert_proto(<<'EOF', 'check_response', 'binary'); +{ + "operationId": "ListShelves:7b3f4c4f-f29c-4391-b35e-0a676427fec9", + "checkErrors": [ + { + "code": "API_KEY_INVALID", + "detail": "API is not valid." + } + ] +} +EOF + + $server->on('POST', '/v1/services/endpoints-test.cloudendpointsapis.com:check', <<'EOF' . $proto_response2); +HTTP/1.1 200 OK +Connection: close + +EOF + + + + $server->run(); +} + +################################################################################ \ No newline at end of file diff --git a/src/nginx/t/grpc_api_key.t b/src/nginx/t/grpc_api_key.t index 7c25cfe7f..7a2a31c82 100644 --- a/src/nginx/t/grpc_api_key.t +++ b/src/nginx/t/grpc_api_key.t @@ -135,8 +135,8 @@ my $expected_report_body = ServiceControl::gen_report_body({ 'http_method' => 'POST', 'log_message' => 'Method: test.grpc.Test.Echo', 'response_code' => '200', - 'request_size' => ($^O eq 'darwin' ? 313 : 315), - 'request_bytes' => ($^O eq 'darwin' ? 313 : 315), + 'request_size' => ($^O eq 'darwin' ? 305 : 307), + 'request_bytes' => ($^O eq 'darwin' ? 305 : 307), 'streaming_request_message_counts' => 1, 'streaming_response_message_counts' => 1, }); diff --git a/src/nginx/t/grpc_auth_pkey.t b/src/nginx/t/grpc_auth_pkey.t index 00184ad41..b47b444d0 100644 --- a/src/nginx/t/grpc_auth_pkey.t +++ b/src/nginx/t/grpc_auth_pkey.t @@ -134,6 +134,7 @@ plans { request { text: "Hello, world!" } + expected_metadata_keys: ["x-endpoint-api-userinfo"] } } EOF @@ -157,6 +158,10 @@ results { echo { text: "Hello, world!" } + additional_metadata { + key: "x-endpoint-api-userinfo" + value: "eyJpc3N1ZXIiOiI2Mjg2NDU3NDE4ODEtbm9hYml1MjNmNWE4bThvdmQ4dWN2Njk4bGo3OHZ2MGxAZGV2ZWxvcGVyLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJpZCI6IjYyODY0NTc0MTg4MS1ub2FiaXUyM2Y1YThtOG92ZDh1Y3Y2OThsajc4dnYwbEBkZXZlbG9wZXIuZ3NlcnZpY2VhY2NvdW50LmNvbSJ9" + } } EOF is($test_results, $test_results_expected, 'Client tests completed as expected.'); diff --git a/src/nginx/t/grpc_compression.t b/src/nginx/t/grpc_compression.t new file mode 100644 index 000000000..3781fe444 --- /dev/null +++ b/src/nginx/t/grpc_compression.t @@ -0,0 +1,175 @@ +# Copyright (C) Extensible Service Proxy Authors +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +################################################################################ +# +use strict; +use warnings; + +################################################################################ + +use src::nginx::t::ApiManager; # Must be first (sets up import path to the Nginx test module) +use src::nginx::t::HttpServer; +use src::nginx::t::ServiceControl; +use Test::Nginx; # Imports Nginx's test module +use Test::More; # And the test framework + +################################################################################ + +# Port assignments +my $ServiceControlPort = ApiManager::pick_port(); +my $Http2NginxPort = ApiManager::pick_port(); +my $GrpcBackendPort = ApiManager::pick_port(); +my $GrpcFallbackPort = ApiManager::pick_port(); + +my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(9); +$t->write_file('service.pb.txt', + ApiManager::get_grpc_test_service_config($GrpcBackendPort) . + ApiManager::read_test_file('testdata/logs_metrics.pb.txt') . <<"EOF"); +control { + environment: "http://127.0.0.1:${ServiceControlPort}" +} +EOF + +ApiManager::write_file_expand($t, 'nginx.conf', <<"EOF"); +%%TEST_GLOBALS%% +daemon off; +events { + worker_connections 32; +} +http { + %%TEST_GLOBALS_HTTP%% + server { + listen 127.0.0.1:${Http2NginxPort} http2; + server_name localhost; + location / { + endpoints { + api service.pb.txt; + %%TEST_CONFIG%% + on; + } + grpc_pass 127.0.0.2:${GrpcFallbackPort}; + } + } +} +EOF + +my $report_done = 'report_done'; + +$t->run_daemon(\&service_control, $t, $ServiceControlPort, 'servicecontrol.log', $report_done); +$t->run_daemon(\&ApiManager::grpc_test_server, $t, "127.0.0.1:${GrpcBackendPort}"); +is($t->waitforsocket("127.0.0.1:${ServiceControlPort}"), 1, 'Service control socket ready.'); +is($t->waitforsocket("127.0.0.1:${GrpcBackendPort}"), 1, 'GRPC test server socket ready.'); +$t->run(); +is($t->waitforsocket("127.0.0.1:${Http2NginxPort}"), 1, 'Nginx socket ready.'); + +################################################################################ +my $test_results = &ApiManager::run_grpc_test($t, <<"EOF"); +server_addr: "127.0.0.1:${Http2NginxPort}" +plans { + echo { + call_config { + api_key: "this-is-an-api-key" + compression: GZIP + } + request { + text: "This text must be long enough for GRPC library compress it. ______________________________________________________________" + } + } +} +EOF + +is($t->waitforfile("$t->{_testdir}/${report_done}"), 1, 'Report body file ready.'); +$t->stop_daemons(); + +my $test_results_expected = <<'EOF'; +results { + echo { + text: "This text must be long enough for GRPC library compress it. ______________________________________________________________" + } +} +EOF +is($test_results, $test_results_expected, 'Client tests completed as expected.'); + +my @servicecontrol_requests = ApiManager::read_http_stream($t, 'servicecontrol.log'); +is(scalar @servicecontrol_requests, 2, 'Service control was called twice'); + +# :check +my $r = shift @servicecontrol_requests; +like($r->{uri}, qr/:check$/, 'First call was a :check'); + +# :report +$r = shift @servicecontrol_requests; +like($r->{uri}, qr/:report$/, 'Second call was a :report'); + +my $report_body = ServiceControl::convert_proto($r->{body}, 'report_request', 'json'); +my $expected_report_body = ServiceControl::gen_report_body({ + 'serviceName' => 'endpoints-grpc-test.cloudendpointsapis.com', + 'api_method' => 'test.grpc.Test.Echo', + 'url' => '/test.grpc.Test/Echo', + 'protocol' => 'grpc', + 'api_key' => 'this-is-an-api-key', + 'api_name' => 'test.grpc.Test', + 'producer_project_id' => 'endpoints-grpc-test', + 'location' => 'us-central1', + 'http_method' => 'POST', + 'log_message' => 'Method: test.grpc.Test.Echo', + 'response_code' => '200', + 'request_size' => ($^O eq 'darwin' ? 371 : 373), + 'request_bytes' => ($^O eq 'darwin' ? 371 : 373), + 'streaming_request_message_counts' => 1, + 'streaming_response_message_counts' => 1, + }); +ok(ServiceControl::compare_http2_report_json($report_body, $expected_report_body), 'Report body is received.'); + +################################################################################ + +sub service_control { + my ($t, $port, $file, $done) = @_; + my $server = HttpServer->new($port, $t->testdir() . '/' . $file) + or die "Can't create test server socket: $!\n"; + + $server->on_sub('POST', '/v1/services/endpoints-grpc-test.cloudendpointsapis.com:check', sub { + my ($headers, $body, $client) = @_; + print $client <<'EOF'; +HTTP/1.1 200 OK +Connection: close + +EOF + }); + + $server->on_sub('POST', '/v1/services/endpoints-grpc-test.cloudendpointsapis.com:report', sub { + my ($headers, $body, $client) = @_; + print $client <<'EOF'; +HTTP/1.1 200 OK +Connection: close + +EOF + $t->write_file($done, ':report done'); + }); + + $server->run(); +} + +################################################################################ diff --git a/src/nginx/t/grpc_interop_cancel.t b/src/nginx/t/grpc_interop_cancel.t index 4874ba24f..3f4dd5aa4 100644 --- a/src/nginx/t/grpc_interop_cancel.t +++ b/src/nginx/t/grpc_interop_cancel.t @@ -91,7 +91,7 @@ my @test_cases = ( foreach my $case (@test_cases) { my $result = &ApiManager::run_grpc_interop_test($t, $Http2NginxPort, - $case, '--global_metadata', 'x-api-key:api-key'); + $case, '--api_key', 'api-key'); is($result, 0, "${case} test completed as expected."); } diff --git a/src/nginx/t/grpc_interop_metadata.t b/src/nginx/t/grpc_interop_metadata.t index dba832e05..88c4f2731 100644 --- a/src/nginx/t/grpc_interop_metadata.t +++ b/src/nginx/t/grpc_interop_metadata.t @@ -89,8 +89,9 @@ my @test_cases = ( ); foreach my $case (@test_cases) { + <>; my $result = &ApiManager::run_grpc_interop_test($t, $Http2NginxPort, - $case, '--global_metadata', 'x-api-key:api-key'); + $case, '--api_key', 'api-key'); is($result, 0, "${case} test completed as expected."); } diff --git a/src/nginx/t/grpc_interop_status.t b/src/nginx/t/grpc_interop_status.t index 8f4c5fc5c..97f576149 100644 --- a/src/nginx/t/grpc_interop_status.t +++ b/src/nginx/t/grpc_interop_status.t @@ -90,7 +90,7 @@ my @test_cases = ( foreach my $case (@test_cases) { my $result = &ApiManager::run_grpc_interop_test($t, $Http2NginxPort, - $case, '--global_metadata', 'x-api-key:api-key'); + $case, '--api_key', 'api-key'); is($result, 0, "${case} test completed as expected."); } diff --git a/src/nginx/t/grpc_interop_streaming.t b/src/nginx/t/grpc_interop_streaming.t index 5345e0a50..f5bef4722 100644 --- a/src/nginx/t/grpc_interop_streaming.t +++ b/src/nginx/t/grpc_interop_streaming.t @@ -87,14 +87,14 @@ is($t->waitforsocket("127.0.0.1:${Http2NginxPort}"), 1, 'Nginx socket ready.'); my @test_cases = ( 'client_streaming', 'empty_stream', - 'half_duplex', 'ping_pong', 'server_streaming', + 'timeout_on_sleeping_server', ); foreach my $case (@test_cases) { my $result = &ApiManager::run_grpc_interop_test($t, $Http2NginxPort, - $case, '--global_metadata', 'x-api-key:api-key'); + $case, '--api_key', 'api-key'); is($result, 0, "${case} test completed as expected."); } diff --git a/src/nginx/t/grpc_interop_unary.t b/src/nginx/t/grpc_interop_unary.t index 7f1360dd1..1b665dae2 100644 --- a/src/nginx/t/grpc_interop_unary.t +++ b/src/nginx/t/grpc_interop_unary.t @@ -91,7 +91,7 @@ my @test_cases = ( foreach my $case (@test_cases) { my $result = &ApiManager::run_grpc_interop_test($t, $Http2NginxPort, - $case, '--global_metadata', 'x-api-key:api-key'); + $case, '--api_key', 'api-key'); is($result, 0, "${case} test completed as expected."); } diff --git a/src/nginx/t/grpc_streaming.t b/src/nginx/t/grpc_streaming.t index 77336b09f..fcf3c0004 100644 --- a/src/nginx/t/grpc_streaming.t +++ b/src/nginx/t/grpc_streaming.t @@ -138,8 +138,8 @@ my $expected_report_body = ServiceControl::gen_report_body({ 'http_method' => 'POST', 'log_message' => 'Method: test.grpc.Test.EchoStream', 'response_code' => '200', - 'request_size' => ($^O eq 'darwin' ? 499 : 501), - 'request_bytes' => ($^O eq 'darwin' ? 499 : 501), + 'request_size' => ($^O eq 'darwin' ? 491 : 493), + 'request_bytes' => ($^O eq 'darwin' ? 491 : 493), 'streaming_request_message_counts' => 10, 'streaming_response_message_counts' => 10, }); diff --git a/src/nginx/t/transcoding_metadata.t b/src/nginx/t/transcoding_metadata.t index 92edbbf1d..b8fb1d23e 100644 --- a/src/nginx/t/transcoding_metadata.t +++ b/src/nginx/t/transcoding_metadata.t @@ -30,6 +30,7 @@ use warnings; ################################################################################ use src::nginx::t::ApiManager; # Must be first (sets up import path to the Nginx test module) +use src::nginx::t::Auth; use src::nginx::t::HttpServer; use src::nginx::t::ServiceControl; use Test::Nginx; # Imports Nginx's test module @@ -42,8 +43,9 @@ use JSON::PP; my $NginxPort = ApiManager::pick_port(); my $ServiceControlPort = ApiManager::pick_port(); my $GrpcServerPort = ApiManager::pick_port(); +my $PubkeyPort = ApiManager::pick_port(); -my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(7); +my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(8); $t->write_file('service.pb.txt', ApiManager::get_grpc_test_service_config($GrpcServerPort) . @@ -51,6 +53,20 @@ $t->write_file('service.pb.txt', control { environment: "http://127.0.0.1:${ServiceControlPort}" } +authentication { + providers { + id: "test_auth" + issuer: "628645741881-noabiu23f5a8m8ovd8ucv698lj78vv0l\@developer.gserviceaccount.com" + jwks_uri: "http://127.0.0.1:${PubkeyPort}/pubkey" + } + rules { + selector: "test.grpc.Test.Echo" + requirements { + provider_id: "test_auth" + audiences: "ok_audience_1,ok_audience_2" + } + } +} EOF $t->write_file_expand('nginx.conf', <run_daemon(\&pubkey, $t, $PubkeyPort, $pkey_jwk, 'pubkey.log'); $t->run_daemon(\&service_control, $t, $ServiceControlPort, 'servicecontrol.log'); $t->run_daemon(\&ApiManager::grpc_test_server, $t, "127.0.0.1:${GrpcServerPort}"); @@ -100,6 +120,7 @@ my $content_length = length($request); my $response = ApiManager::http($NginxPort,<stop_daemons(); my ($headers, $actual_body) = split /\r\n\r\n/, $response, 2; my $json_response = decode_json($actual_body); +my $expected_userinfo = "ZXlKcGMzTjFaWElpT2lJMk1qZzJORFUzTkRFNE9ERXRibTloWW1sMU1qTm1OV0U0YlRodmRtUTRkV04yTmprNGJHbzNPSFoyTUd4QVpHVjJaV3h2Y0dWeUxtZHpaWEoyYVdObFlXTmpiM1Z1ZEM1amIyMGlMQ0pwWkNJNklqWXlPRFkwTlRjME1UZzRNUzF1YjJGaWFYVXlNMlkxWVRodE9HOTJaRGgxWTNZMk9UaHNhamM0ZG5Zd2JFQmtaWFpsYkc5d1pYSXVaM05sY25acFkyVmhZMk52ZFc1MExtTnZiU0o5"; is('dGV4dA==', $json_response->{receivedMetadata}->{'client-text'}, "Received client-text metadata"); is('YmluYXJ5', $json_response->{receivedMetadata}->{'client-binary-bin'}, "Received client-binary metadata"); +is($expected_userinfo, $json_response->{receivedMetadata}->{'x-endpoint-api-userinfo'}, "Received x-endpoint-api-userinfo"); + like($headers, qr/initial-text: text/, "Server returns initial text metadata"); like($headers, qr/initial-binary-bin: YmluYXJ5/, "Server returns initial binary metadata"); @@ -143,3 +167,20 @@ EOF } ################################################################################ + +sub pubkey { + my ($t, $port, $pkey, $file) = @_; + my $server = HttpServer->new($port, $t->testdir() . '/' . $file) + or die "Can't create test server socket: $!\n"; + local $SIG{PIPE} = 'IGNORE'; + + $server->on('GET', '/pubkey', <<"EOF"); +HTTP/1.1 200 OK +Connection: close + +$pkey +EOF + + $server->run(); +} + diff --git a/src/nginx/version b/src/nginx/version index 9084fa2f7..26aaba0e8 100644 --- a/src/nginx/version +++ b/src/nginx/version @@ -1 +1 @@ -1.1.0 +1.2.0 diff --git a/test/bookstore/swagger.json b/test/bookstore/swagger.json index f5f4ec66c..8241b6ec0 100644 --- a/test/bookstore/swagger.json +++ b/test/bookstore/swagger.json @@ -91,23 +91,18 @@ "description": "get message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences":[] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.echo.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] }, @@ -122,23 +117,18 @@ "description": "post message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences":[] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.echo.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] } @@ -185,52 +175,34 @@ } } }, - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [], + "api_key": [] }, { - "google_identity_toolkit": { - "audiences": [] - } + "google_identity_toolkit": [], + "api_key": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [], + "api_key": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [], + "api_key": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] } @@ -260,55 +232,27 @@ } } }, - "security": [], - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [] }, { - "google_identity_toolkit": { - "audiences": [ - "esp-test-client" - ] - } + "google_identity_toolkit": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [] } ] }, @@ -426,54 +370,34 @@ } } }, - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [], + "api_key": [] }, { - "google_identity_toolkit": { - "audiences": [ - "esp-test-client" - ] - } + "google_identity_toolkit": [], + "api_key": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [], + "api_key": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [], + "api_key": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] }, @@ -608,50 +532,55 @@ "authorizationUrl": "https://esp-jwk.auth0.com/authorize", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://esp-jwk.auth0.com/", - "x-jwks_uri": "https://esp-jwk.auth0.com/.well-known/jwks.json" + "x-google-issuer": "https://esp-jwk.auth0.com/", + "x-google-jwks_uri": "https://esp-jwk.auth0.com/.well-known/jwks.json", + "x-google-audiences": "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" }, "auth0_symmetric": { "authorizationUrl": "https://esp-symmetric.auth0.com/authorize", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://esp-symmetric.auth0.com/", - "x-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-https_esp-symmetric_auth0_com" + "x-google-issuer": "https://esp-symmetric.auth0.com/", + "x-google-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-https_esp-symmetric_auth0_com", + "x-google-audiences" : "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" }, "google_id_token": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://accounts.google.com", - "x-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs" + "x-google-issuer": "https://accounts.google.com", + "x-google-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs", + "x-google-audiences": "848149964201.apps.googleusercontent.com, 841077041629.apps.googleusercontent.com, 488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com, 488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" }, "google_identity_toolkit": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://securetoken.google.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com" + "x-google-issuer": "https://securetoken.google.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com", + "x-google-audiences": "esp-test-client" }, "test_jwk": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" + "x-google-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" }, "test_symmetric": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://test.esp.client", - "x-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-test_esp_client" + "x-google-issuer": "https://test.esp.client", + "x-google-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-test_esp_client", + "x-google-audiences": "test.echo.audience, test.esp.audience" }, "test_x509": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com" + "x-google-issuer": "23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com" } } } diff --git a/test/bookstore/swagger_template.json b/test/bookstore/swagger_template.json index 95213693b..2fc63b4e1 100644 --- a/test/bookstore/swagger_template.json +++ b/test/bookstore/swagger_template.json @@ -91,23 +91,18 @@ "description": "get message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences":[] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.echo.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] }, @@ -122,23 +117,18 @@ "description": "post message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences":[] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.echo.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] } @@ -185,52 +175,34 @@ } } }, - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [], + "api_key": [] }, { - "google_identity_toolkit": { - "audiences": [] - } + "google_identity_toolkit": [], + "api_key": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [], + "api_key": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [], + "api_key": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] } @@ -260,55 +232,27 @@ } } }, - "security": [], - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [] }, { - "google_identity_toolkit": { - "audiences": [ - "esp-test-client" - ] - } + "google_identity_toolkit": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [] } ] }, @@ -426,54 +370,34 @@ } } }, - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [], + "api_key": [] }, { - "google_identity_toolkit": { - "audiences": [ - "esp-test-client" - ] - } + "google_identity_toolkit": [], + "api_key": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [], + "api_key": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [], + "api_key": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] }, @@ -608,50 +532,55 @@ "authorizationUrl": "https://esp-jwk.auth0.com/authorize", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://esp-jwk.auth0.com/", - "x-jwks_uri": "https://esp-jwk.auth0.com/.well-known/jwks.json" + "x-google-issuer": "https://esp-jwk.auth0.com/", + "x-google-jwks_uri": "https://esp-jwk.auth0.com/.well-known/jwks.json", + "x-google-audiences": "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" }, "auth0_symmetric": { "authorizationUrl": "https://esp-symmetric.auth0.com/authorize", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://esp-symmetric.auth0.com/", - "x-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-https_esp-symmetric_auth0_com" + "x-google-issuer": "https://esp-symmetric.auth0.com/", + "x-google-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-https_esp-symmetric_auth0_com", + "x-google-audiences": "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" }, "google_id_token": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://accounts.google.com", - "x-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs" + "x-google-issuer": "https://accounts.google.com", + "x-google-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs", + "x-google-audiences": "848149964201.apps.googleusercontent.com, 841077041629.apps.googleusercontent.com, 488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com, 488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" }, "google_identity_toolkit": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://securetoken.google.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com" + "x-google-issuer": "https://securetoken.google.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com", + "x-google-audiences": "esp-test-client" }, "test_jwk": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" + "x-google-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" }, "test_symmetric": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://test.esp.client", - "x-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-test_esp_client" + "x-google-issuer": "https://test.esp.client", + "x-google-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-test_esp_client", + "x-google-audiences": "test.echo.audience, test.esp.audience" }, "test_x509": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com" + "x-google-issuer": "23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com" } } } diff --git a/test/client/esp_client.py b/test/client/esp_client.py index 4c6bfeb2d..35efda904 100755 --- a/test/client/esp_client.py +++ b/test/client/esp_client.py @@ -118,10 +118,12 @@ def count_failed_requests(out): """ Count failed and non-2xx responses """ failed = 0 non2xx = 0 + completed = 0 for metrics, _, _ in out: failed += metrics.get('Failed requests', [0])[0] non2xx += metrics.get('Non-2xx responses', [0])[0] - return failed, non2xx + completed += metrics.get('Complete requests', [0])[0] + return failed, non2xx, completed if __name__ == "__main__": try: @@ -186,8 +188,8 @@ def count_failed_requests(out): if FLAGS.test_env: esp_perfkit_publisher.Publish(results, test_env) - failed, non2xx = count_failed_requests(results) - if failed + non2xx > 0: + failed, non2xx, completed = count_failed_requests(results) + if failed + non2xx > 0.005 * completed: sys.exit( ('Load test failed:\n' ' {} failed requests,\n' diff --git a/test/echo/echo.json b/test/echo/echo.json index 1bcf5e4e3..3cbe6ff73 100644 --- a/test/echo/echo.json +++ b/test/echo/echo.json @@ -16,22 +16,23 @@ "type": "oauth2", "authorizationUrl": "", "flow": "implicit", - "x-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" + "x-google-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" }, "test_x509": { "type": "oauth2", "authorizationUrl": "", "flow": "implicit", - "x-issuer": "account-1@esp-echo.iam.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/account-1@esp-echo.iam.gserviceaccount.com" + "x-google-issuer": "account-1@esp-echo.iam.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/account-1@esp-echo.iam.gserviceaccount.com" }, "test_symmetric": { "type": "oauth2", "authorizationUrl": "", "flow": "implicit", - "x-issuer": "https://test.echo.client", - "x-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-test_echo_client" + "x-google-issuer": "https://test.echo.client", + "x-google-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-test_echo_client", + "x-google-audiences": "test.echo.audience" } }, "security": [ @@ -124,23 +125,18 @@ "description": "get message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences":[] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.echo.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] }, @@ -155,23 +151,18 @@ "description": "post message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences":[] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.echo.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] } diff --git a/test/echo/swagger.json b/test/echo/swagger.json index 8bb863fae..f66c42522 100644 --- a/test/echo/swagger.json +++ b/test/echo/swagger.json @@ -91,13 +91,10 @@ "description": "get message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences": [ - "echo-${MY_PROJECT_ID}.appspot.com" - ] - } + "test_jwk": [], + "api_key": [] } ] }, @@ -112,13 +109,10 @@ "description": "post message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[ - "echo-${MY_PROJECT_ID}.appspot.com" - ] - } + "test_jwk": [], + "api_key": [] } ] } @@ -169,8 +163,9 @@ "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" + "x-google-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com", + "x-google-audiences": "echo-${MY_PROJECT_ID}.appspot.com" } } } diff --git a/test/grpc/BUILD b/test/grpc/BUILD index b2191e5fb..64556bc49 100644 --- a/test/grpc/BUILD +++ b/test/grpc/BUILD @@ -72,16 +72,13 @@ genrule( name = "grpc-interop_descriptor", srcs = [ "@protobuf_git//:well_known_protos", - "@grpc_test_git//:src/proto/grpc/testing/test.proto", - "@grpc_test_git//:src/proto/grpc/testing/empty.proto", - "@grpc_test_git//:src/proto/grpc/testing/messages.proto", + "@org_golang_google_grpc//interop/grpc_testing:go_default_library_protos", ], outs = ["grpc-interop.descriptor"], cmd = """$(location //external:protoc) \ - $(location @grpc_test_git//:src/proto/grpc/testing/test.proto) \ + $(location @org_golang_google_grpc//interop/grpc_testing:go_default_library_protos) \ + -I$$(dirname $(location @org_golang_google_grpc//interop/grpc_testing:go_default_library_protos)) \ -Iexternal/protobuf_git/src \ - -I$$(dirname $(location @grpc_test_git//:src/proto/grpc/testing/test.proto))/../../../.. \ - -I$$(dirname $(location @grpc_test_git//:src/proto/grpc/testing/test.proto)) \ --include_imports --descriptor_set_out=$@""", tools = ["//external:protoc"], ) @@ -96,6 +93,7 @@ cc_library( deps = [ ":grpc-test_proto", "//external:api_manager_utils", + "//external:grpc++", ], ) @@ -124,41 +122,34 @@ cc_binary( name = "grpc-test-server", testonly = 1, srcs = ["grpc-test-server.cc"], - deps = [":grpc-test_proto"], -) - -cc_binary( - name = "interop-server", - testonly = 1, deps = [ - "@grpc_test_git//:interop_server_main", + ":grpc-test_proto", + "//external:grpc++", ], ) -cc_binary( - name = "interop-stress-client", - testonly = 1, - deps = [ - "@grpc_test_git//:stress_test", - ], +load( + "@io_bazel_rules_go//go:def.bzl", + "go_prefix", + "go_binary", ) -cc_binary( - name = "interop-metrics-client", - testonly = 1, - deps = [ - "@grpc_test_git//:metrics_client", - ], -) +go_prefix("github.com/cloudendpoints/esp/test/grpc") -cc_binary( +go_binary( name = "interop-client", - testonly = 1, srcs = [ - "interop-client.cc", + "interop-client.go", ], + go_prefix = ":go_prefix", deps = [ - "@grpc_test_git//:interop_client_main", + "@org_golang_google_grpc//:go_default_library", + "@org_golang_google_grpc//credentials:go_default_library", + "@org_golang_google_grpc//credentials/oauth:go_default_library", + "@org_golang_google_grpc//grpclog:go_default_library", + "@org_golang_google_grpc//interop:go_default_library", + "@org_golang_google_grpc//interop/grpc_testing:go_default_library", + "@org_golang_x_net//context:go_default_library", ], ) diff --git a/test/grpc/client-test-lib.cc b/test/grpc/client-test-lib.cc index f638b2296..eb85ee204 100644 --- a/test/grpc/client-test-lib.cc +++ b/test/grpc/client-test-lib.cc @@ -106,6 +106,10 @@ void SetCallConfig(const CallConfig &call_config, ClientContext *ctx) { for (const auto &it : call_config.metadata()) { ctx->AddMetadata(it.first, it.second); } + if (call_config.compression()) { + ctx->set_compression_algorithm( + static_cast(call_config.compression())); + } } template @@ -197,6 +201,13 @@ class Echo { result.mutable_echo()->set_verified_metadata(verified_metadata); ok &= metadata_results->size() == 0; } + + for (auto key : echo->desc_.expected_metadata_keys()) { + auto it = echo->response_.received_metadata().find(key); + if (it != echo->response_.received_metadata().end()) { + (*(result.mutable_additional_metadata()))[key] = it->second; + } + } done(ok, result); })); } diff --git a/test/grpc/grpc-test.proto b/test/grpc/grpc-test.proto index c9ada43fc..3db36e026 100644 --- a/test/grpc/grpc-test.proto +++ b/test/grpc/grpc-test.proto @@ -74,6 +74,14 @@ message CallConfig { // Additional metadata to send to server map metadata = 4; + + enum CompressionAlgorithm { + NONE = 0; + DEFLATE = 1; + GZIP = 2; + } + // Compression algorithm the request + CompressionAlgorithm compression = 5; } // The outcome of a GRPC call. @@ -102,6 +110,9 @@ message EchoTest { // The final RPC status to expect in the response. CallStatus expected_status = 3; + + // The expected metadata keys that the grpc server should receive. + repeated string expected_metadata_keys = 4; } message EchoResult { @@ -347,6 +358,9 @@ message TestResult { ProbeUpstreamMessageLimitResult probe_upstream_message_limit = 7; EchoReportResult echo_report = 8; } + + // Additional metadata that can be added by ESP during the Check processing. + map additional_metadata = 9; } // Test results. diff --git a/test/grpc/interop-client.cc b/test/grpc/interop-client.cc deleted file mode 100644 index 1beccb5e4..000000000 --- a/test/grpc/interop-client.cc +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (C) Extensible Service Proxy Authors -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -// SUCH DAMAGE. -// -//////////////////////////////////////////////////////////////////////////////// -// -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "src/core/lib/support/string.h" -#include "test/cpp/interop/client_helper.h" -#include "test/cpp/interop/interop_client.h" -#include "test/cpp/util/test_config.h" - -DEFINE_bool(use_tls, false, "Whether to use tls."); -DEFINE_bool(use_test_ca, false, "False to use SSL roots for google"); -DEFINE_int32(server_port, 0, "Server port."); -DEFINE_string(server_host, "127.0.0.1", "Server host to connect to"); -DEFINE_string(server_host_override, "foo.test.google.fr", - "Override the server host which is sent in HTTP header"); -DEFINE_string(test_case, "large_unary", - "Configure different test cases. Valid options are:\n\n" - "all : all test cases;\n" - "cancel_after_begin : cancel stream after starting it;\n" - "cancel_after_first_response: cancel on first response;\n" - "client_compressed_streaming : compressed request streaming with " - "client_compressed_unary : single compressed request;\n" - "client_streaming : request streaming with single response;\n" - "compute_engine_creds: large_unary with compute engine auth;\n" - "custom_metadata: server will echo custom metadata;\n" - "empty_stream : bi-di stream with no request/response;\n" - "empty_unary : empty (zero bytes) request and response;\n" - "half_duplex : half-duplex streaming;\n" - "jwt_token_creds: large_unary with JWT token auth;\n" - "large_unary : single request and (large) response;\n" - "oauth2_auth_token: raw oauth2 access token auth;\n" - "per_rpc_creds: raw oauth2 access token on a single rpc;\n" - "ping_pong : full-duplex streaming;\n" - "response streaming;\n" - "server_compressed_streaming : single request with compressed " - "server_compressed_unary : single compressed response;\n" - "server_streaming : single request with response streaming;\n" - "slow_consumer : single request with response streaming with " - "slow client consumer;\n" - "status_code_and_message: verify status code & message;\n" - "timeout_on_sleeping_server: deadline exceeds on stream;\n"); -DEFINE_string(default_service_account, "", - "Email of GCE default service account"); -DEFINE_string(service_account_key_file, "", - "Path to service account json key file."); -DEFINE_string(oauth_scope, "", "Scope for OAuth tokens."); -DEFINE_bool(do_not_abort_on_transient_failures, false, - "If set to 'true', abort() is not called in case of transient " - "failures (i.e failures that are temporary and will likely go away " - "on retrying; like a temporary connection failure) and an error " - "message is printed instead. Note that this flag just controls " - "whether abort() is called or not. It does not control whether the " - "test is retried in case of transient failures (and currently the " - "interop tests are not retried even if this flag is set to true)"); -DEFINE_string(global_metadata, "", - "Global metadata added to every GRPC calls. " - "format: :;:"); - -using grpc::testing::CreateChannelForTestCase; -using grpc::testing::GetServiceAccountJsonKey; - -namespace { - -class MetadataGlobalCallbacks : public grpc::ClientContext::GlobalCallbacks { - public: - MetadataGlobalCallbacks(std::multimap metadata) - : metadata_(metadata) {} - virtual void DefaultConstructor(grpc::ClientContext *context) override { - for (const auto &it : metadata_) { - context->AddMetadata(it.first, it.second); - } - } - virtual void Destructor(grpc::ClientContext *context) override {} - - private: - std::multimap metadata_; -}; - -std::multimap ParseMetadataFlag( - const std::string &flag) { - std::istringstream ss(flag); - std::multimap metadata; - std::string token; - - while (std::getline(ss, token, ';')) { - size_t pos = token.find(':'); - if (pos == std::string::npos) { - std::cerr << "Ignoring invalid metadata: " << token << std::endl; - continue; - } - metadata.emplace(token.substr(0, pos), token.substr(pos + 1)); - } - - return metadata; -}; -} - -int main(int argc, char **argv) { - grpc::testing::InitTest(&argc, &argv, true); - MetadataGlobalCallbacks callbacks(ParseMetadataFlag(FLAGS_global_metadata)); - grpc::ClientContext::SetGlobalCallbacks(&callbacks); - gpr_log(GPR_INFO, "Testing these cases: %s", FLAGS_test_case.c_str()); - int ret = 0; - grpc::testing::InteropClient client(CreateChannelForTestCase(FLAGS_test_case), - true, - FLAGS_do_not_abort_on_transient_failures); - if (FLAGS_test_case == "empty_unary") { - client.DoEmpty(); - } else if (FLAGS_test_case == "large_unary") { - client.DoLargeUnary(); - } else if (FLAGS_test_case == "server_compressed_unary") { - client.DoServerCompressedUnary(); - } else if (FLAGS_test_case == "client_compressed_unary") { - client.DoClientCompressedUnary(); - } else if (FLAGS_test_case == "client_streaming") { - client.DoRequestStreaming(); - } else if (FLAGS_test_case == "server_streaming") { - client.DoResponseStreaming(); - } else if (FLAGS_test_case == "server_compressed_streaming") { - client.DoServerCompressedStreaming(); - } else if (FLAGS_test_case == "client_compressed_streaming") { - client.DoClientCompressedStreaming(); - } else if (FLAGS_test_case == "slow_consumer") { - client.DoResponseStreamingWithSlowConsumer(); - } else if (FLAGS_test_case == "half_duplex") { - client.DoHalfDuplex(); - } else if (FLAGS_test_case == "ping_pong") { - client.DoPingPong(); - } else if (FLAGS_test_case == "cancel_after_begin") { - client.DoCancelAfterBegin(); - } else if (FLAGS_test_case == "cancel_after_first_response") { - client.DoCancelAfterFirstResponse(); - } else if (FLAGS_test_case == "timeout_on_sleeping_server") { - client.DoTimeoutOnSleepingServer(); - } else if (FLAGS_test_case == "empty_stream") { - client.DoEmptyStream(); - } else if (FLAGS_test_case == "compute_engine_creds") { - client.DoComputeEngineCreds(FLAGS_default_service_account, - FLAGS_oauth_scope); - } else if (FLAGS_test_case == "jwt_token_creds") { - grpc::string json_key = GetServiceAccountJsonKey(); - client.DoJwtTokenCreds(json_key); - } else if (FLAGS_test_case == "oauth2_auth_token") { - client.DoOauth2AuthToken(FLAGS_default_service_account, FLAGS_oauth_scope); - } else if (FLAGS_test_case == "per_rpc_creds") { - grpc::string json_key = GetServiceAccountJsonKey(); - client.DoPerRpcCreds(json_key); - } else if (FLAGS_test_case == "status_code_and_message") { - client.DoStatusWithMessage(); - } else if (FLAGS_test_case == "custom_metadata") { - client.DoCustomMetadata(); - } else if (FLAGS_test_case == "cacheable_unary") { - client.DoCacheableUnary(); - } else if (FLAGS_test_case == "all") { - client.DoEmpty(); - client.DoLargeUnary(); - client.DoClientCompressedUnary(); - client.DoServerCompressedUnary(); - client.DoRequestStreaming(); - client.DoResponseStreaming(); - client.DoClientCompressedStreaming(); - client.DoServerCompressedStreaming(); - client.DoHalfDuplex(); - client.DoPingPong(); - client.DoCancelAfterBegin(); - client.DoCancelAfterFirstResponse(); - client.DoTimeoutOnSleepingServer(); - client.DoEmptyStream(); - client.DoStatusWithMessage(); - client.DoCustomMetadata(); - client.DoCacheableUnary(); - // service_account_creds and jwt_token_creds can only run with ssl. - if (FLAGS_use_tls) { - grpc::string json_key = GetServiceAccountJsonKey(); - client.DoJwtTokenCreds(json_key); - client.DoOauth2AuthToken(FLAGS_default_service_account, - FLAGS_oauth_scope); - client.DoPerRpcCreds(json_key); - } - // compute_engine_creds only runs in GCE. - } else { - const char *testcases[] = {"all", - "cacheable_unary", - "cancel_after_begin", - "cancel_after_first_response", - "client_compressed_streaming", - "client_compressed_unary", - "client_streaming", - "compute_engine_creds", - "custom_metadata", - "empty_stream", - "empty_unary", - "half_duplex", - "jwt_token_creds", - "large_unary", - "oauth2_auth_token", - "oauth2_auth_token", - "per_rpc_creds", - "per_rpc_creds", - "ping_pong", - "server_compressed_streaming", - "server_compressed_unary", - "server_streaming", - "status_code_and_message", - "timeout_on_sleeping_server", - "unimplemented_method"}; - char *joined_testcases = - gpr_strjoin_sep(testcases, GPR_ARRAY_SIZE(testcases), "\n", NULL); - - gpr_log(GPR_ERROR, "Unsupported test case %s. Valid options are\n%s", - FLAGS_test_case.c_str(), joined_testcases); - gpr_free(joined_testcases); - ret = 1; - } - - return ret; -} diff --git a/test/grpc/interop-client.go b/test/grpc/interop-client.go new file mode 100644 index 000000000..65eff8331 --- /dev/null +++ b/test/grpc/interop-client.go @@ -0,0 +1,214 @@ +// Copyright (C) Extensible Service Proxy Authors +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +//////////////////////////////////////////////////////////////////////////////// +// + +// Based on https://github.com/grpc/grpc-go/blob/v1.0.5/interop/client/client.go + +package main + +import ( + "flag" + "net" + "strconv" + + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/oauth" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/interop" + testpb "google.golang.org/grpc/interop/grpc_testing" +) + +type apiKeyCredentials struct { + apiKey string +} + +func (a apiKeyCredentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { + return map[string]string{ + "x-api-key": a.apiKey, + }, nil +} + +func (a apiKeyCredentials) RequireTransportSecurity() bool { + return false +} + +var ( + useTLS = flag.Bool("use_tls", false, "Connection uses TLS if true, else plain TCP") + testCA = flag.Bool("use_test_ca", false, "Whether to replace platform root CAs with test CA as the CA root") + serviceAccountKeyFile = flag.String("service_account_key_file", "", "Path to service account json key file") + oauthScope = flag.String("oauth_scope", "", "The scope for OAuth2 tokens") + defaultServiceAccount = flag.String("default_service_account", "", "Email of GCE default service account") + serverHost = flag.String("server_host", "127.0.0.1", "The server host name") + serverPort = flag.Int("server_port", 10000, "The server port number") + tlsServerName = flag.String("server_host_override", "", "The server name use to verify the hostname returned by TLS handshake if it is not empty. Otherwise, --server_host is used.") + testCase = flag.String("test_case", "large_unary", + `Configure different test cases. Valid options are: + empty_unary : empty (zero bytes) request and response; + large_unary : single request and (large) response; + client_streaming : request streaming with single response; + server_streaming : single request with response streaming; + ping_pong : full-duplex streaming; + empty_stream : full-duplex streaming with zero message; + timeout_on_sleeping_server: fullduplex streaming on a sleeping server; + compute_engine_creds: large_unary with compute engine auth; + service_account_creds: large_unary with service account auth; + jwt_token_creds: large_unary with jwt token auth; + per_rpc_creds: large_unary with per rpc token; + oauth2_auth_token: large_unary with oauth2 token auth; + cancel_after_begin: cancellation after metadata has been sent but before payloads are sent; + cancel_after_first_response: cancellation after receiving 1st message from the server; + status_code_and_message: status code propagated back to client; + custom_metadata: server will echo custom metadata; + unimplemented_method: client attempts to call unimplemented method; + unimplemented_service: client attempts to call unimplemented service.`) + apiKey = flag.String("api_key", "", "API key") + // The test CA root cert file + testCAFile = "testdata/ca.pem" +) + +func main() { + flag.Parse() + serverAddr := net.JoinHostPort(*serverHost, strconv.Itoa(*serverPort)) + var opts []grpc.DialOption + if *useTLS { + var sn string + if *tlsServerName != "" { + sn = *tlsServerName + } + var creds credentials.TransportCredentials + if *testCA { + var err error + creds, err = credentials.NewClientTLSFromFile(testCAFile, sn) + if err != nil { + grpclog.Fatalf("Failed to create TLS credentials %v", err) + } + } else { + creds = credentials.NewClientTLSFromCert(nil, sn) + } + opts = append(opts, grpc.WithTransportCredentials(creds)) + if *testCase == "compute_engine_creds" { + opts = append(opts, grpc.WithPerRPCCredentials(oauth.NewComputeEngine())) + } else if *testCase == "service_account_creds" { + jwtCreds, err := oauth.NewServiceAccountFromFile(*serviceAccountKeyFile, *oauthScope) + if err != nil { + grpclog.Fatalf("Failed to create JWT credentials: %v", err) + } + opts = append(opts, grpc.WithPerRPCCredentials(jwtCreds)) + } else if *testCase == "jwt_token_creds" { + jwtCreds, err := oauth.NewJWTAccessFromFile(*serviceAccountKeyFile) + if err != nil { + grpclog.Fatalf("Failed to create JWT credentials: %v", err) + } + opts = append(opts, grpc.WithPerRPCCredentials(jwtCreds)) + } else if *testCase == "oauth2_auth_token" { + opts = append(opts, grpc.WithPerRPCCredentials(oauth.NewOauthAccess(interop.GetToken(*serviceAccountKeyFile, *oauthScope)))) + } + } else { + opts = append(opts, grpc.WithInsecure()) + } + opts = append(opts, grpc.WithPerRPCCredentials(apiKeyCredentials{*apiKey})) + conn, err := grpc.Dial(serverAddr, opts...) + if err != nil { + grpclog.Fatalf("Fail to dial: %v", err) + } + defer conn.Close() + tc := testpb.NewTestServiceClient(conn) + switch *testCase { + case "empty_unary": + interop.DoEmptyUnaryCall(tc) + grpclog.Println("EmptyUnaryCall done") + case "large_unary": + interop.DoLargeUnaryCall(tc) + grpclog.Println("LargeUnaryCall done") + case "client_streaming": + interop.DoClientStreaming(tc) + grpclog.Println("ClientStreaming done") + case "server_streaming": + interop.DoServerStreaming(tc) + grpclog.Println("ServerStreaming done") + case "ping_pong": + interop.DoPingPong(tc) + grpclog.Println("Pingpong done") + case "empty_stream": + interop.DoEmptyStream(tc) + grpclog.Println("Emptystream done") + case "timeout_on_sleeping_server": + interop.DoTimeoutOnSleepingServer(tc) + grpclog.Println("TimeoutOnSleepingServer done") + case "compute_engine_creds": + if !*useTLS { + grpclog.Fatalf("TLS is not enabled. TLS is required to execute compute_engine_creds test case.") + } + interop.DoComputeEngineCreds(tc, *defaultServiceAccount, *oauthScope) + grpclog.Println("ComputeEngineCreds done") + case "service_account_creds": + if !*useTLS { + grpclog.Fatalf("TLS is not enabled. TLS is required to execute service_account_creds test case.") + } + interop.DoServiceAccountCreds(tc, *serviceAccountKeyFile, *oauthScope) + grpclog.Println("ServiceAccountCreds done") + case "jwt_token_creds": + if !*useTLS { + grpclog.Fatalf("TLS is not enabled. TLS is required to execute jwt_token_creds test case.") + } + interop.DoJWTTokenCreds(tc, *serviceAccountKeyFile) + grpclog.Println("JWTtokenCreds done") + case "per_rpc_creds": + if !*useTLS { + grpclog.Fatalf("TLS is not enabled. TLS is required to execute per_rpc_creds test case.") + } + interop.DoPerRPCCreds(tc, *serviceAccountKeyFile, *oauthScope) + grpclog.Println("PerRPCCreds done") + case "oauth2_auth_token": + if !*useTLS { + grpclog.Fatalf("TLS is not enabled. TLS is required to execute oauth2_auth_token test case.") + } + interop.DoOauth2TokenCreds(tc, *serviceAccountKeyFile, *oauthScope) + grpclog.Println("Oauth2TokenCreds done") + case "cancel_after_begin": + interop.DoCancelAfterBegin(tc) + grpclog.Println("CancelAfterBegin done") + case "cancel_after_first_response": + interop.DoCancelAfterFirstResponse(tc) + grpclog.Println("CancelAfterFirstResponse done") + case "status_code_and_message": + interop.DoStatusCodeAndMessage(tc) + grpclog.Println("StatusCodeAndMessage done") + case "custom_metadata": + interop.DoCustomMetadata(tc) + grpclog.Println("CustomMetadata done") + case "unimplemented_method": + interop.DoUnimplementedMethod(conn) + grpclog.Println("UnimplementedMethod done") + case "unimplemented_service": + interop.DoUnimplementedService(testpb.NewUnimplementedServiceClient(conn)) + grpclog.Println("UnimplementedService done") + default: + grpclog.Fatal("Unsupported test case: ", *testCase) + } +} diff --git a/test/grpc/linux-build-grpc-docker b/test/grpc/linux-build-grpc-docker index 4504a7102..25e462bfd 100755 --- a/test/grpc/linux-build-grpc-docker +++ b/test/grpc/linux-build-grpc-docker @@ -38,14 +38,16 @@ GRPC_ROOT="${ROOT}/test/grpc" . "${ROOT}/script/all-utilities" || { echo "Cannot load Bash utilities"; exit 1; } -TEST_SERVER_BIN='grpc-test-server' +TEST_SERVER_TARGET='//test/grpc:grpc-test-server' +TEST_SERVER_BIN='test/grpc/grpc-test-server' TEST_SERVER_ARGS='0.0.0.0:8081' while getopts :i:o arg; do case ${arg} in i) IMAGE="${OPTARG}";; o) - TEST_SERVER_BIN='interop-server' + TEST_SERVER_TARGET='@org_golang_google_grpc//interop/server' + TEST_SERVER_BIN='external/org_golang_google_grpc/interop/server/server' TEST_SERVER_ARGS='--port=8081' ;; *) error_exit "Unrecognized argument -${OPTARG}";; @@ -58,17 +60,17 @@ echo "Checking if docker image ${IMAGE} exists.." gcloud docker pull "${IMAGE}" \ && { echo "Image ${IMAGE} already exists; skipping"; exit 0; } -BAZEL_TARGET="${ROOT}/bazel-bin/test/grpc/${TEST_SERVER_BIN}" +BAZEL_TARGET="${ROOT}/bazel-bin/${TEST_SERVER_BIN}" if ! [[ -e "${BAZEL_TARGET}" ]]; then echo "Building ${TEST_SERVER_BIN}" - bazel build --config=release "//test/grpc:${TEST_SERVER_BIN}" \ + bazel build --config=release "${TEST_SERVER_TARGET}" \ || error_exit 'Could not build ${TEST_SERVER_BIN}' fi cp -f "${BAZEL_TARGET}" "${GRPC_ROOT}" \ || error_exit "Could not copy ${BAZEL_TARGET} to ${GRPC_ROOT}" -sed -e "s|TEST_SERVER_BIN|${TEST_SERVER_BIN}|g" \ +sed -e "s|TEST_SERVER_BIN|$(basename ${TEST_SERVER_BIN})|g" \ -e "s|TEST_SERVER_ARGS|${TEST_SERVER_ARGS}|g" \ "${GRPC_ROOT}/Dockerfile.temp" > "${GRPC_ROOT}/Dockerfile" diff --git a/test/grpc/repositories.bzl b/test/grpc/repositories.bzl new file mode 100644 index 000000000..eeaf9be8d --- /dev/null +++ b/test/grpc/repositories.bzl @@ -0,0 +1,65 @@ +# Copyright (C) Extensible Service Proxy Authors +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +################################################################################ +# + +load("@io_bazel_rules_go//go:def.bzl", "new_go_repository") + +def grpc_go_repositories(): + new_go_repository( + name = "org_golang_google_grpc", + commit = "708a7f9f3283aa2d4f6132d287d78683babe55c8", + importpath = "google.golang.org/grpc", + ) + + new_go_repository( + name = "com_github_golang_protobuf", + commit = "8ee79997227bf9b34611aee7946ae64735e6fd93", + importpath = "github.com/golang/protobuf", + ) + + new_go_repository( + name = "org_golang_x_net", + commit = "a689eb3bc4b53af70390acc3cf68c9f549b6b8d6", + importpath = "golang.org/x/net", + ) + + new_go_repository( + name = "org_golang_x_oauth2", + commit = "de0725b330ab43c1a3d6c84d961cf01183783f1e", + importpath = "golang.org/x/oauth2", + ) + + new_go_repository( + name = "com_google_cloud_go", + commit = "513b07bb7468fa6d8c59519f35b66456bce959b5", + importpath = "cloud.google.com/go", + ) + + new_go_repository( + name = "com_github_googleapis_gax_go", + commit = "da06d194a00e19ce00d9011a13931c3f6f6887c7", + importpath = "github.com/googleapis/gax-go", + ) diff --git a/test/transcoding/BUILD b/test/transcoding/BUILD index a24998fe0..dfc50e2d1 100644 --- a/test/transcoding/BUILD +++ b/test/transcoding/BUILD @@ -45,7 +45,10 @@ cc_binary( name = "bookstore-server", testonly = 1, srcs = ["bookstore-server.cc"], - deps = [":bookstore"], + deps = [ + ":bookstore", + "//external:grpc++", + ], ) cc_binary( @@ -57,6 +60,7 @@ cc_binary( ":bookstore", "//external:protobuf", "//external:gflags", + "//external:grpc++", ], ) diff --git a/third_party/BUILD.grpc b/third_party/BUILD.grpc deleted file mode 100644 index 9e3b924b3..000000000 --- a/third_party/BUILD.grpc +++ /dev/null @@ -1,3604 +0,0 @@ -# GRPC Bazel BUILD file. -# This currently builds C, C++ and Objective-C code. -# This file has been automatically generated from a template file. -# Please look at the templates directory instead. -# This file can be regenerated from the template by running -# tools/buildgen/generate_projects.sh - -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -licenses(["notice"]) # 3-clause BSD - -exports_files(["LICENSE"]) - -package(default_visibility = ["//visibility:public"]) - -load("@protobuf_bzl//:protobuf.bzl", "cc_proto_library") - -cc_proto_library( - name = "testing_messages_proto", - srcs = [ - "src/proto/grpc/testing/messages.proto", - ], - use_grpc_plugin = True, - protoc = "//external:protoc", - default_runtime = "//external:protobuf", -) - -cc_proto_library( - name = "interop_proto", - srcs = [ - "src/proto/grpc/testing/empty.proto", - "src/proto/grpc/testing/metrics.proto", - "src/proto/grpc/testing/test.proto", - ], - deps = [ - ":testing_messages_proto", - ], - use_grpc_plugin = True, - protoc = "//external:protoc", - default_runtime = "//external:protobuf", -) - -cc_proto_library( - name = "qps_proto", - srcs = [ - "src/proto/grpc/testing/payloads.proto", - "src/proto/grpc/testing/stats.proto", - "src/proto/grpc/testing/control.proto", - "src/proto/grpc/testing/services.proto", - ], - deps = [ - ":testing_messages_proto", - ], - use_grpc_plugin = True, - protoc = "//external:protoc", - default_runtime = "//external:protobuf", -) - -cc_proto_library( - name = "test_util_proto", - srcs = [ - "src/proto/grpc/testing/echo_messages.proto", - "src/proto/grpc/testing/echo.proto", - "src/proto/grpc/testing/duplicate/echo_duplicate.proto", - ], - use_grpc_plugin = True, - protoc = "//external:protoc", - default_runtime = "//external:protobuf", -) - - - - - - -cc_library( - name = "gpr", - srcs = [ - "src/core/lib/profiling/timers.h", - "src/core/lib/support/backoff.h", - "src/core/lib/support/block_annotate.h", - "src/core/lib/support/env.h", - "src/core/lib/support/mpscq.h", - "src/core/lib/support/murmur_hash.h", - "src/core/lib/support/percent_encoding.h", - "src/core/lib/support/stack_lockfree.h", - "src/core/lib/support/string.h", - "src/core/lib/support/string_windows.h", - "src/core/lib/support/thd_internal.h", - "src/core/lib/support/time_precise.h", - "src/core/lib/support/tmpfile.h", - "src/core/lib/profiling/basic_timers.c", - "src/core/lib/profiling/stap_timers.c", - "src/core/lib/support/alloc.c", - "src/core/lib/support/avl.c", - "src/core/lib/support/backoff.c", - "src/core/lib/support/cmdline.c", - "src/core/lib/support/cpu_iphone.c", - "src/core/lib/support/cpu_linux.c", - "src/core/lib/support/cpu_posix.c", - "src/core/lib/support/cpu_windows.c", - "src/core/lib/support/env_linux.c", - "src/core/lib/support/env_posix.c", - "src/core/lib/support/env_windows.c", - "src/core/lib/support/histogram.c", - "src/core/lib/support/host_port.c", - "src/core/lib/support/log.c", - "src/core/lib/support/log_android.c", - "src/core/lib/support/log_linux.c", - "src/core/lib/support/log_posix.c", - "src/core/lib/support/log_windows.c", - "src/core/lib/support/mpscq.c", - "src/core/lib/support/murmur_hash.c", - "src/core/lib/support/percent_encoding.c", - "src/core/lib/support/slice.c", - "src/core/lib/support/slice_buffer.c", - "src/core/lib/support/stack_lockfree.c", - "src/core/lib/support/string.c", - "src/core/lib/support/string_posix.c", - "src/core/lib/support/string_util_windows.c", - "src/core/lib/support/string_windows.c", - "src/core/lib/support/subprocess_posix.c", - "src/core/lib/support/subprocess_windows.c", - "src/core/lib/support/sync.c", - "src/core/lib/support/sync_posix.c", - "src/core/lib/support/sync_windows.c", - "src/core/lib/support/thd.c", - "src/core/lib/support/thd_posix.c", - "src/core/lib/support/thd_windows.c", - "src/core/lib/support/time.c", - "src/core/lib/support/time_posix.c", - "src/core/lib/support/time_precise.c", - "src/core/lib/support/time_windows.c", - "src/core/lib/support/tls_pthread.c", - "src/core/lib/support/tmpfile_msys.c", - "src/core/lib/support/tmpfile_posix.c", - "src/core/lib/support/tmpfile_windows.c", - "src/core/lib/support/wrap_memcpy.c", - ], - hdrs = [ - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/atm_gcc_atomic.h", - "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_windows.h", - "include/grpc/support/avl.h", - "include/grpc/support/cmdline.h", - "include/grpc/support/cpu.h", - "include/grpc/support/histogram.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/log_windows.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", - "include/grpc/support/sync.h", - "include/grpc/support/sync_generic.h", - "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_windows.h", - "include/grpc/support/thd.h", - "include/grpc/support/time.h", - "include/grpc/support/tls.h", - "include/grpc/support/tls_gcc.h", - "include/grpc/support/tls_msvc.h", - "include/grpc/support/tls_pthread.h", - "include/grpc/support/useful.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - ], - includes = [ - "include", - ], - deps = [ - ], -) - - - -cc_library( - name = "gpr_test_util", - srcs = [ - "test/core/util/test_config.h", - "test/core/util/test_config.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":gpr", - ], -) - - - -cc_library( - name = "grpc", - srcs = [ - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_uv.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/port.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_uv.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_generic.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/timer_uv.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_uv.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", - "src/core/ext/client_channel/client_channel.h", - "src/core/ext/client_channel/client_channel_factory.h", - "src/core/ext/client_channel/connector.h", - "src/core/ext/client_channel/http_connect_handshaker.h", - "src/core/ext/client_channel/initial_connect_string.h", - "src/core/ext/client_channel/lb_policy.h", - "src/core/ext/client_channel/lb_policy_factory.h", - "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/parse_address.h", - "src/core/ext/client_channel/resolver.h", - "src/core/ext/client_channel/resolver_factory.h", - "src/core/ext/client_channel/resolver_registry.h", - "src/core/ext/client_channel/subchannel.h", - "src/core/ext/client_channel/subchannel_index.h", - "src/core/ext/client_channel/uri_parser.h", - "src/core/ext/lb_policy/grpclb/grpclb.h", - "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", - "src/core/ext/load_reporting/load_reporting.h", - "src/core/ext/load_reporting/load_reporting_filter.h", - "src/core/ext/census/aggregation.h", - "src/core/ext/census/base_resources.h", - "src/core/ext/census/census_interface.h", - "src/core/ext/census/census_rpc_stats.h", - "src/core/ext/census/gen/census.pb.h", - "src/core/ext/census/gen/trace_context.pb.h", - "src/core/ext/census/grpc_filter.h", - "src/core/ext/census/mlog.h", - "src/core/ext/census/resource.h", - "src/core/ext/census/rpc_metric_id.h", - "src/core/ext/census/trace_context.h", - "src/core/lib/surface/init.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_uv.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_uv.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_uv.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_uv.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_uv.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_utils_uv.c", - "src/core/lib/iomgr/socket_utils_windows.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_uv.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_uv.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_uv.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer_generic.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/timer_uv.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_uv.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", - "src/core/ext/transport/chttp2/transport/bin_decoder.c", - "src/core/ext/transport/chttp2/transport/bin_encoder.c", - "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", - "src/core/ext/transport/chttp2/transport/chttp2_transport.c", - "src/core/ext/transport/chttp2/transport/frame_data.c", - "src/core/ext/transport/chttp2/transport/frame_goaway.c", - "src/core/ext/transport/chttp2/transport/frame_ping.c", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", - "src/core/ext/transport/chttp2/transport/frame_settings.c", - "src/core/ext/transport/chttp2/transport/frame_window_update.c", - "src/core/ext/transport/chttp2/transport/hpack_encoder.c", - "src/core/ext/transport/chttp2/transport/hpack_parser.c", - "src/core/ext/transport/chttp2/transport/hpack_table.c", - "src/core/ext/transport/chttp2/transport/huffsyms.c", - "src/core/ext/transport/chttp2/transport/incoming_metadata.c", - "src/core/ext/transport/chttp2/transport/parsing.c", - "src/core/ext/transport/chttp2/transport/status_conversion.c", - "src/core/ext/transport/chttp2/transport/stream_lists.c", - "src/core/ext/transport/chttp2/transport/stream_map.c", - "src/core/ext/transport/chttp2/transport/varint.c", - "src/core/ext/transport/chttp2/transport/writing.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_generic.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", - "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - "src/core/ext/client_channel/channel_connectivity.c", - "src/core/ext/client_channel/client_channel.c", - "src/core/ext/client_channel/client_channel_factory.c", - "src/core/ext/client_channel/client_channel_plugin.c", - "src/core/ext/client_channel/connector.c", - "src/core/ext/client_channel/default_initial_connect_string.c", - "src/core/ext/client_channel/http_connect_handshaker.c", - "src/core/ext/client_channel/initial_connect_string.c", - "src/core/ext/client_channel/lb_policy.c", - "src/core/ext/client_channel/lb_policy_factory.c", - "src/core/ext/client_channel/lb_policy_registry.c", - "src/core/ext/client_channel/parse_address.c", - "src/core/ext/client_channel/resolver.c", - "src/core/ext/client_channel/resolver_factory.c", - "src/core/ext/client_channel/resolver_registry.c", - "src/core/ext/client_channel/subchannel.c", - "src/core/ext/client_channel/subchannel_index.c", - "src/core/ext/client_channel/uri_parser.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", - "src/core/ext/lb_policy/grpclb/grpclb.c", - "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", - "src/core/ext/lb_policy/pick_first/pick_first.c", - "src/core/ext/lb_policy/round_robin/round_robin.c", - "src/core/ext/resolver/dns/native/dns_resolver.c", - "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", - "src/core/ext/load_reporting/load_reporting.c", - "src/core/ext/load_reporting/load_reporting_filter.c", - "src/core/ext/census/base_resources.c", - "src/core/ext/census/context.c", - "src/core/ext/census/gen/census.pb.c", - "src/core/ext/census/gen/trace_context.pb.c", - "src/core/ext/census/grpc_context.c", - "src/core/ext/census/grpc_filter.c", - "src/core/ext/census/grpc_plugin.c", - "src/core/ext/census/initialize.c", - "src/core/ext/census/mlog.c", - "src/core/ext/census/operation.c", - "src/core/ext/census/placeholders.c", - "src/core/ext/census/resource.c", - "src/core/ext/census/trace_context.c", - "src/core/ext/census/tracing.c", - "src/core/plugin_registry/grpc_plugin_registry.c", - ], - hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc/grpc_security.h", - "include/grpc/census.h", - ], - includes = [ - "include", - ], - deps = [ - "//external:libssl", - "//external:zlib", - ":gpr", - "//third_party/nanopb", - ], - copts = [ - "-std=gnu99", - ], -) - - - -cc_library( - name = "grpc_cronet", - srcs = [ - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_uv.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/port.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_uv.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_generic.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/timer_uv.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_uv.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "third_party/objective_c/Cronet/cronet_c_for_grpc.h", - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/ext/client_channel/client_channel.h", - "src/core/ext/client_channel/client_channel_factory.h", - "src/core/ext/client_channel/connector.h", - "src/core/ext/client_channel/http_connect_handshaker.h", - "src/core/ext/client_channel/initial_connect_string.h", - "src/core/ext/client_channel/lb_policy.h", - "src/core/ext/client_channel/lb_policy_factory.h", - "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/parse_address.h", - "src/core/ext/client_channel/resolver.h", - "src/core/ext/client_channel/resolver_factory.h", - "src/core/ext/client_channel/resolver_registry.h", - "src/core/ext/client_channel/subchannel.h", - "src/core/ext/client_channel/subchannel_index.h", - "src/core/ext/client_channel/uri_parser.h", - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", - "src/core/lib/surface/init.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_uv.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_uv.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_uv.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_uv.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_uv.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_utils_uv.c", - "src/core/lib/iomgr/socket_utils_windows.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_uv.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_uv.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_uv.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer_generic.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/timer_uv.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_uv.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", - "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - "src/core/ext/transport/chttp2/transport/bin_decoder.c", - "src/core/ext/transport/chttp2/transport/bin_encoder.c", - "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", - "src/core/ext/transport/chttp2/transport/chttp2_transport.c", - "src/core/ext/transport/chttp2/transport/frame_data.c", - "src/core/ext/transport/chttp2/transport/frame_goaway.c", - "src/core/ext/transport/chttp2/transport/frame_ping.c", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", - "src/core/ext/transport/chttp2/transport/frame_settings.c", - "src/core/ext/transport/chttp2/transport/frame_window_update.c", - "src/core/ext/transport/chttp2/transport/hpack_encoder.c", - "src/core/ext/transport/chttp2/transport/hpack_parser.c", - "src/core/ext/transport/chttp2/transport/hpack_table.c", - "src/core/ext/transport/chttp2/transport/huffsyms.c", - "src/core/ext/transport/chttp2/transport/incoming_metadata.c", - "src/core/ext/transport/chttp2/transport/parsing.c", - "src/core/ext/transport/chttp2/transport/status_conversion.c", - "src/core/ext/transport/chttp2/transport/stream_lists.c", - "src/core/ext/transport/chttp2/transport/stream_map.c", - "src/core/ext/transport/chttp2/transport/varint.c", - "src/core/ext/transport/chttp2/transport/writing.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/ext/client_channel/channel_connectivity.c", - "src/core/ext/client_channel/client_channel.c", - "src/core/ext/client_channel/client_channel_factory.c", - "src/core/ext/client_channel/client_channel_plugin.c", - "src/core/ext/client_channel/connector.c", - "src/core/ext/client_channel/default_initial_connect_string.c", - "src/core/ext/client_channel/http_connect_handshaker.c", - "src/core/ext/client_channel/initial_connect_string.c", - "src/core/ext/client_channel/lb_policy.c", - "src/core/ext/client_channel/lb_policy_factory.c", - "src/core/ext/client_channel/lb_policy_registry.c", - "src/core/ext/client_channel/parse_address.c", - "src/core/ext/client_channel/resolver.c", - "src/core/ext/client_channel/resolver_factory.c", - "src/core/ext/client_channel/resolver_registry.c", - "src/core/ext/client_channel/subchannel.c", - "src/core/ext/client_channel/subchannel_index.c", - "src/core/ext/client_channel/uri_parser.c", - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_generic.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", - "src/core/plugin_registry/grpc_cronet_plugin_registry.c", - ], - hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc/grpc_cronet.h", - "include/grpc/grpc_security.h", - ], - includes = [ - "include", - ], - deps = [ - "//external:libssl", - ":gpr", - ], -) - - - -cc_library( - name = "grpc_dll", - srcs = [ - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":gpr", - ":grpc", - ], -) - - - -cc_library( - name = "grpc_test_util", - srcs = [ - "test/core/end2end/data/ssl_test_data.h", - "test/core/security/oauth2_utils.h", - "test/core/end2end/cq_verifier.h", - "test/core/end2end/fake_resolver.h", - "test/core/end2end/fixtures/http_proxy.h", - "test/core/end2end/fixtures/proxy.h", - "test/core/iomgr/endpoint_tests.h", - "test/core/util/grpc_profiler.h", - "test/core/util/memory_counters.h", - "test/core/util/mock_endpoint.h", - "test/core/util/parse_hexstring.h", - "test/core/util/passthru_endpoint.h", - "test/core/util/port.h", - "test/core/util/port_server_client.h", - "test/core/util/slice_splitter.h", - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_uv.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/port.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_uv.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_generic.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/timer_uv.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_uv.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "test/core/end2end/data/client_certs.c", - "test/core/end2end/data/server1_cert.c", - "test/core/end2end/data/server1_key.c", - "test/core/end2end/data/test_root_cert.c", - "test/core/security/oauth2_utils.c", - "test/core/end2end/cq_verifier.c", - "test/core/end2end/fake_resolver.c", - "test/core/end2end/fixtures/http_proxy.c", - "test/core/end2end/fixtures/proxy.c", - "test/core/iomgr/endpoint_tests.c", - "test/core/util/grpc_profiler.c", - "test/core/util/memory_counters.c", - "test/core/util/mock_endpoint.c", - "test/core/util/parse_hexstring.c", - "test/core/util/passthru_endpoint.c", - "test/core/util/port_posix.c", - "test/core/util/port_server_client.c", - "test/core/util/port_uv.c", - "test/core/util/port_windows.c", - "test/core/util/slice_splitter.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_uv.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_uv.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_uv.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_uv.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_uv.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_utils_uv.c", - "src/core/lib/iomgr/socket_utils_windows.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_uv.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_uv.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_uv.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer_generic.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/timer_uv.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_uv.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - ], - hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - ], - includes = [ - "include", - ], - deps = [ - ":gpr_test_util", - ":gpr", - ":grpc", - ], - copts = [ - "-std=gnu99", - ], -) - - - -cc_library( - name = "grpc_test_util_unsecure", - srcs = [ - "test/core/end2end/cq_verifier.h", - "test/core/end2end/fake_resolver.h", - "test/core/end2end/fixtures/http_proxy.h", - "test/core/end2end/fixtures/proxy.h", - "test/core/iomgr/endpoint_tests.h", - "test/core/util/grpc_profiler.h", - "test/core/util/memory_counters.h", - "test/core/util/mock_endpoint.h", - "test/core/util/parse_hexstring.h", - "test/core/util/passthru_endpoint.h", - "test/core/util/port.h", - "test/core/util/port_server_client.h", - "test/core/util/slice_splitter.h", - "test/core/end2end/cq_verifier.c", - "test/core/end2end/fake_resolver.c", - "test/core/end2end/fixtures/http_proxy.c", - "test/core/end2end/fixtures/proxy.c", - "test/core/iomgr/endpoint_tests.c", - "test/core/util/grpc_profiler.c", - "test/core/util/memory_counters.c", - "test/core/util/mock_endpoint.c", - "test/core/util/parse_hexstring.c", - "test/core/util/passthru_endpoint.c", - "test/core/util/port_posix.c", - "test/core/util/port_server_client.c", - "test/core/util/port_uv.c", - "test/core/util/port_windows.c", - "test/core/util/slice_splitter.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":gpr", - ":gpr_test_util", - ":grpc_unsecure", - ":grpc", - ], -) - - - -cc_library( - name = "grpc_unsecure", - srcs = [ - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_uv.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/port.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_uv.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_generic.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/timer_uv.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_uv.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/ext/client_channel/client_channel.h", - "src/core/ext/client_channel/client_channel_factory.h", - "src/core/ext/client_channel/connector.h", - "src/core/ext/client_channel/http_connect_handshaker.h", - "src/core/ext/client_channel/initial_connect_string.h", - "src/core/ext/client_channel/lb_policy.h", - "src/core/ext/client_channel/lb_policy_factory.h", - "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/parse_address.h", - "src/core/ext/client_channel/resolver.h", - "src/core/ext/client_channel/resolver_factory.h", - "src/core/ext/client_channel/resolver_registry.h", - "src/core/ext/client_channel/subchannel.h", - "src/core/ext/client_channel/subchannel_index.h", - "src/core/ext/client_channel/uri_parser.h", - "src/core/ext/load_reporting/load_reporting.h", - "src/core/ext/load_reporting/load_reporting_filter.h", - "src/core/ext/lb_policy/grpclb/grpclb.h", - "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", - "src/core/ext/census/aggregation.h", - "src/core/ext/census/base_resources.h", - "src/core/ext/census/census_interface.h", - "src/core/ext/census/census_rpc_stats.h", - "src/core/ext/census/gen/census.pb.h", - "src/core/ext/census/gen/trace_context.pb.h", - "src/core/ext/census/grpc_filter.h", - "src/core/ext/census/mlog.h", - "src/core/ext/census/resource.h", - "src/core/ext/census/rpc_metric_id.h", - "src/core/ext/census/trace_context.h", - "src/core/lib/surface/init.c", - "src/core/lib/surface/init_unsecure.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_uv.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_uv.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_uv.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_uv.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_uv.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_utils_uv.c", - "src/core/lib/iomgr/socket_utils_windows.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_uv.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_uv.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_uv.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer_generic.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/timer_uv.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_uv.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", - "src/core/ext/transport/chttp2/transport/bin_decoder.c", - "src/core/ext/transport/chttp2/transport/bin_encoder.c", - "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", - "src/core/ext/transport/chttp2/transport/chttp2_transport.c", - "src/core/ext/transport/chttp2/transport/frame_data.c", - "src/core/ext/transport/chttp2/transport/frame_goaway.c", - "src/core/ext/transport/chttp2/transport/frame_ping.c", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", - "src/core/ext/transport/chttp2/transport/frame_settings.c", - "src/core/ext/transport/chttp2/transport/frame_window_update.c", - "src/core/ext/transport/chttp2/transport/hpack_encoder.c", - "src/core/ext/transport/chttp2/transport/hpack_parser.c", - "src/core/ext/transport/chttp2/transport/hpack_table.c", - "src/core/ext/transport/chttp2/transport/huffsyms.c", - "src/core/ext/transport/chttp2/transport/incoming_metadata.c", - "src/core/ext/transport/chttp2/transport/parsing.c", - "src/core/ext/transport/chttp2/transport/status_conversion.c", - "src/core/ext/transport/chttp2/transport/stream_lists.c", - "src/core/ext/transport/chttp2/transport/stream_map.c", - "src/core/ext/transport/chttp2/transport/varint.c", - "src/core/ext/transport/chttp2/transport/writing.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", - "src/core/ext/client_channel/channel_connectivity.c", - "src/core/ext/client_channel/client_channel.c", - "src/core/ext/client_channel/client_channel_factory.c", - "src/core/ext/client_channel/client_channel_plugin.c", - "src/core/ext/client_channel/connector.c", - "src/core/ext/client_channel/default_initial_connect_string.c", - "src/core/ext/client_channel/http_connect_handshaker.c", - "src/core/ext/client_channel/initial_connect_string.c", - "src/core/ext/client_channel/lb_policy.c", - "src/core/ext/client_channel/lb_policy_factory.c", - "src/core/ext/client_channel/lb_policy_registry.c", - "src/core/ext/client_channel/parse_address.c", - "src/core/ext/client_channel/resolver.c", - "src/core/ext/client_channel/resolver_factory.c", - "src/core/ext/client_channel/resolver_registry.c", - "src/core/ext/client_channel/subchannel.c", - "src/core/ext/client_channel/subchannel_index.c", - "src/core/ext/client_channel/uri_parser.c", - "src/core/ext/resolver/dns/native/dns_resolver.c", - "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", - "src/core/ext/load_reporting/load_reporting.c", - "src/core/ext/load_reporting/load_reporting_filter.c", - "src/core/ext/lb_policy/grpclb/grpclb.c", - "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", - "src/core/ext/lb_policy/pick_first/pick_first.c", - "src/core/ext/lb_policy/round_robin/round_robin.c", - "src/core/ext/census/base_resources.c", - "src/core/ext/census/context.c", - "src/core/ext/census/gen/census.pb.c", - "src/core/ext/census/gen/trace_context.pb.c", - "src/core/ext/census/grpc_context.c", - "src/core/ext/census/grpc_filter.c", - "src/core/ext/census/grpc_plugin.c", - "src/core/ext/census/initialize.c", - "src/core/ext/census/mlog.c", - "src/core/ext/census/operation.c", - "src/core/ext/census/placeholders.c", - "src/core/ext/census/resource.c", - "src/core/ext/census/trace_context.c", - "src/core/ext/census/tracing.c", - "src/core/plugin_registry/grpc_unsecure_plugin_registry.c", - ], - hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc/census.h", - ], - includes = [ - "include", - ], - deps = [ - ":gpr", - "//third_party/nanopb", - ], - copts = [ - "-std=gnu99", - ], -) - - - -cc_library( - name = "reconnect_server", - srcs = [ - "test/core/util/reconnect_server.h", - "test/core/util/reconnect_server.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":test_tcp_server", - ":grpc_test_util", - ":grpc", - ":gpr_test_util", - ":gpr", - ], -) - - - -cc_library( - name = "test_tcp_server", - srcs = [ - "test/core/util/test_tcp_server.h", - "test/core/util/test_tcp_server.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":grpc_test_util", - ":grpc", - ":gpr_test_util", - ":gpr", - ], -) - - - -cc_library( - name = "grpc++", - srcs = [ - "include/grpc++/impl/codegen/core_codegen.h", - "src/cpp/client/secure_credentials.h", - "src/cpp/common/secure_auth_context.h", - "src/cpp/server/secure_server_credentials.h", - "src/cpp/client/create_channel_internal.h", - "src/cpp/common/channel_filter.h", - "src/cpp/server/dynamic_thread_pool.h", - "src/cpp/server/thread_pool_interface.h", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/client/secure_credentials.cc", - "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/secure_auth_context.cc", - "src/cpp/common/secure_channel_arguments.cc", - "src/cpp/common/secure_create_auth_context.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/server/secure_server_credentials.cc", - "src/cpp/client/channel_cc.cc", - "src/cpp/client/client_context.cc", - "src/cpp/client/create_channel.cc", - "src/cpp/client/create_channel_internal.cc", - "src/cpp/client/create_channel_posix.cc", - "src/cpp/client/credentials_cc.cc", - "src/cpp/client/generic_stub.cc", - "src/cpp/common/channel_arguments.cc", - "src/cpp/common/channel_filter.cc", - "src/cpp/common/completion_queue_cc.cc", - "src/cpp/common/core_codegen.cc", - "src/cpp/common/rpc_method.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/dynamic_thread_pool.cc", - "src/cpp/server/server_builder.cc", - "src/cpp/server/server_cc.cc", - "src/cpp/server/server_context.cc", - "src/cpp/server/server_credentials.cc", - "src/cpp/server/server_posix.cc", - "src/cpp/util/byte_buffer_cc.cc", - "src/cpp/util/slice_cc.cc", - "src/cpp/util/status.cc", - "src/cpp/util/string_ref.cc", - "src/cpp/util/time_cc.cc", - "src/cpp/codegen/codegen_init.cc", - ], - hdrs = [ - "include/grpc++/alarm.h", - "include/grpc++/channel.h", - "include/grpc++/client_context.h", - "include/grpc++/completion_queue.h", - "include/grpc++/create_channel.h", - "include/grpc++/create_channel_posix.h", - "include/grpc++/generic/async_generic_service.h", - "include/grpc++/generic/generic_stub.h", - "include/grpc++/grpc++.h", - "include/grpc++/impl/call.h", - "include/grpc++/impl/client_unary_call.h", - "include/grpc++/impl/codegen/core_codegen.h", - "include/grpc++/impl/grpc_library.h", - "include/grpc++/impl/method_handler_impl.h", - "include/grpc++/impl/rpc_method.h", - "include/grpc++/impl/rpc_service_method.h", - "include/grpc++/impl/serialization_traits.h", - "include/grpc++/impl/server_builder_option.h", - "include/grpc++/impl/server_builder_plugin.h", - "include/grpc++/impl/server_initializer.h", - "include/grpc++/impl/service_type.h", - "include/grpc++/impl/sync.h", - "include/grpc++/impl/sync_cxx11.h", - "include/grpc++/impl/sync_no_cxx11.h", - "include/grpc++/impl/thd.h", - "include/grpc++/impl/thd_cxx11.h", - "include/grpc++/impl/thd_no_cxx11.h", - "include/grpc++/security/auth_context.h", - "include/grpc++/security/auth_metadata_processor.h", - "include/grpc++/security/credentials.h", - "include/grpc++/security/server_credentials.h", - "include/grpc++/server.h", - "include/grpc++/server_builder.h", - "include/grpc++/server_context.h", - "include/grpc++/server_posix.h", - "include/grpc++/support/async_stream.h", - "include/grpc++/support/async_unary_call.h", - "include/grpc++/support/byte_buffer.h", - "include/grpc++/support/channel_arguments.h", - "include/grpc++/support/config.h", - "include/grpc++/support/slice.h", - "include/grpc++/support/status.h", - "include/grpc++/support/status_code_enum.h", - "include/grpc++/support/string_ref.h", - "include/grpc++/support/stub_options.h", - "include/grpc++/support/sync_stream.h", - "include/grpc++/support/time.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - ], - includes = [ - "include", - ], - deps = [ - "//external:libssl", - "//external:protobuf_clib", - ":grpc", - ], -) - - - -cc_library( - name = "grpc++_cronet", - srcs = [ - "src/cpp/client/create_channel_internal.h", - "src/cpp/common/channel_filter.h", - "src/cpp/server/dynamic_thread_pool.h", - "src/cpp/server/thread_pool_interface.h", - "src/cpp/client/cronet_credentials.cc", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/insecure_create_auth_context.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/client/channel_cc.cc", - "src/cpp/client/client_context.cc", - "src/cpp/client/create_channel.cc", - "src/cpp/client/create_channel_internal.cc", - "src/cpp/client/create_channel_posix.cc", - "src/cpp/client/credentials_cc.cc", - "src/cpp/client/generic_stub.cc", - "src/cpp/common/channel_arguments.cc", - "src/cpp/common/channel_filter.cc", - "src/cpp/common/completion_queue_cc.cc", - "src/cpp/common/core_codegen.cc", - "src/cpp/common/rpc_method.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/dynamic_thread_pool.cc", - "src/cpp/server/server_builder.cc", - "src/cpp/server/server_cc.cc", - "src/cpp/server/server_context.cc", - "src/cpp/server/server_credentials.cc", - "src/cpp/server/server_posix.cc", - "src/cpp/util/byte_buffer_cc.cc", - "src/cpp/util/slice_cc.cc", - "src/cpp/util/status.cc", - "src/cpp/util/string_ref.cc", - "src/cpp/util/time_cc.cc", - "src/cpp/codegen/codegen_init.cc", - ], - hdrs = [ - "include/grpc++/alarm.h", - "include/grpc++/channel.h", - "include/grpc++/client_context.h", - "include/grpc++/completion_queue.h", - "include/grpc++/create_channel.h", - "include/grpc++/create_channel_posix.h", - "include/grpc++/generic/async_generic_service.h", - "include/grpc++/generic/generic_stub.h", - "include/grpc++/grpc++.h", - "include/grpc++/impl/call.h", - "include/grpc++/impl/client_unary_call.h", - "include/grpc++/impl/codegen/core_codegen.h", - "include/grpc++/impl/grpc_library.h", - "include/grpc++/impl/method_handler_impl.h", - "include/grpc++/impl/rpc_method.h", - "include/grpc++/impl/rpc_service_method.h", - "include/grpc++/impl/serialization_traits.h", - "include/grpc++/impl/server_builder_option.h", - "include/grpc++/impl/server_builder_plugin.h", - "include/grpc++/impl/server_initializer.h", - "include/grpc++/impl/service_type.h", - "include/grpc++/impl/sync.h", - "include/grpc++/impl/sync_cxx11.h", - "include/grpc++/impl/sync_no_cxx11.h", - "include/grpc++/impl/thd.h", - "include/grpc++/impl/thd_cxx11.h", - "include/grpc++/impl/thd_no_cxx11.h", - "include/grpc++/security/auth_context.h", - "include/grpc++/security/auth_metadata_processor.h", - "include/grpc++/security/credentials.h", - "include/grpc++/security/server_credentials.h", - "include/grpc++/server.h", - "include/grpc++/server_builder.h", - "include/grpc++/server_context.h", - "include/grpc++/server_posix.h", - "include/grpc++/support/async_stream.h", - "include/grpc++/support/async_unary_call.h", - "include/grpc++/support/byte_buffer.h", - "include/grpc++/support/channel_arguments.h", - "include/grpc++/support/config.h", - "include/grpc++/support/slice.h", - "include/grpc++/support/status.h", - "include/grpc++/support/status_code_enum.h", - "include/grpc++/support/string_ref.h", - "include/grpc++/support/stub_options.h", - "include/grpc++/support/sync_stream.h", - "include/grpc++/support/time.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - ], - includes = [ - "include", - ], - deps = [ - "//external:libssl", - ":gpr", - ":grpc_cronet", - ], -) - - - -cc_library( - name = "grpc++_reflection", - srcs = [ - "src/cpp/ext/proto_server_reflection.h", - "src/cpp/ext/proto_server_reflection.cc", - "src/cpp/ext/proto_server_reflection_plugin.cc", - "src/cpp/ext/reflection.grpc.pb.cc", - "src/cpp/ext/reflection.pb.cc", - ], - hdrs = [ - "include/grpc++/ext/proto_server_reflection_plugin.h", - "include/grpc++/ext/reflection.grpc.pb.h", - "include/grpc++/ext/reflection.pb.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc++/impl/codegen/config_protobuf.h", - ], - includes = [ - "include", - ], - deps = [ - ":grpc++", - ], -) - - - -cc_library( - name = "grpc++_reflection_codegen", - srcs = [ - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ], -) - - - -cc_library( - name = "grpc++_test", - srcs = [ - "include/grpc++/test/server_context_test_spouse.h", - "src/cpp/test/server_context_test_spouse.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":grpc++", - ], -) - - - -cc_library( - name = "grpc++_test_config", - srcs = [ - "test/cpp/util/test_config.h", - "test/cpp/util/test_config_cc.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - "//external:gflags", - ], -) - - - -cc_library( - name = "grpc++_test_util", - srcs = [ - "test/cpp/end2end/test_service_impl.h", - "test/cpp/util/byte_buffer_proto_helper.h", - "test/cpp/util/create_test_channel.h", - "test/cpp/util/string_ref_helper.h", - "test/cpp/util/subprocess.h", - "test/cpp/util/test_credentials_provider.h", - "test/cpp/end2end/test_service_impl.cc", - "test/cpp/util/byte_buffer_proto_helper.cc", - "test/cpp/util/create_test_channel.cc", - "test/cpp/util/string_ref_helper.cc", - "test/cpp/util/subprocess.cc", - "test/cpp/util/test_credentials_provider.cc", - "src/cpp/codegen/codegen_init.cc", - ], - hdrs = [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/thrift_serializer.h", - "include/grpc++/impl/codegen/thrift_utils.h", - ], - includes = [ - "include", - ], - deps = [ - ":test_util_proto", - "//external:googletest", - ":grpc++", - ":grpc_test_util", - ], -) - - - -cc_library( - name = "grpc++_unsecure", - srcs = [ - "src/cpp/client/create_channel_internal.h", - "src/cpp/common/channel_filter.h", - "src/cpp/server/dynamic_thread_pool.h", - "src/cpp/server/thread_pool_interface.h", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/insecure_create_auth_context.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/client/channel_cc.cc", - "src/cpp/client/client_context.cc", - "src/cpp/client/create_channel.cc", - "src/cpp/client/create_channel_internal.cc", - "src/cpp/client/create_channel_posix.cc", - "src/cpp/client/credentials_cc.cc", - "src/cpp/client/generic_stub.cc", - "src/cpp/common/channel_arguments.cc", - "src/cpp/common/channel_filter.cc", - "src/cpp/common/completion_queue_cc.cc", - "src/cpp/common/core_codegen.cc", - "src/cpp/common/rpc_method.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/dynamic_thread_pool.cc", - "src/cpp/server/server_builder.cc", - "src/cpp/server/server_cc.cc", - "src/cpp/server/server_context.cc", - "src/cpp/server/server_credentials.cc", - "src/cpp/server/server_posix.cc", - "src/cpp/util/byte_buffer_cc.cc", - "src/cpp/util/slice_cc.cc", - "src/cpp/util/status.cc", - "src/cpp/util/string_ref.cc", - "src/cpp/util/time_cc.cc", - "src/cpp/codegen/codegen_init.cc", - ], - hdrs = [ - "include/grpc++/alarm.h", - "include/grpc++/channel.h", - "include/grpc++/client_context.h", - "include/grpc++/completion_queue.h", - "include/grpc++/create_channel.h", - "include/grpc++/create_channel_posix.h", - "include/grpc++/generic/async_generic_service.h", - "include/grpc++/generic/generic_stub.h", - "include/grpc++/grpc++.h", - "include/grpc++/impl/call.h", - "include/grpc++/impl/client_unary_call.h", - "include/grpc++/impl/codegen/core_codegen.h", - "include/grpc++/impl/grpc_library.h", - "include/grpc++/impl/method_handler_impl.h", - "include/grpc++/impl/rpc_method.h", - "include/grpc++/impl/rpc_service_method.h", - "include/grpc++/impl/serialization_traits.h", - "include/grpc++/impl/server_builder_option.h", - "include/grpc++/impl/server_builder_plugin.h", - "include/grpc++/impl/server_initializer.h", - "include/grpc++/impl/service_type.h", - "include/grpc++/impl/sync.h", - "include/grpc++/impl/sync_cxx11.h", - "include/grpc++/impl/sync_no_cxx11.h", - "include/grpc++/impl/thd.h", - "include/grpc++/impl/thd_cxx11.h", - "include/grpc++/impl/thd_no_cxx11.h", - "include/grpc++/security/auth_context.h", - "include/grpc++/security/auth_metadata_processor.h", - "include/grpc++/security/credentials.h", - "include/grpc++/security/server_credentials.h", - "include/grpc++/server.h", - "include/grpc++/server_builder.h", - "include/grpc++/server_context.h", - "include/grpc++/server_posix.h", - "include/grpc++/support/async_stream.h", - "include/grpc++/support/async_unary_call.h", - "include/grpc++/support/byte_buffer.h", - "include/grpc++/support/channel_arguments.h", - "include/grpc++/support/config.h", - "include/grpc++/support/slice.h", - "include/grpc++/support/status.h", - "include/grpc++/support/status_code_enum.h", - "include/grpc++/support/string_ref.h", - "include/grpc++/support/stub_options.h", - "include/grpc++/support/sync_stream.h", - "include/grpc++/support/time.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - ], - includes = [ - "include", - ], - deps = [ - "//external:protobuf_clib", - ":gpr", - ":grpc_unsecure", - ], -) - - - -cc_library( - name = "grpc_cli_libs", - srcs = [ - "test/cpp/util/cli_call.h", - "test/cpp/util/cli_credentials.h", - "test/cpp/util/config_grpc_cli.h", - "test/cpp/util/grpc_tool.h", - "test/cpp/util/proto_file_parser.h", - "test/cpp/util/proto_reflection_descriptor_database.h", - "test/cpp/util/service_describer.h", - "test/cpp/util/cli_call.cc", - "test/cpp/util/cli_credentials.cc", - "test/cpp/util/grpc_tool.cc", - "test/cpp/util/proto_file_parser.cc", - "test/cpp/util/proto_reflection_descriptor_database.cc", - "test/cpp/util/service_describer.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":grpc++_reflection", - ":grpc++", - ], -) - - - -cc_library( - name = "grpc_plugin_support", - srcs = [ - "src/compiler/config.h", - "src/compiler/cpp_generator.h", - "src/compiler/cpp_generator_helpers.h", - "src/compiler/csharp_generator.h", - "src/compiler/csharp_generator_helpers.h", - "src/compiler/generator_helpers.h", - "src/compiler/node_generator.h", - "src/compiler/node_generator_helpers.h", - "src/compiler/objective_c_generator.h", - "src/compiler/objective_c_generator_helpers.h", - "src/compiler/php_generator.h", - "src/compiler/php_generator_helpers.h", - "src/compiler/python_generator.h", - "src/compiler/ruby_generator.h", - "src/compiler/ruby_generator_helpers-inl.h", - "src/compiler/ruby_generator_map-inl.h", - "src/compiler/ruby_generator_string-inl.h", - "src/compiler/cpp_generator.cc", - "src/compiler/csharp_generator.cc", - "src/compiler/node_generator.cc", - "src/compiler/objective_c_generator.cc", - "src/compiler/php_generator.cc", - "src/compiler/python_generator.cc", - "src/compiler/ruby_generator.cc", - ], - hdrs = [ - "include/grpc++/impl/codegen/config_protobuf.h", - ], - includes = [ - "include", - ], - deps = [ - "//external:protobuf_compiler", - ], -) - - - -cc_library( - name = "interop_client_helper", - srcs = [ - "test/cpp/interop/client_helper.h", - "test/cpp/interop/client_helper.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":interop_proto", - "//external:gflags", - ":grpc++_test_util", - ":grpc_test_util", - ":grpc++", - ":grpc", - ":gpr", - ], -) - - - -cc_library( - name = "interop_client_main", - srcs = [ - "test/cpp/interop/interop_client.h", - "test/cpp/interop/client.cc", - "test/cpp/interop/interop_client.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":interop_proto", - "//external:gflags", - ":interop_client_helper", - ":grpc++_test_util", - ":grpc_test_util", - ":grpc++", - ":grpc", - ":gpr_test_util", - ":gpr", - ":grpc++_test_config", - ], -) - - -cc_library( - name = "stress_test", - srcs = [ - "test/cpp/interop/interop_client.cc", - "test/cpp/interop/stress_interop_client.cc", - "test/cpp/interop/stress_test.cc", - "test/cpp/util/metrics_server.cc", - ], - hdrs = [ - "test/cpp/interop/client_helper.h", - "test/cpp/interop/interop_client.h", - "test/cpp/interop/stress_interop_client.h", - "test/cpp/util/metrics_server.h", - ], - includes = [ - "include", - ], - deps = [ - ":interop_proto", - "//external:gflags", - ":interop_client_helper", - ":grpc++_test_util", - ":grpc_test_util", - ":grpc++", - ":grpc", - ":gpr_test_util", - ":gpr", - ":grpc++_test_config", - ], -) - - -cc_library( - name = "metrics_client", - srcs = [ - "test/cpp/interop/metrics_client.cc", - "test/cpp/util/metrics_server.h", - ], - includes = [ - "include", - ], - deps = [ - ":interop_proto", - ":grpc++", - ":grpc", - ":gpr", - ":grpc++_test_config", - ], -) - - -cc_library( - name = "interop_server_helper", - srcs = [ - "test/cpp/interop/server_helper.h", - "test/cpp/interop/server_helper.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":interop_proto", - "//external:gflags", - ":grpc_test_util", - ":grpc++", - ":grpc", - ":gpr", - ], -) - - - -cc_library( - name = "interop_server_lib", - srcs = [ - "test/cpp/interop/interop_server.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":interop_proto", - "//external:gflags", - ":interop_server_helper", - ":grpc++_test_util", - ":grpc_test_util", - ":grpc++", - ":grpc", - ":gpr_test_util", - ":gpr", - ":grpc++_test_config", - ], -) - - - -cc_library( - name = "interop_server_main", - srcs = [ - "test/cpp/interop/interop_server_bootstrap.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":interop_proto", - "//external:gflags", - ":interop_server_lib", - ], -) - - - -cc_library( - name = "qps", - srcs = [ - "test/cpp/qps/client.h", - "test/cpp/qps/driver.h", - "test/cpp/qps/histogram.h", - "test/cpp/qps/interarrival.h", - "test/cpp/qps/limit_cores.h", - "test/cpp/qps/parse_json.h", - "test/cpp/qps/qps_worker.h", - "test/cpp/qps/report.h", - "test/cpp/qps/server.h", - "test/cpp/qps/stats.h", - "test/cpp/qps/usage_timer.h", - "test/cpp/util/benchmark_config.h", - "test/cpp/qps/client_async.cc", - "test/cpp/qps/client_sync.cc", - "test/cpp/qps/driver.cc", - "test/cpp/qps/limit_cores.cc", - "test/cpp/qps/parse_json.cc", - "test/cpp/qps/qps_worker.cc", - "test/cpp/qps/report.cc", - "test/cpp/qps/server_async.cc", - "test/cpp/qps/server_sync.cc", - "test/cpp/qps/usage_timer.cc", - "test/cpp/util/benchmark_config.cc", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":qps_proto", - "//external:gflags", - ":grpc_test_util", - ":grpc++_test_util", - ":grpc++", - ], -) - - - -cc_library( - name = "grpc_csharp_ext", - srcs = [ - "src/csharp/ext/grpc_csharp_ext.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":grpc", - ":gpr", - ], -) - - - -cc_library( - name = "bad_client_test", - srcs = [ - "test/core/bad_client/bad_client.h", - "test/core/bad_client/bad_client.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":grpc_test_util_unsecure", - ":grpc_unsecure", - ":gpr_test_util", - ":gpr", - ], -) - - - -cc_library( - name = "bad_ssl_test_server", - srcs = [ - "test/core/bad_ssl/server_common.h", - "test/core/bad_ssl/server_common.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":grpc_test_util", - ":grpc", - ":gpr_test_util", - ":gpr", - ], -) - - - -cc_library( - name = "end2end_tests", - srcs = [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h", - "test/core/end2end/end2end_tests.c", - "test/core/end2end/tests/bad_hostname.c", - "test/core/end2end/tests/binary_metadata.c", - "test/core/end2end/tests/call_creds.c", - "test/core/end2end/tests/cancel_after_accept.c", - "test/core/end2end/tests/cancel_after_client_done.c", - "test/core/end2end/tests/cancel_after_invoke.c", - "test/core/end2end/tests/cancel_before_invoke.c", - "test/core/end2end/tests/cancel_in_a_vacuum.c", - "test/core/end2end/tests/cancel_with_status.c", - "test/core/end2end/tests/compressed_payload.c", - "test/core/end2end/tests/connectivity.c", - "test/core/end2end/tests/default_host.c", - "test/core/end2end/tests/disappearing_server.c", - "test/core/end2end/tests/empty_batch.c", - "test/core/end2end/tests/filter_call_init_fails.c", - "test/core/end2end/tests/filter_causes_close.c", - "test/core/end2end/tests/graceful_server_shutdown.c", - "test/core/end2end/tests/high_initial_seqno.c", - "test/core/end2end/tests/hpack_size.c", - "test/core/end2end/tests/idempotent_request.c", - "test/core/end2end/tests/invoke_large_request.c", - "test/core/end2end/tests/large_metadata.c", - "test/core/end2end/tests/load_reporting_hook.c", - "test/core/end2end/tests/max_concurrent_streams.c", - "test/core/end2end/tests/max_message_length.c", - "test/core/end2end/tests/negative_deadline.c", - "test/core/end2end/tests/network_status_change.c", - "test/core/end2end/tests/no_logging.c", - "test/core/end2end/tests/no_op.c", - "test/core/end2end/tests/payload.c", - "test/core/end2end/tests/ping.c", - "test/core/end2end/tests/ping_pong_streaming.c", - "test/core/end2end/tests/registered_call.c", - "test/core/end2end/tests/request_with_flags.c", - "test/core/end2end/tests/request_with_payload.c", - "test/core/end2end/tests/server_finishes_request.c", - "test/core/end2end/tests/shutdown_finishes_calls.c", - "test/core/end2end/tests/shutdown_finishes_tags.c", - "test/core/end2end/tests/simple_cacheable_request.c", - "test/core/end2end/tests/simple_delayed_request.c", - "test/core/end2end/tests/simple_metadata.c", - "test/core/end2end/tests/simple_request.c", - "test/core/end2end/tests/streaming_error_response.c", - "test/core/end2end/tests/trailing_metadata.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - "//external:libssl", - ":grpc_test_util", - ":grpc", - ":gpr_test_util", - ":gpr", - ], -) - - - -cc_library( - name = "end2end_nosec_tests", - srcs = [ - "test/core/end2end/tests/cancel_test_helpers.h", - "test/core/end2end/end2end_tests.h", - "test/core/end2end/end2end_nosec_tests.c", - "test/core/end2end/tests/bad_hostname.c", - "test/core/end2end/tests/binary_metadata.c", - "test/core/end2end/tests/cancel_after_accept.c", - "test/core/end2end/tests/cancel_after_client_done.c", - "test/core/end2end/tests/cancel_after_invoke.c", - "test/core/end2end/tests/cancel_before_invoke.c", - "test/core/end2end/tests/cancel_in_a_vacuum.c", - "test/core/end2end/tests/cancel_with_status.c", - "test/core/end2end/tests/compressed_payload.c", - "test/core/end2end/tests/connectivity.c", - "test/core/end2end/tests/default_host.c", - "test/core/end2end/tests/disappearing_server.c", - "test/core/end2end/tests/empty_batch.c", - "test/core/end2end/tests/filter_call_init_fails.c", - "test/core/end2end/tests/filter_causes_close.c", - "test/core/end2end/tests/graceful_server_shutdown.c", - "test/core/end2end/tests/high_initial_seqno.c", - "test/core/end2end/tests/hpack_size.c", - "test/core/end2end/tests/idempotent_request.c", - "test/core/end2end/tests/invoke_large_request.c", - "test/core/end2end/tests/large_metadata.c", - "test/core/end2end/tests/load_reporting_hook.c", - "test/core/end2end/tests/max_concurrent_streams.c", - "test/core/end2end/tests/max_message_length.c", - "test/core/end2end/tests/negative_deadline.c", - "test/core/end2end/tests/network_status_change.c", - "test/core/end2end/tests/no_logging.c", - "test/core/end2end/tests/no_op.c", - "test/core/end2end/tests/payload.c", - "test/core/end2end/tests/ping.c", - "test/core/end2end/tests/ping_pong_streaming.c", - "test/core/end2end/tests/registered_call.c", - "test/core/end2end/tests/request_with_flags.c", - "test/core/end2end/tests/request_with_payload.c", - "test/core/end2end/tests/server_finishes_request.c", - "test/core/end2end/tests/shutdown_finishes_calls.c", - "test/core/end2end/tests/shutdown_finishes_tags.c", - "test/core/end2end/tests/simple_cacheable_request.c", - "test/core/end2end/tests/simple_delayed_request.c", - "test/core/end2end/tests/simple_metadata.c", - "test/core/end2end/tests/simple_request.c", - "test/core/end2end/tests/streaming_error_response.c", - "test/core/end2end/tests/trailing_metadata.c", - ], - hdrs = [ - ], - includes = [ - "include", - ], - deps = [ - ":grpc_test_util_unsecure", - ":grpc_unsecure", - ":gpr_test_util", - ":gpr", - ], -) - - - - -objc_library( - name = "gpr_objc", - srcs = [ - "src/core/lib/profiling/basic_timers.c", - "src/core/lib/profiling/stap_timers.c", - "src/core/lib/support/alloc.c", - "src/core/lib/support/avl.c", - "src/core/lib/support/backoff.c", - "src/core/lib/support/cmdline.c", - "src/core/lib/support/cpu_iphone.c", - "src/core/lib/support/cpu_linux.c", - "src/core/lib/support/cpu_posix.c", - "src/core/lib/support/cpu_windows.c", - "src/core/lib/support/env_linux.c", - "src/core/lib/support/env_posix.c", - "src/core/lib/support/env_windows.c", - "src/core/lib/support/histogram.c", - "src/core/lib/support/host_port.c", - "src/core/lib/support/log.c", - "src/core/lib/support/log_android.c", - "src/core/lib/support/log_linux.c", - "src/core/lib/support/log_posix.c", - "src/core/lib/support/log_windows.c", - "src/core/lib/support/mpscq.c", - "src/core/lib/support/murmur_hash.c", - "src/core/lib/support/percent_encoding.c", - "src/core/lib/support/slice.c", - "src/core/lib/support/slice_buffer.c", - "src/core/lib/support/stack_lockfree.c", - "src/core/lib/support/string.c", - "src/core/lib/support/string_posix.c", - "src/core/lib/support/string_util_windows.c", - "src/core/lib/support/string_windows.c", - "src/core/lib/support/subprocess_posix.c", - "src/core/lib/support/subprocess_windows.c", - "src/core/lib/support/sync.c", - "src/core/lib/support/sync_posix.c", - "src/core/lib/support/sync_windows.c", - "src/core/lib/support/thd.c", - "src/core/lib/support/thd_posix.c", - "src/core/lib/support/thd_windows.c", - "src/core/lib/support/time.c", - "src/core/lib/support/time_posix.c", - "src/core/lib/support/time_precise.c", - "src/core/lib/support/time_windows.c", - "src/core/lib/support/tls_pthread.c", - "src/core/lib/support/tmpfile_msys.c", - "src/core/lib/support/tmpfile_posix.c", - "src/core/lib/support/tmpfile_windows.c", - "src/core/lib/support/wrap_memcpy.c", - ], - hdrs = [ - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/atm_gcc_atomic.h", - "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_windows.h", - "include/grpc/support/avl.h", - "include/grpc/support/cmdline.h", - "include/grpc/support/cpu.h", - "include/grpc/support/histogram.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/log_windows.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", - "include/grpc/support/sync.h", - "include/grpc/support/sync_generic.h", - "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_windows.h", - "include/grpc/support/thd.h", - "include/grpc/support/time.h", - "include/grpc/support/tls.h", - "include/grpc/support/tls_gcc.h", - "include/grpc/support/tls_msvc.h", - "include/grpc/support/tls_pthread.h", - "include/grpc/support/useful.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "src/core/lib/profiling/timers.h", - "src/core/lib/support/backoff.h", - "src/core/lib/support/block_annotate.h", - "src/core/lib/support/env.h", - "src/core/lib/support/mpscq.h", - "src/core/lib/support/murmur_hash.h", - "src/core/lib/support/percent_encoding.h", - "src/core/lib/support/stack_lockfree.h", - "src/core/lib/support/string.h", - "src/core/lib/support/string_windows.h", - "src/core/lib/support/thd_internal.h", - "src/core/lib/support/time_precise.h", - "src/core/lib/support/tmpfile.h", - ], - includes = [ - "include", - ], - deps = [ - ], -) - - - -objc_library( - name = "grpc_objc", - srcs = [ - "src/core/lib/surface/init.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_uv.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_uv.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_uv.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_uv.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_uv.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_utils_uv.c", - "src/core/lib/iomgr/socket_utils_windows.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_uv.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_uv.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_uv.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer_generic.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/timer_uv.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_uv.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/method_config.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", - "src/core/ext/transport/chttp2/transport/bin_decoder.c", - "src/core/ext/transport/chttp2/transport/bin_encoder.c", - "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", - "src/core/ext/transport/chttp2/transport/chttp2_transport.c", - "src/core/ext/transport/chttp2/transport/frame_data.c", - "src/core/ext/transport/chttp2/transport/frame_goaway.c", - "src/core/ext/transport/chttp2/transport/frame_ping.c", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", - "src/core/ext/transport/chttp2/transport/frame_settings.c", - "src/core/ext/transport/chttp2/transport/frame_window_update.c", - "src/core/ext/transport/chttp2/transport/hpack_encoder.c", - "src/core/ext/transport/chttp2/transport/hpack_parser.c", - "src/core/ext/transport/chttp2/transport/hpack_table.c", - "src/core/ext/transport/chttp2/transport/huffsyms.c", - "src/core/ext/transport/chttp2/transport/incoming_metadata.c", - "src/core/ext/transport/chttp2/transport/parsing.c", - "src/core/ext/transport/chttp2/transport/status_conversion.c", - "src/core/ext/transport/chttp2/transport/stream_lists.c", - "src/core/ext/transport/chttp2/transport/stream_map.c", - "src/core/ext/transport/chttp2/transport/varint.c", - "src/core/ext/transport/chttp2/transport/writing.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_generic.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", - "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - "src/core/ext/client_channel/channel_connectivity.c", - "src/core/ext/client_channel/client_channel.c", - "src/core/ext/client_channel/client_channel_factory.c", - "src/core/ext/client_channel/client_channel_plugin.c", - "src/core/ext/client_channel/connector.c", - "src/core/ext/client_channel/default_initial_connect_string.c", - "src/core/ext/client_channel/http_connect_handshaker.c", - "src/core/ext/client_channel/initial_connect_string.c", - "src/core/ext/client_channel/lb_policy.c", - "src/core/ext/client_channel/lb_policy_factory.c", - "src/core/ext/client_channel/lb_policy_registry.c", - "src/core/ext/client_channel/parse_address.c", - "src/core/ext/client_channel/resolver.c", - "src/core/ext/client_channel/resolver_factory.c", - "src/core/ext/client_channel/resolver_registry.c", - "src/core/ext/client_channel/subchannel.c", - "src/core/ext/client_channel/subchannel_index.c", - "src/core/ext/client_channel/uri_parser.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", - "src/core/ext/lb_policy/grpclb/grpclb.c", - "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", - "src/core/ext/lb_policy/pick_first/pick_first.c", - "src/core/ext/lb_policy/round_robin/round_robin.c", - "src/core/ext/resolver/dns/native/dns_resolver.c", - "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", - "src/core/ext/load_reporting/load_reporting.c", - "src/core/ext/load_reporting/load_reporting_filter.c", - "src/core/ext/census/base_resources.c", - "src/core/ext/census/context.c", - "src/core/ext/census/gen/census.pb.c", - "src/core/ext/census/gen/trace_context.pb.c", - "src/core/ext/census/grpc_context.c", - "src/core/ext/census/grpc_filter.c", - "src/core/ext/census/grpc_plugin.c", - "src/core/ext/census/initialize.c", - "src/core/ext/census/mlog.c", - "src/core/ext/census/operation.c", - "src/core/ext/census/placeholders.c", - "src/core/ext/census/resource.c", - "src/core/ext/census/trace_context.c", - "src/core/ext/census/tracing.c", - "src/core/plugin_registry/grpc_plugin_registry.c", - ], - hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc/grpc_security.h", - "include/grpc/census.h", - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_uv.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/port.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_uv.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_generic.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/timer_uv.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_uv.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/method_config.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", - "src/core/ext/client_channel/client_channel.h", - "src/core/ext/client_channel/client_channel_factory.h", - "src/core/ext/client_channel/connector.h", - "src/core/ext/client_channel/http_connect_handshaker.h", - "src/core/ext/client_channel/initial_connect_string.h", - "src/core/ext/client_channel/lb_policy.h", - "src/core/ext/client_channel/lb_policy_factory.h", - "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/parse_address.h", - "src/core/ext/client_channel/resolver.h", - "src/core/ext/client_channel/resolver_factory.h", - "src/core/ext/client_channel/resolver_registry.h", - "src/core/ext/client_channel/subchannel.h", - "src/core/ext/client_channel/subchannel_index.h", - "src/core/ext/client_channel/uri_parser.h", - "src/core/ext/lb_policy/grpclb/grpclb.h", - "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", - "src/core/ext/load_reporting/load_reporting.h", - "src/core/ext/load_reporting/load_reporting_filter.h", - "src/core/ext/census/aggregation.h", - "src/core/ext/census/base_resources.h", - "src/core/ext/census/census_interface.h", - "src/core/ext/census/census_rpc_stats.h", - "src/core/ext/census/gen/census.pb.h", - "src/core/ext/census/gen/trace_context.pb.h", - "src/core/ext/census/grpc_filter.h", - "src/core/ext/census/mlog.h", - "src/core/ext/census/resource.h", - "src/core/ext/census/rpc_metric_id.h", - "src/core/ext/census/trace_context.h", - ], - includes = [ - "include", - ], - deps = [ - ":gpr_objc", - "//external:libssl_objc", - "//third_party/nanopb", - ], - sdk_dylibs = ["libz"], -) - - - -cc_binary( - name = "grpc_cpp_plugin", - srcs = [ - "src/compiler/cpp_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_csharp_plugin", - srcs = [ - "src/compiler/csharp_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_node_plugin", - srcs = [ - "src/compiler/node_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_objective_c_plugin", - srcs = [ - "src/compiler/objective_c_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_php_plugin", - srcs = [ - "src/compiler/php_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_python_plugin", - srcs = [ - "src/compiler/python_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_ruby_plugin", - srcs = [ - "src/compiler/ruby_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - - - - - - - -objc_path = "src/objective-c" - -rx_library_path = objc_path + "/RxLibrary" - -objc_library( - name = "rx_library", - hdrs = glob([ - rx_library_path + "/*.h", - rx_library_path + "/transformations/*.h", - ]), - srcs = glob([ - rx_library_path + "/*.m", - rx_library_path + "/transformations/*.m", - ]), - includes = [objc_path], - deps = [ - ":rx_library_private", - ], -) - -objc_library( - name = "rx_library_private", - hdrs = glob([rx_library_path + "/private/*.h"]), - srcs = glob([rx_library_path + "/private/*.m"]), - visibility = ["//visibility:private"], -) - -objc_client_path = objc_path + "/GRPCClient" - -objc_library( - name = "grpc_client", - hdrs = glob([ - objc_client_path + "/*.h", - objc_client_path + "/private/*.h", - ]), - srcs = glob([ - objc_client_path + "/*.m", - objc_client_path + "/private/*.m", - ]), - includes = [objc_path], - bundles = [":gRPCCertificates"], - deps = [ - ":grpc_objc", - ":rx_library", - ], -) - -objc_bundle_library( - # The choice of name is signicant here, since it determines the bundle name. - name = "gRPCCertificates", - resources = ["etc/roots.pem"], -) - -proto_objc_rpc_path = objc_path + "/ProtoRPC" - -objc_library( - name = "proto_objc_rpc", - hdrs = glob([ - proto_objc_rpc_path + "/*.h", - ]), - srcs = glob([ - proto_objc_rpc_path + "/*.m", - ]), - includes = [objc_path], - deps = [ - ":grpc_client", - ":rx_library", - "//external:protobuf_objc", - ], -) diff --git a/tools/src/deploy/example/bookstore_swagger_template.json b/tools/src/deploy/example/bookstore_swagger_template.json index 0577999f4..a36453ead 100644 --- a/tools/src/deploy/example/bookstore_swagger_template.json +++ b/tools/src/deploy/example/bookstore_swagger_template.json @@ -91,23 +91,18 @@ "description": "get message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences":[] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.echo.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] }, @@ -122,23 +117,18 @@ "description": "post message response" } }, - "x-security": [ + "security": [ { - "test_jwk": { - "audiences":[] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences":[] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.echo.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] } @@ -185,52 +175,34 @@ } } }, - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [], + "api_key": [] }, { - "google_identity_toolkit": { - "audiences": [] - } + "google_identity_toolkit": [], + "api_key": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [], + "api_key": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [], + "api_key": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [], + "api_key": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [], + "api_key": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [], + "api_key": [] } ] } @@ -260,55 +232,27 @@ } } }, - "security": [], - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [] }, { - "google_identity_toolkit": { - "audiences": [ - "esp-test-client" - ] - } + "google_identity_toolkit": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [] } ] }, @@ -426,54 +370,30 @@ } } }, - "x-security": [ - { - "google_id_token": { - "audiences": [ - "848149964201.apps.googleusercontent.com", - "841077041629.apps.googleusercontent.com", - "488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com", - "488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" - ] - } + "security": [ + { + "google_id_token": [] }, { - "google_identity_toolkit": { - "audiences": [ - "esp-test-client" - ] - } + "google_identity_toolkit": [] }, { - "auth0_symmetric": { - "audiences": [ - "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" - ] - } + "auth0_symmetric": [] }, { - "auth0_jwk": { - "audiences": [ - "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" - ] - } + "auth0_jwk": [] }, { - "test_jwk": { - "audiences": [] - } + "test_jwk": [] }, { - "test_x509": { - "audiences": [] - } + "test_x509": [] }, { - "test_symmetric": { - "audiences": [ - "test.esp.audience" - ] - } + "test_symmetric": [] + }, + { + "api_key": [] } ] }, @@ -608,50 +528,56 @@ "authorizationUrl": "https://esp-jwk.auth0.com/authorize", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://esp-jwk.auth0.com/", - "x-jwks_uri": "https://esp-jwk.auth0.com/.well-known/jwks.json" + "x-google-issuer": "https://esp-jwk.auth0.com/", + "x-google-jwks_uri": "https://esp-jwk.auth0.com/.well-known/jwks.json", + "x-google-audiences": "Uuts8fJWf1yieO9Ocv0Uk6LBqsUTePQq" }, "auth0_symmetric": { "authorizationUrl": "https://esp-symmetric.auth0.com/authorize", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://esp-symmetric.auth0.com/", - "x-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-https_esp-symmetric_auth0_com" + "x-google-issuer": "https://esp-symmetric.auth0.com/", + "x-google-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-https_esp-symmetric_auth0_com", + "x-google-audiences": "sI0N2qOcfYoizZtstfnkEbsUWt6bluT0" }, "google_id_token": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://accounts.google.com", - "x-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs" + "x-google-issuer": "https://accounts.google.com", + "x-google-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs", + "x-google-audiences": "848149964201.apps.googleusercontent.com, 841077041629.apps.googleusercontent.com, 488010225785-g97tab3t7jdj51fr8vbqvmh4bfic3g5k.apps.googleusercontent.com, 488010225785-qvp4qbiak296t4afcej35dh4maoufmhc.apps.googleusercontent.com" + }, "google_identity_toolkit": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://securetoken.google.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com" + "x-google-issuer": "https://securetoken.google.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com", + "x-google-audiences": "esp-test-client" }, "test_jwk": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" + "x-google-issuer": "loadtest@esp-test-client.iam.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/jwk/loadtest@esp-test-client.iam.gserviceaccount.com" }, "test_symmetric": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "https://test.esp.client", - "x-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-test_esp_client" + "x-google-issuer": "https://test.esp.client", + "x-google-jwks_uri": "http://169.254.169.254/computeMetadata/v1/project/attributes/auth-key-test_esp_client", + "x-google-audiences": "test.echo.audience, test.esp.audience" }, "test_x509": { "authorizationUrl": "", "flow": "implicit", "type": "oauth2", - "x-issuer": "23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com", - "x-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com" + "x-google-issuer": "23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com", + "x-google-jwks_uri": "https://www.googleapis.com/service_accounts/v1/metadata/x509/23028304136-fbju1j1cdfpc5q9q6s23gm56trn0c9ti@developer.gserviceaccount.com" } } }