Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions authzed/api/v1/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ message Relationship {
// relation is how the resource and subject are related.
string relation = 2 [
(validate.rules).string = {
pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$"
pattern: "^[a-z_][a-z0-9_]{1,62}[a-z0-9]$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$"
pattern: "^[a-z_][a-z0-9_]{1,62}[a-z0-9]$"
max_bytes: 64
}
];
Expand Down Expand Up @@ -81,11 +81,11 @@ message SubjectReference {
];
string optional_relation = 2 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand All @@ -95,11 +95,11 @@ message SubjectReference {
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
},
(buf.validate.field).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
}
];
Expand Down
16 changes: 8 additions & 8 deletions authzed/api/v1/experimental_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ message ExperimentalRegisterRelationshipCounterRequest {
// name is the name of the counter being registered.
string name = 1 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand All @@ -163,11 +163,11 @@ message ExperimentalCountRelationshipsRequest {
// name is the name of the counter whose count is being requested.
string name = 1 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand Down Expand Up @@ -198,11 +198,11 @@ message ExperimentalUnregisterRelationshipCounterRequest {
// name is the name of the counter being unregistered.
string name = 1 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand All @@ -229,11 +229,11 @@ message BulkCheckPermissionRequestItem {

string permission = 2 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand Down
48 changes: 24 additions & 24 deletions authzed/api/v1/permission_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ message RelationshipFilter {
// NOTE: It is not prefixed with "optional_" for legacy compatibility.
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
},
(buf.validate.field).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
}
];
Expand Down Expand Up @@ -239,11 +239,11 @@ message RelationshipFilter {
// relation is the *optional* relation of the relationship.
string optional_relation = 3 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand All @@ -260,23 +260,23 @@ message SubjectFilter {
message RelationFilter {
string relation = 1 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
}

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
},
(buf.validate.field).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
}
];
Expand Down Expand Up @@ -482,11 +482,11 @@ message CheckPermissionRequest {
// the check.
string permission = 3 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand Down Expand Up @@ -582,11 +582,11 @@ message CheckBulkPermissionsRequestItem {

string permission = 2 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand Down Expand Up @@ -663,11 +663,11 @@ message ExpandPermissionTreeRequest {
// expansion for the resource.
string permission = 3 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand All @@ -692,11 +692,11 @@ message LookupResourcesRequest {
// 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
},
(buf.validate.field).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
}
];
Expand All @@ -705,11 +705,11 @@ message LookupResourcesRequest {
// must Check.
string permission = 3 [
(validate.rules).string = {
pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$"
pattern: "^[a-z_][a-z0-9_]{1,62}[a-z0-9]$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^[a-z][a-z0-9_]{1,62}[a-z0-9]$"
pattern: "^[a-z_][a-z0-9_]{1,62}[a-z0-9]$"
max_bytes: 64
}
];
Expand Down Expand Up @@ -802,11 +802,11 @@ message LookupSubjectsRequest {
// the subjects.
string permission = 3 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand All @@ -815,23 +815,23 @@ message LookupSubjectsRequest {
// 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
},
(buf.validate.field).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
}
];

// optional_subject_relation is the optional relation for the subject.
string optional_subject_relation = 5 [
(validate.rules).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
},
(buf.validate.field).string = {
pattern: "^([a-z][a-z0-9_]{1,62}[a-z0-9])?$"
pattern: "^([a-z_][a-z0-9_]{1,62}[a-z0-9])?$"
max_bytes: 64
}
];
Expand Down
8 changes: 4 additions & 4 deletions authzed/api/v1/watch_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ message WatchRequest {
(buf.validate.field).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]/"
")*[a-z_][a-z0-9_]{1,62}[a-z0-9]$"
max_bytes: 128
},
(buf.validate.field).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]/"
")*[a-z_][a-z0-9_]{1,62}[a-z0-9]$"
max_bytes: 128
}
];
Expand Down