File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ option java_package = "com.authzed.api.v1";
66option java_multiple_files = true ;
77
88import "google/protobuf/struct.proto" ;
9+ import "google/protobuf/timestamp.proto" ;
910import "validate/validate.proto" ;
1011
1112// Relationship specifies how a resource relates to a subject. Relationships
@@ -24,8 +25,11 @@ message Relationship {
2425 // subject is the subject to which the resource is related, in some manner.
2526 SubjectReference subject = 3 [ (validate.rules ) .message.required = true ];
2627
27- // optional_caveat is a reference to a the caveat that must be enforced over the relationship
28+ // optional_caveat is a reference to a the caveat that must be enforced over the relationship.
2829 ContextualizedCaveat optional_caveat = 4 [ (validate.rules ) .message.required = false ];
30+
31+ // optional_expires_at is the time at which the relationship expires, if any.
32+ google.protobuf.Timestamp optional_expires_at = 5 ;
2933}
3034
3135// ContextualizedCaveat represents a reference to a caveat to be used by caveated relationships.
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import "authzed/api/v1/core.proto";
55import "validate/validate.proto" ;
66import "google/protobuf/struct.proto" ;
77import "google/protobuf/duration.proto" ;
8+ import "google/protobuf/timestamp.proto" ;
89
910option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1" ;
1011option java_package = "com.authzed.api.v1" ;
@@ -77,6 +78,10 @@ message CheckDebugTrace {
7778 // and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation.
7879 SubProblems sub_problems = 7 ;
7980 }
81+
82+ // optional_expires_at is the time at which at least one of the relationships used to
83+ // compute this result, expires (if any). This is *not* related to the caching window.
84+ google.protobuf.Timestamp optional_expires_at = 10 ;
8085}
8186
8287// CaveatEvalInfo holds information about a caveat expression that was evaluated.
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ option java_multiple_files = true;
88import "google/protobuf/struct.proto" ;
99import "google/api/annotations.proto" ;
1010import "google/rpc/status.proto" ;
11+ import "google/protobuf/timestamp.proto" ;
1112import "validate/validate.proto" ;
1213
1314import "authzed/api/v1/core.proto" ;
@@ -405,6 +406,10 @@ message CheckPermissionResponse {
405406
406407 // debug_trace is the debugging trace of this check, if requested.
407408 DebugInformation debug_trace = 4 ;
409+
410+ // optional_expires_at is the time at which at least one of the relationships used to
411+ // compute this result, expires (if any). This is *not* related to the caching window.
412+ google.protobuf.Timestamp optional_expires_at = 5 ;
408413}
409414
410415// CheckBulkPermissionsRequest issues a check on whether a subject has permission
You can’t perform that action at this time.
0 commit comments