diff --git a/openfga/v1/openfga_service.proto b/openfga/v1/openfga_service.proto index ebb66001..05c345d2 100644 --- a/openfga/v1/openfga_service.proto +++ b/openfga/v1/openfga_service.proto @@ -1142,7 +1142,7 @@ message CheckRequest { message CheckRequestTupleKey { string user = 1 [ (google.api.field_behavior) = REQUIRED, - (validate.rules).string = {pattern: "^[^\\s]{2,512}$"}, + (validate.rules).string = {pattern: "^(?=.{2,512}$)(?:[a-z_-]+:(?:[a-zA-Z0-9_/#-]+|\*))$"}, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { max_length: 512 example: "\"user:anne\"" @@ -1151,7 +1151,7 @@ message CheckRequestTupleKey { string relation = 2 [ (google.api.field_behavior) = REQUIRED, - (validate.rules).string = {pattern: "^[^:#@\\s]{1,50}$"}, + (validate.rules).string = {pattern: "^[a-z]{1,50}$"}, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { max_length: 50 example: "\"reader\"" @@ -1160,7 +1160,7 @@ message CheckRequestTupleKey { string object = 3 [ (google.api.field_behavior) = REQUIRED, - (validate.rules).string = {pattern: "^[^\\s]{2,256}$"}, + (validate.rules).string = {pattern: "^(?=.{2,256}$)(?:[a-z_-]+:(?:[a-zA-Z0-9_/-]+|\*))$"}, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { max_length: 256 example: "\"document:2021-budget\""