Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Update dependencies and protobuf definitions #96

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
96 changes: 52 additions & 44 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions protos/cerbos/audit/v1/audit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ message DecisionLogEntry {
google.protobuf.Timestamp timestamp = 2;
Peer peer = 3;
// Deprecated. Use method.check_resources.inputs instead.
repeated cerbos.engine.v1.CheckInput inputs = 4;
repeated cerbos.engine.v1.CheckInput inputs = 4 [deprecated = true];
// Deprecated. Use method.check_resources.outputs instead.
repeated cerbos.engine.v1.CheckOutput outputs = 5;
repeated cerbos.engine.v1.CheckOutput outputs = 5 [deprecated = true];
// Deprecated. Use method.check_resources.error instead.
string error = 6;
string error = 6 [deprecated = true];
oneof method {
CheckResources check_resources = 7;
PlanResources plan_resources = 8;
Expand Down
6 changes: 6 additions & 0 deletions protos/cerbos/engine/v1/engine.proto
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ message Trace {
KIND_VARIABLE = 12;
KIND_VARIABLES = 13;
KIND_OUTPUT = 14;
KIND_ROLE_POLICY_SCOPE = 15;
}

message Variable {
Expand All @@ -325,6 +326,7 @@ message Trace {
string scope = 9;
Variable variable = 10;
string output = 11;
string role_policy_scope = 12;
}
}

Expand Down Expand Up @@ -352,12 +354,16 @@ message Request {
string id = 1;
repeated string roles = 2;
map<string, google.protobuf.Value> attr = 3;
string policy_version = 4;
string scope = 5;
}

message Resource {
string kind = 1;
string id = 2;
map<string, google.protobuf.Value> attr = 3;
string policy_version = 4;
string scope = 5;
}

Principal principal = 1;
Expand Down
28 changes: 28 additions & 0 deletions protos/cerbos/policy/v1/policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum Kind {
KIND_EXPORT_VARIABLES = 2;
KIND_PRINCIPAL = 3;
KIND_RESOURCE = 4;
KIND_ROLE_POLICY = 5;
}

message Policy {
Expand All @@ -38,6 +39,7 @@ message Policy {
PrincipalPolicy principal_policy = 6;
DerivedRoles derived_roles = 7;
ExportVariables export_variables = 10;
RolePolicy role_policy = 11;
}
map<string, string> variables = 8 [deprecated = true];
string json_schema = 9 [json_name = "$schema"];
Expand Down Expand Up @@ -114,6 +116,32 @@ message ResourceRule {
Output output = 7;
}

message RolePolicy {
oneof policy_type {
option (buf.validate.oneof).required = true;
string role = 1 [(buf.validate.field).string = {min_len: 1}];
}
string scope = 2 [(buf.validate.field).string.pattern = "^([[:alnum:]][[:word:]\\-]*(\\.[[:word:]\\-]*)*)*$"];
repeated RoleRule rules = 3;
}

message RoleRule {
string resource = 1 [
(buf.validate.field).required = true,
(buf.validate.field).string = {min_len: 1}
];
repeated string permissible_actions = 2 [
(buf.validate.field).repeated = {
min_items: 1
unique: true
items: {
string: {min_len: 1}
}
},
(buf.validate.field).required = true
];
}

message PrincipalPolicy {
string principal = 1 [
(buf.validate.field).required = true,
Expand Down
Loading
Loading