-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
31 changed files
with
395 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package envoy | ||
|
||
import ( | ||
authv3 "github.com/envoyproxy/go-control-plane/envoy/service/auth/v3" | ||
status "google.golang.org/genproto/googleapis/rpc/status" | ||
"google.golang.org/protobuf/types/known/structpb" | ||
) | ||
|
||
type OkResponse struct { | ||
// Status “OK“ allows the request. Any other status indicates the request should be denied, and | ||
// for HTTP filter, if not overridden by :ref:`denied HTTP response status <envoy_v3_api_field_service.auth.v3.DeniedHttpResponse.status>` | ||
// Envoy sends “403 Forbidden“ HTTP status code by default. | ||
Status *status.Status `cel:"status"` | ||
// An 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. | ||
// | ||
// Types that are assignable to HttpResponse: | ||
// | ||
// *CheckResponse_DeniedResponse | ||
// *CheckResponse_OkResponse | ||
OkHttpResponse *authv3.OkHttpResponse `cel:"http_response"` | ||
// Optional response metadata that will be emitted as dynamic metadata to be consumed by the next | ||
// filter. This metadata lives in a namespace specified by the canonical name of extension filter | ||
// that requires it: | ||
// | ||
// - :ref:`envoy.filters.http.ext_authz <config_http_filters_ext_authz_dynamic_metadata>` for HTTP filter. | ||
// - :ref:`envoy.filters.network.ext_authz <config_network_filters_ext_authz_dynamic_metadata>` for network filter. | ||
DynamicMetadata *structpb.Struct `cel:"dynamic_metadata"` | ||
} | ||
|
||
type DeniedResponse struct { | ||
// Status “OK“ allows the request. Any other status indicates the request should be denied, and | ||
// for HTTP filter, if not overridden by :ref:`denied HTTP response status <envoy_v3_api_field_service.auth.v3.DeniedHttpResponse.status>` | ||
// Envoy sends “403 Forbidden“ HTTP status code by default. | ||
Status *status.Status `cel:"status"` | ||
// An 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. | ||
// | ||
// Types that are assignable to HttpResponse: | ||
// | ||
// *CheckResponse_DeniedResponse | ||
// *CheckResponse_OkResponse | ||
DeniedHttpResponse *authv3.DeniedHttpResponse `cel:"http_response"` | ||
// Optional response metadata that will be emitted as dynamic metadata to be consumed by the next | ||
// filter. This metadata lives in a namespace specified by the canonical name of extension filter | ||
// that requires it: | ||
// | ||
// - :ref:`envoy.filters.http.ext_authz <config_http_filters_ext_authz_dynamic_metadata>` for HTTP filter. | ||
// - :ref:`envoy.filters.network.ext_authz <config_network_filters_ext_authz_dynamic_metadata>` for network filter. | ||
DynamicMetadata *structpb.Struct `cel:"dynamic_metadata"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.