robobunny173
11/22/2023, 3:21 PMAmazon orders
but UserB is not)
- by the field (example: UserA is allowed to see data belonging to a field called Profit
but UserB is not)
Row types are practically unlimited and set by the users, but fields are limited and set by the system. Row types and fields are essentially orthogonal, so any row type can have data in any field.
So let's say I model this with something like:
definition row_type {
relation viewer: user
}
definition field {
relation viewer: user
}
definition data_point {
relation type: row_type
relation field: field
permission view = type->viewer & field->viewer
}
This is highly simplified, but conceptually it maps onto what I'm doing. It's also very easy to understand, even when the added complexity is introduced (fields and row_types are recursive, users can be in groups, etc. etc.), which is lovely.
But if this is my schema, I'm going to have to register a relationship to both a row_type and a field for every single data point that I pull into my data lake, which is like in the 10e7-8 per day, let's say. The compute involved is of course one thing, but also my information about auth relationships is going to be at least as big as my data lake itself, right?. This isn't ideal, right?robobunny173
11/22/2023, 3:24 PMview
, I get something like this:
definition view {
relation row_type: row_type
relation field: field
permission view = row_type->viewer & field->viewer
}
but of course the problem there is that I need to have permissions to view all the row types and all the fields that are connected to that view, not just one. Which I could implement at the application layer, but then why am I using SpiceDB?
There's got to be a way... who wants to help me brainstorm?yetitwo
11/22/2023, 4:05 PMyetitwo
11/22/2023, 4:05 PMyetitwo
11/22/2023, 4:06 PMrobobunny173
11/28/2023, 4:51 PMyetitwo
11/28/2023, 5:09 PMyetitwo
11/28/2023, 5:11 PMrobobunny173
11/28/2023, 5:12 PM