authz_filter: configuration to support Ambassador authorization flow (#563)
This PR includes the necessary modifications in support of envoyproxy/envoy#2828. Added additional configuration to ext_authz.proto so that the filter is able to call an HTTP/1.1 authorization service. In external_auth.proto, added a nested message to CheckResponse that allows the authorization service to pass additional HTTP response attributes back to the authz filter. Signed-off-by: Gabriel <gsagula@gmail.com>pull/599/head
parent
c4590ec24e
commit
f88047c0d4
8 changed files with 68 additions and 32 deletions
@ -1,26 +0,0 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.config.filter.http.ext_authz.v2; |
||||
option go_package = "v2"; |
||||
|
||||
import "envoy/api/v2/core/grpc_service.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. |
||||
envoy.api.v2.core.GrpcService grpc_service = 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 or getting a response that |
||||
// is NOT denied then traffic will be permitted. |
||||
// Defaults to false. |
||||
bool failure_mode_allow = 2; |
||||
} |
@ -0,0 +1,34 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.config.filter.http.ext_authz.v2alpha; |
||||
option go_package = "v2alpha"; |
||||
|
||||
import "envoy/api/v2/core/grpc_service.proto"; |
||||
import "envoy/api/v2/core/http_uri.proto"; |
||||
|
||||
// The external authorization HTTP service configuration. |
||||
message HttpService { |
||||
// Sets the HTTP server URI which the authorization requests must be sent to. |
||||
envoy.api.v2.core.HttpUri server_uri = 1; |
||||
|
||||
// Sets an optional prefix to the value of authorization request header `path`. |
||||
string path_prefix = 2; |
||||
} |
||||
|
||||
message ExtAuthz { |
||||
|
||||
oneof services { |
||||
// The external authorization gRPC service configuration. |
||||
envoy.api.v2.core.GrpcService grpc_service = 1; |
||||
|
||||
// The external authorization HTTP service configuration. |
||||
HttpService http_service = 3; |
||||
} |
||||
|
||||
// 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 or getting a response that |
||||
// is NOT denied then traffic will be permitted. |
||||
// Defaults to false. |
||||
bool failure_mode_allow = 2; |
||||
} |
Loading…
Reference in new issue