Skip to content

Commit

Permalink
Extension: update gRPC HTTP/1.1 Reverse Bridge extension documentatio…
Browse files Browse the repository at this point in the history
…n & code layout (envoyproxy#6158)

Signed-off-by: Michael Payne <[email protected]>
  • Loading branch information
moderation authored and mattklein123 committed Mar 5, 2019
1 parent f59a30e commit 9befe9f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 17 deletions.
5 changes: 3 additions & 2 deletions api/envoy/config/filter/http/ext_authz/v2/ext_authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ syntax = "proto3";
package envoy.config.filter.http.ext_authz.v2;

option java_outer_classname = "ExtAuthzProto";
option java_package = "io.envoyproxy.envoy.config.filter.http.ext_authz.v2";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.config.filter.http.ext_authz.v2";
option go_package = "v2";

import "envoy/api/v2/core/base.proto";
Expand All @@ -16,7 +16,8 @@ import "envoy/type/matcher/string.proto";
import "validate/validate.proto";

// [#protodoc-title: External Authorization]
// ExtAuthz :ref:`configuration overview <config_http_filters_ext_authz>`.
// External Authorization :ref:`configuration overview <config_http_filters_ext_authz>`.

message ExtAuthz {
// External authorization service configuration.
oneof services {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
syntax = "proto3";

package envoy.extensions.filter.http.grpc_http1_reverse_bridge.v2alpha1;
package envoy.config.filter.http.grpc_http1_reverse_bridge.v2alpha1;

option java_outer_classname = "ConfigProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.extensions.filter.http.grpc_http1_reverse_bridge.v2alpha1";
option java_package = "io.envoyproxy.envoy.config.filter.http.grpc_http1_reverse_bridge.v2alpha1";
option go_package = "v2";

import "validate/validate.proto";

// [#protodoc-title: Extensions gRPC Http1 Reverse Bridge]
// [#protodoc-title: gRPC HTTP/1.1 Reverse Bridge]
// gRPC HTTP/1.1 Reverse Bridge :ref:`configuration overview
// <config_http_filters_grpc_http1_reverse_bridge>`.

// gRPC reverse bridge filter configuration
message FilterConfig {
// The content-type to pass to the upstream when the gRPC bridge filter is applied.
Expand Down
3 changes: 3 additions & 0 deletions api/envoy/config/filter/http/jwt_authn/v2alpha/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "validate/validate.proto";

// [#protodoc-title: JWT Authentication]
// JWT Authentication :ref:`configuration overview <config_http_filters_jwt_authn>`.

// Please see following for JWT authentication flow:
//
// * `JSON Web Token (JWT) <https://tools.ietf.org/html/rfc7519>`_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,20 @@ message HttpFilter {
// [#comment:TODO(mattklein123): Auto generate the following list]
// * :ref:`envoy.buffer <config_http_filters_buffer>`
// * :ref:`envoy.cors <config_http_filters_cors>`
// * :ref:`envoy.ext_authz <config_http_filters_ext_authz>`
// * :ref:`envoy.fault <config_http_filters_fault_injection>`
// * :ref:`envoy.filters.http.header_to_metadata <config_http_filters_header_to_metadata>`
// * :ref:`envoy.filters.http.grpc_http1_reverse_bridge \
// <config_http_filters_grpc_http1_reverse_bridge>`
// * :ref:`envoy.filters.http.jwt_authn <config_http_filters_jwt_authn>`
// * :ref:`envoy.filters.http.rbac <config_http_filters_rbac>`
// * :ref:`envoy.filters.http.tap <config_http_filters_tap>`
// * :ref:`envoy.gzip <config_http_filters_gzip>`
// * :ref:`envoy.http_dynamo_filter <config_http_filters_dynamo>`
// * :ref:`envoy.grpc_http1_bridge <config_http_filters_grpc_bridge>`
// * :ref:`envoy.grpc_json_transcoder <config_http_filters_grpc_json_transcoder>`
// * :ref:`envoy.grpc_web <config_http_filters_grpc_web>`
// * :ref:`envoy.health_check <config_http_filters_health_check>`
// * :ref:`envoy.header_to_metadata <config_http_filters_header_to_metadata>`
// * :ref:`envoy.ip_tagging <config_http_filters_ip_tagging>`
// * :ref:`envoy.lua <config_http_filters_lua>`
// * :ref:`envoy.rate_limit <config_http_filters_rate_limit>`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.. _config_http_filters_grpc_reverse_bridge:
.. _config_http_filters_grpc_http1_reverse_bridge:

gRPC HTTP/1.1 reverse bridge
============================

* gRPC :ref:`architecture overview <arch_overview_grpc>`
* :ref:`v2 API reference <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpFilter.name>`
* This filter should be configured with the name *envoy.grpc_http1_reverse_bridge*.
* This filter should be configured with the name *envoy.filters.http.grpc_http1_reverse_bridge*.

This is a filter that enables converting an incoming gRPC request into a HTTP/1.1 request to allow
a server that does not understand HTTP/2 or gRPC semantics to handle the request.
Expand Down
4 changes: 2 additions & 2 deletions docs/root/intro/arch_overview/grpc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Envoy supports two gRPC bridges:
* :ref:`grpc_http1_bridge filter <config_http_filters_grpc_bridge>` which allows gRPC requests to be sent to Envoy over
HTTP/1.1. Envoy then translates the requests to HTTP/2 for transport to the target server. The response is translated back to HTTP/1.1.
When installed, the bridge filter gathers per RPC statistics in addition to the standard array of global HTTP statistics.
* :ref:`grpc_http1_reverse_bridge filter <config_http_filters_grpc_reverse_bridge>` which allows gRPC requests to be sent to Envoy and
then translated to HTTP/1.1 when sent to the upstream. The response is then converted back into gRPC when sent to the downstream.
* :ref:`grpc_http1_reverse_bridge filter <config_http_filters_grpc_http1_reverse_bridge>` which allows gRPC requests to be sent to Envoy
and then translated to HTTP/1.1 when sent to the upstream. The response is then converted back into gRPC when sent to the downstream.
This filter can also optionally manage the gRPC frame header, allowing the upstream to not have to be gRPC aware at all.

.. _arch_overview_grpc_services:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ namespace HttpFilters {
namespace GrpcHttp1ReverseBridge {

Http::FilterFactoryCb Config::createFilterFactoryFromProtoTyped(
const envoy::extensions::filter::http::grpc_http1_reverse_bridge::v2alpha1::FilterConfig&
config,
const envoy::config::filter::http::grpc_http1_reverse_bridge::v2alpha1::FilterConfig& config,
const std::string&, Server::Configuration::FactoryContext&) {
return [config](Envoy::Http::FilterChainFactoryCallbacks& callbacks) -> void {
callbacks.addStreamFilter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ namespace Extensions {
namespace HttpFilters {
namespace GrpcHttp1ReverseBridge {

class Config
: public Common::FactoryBase<
envoy::extensions::filter::http::grpc_http1_reverse_bridge::v2alpha1::FilterConfig> {
class Config : public Common::FactoryBase<
envoy::config::filter::http::grpc_http1_reverse_bridge::v2alpha1::FilterConfig> {
public:
Config() : FactoryBase(HttpFilterNames::get().GrpcHttp1ReverseBridge) {}

Http::FilterFactoryCb createFilterFactoryFromProtoTyped(
const envoy::extensions::filter::http::grpc_http1_reverse_bridge::v2alpha1::FilterConfig&
config,
const envoy::config::filter::http::grpc_http1_reverse_bridge::v2alpha1::FilterConfig& config,
const std::string& stat_prefix,
Envoy::Server::Configuration::FactoryContext& context) override;
};
Expand Down

0 comments on commit 9befe9f

Please sign in to comment.