Add support for configuration of external authorization grpc server. (#346)
Add support for configuration of TCP, HTTP filters to support external authorization cluster. The filter configuration references an external cluster which is expected to be running the grpc server that supports the service being defined by #296 Signed-off-by: Saurabh Mohan <saurabh+github@tigera.io>pull/372/head
parent
47f761e65a
commit
28d28198e5
7 changed files with 92 additions and 2 deletions
@ -0,0 +1,25 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.filter.http; |
||||
|
||||
import "api/grpc_cluster.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// [#not-implemented-hide:] |
||||
// External Authorization filter calls out to an external service over the |
||||
// gRPC Authorization API defined by :ref:`external_auth <envoy_api_msg_auth.CheckRequest>`. |
||||
// A failed check will cause this filter to return 403 Forbidden. |
||||
message ExtAuthz { |
||||
|
||||
// The external authorization gRPC service configuration. |
||||
GrpcCluster grpc_cluster = 1; |
||||
|
||||
// The filter's behaviour in case the external authorization service does |
||||
// not respond back. If set to true then in case of failure to get a |
||||
// response back from the authorization service allow the traffic. |
||||
// Defaults to false. |
||||
// If set to true and the response from the authorization service is NOT |
||||
// Denied then the traffic will be permitted. |
||||
bool failure_mode_allow = 2; |
||||
} |
@ -0,0 +1,27 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.filter.network; |
||||
|
||||
import "api/grpc_cluster.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// [#not-implemented-hide:] |
||||
// External Authorization filter calls out to an external service over the |
||||
// gRPC Authorization API defined by :ref:`external_auth <envoy_api_msg_auth.CheckRequest>`. |
||||
// A failed check will cause this filter to close the TCP connection. |
||||
message ExtAuthz { |
||||
// The prefix to use when emitting statistics. |
||||
string stat_prefix = 1 [(validate.rules).string.min_bytes = 1]; |
||||
|
||||
// The external authorization gRPC service configuration. |
||||
GrpcCluster grpc_cluster = 2; |
||||
|
||||
// The filter's behaviour in case the external authorization service does |
||||
// not respond back. If set to true then in case of failure to get a |
||||
// response back from the authorization service allow the traffic. |
||||
// Defaults to false. |
||||
// If set to true and the response from the authorization service is NOT |
||||
// Denied then the traffic will be permitted. |
||||
bool failure_mode_allow = 3; |
||||
} |
@ -0,0 +1,19 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2; |
||||
|
||||
import "google/protobuf/duration.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// [#not-implemented-hide:] |
||||
// GrpcCluster is used to expose generic gRPC cluster configuration that may |
||||
// be used by filters to interface with a gRPC service. |
||||
message GrpcCluster { |
||||
// The name of the upstream gRPC cluster. |
||||
string cluster_name = 1 [(validate.rules).string.min_bytes = 1]; |
||||
|
||||
// The timeout for the gRPC request. This is the timeout for a specific |
||||
// request. |
||||
google.protobuf.Duration timeout = 2; |
||||
} |
Loading…
Reference in new issue