Skip to content

Commit d9e1aad

Browse files
committed
Full consistency
Fixes "read-after-write" race condition caused by Rakis creating a Kubernetes 'Secret' and then immediately updating it. In the future, the consistency should be configurable and allow the use of ZedTokens with 'AtLeastAsFresh' consistency.
1 parent 97ea889 commit d9e1aad

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/authz/check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func runAllMatchingChecks(ctx context.Context, matchingRules []*rules.RunnableRu
2929
}
3030
req := &v1.CheckPermissionRequest{
3131
Consistency: &v1.Consistency{
32-
Requirement: &v1.Consistency_MinimizeLatency{MinimizeLatency: true},
32+
Requirement: &v1.Consistency_FullyConsistent{FullyConsistent: true},
3333
},
3434
Resource: &v1.ObjectReference{
3535
ObjectType: rel.ResourceType,

pkg/authz/filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func filterList(ctx context.Context, client v1.PermissionsServiceClient, filter
8080

8181
req := &v1.LookupResourcesRequest{
8282
Consistency: &v1.Consistency{
83-
Requirement: &v1.Consistency_MinimizeLatency{MinimizeLatency: true},
83+
Requirement: &v1.Consistency_FullyConsistent{FullyConsistent: true},
8484
},
8585
ResourceObjectType: filter.Rel.ResourceType,
8686
Permission: filter.Rel.ResourceRelation,

0 commit comments

Comments
 (0)