Joey
02/15/2022, 3:07 AMJoey
02/15/2022, 3:10 AMdefinition user {}
definition document {
relation reader: user
relation writer: user
permission write = writer
permission view = reader + write
}
and you want to check if the user can read and writeJoey
02/15/2022, 3:11 AMCheckPermission
for document:somedoc#view
and document:somedoc#write
, then SpiceDB will be dispatching the subproblems of checking document:somedoc#reader
and document:somedoc#writer
. Those will be cached, so when you check for both, the system will only calculate each once (assuming the same user, and the CheckPermission calls being close together)Joey
02/15/2022, 3:12 AMmixedCase
02/15/2022, 3:17 AMJoey
02/15/2022, 3:18 AMJoey
02/15/2022, 3:18 AMJoey
02/15/2022, 3:19 AMmixedCase
02/15/2022, 3:26 AMJoey
02/15/2022, 3:26 AMJoey
02/15/2022, 3:26 AMvroldanbet
02/15/2022, 12:42 PMvroldanbet
02/15/2022, 12:43 PMkuberesolver
, it seems to be somewhat opaque to SpiceDB?vroldanbet
02/15/2022, 12:45 PMgrpc_method
tag in logs and determine if e.g. DispatchCheck
. is being invoked?user
02/15/2022, 4:29 PMspicedb_dispatch_check_from_cache_total
which is the metric for cache hits from a remote dispatchuser
02/15/2022, 4:30 PMvroldanbet
02/15/2022, 6:24 PMkuberesolver
. to be able to talk to the Kube Server API and resolve endpoints, I assume it needs some ClusterRole
. or the like? Is there any documentation or guidance around configuring the upstream?ecordell
02/15/2022, 6:26 PMget
, list
, and watch
for endpoints
ecordell
02/15/2022, 6:27 PMapiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: watchEndpoints
rules:
- apiGroups:
- ""
resources:
- endpoints
verbs:
- get
- list
- watch
vroldanbet
02/15/2022, 6:28 PMvroldanbet
02/15/2022, 6:33 PMlog: 2022/02/15 18:19:11 ERROR: kuberesolver: watching ended with error='invalid response code 403 for service spicedb-internal in namespace spicedb-staging', will reconnect again
Also noticed that the log from kuberesolver is not doing structured loggingJoey
02/15/2022, 6:45 PMecordell
02/15/2022, 6:58 PMecordell
02/15/2022, 7:03 PMvroldanbet
02/15/2022, 7:11 PMvroldanbet
02/15/2022, 7:11 PMecordell
02/15/2022, 7:13 PMecordell
02/15/2022, 7:16 PMecordell
02/15/2022, 7:18 PM