diff --git a/odpf/shield/v1beta1/shield.proto b/odpf/shield/v1beta1/shield.proto index 1edc02c2..13bf57cc 100644 --- a/odpf/shield/v1beta1/shield.proto +++ b/odpf/shield/v1beta1/shield.proto @@ -595,6 +595,19 @@ service ShieldService { summary: "Update Resource by ID"; }; } + + + // Authz + rpc CheckResourcePermission(ResourceActionAuthzRequest) returns (ResourceActionAuthzResponse) { + option (google.api.http) = { + post: "/v1beta1/check/{resource_id}", + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "Authz"; + summary: "check permission for action on a resource by an user"; + }; + } } message UserRequestBody { @@ -1219,4 +1232,14 @@ message UpdateRelationRequest { message UpdateResourceResponse { Resource resource = 1; + } + + message ResourceActionAuthzRequest { + string resource_id = 1 [(validate.rules).string.pattern = "^[A-Za-z0-9_-]+$"];; + string action_id = 2 [(validate.rules).string.pattern = "^[A-Za-z0-9_-]+$"];; + string namespace_id = 3 [(validate.rules).string.pattern = "^[A-Za-z0-9_-]+$"];; + } + + message ResourceActionAuthzResponse { + string status = 1; } \ No newline at end of file