diff --git a/proto/src/main/protobuf/authzed/api/v1/package2.proto b/proto/src/main/protobuf/authzed/api/v1/authzed_api_package.proto similarity index 100% rename from proto/src/main/protobuf/authzed/api/v1/package2.proto rename to proto/src/main/protobuf/authzed/api/v1/authzed_api_package.proto diff --git a/proto/src/main/protobuf/authzed/api/v1/core.proto b/proto/src/main/protobuf/authzed/api/v1/core.proto index 4d3fae3..72d98d2 100644 --- a/proto/src/main/protobuf/authzed/api/v1/core.proto +++ b/proto/src/main/protobuf/authzed/api/v1/core.proto @@ -55,7 +55,7 @@ message SubjectReference { // ObjectReference is used to refer to a specific object in the system. message ObjectReference { string object_type = 1 [ (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$", max_bytes : 128, } ]; string object_id = 2 [ (validate.rules).string = { diff --git a/proto/src/main/protobuf/authzed/api/v1/package.proto b/proto/src/main/protobuf/authzed/api/v1/google_api_package.proto similarity index 100% rename from proto/src/main/protobuf/authzed/api/v1/package.proto rename to proto/src/main/protobuf/authzed/api/v1/google_api_package.proto diff --git a/proto/src/main/protobuf/authzed/api/v1/permission_service.proto b/proto/src/main/protobuf/authzed/api/v1/permission_service.proto index f181b59..eecc8ee 100644 --- a/proto/src/main/protobuf/authzed/api/v1/permission_service.proto +++ b/proto/src/main/protobuf/authzed/api/v1/permission_service.proto @@ -126,7 +126,7 @@ message Consistency { // unspecified will not filter relationships. message RelationshipFilter { string resource_type = 1 [ (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$", max_bytes : 128, } ]; @@ -156,7 +156,7 @@ message SubjectFilter { } string subject_type = 1 [ (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$", max_bytes : 128, } ]; @@ -370,7 +370,7 @@ message LookupResourcesRequest { // resource_object_type is the type of resource object for which the IDs will // be returned. string resource_object_type = 2 [ (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$", max_bytes : 128, } ]; @@ -451,7 +451,7 @@ message LookupSubjectsRequest { // subject_object_type is the type of subject object for which the IDs will // be returned. string subject_object_type = 4 [ (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$", max_bytes : 128, } ]; @@ -545,4 +545,4 @@ message ResolvedSubject { // partial_caveat_info holds information of a partially-evaluated caveated response PartialCaveatInfo partial_caveat_info = 3 [ (validate.rules).message.required = false ]; -} +} \ No newline at end of file diff --git a/proto/src/main/protobuf/authzed/api/v1/watch_service.proto b/proto/src/main/protobuf/authzed/api/v1/watch_service.proto index b7778bc..3c14d40 100644 --- a/proto/src/main/protobuf/authzed/api/v1/watch_service.proto +++ b/proto/src/main/protobuf/authzed/api/v1/watch_service.proto @@ -26,7 +26,7 @@ message WatchRequest { (validate.rules).repeated .min_items = 0, (validate.rules).repeated .items.string = { pattern : "^([a-z][a-z0-9_]{1,62}[a-z0-9]/" - ")?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + ")*[a-z][a-z0-9_]{1,62}[a-z0-9]$", max_bytes : 128, } ]; diff --git a/proto/src/main/protobuf/authzed/api/v1alpha1/schema.proto b/proto/src/main/protobuf/authzed/api/v1alpha1/schema.proto index 969ecdb..9cde043 100644 --- a/proto/src/main/protobuf/authzed/api/v1alpha1/schema.proto +++ b/proto/src/main/protobuf/authzed/api/v1alpha1/schema.proto @@ -29,7 +29,7 @@ message ReadSchemaRequest { // These names must be fully qualified with their namespace (e.g. // myblog/post). repeated string object_definitions_names = 1 [ (validate.rules).repeated .items.string = { - pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$", max_bytes: 128, } ]; } diff --git a/proto/src/main/protobuf/authzed/api/v1alpha1/watchresources_service.proto b/proto/src/main/protobuf/authzed/api/v1alpha1/watchresources_service.proto index 27c028a..7405121 100644 --- a/proto/src/main/protobuf/authzed/api/v1alpha1/watchresources_service.proto +++ b/proto/src/main/protobuf/authzed/api/v1alpha1/watchresources_service.proto @@ -31,7 +31,7 @@ message WatchResourcesRequest { // resource_object_type is the type of resource object for which we will // watch for changes. string resource_object_type = 1 [ (validate.rules).string = { - pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$", + pattern : "^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$", max_bytes : 128, } ];