-
Notifications
You must be signed in to change notification settings - Fork 273
authz_filter: configuration to support Ambassador authorization flow #563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
61e546f
2c8f23c
9810412
e6c5342
fdd6594
49dedbd
3128f16
339db0e
f663e11
0f55cb6
b0c3389
79d770a
f024a1b
a8db286
e16fcdb
5eceb00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package envoy.config.filter.http.ext_authz.v2alpha; | ||
| option go_package = "v2"; | ||
|
|
||
| import "envoy/api/v2/core/grpc_service.proto"; | ||
| import "envoy/api/v2/core/http_uri.proto"; | ||
|
|
||
| import "google/protobuf/duration.proto"; | ||
| import "gogoproto/gogo.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 the time, in milliseconds, within the service should respond to an authorization | ||
| // request. | ||
| google.protobuf.Duration timeout = 2 [(gogoproto.stdduration) = true]; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thoughts on merging this into
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. I will do it. |
||
|
|
||
| // Sets an optional prefix to the value of authorization request header `path`. | ||
| string path_prefix = 3; | ||
| } | ||
|
|
||
| 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; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: should it be 2.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it ok to re-index them?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are right |
||
| } | ||
|
|
||
| // 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; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ syntax = "proto3"; | |
|
|
||
| // [#proto-status: draft] | ||
|
|
||
| package envoy.service.auth.v2; | ||
| package envoy.service.auth.v2alpha; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are just copies from the existing protos? How come the existing ones aren't being deleted (i.e. this isn't a move)?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I just copied them. I wasn't 100% sure if I should delete the old ones. |
||
|
|
||
| import "envoy/api/v2/core/address.proto"; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,13 +2,14 @@ syntax = "proto3"; | |
|
|
||
| // [#proto-status: draft] | ||
|
|
||
| package envoy.service.auth.v2; | ||
| package envoy.service.auth.v2alpha; | ||
| option go_package = "v2"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here, |
||
| option java_generic_services = true; | ||
|
|
||
| import "envoy/service/auth/v2/attribute_context.proto"; | ||
| import "envoy/service/auth/v2alpha/attribute_context.proto"; | ||
|
|
||
| import "google/rpc/status.proto"; | ||
| import "validate/validate.proto"; | ||
|
|
||
| // A generic interface for performing authorization check on incoming | ||
| // requests to a networked service. | ||
|
|
@@ -26,4 +27,18 @@ message CheckRequest { | |
| message CheckResponse { | ||
| // Status `OK` allows the request. Any other status indicates the request should be denied. | ||
| google.rpc.Status status = 1; | ||
|
|
||
| // An optional message that contains HTTP response attributes. This message is | ||
| // used when the authorization service needs to send custom responses to the | ||
| // downstream client or, to modify/add request headers being dispatched to the upstream. | ||
| message HttpResponse { | ||
| // Http status code. | ||
| uint32 status_code = 1 [(validate.rules).uint32 = {gte: 100, lt: 600}]; | ||
|
|
||
| // Http entity headers. | ||
| map<string, string> headers = 2; | ||
|
|
||
| // Http entity body. | ||
| string body = 3; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please change this to
v2alpha?