You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
7 years ago
|
syntax = "proto3";
|
||
|
|
||
|
// [#proto-status: draft]
|
||
|
|
||
7 years ago
|
package envoy.service.auth.v2alpha;
|
||
|
option go_package = "v2alpha";
|
||
7 years ago
|
option java_generic_services = true;
|
||
7 years ago
|
|
||
7 years ago
|
import "envoy/service/auth/v2alpha/attribute_context.proto";
|
||
7 years ago
|
|
||
7 years ago
|
import "google/rpc/status.proto";
|
||
7 years ago
|
import "validate/validate.proto";
|
||
7 years ago
|
|
||
7 years ago
|
// A generic interface for performing authorization check on incoming
|
||
|
// requests to a networked service.
|
||
7 years ago
|
service Authorization {
|
||
7 years ago
|
// Performs authorization check based on the attributes associated with the
|
||
|
// incoming request, and returns status `OK` or not `OK`.
|
||
7 years ago
|
rpc Check(CheckRequest) returns (CheckResponse);
|
||
|
}
|
||
|
|
||
|
message CheckRequest {
|
||
|
// The request attributes.
|
||
|
AttributeContext attributes = 1;
|
||
|
}
|
||
|
|
||
|
message CheckResponse {
|
||
|
// Status `OK` allows the request. Any other status indicates the request should be denied.
|
||
|
google.rpc.Status status = 1;
|
||
7 years ago
|
|
||
|
// 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;
|
||
|
}
|
||
7 years ago
|
}
|