1
00:00:01,920 --> 00:00:05,120
Welcome back to Coding Cat Dev, 
where we give you cats the 

2
00:00:05,120 --> 00:00:19,280
freshest dose of dev snacks. 
Auth set. 

3
00:00:19,280 --> 00:00:21,600
Stop building Authz, start 
building value. 

4
00:00:22,840 --> 00:00:25,320
Hey folks, if you're just coming
to this video and you're looking

5
00:00:25,320 --> 00:00:28,840
for more on Authzed and how to 
implement it, we actually have a

6
00:00:28,840 --> 00:00:33,560
full discussion about Reback and
all the other different types of

7
00:00:33,840 --> 00:00:36,400
authorizations along with how it
kind of correlates with 

8
00:00:36,400 --> 00:00:38,880
authentication. 
So I put a link here and go 

9
00:00:38,880 --> 00:00:41,240
check out that video. 
And then you can kind of break 

10
00:00:41,240 --> 00:00:43,840
it down a little bit further in 
this video with Sam walking 

11
00:00:43,840 --> 00:00:48,360
through some different parts of 
both Authzed as well as Claude 

12
00:00:48,360 --> 00:00:51,280
and MCP servers and how you 
could use it in a pretty cool 

13
00:00:51,280 --> 00:00:53,920
way. 
So check out this right after 

14
00:00:53,920 --> 00:00:55,440
you check that one out. 
See ya. 

15
00:00:58,960 --> 00:01:03,720
So this is a playground. 
One cool kind of technical note 

16
00:01:03,720 --> 00:01:08,040
about it is that it is actually 
running a real version of Spice 

17
00:01:08,040 --> 00:01:11,240
DB. 
So we compile Spice DB to wasm, 

18
00:01:12,400 --> 00:01:15,360
it downloads it, and you're 
actually running real Spice DB. 

19
00:01:15,360 --> 00:01:18,040
This is not like a rules engine 
that emulates Spice DB. 

20
00:01:18,040 --> 00:01:22,400
You're running the real thing 
because in browser you can make 

21
00:01:22,600 --> 00:01:27,080
sample and test access control 
questions. 

22
00:01:27,080 --> 00:01:29,560
You can model those and kind of 
run them and it all runs in real

23
00:01:29,560 --> 00:01:34,160
time, all in your browser. 
And I think just just a little 

24
00:01:34,160 --> 00:01:37,280
while ago, you can kind of kind 
of ingest saying like, oh, I 

25
00:01:37,280 --> 00:01:39,240
want to, I want to do Google doc
sharing. 

26
00:01:40,200 --> 00:01:46,240
That's one of our examples. 
So this is the schema that does 

27
00:01:46,240 --> 00:01:50,480
exactly that. 
And so you would essentially 

28
00:01:50,480 --> 00:01:55,680
take the schema, write it into 
your spicy database, and then as

29
00:01:55,680 --> 00:01:58,200
long as your application is 
writing the right relationships,

30
00:01:58,200 --> 00:02:01,560
you can use the permissions 
questions where you're doing 

31
00:02:01,560 --> 00:02:05,840
your own sharing and you you can
be assured that the actual 

32
00:02:05,840 --> 00:02:07,440
permissions controls are 
accurate. 

33
00:02:09,080 --> 00:02:14,040
So in that example, just to like
for my own mental sake, let's 

34
00:02:14,040 --> 00:02:19,080
say I have a a Google doc that's
in my own drive and I just share

35
00:02:19,080 --> 00:02:25,200
with you, Sam, is that going to 
fall into like user group in 

36
00:02:25,200 --> 00:02:29,200
this or like what is something? 
How does that kind of navigate 

37
00:02:29,200 --> 00:02:31,160
its way through? 
Yeah. 

38
00:02:31,400 --> 00:02:35,040
So let's see if I can kind of 
give you a semblance of like a 

39
00:02:35,040 --> 00:02:37,760
step by step process. 
So if you when you know, when 

40
00:02:37,760 --> 00:02:41,080
you go into the share button in 
Google Docs, you get that 

41
00:02:41,080 --> 00:02:44,960
dialogue and then you know, one 
of the options is you can paste 

42
00:02:44,960 --> 00:02:49,400
my e-mail address, for example, 
and say share directly with this

43
00:02:49,400 --> 00:02:51,960
e-mail address. 
What's happening behind the 

44
00:02:51,960 --> 00:02:55,640
scenes is that that writes a 
relationship for that document. 

45
00:02:56,200 --> 00:03:01,080
Probably something like viewer 
document has a relationship 

46
00:03:01,080 --> 00:03:03,400
called view viewer. 
You just wrote a new 

47
00:03:03,400 --> 00:03:07,560
relationship like Sam is a 
viewer of this document and that

48
00:03:07,560 --> 00:03:10,560
sits in Spicy Bee or Zanzibar, 
whatever. 

49
00:03:11,160 --> 00:03:14,680
And then when I go to that URL 
for that document, what it's 

50
00:03:14,680 --> 00:03:18,240
doing is it's asking the 
question, does Sam have view 

51
00:03:18,240 --> 00:03:22,600
permissions on this document? 
Now that view permissions is 

52
00:03:22,600 --> 00:03:29,280
probably a kind of like kind of 
like here view. 

53
00:03:30,840 --> 00:03:35,920
It's it's probably a set of like
operators on multiple relations.

54
00:03:35,920 --> 00:03:41,360
So not only does things that 
have viewer relationship with 

55
00:03:41,360 --> 00:03:44,920
that resource, that document, 
but also any manager should be 

56
00:03:44,920 --> 00:03:47,480
able to also view it. 
And so it's computing this 

57
00:03:47,720 --> 00:03:52,000
behind the scenes and, you know,
responding with a simple yes, Oh

58
00:03:52,680 --> 00:03:55,080
yeah, Sam has view permissions. 
You don't necessarily have to 

59
00:03:55,080 --> 00:03:58,160
figure out, oh, he has, you 
know, he has view permissions 

60
00:03:58,160 --> 00:03:59,760
because he's a viewer on the 
document. 

61
00:03:59,920 --> 00:04:02,280
You just ask can they view it or
not? 

62
00:04:02,760 --> 00:04:07,040
And it kind of handles making 
sure that these permission 

63
00:04:07,040 --> 00:04:08,800
definitions are being computed 
accurately. 

64
00:04:08,800 --> 00:04:11,760
There you go. 
Yeah. 

65
00:04:12,280 --> 00:04:14,480
But for the sake of kind of our 
exercise, we're just going to 

66
00:04:14,480 --> 00:04:17,600
use a more straightforward 
schema. 

67
00:04:19,360 --> 00:04:22,800
So this is RBAC modeled inside 
of Specdb. 

68
00:04:25,440 --> 00:04:29,920
You have one object called a 
user, one object called a 

69
00:04:29,920 --> 00:04:31,880
document. 
That's it. 

70
00:04:33,120 --> 00:04:36,360
A document has a couple of 
relations. 

71
00:04:37,440 --> 00:04:40,000
You can be a writer on a 
document, you can be a reader on

72
00:04:40,000 --> 00:04:42,160
the document. 
And there are two permissions 

73
00:04:42,160 --> 00:04:45,080
that we want to expose on the 
document, which are edit and 

74
00:04:45,080 --> 00:04:48,080
view. 
So edit is anyone. 

75
00:04:48,080 --> 00:04:52,160
This means anyone who's a writer
of the document can edit for 

76
00:04:52,160 --> 00:04:55,000
view. 
Anyone who has who is a reader 

77
00:04:55,480 --> 00:04:59,320
or who can edit the document can
also view. 

78
00:05:00,440 --> 00:05:02,240
That's the plus. 
Keeps throwing me off. 

79
00:05:02,240 --> 00:05:05,480
I keep wanting to say like, I 
don't know, instead of like an 

80
00:05:05,480 --> 00:05:11,000
or in like 2-2 whatever vertical
lines, I guess I'm like, oh 

81
00:05:11,000 --> 00:05:16,080
wait, so they're getting both. 
I'm like, I don't know why it's.

82
00:05:16,240 --> 00:05:18,480
You can think of it kind of like
set operations. 

83
00:05:18,680 --> 00:05:21,920
Sure, it's like all the set of 
all readers and the set of all 

84
00:05:21,920 --> 00:05:24,680
people are all objects that have
edit permissions. 

85
00:05:25,000 --> 00:05:27,520
That combined set has view 
permission that. 

86
00:05:27,520 --> 00:05:29,640
Makes sense? 
So for the sake of this 

87
00:05:29,640 --> 00:05:32,640
exercise, let's say we wanted to
have like another permission 

88
00:05:32,640 --> 00:05:40,920
called like or, you know, 
permission comment, let's say. 

89
00:05:42,680 --> 00:05:44,520
So we're going to we're going to
fill that in a second. 

90
00:05:45,160 --> 00:05:49,480
So we probably so comment, let's
say are, you know, again, all 

91
00:05:49,480 --> 00:05:51,440
the people who can write should 
be able to comment. 

92
00:05:52,360 --> 00:05:54,520
Readers, let's say, shouldn't be
able to comment. 

93
00:05:54,960 --> 00:05:59,600
But let's say we wanted to add 
kind of another subset of users 

94
00:05:59,600 --> 00:06:04,320
that can that can comment, but 
it can only comment, for 

95
00:06:04,320 --> 00:06:06,600
example. 
I would assume like they would 

96
00:06:06,600 --> 00:06:09,120
get view permission to write. 
Right. 

97
00:06:09,520 --> 00:06:13,120
OK, cool. 
So to represent kind of this new

98
00:06:13,120 --> 00:06:17,280
subset of users, we have to kind
of introduce a way for users to 

99
00:06:17,280 --> 00:06:22,600
relate to a document, we'll call
it commenter. 

100
00:06:25,320 --> 00:06:29,600
And so now you can start writing
new relations to spicy B and 

101
00:06:29,600 --> 00:06:31,040
Spicy B will understand what 
that is. 

102
00:06:31,040 --> 00:06:39,200
You would say, you know, Sam is 
a commenter on document and now 

103
00:06:39,200 --> 00:06:40,640
we have to update our 
permissions. 

104
00:06:40,640 --> 00:06:44,320
So the first thing we'll do is 
add our new comment permission. 

105
00:06:44,320 --> 00:06:50,800
So comments would be, like you 
said, obviously commenters and 

106
00:06:51,200 --> 00:06:57,120
anyone who has edit access. 
So anyone who can edit it 

107
00:06:57,120 --> 00:07:00,760
obviously can comment on it. 
The other thing we were going to

108
00:07:00,760 --> 00:07:03,960
do is, yeah, anyone who could 
comment should also be able to 

109
00:07:03,960 --> 00:07:06,240
read it too. 
So we got to update this. 

110
00:07:09,680 --> 00:07:14,480
So now in your application, you 
would write this updated schema 

111
00:07:14,600 --> 00:07:17,640
again, like you would kind of 
like migrate a schema in a 

112
00:07:17,640 --> 00:07:20,640
relational database. 
And in your application code, 

113
00:07:21,160 --> 00:07:24,800
you would build out, you know, 
the UI for, you know, adding 

114
00:07:25,320 --> 00:07:29,160
commenter as like a, an option 
in the drop down in your share 

115
00:07:29,160 --> 00:07:31,600
dialogue, for example. 
And behind the scenes, you would

116
00:07:31,600 --> 00:07:33,280
now write this new type of 
relationship. 

117
00:07:34,000 --> 00:07:39,440
Sam is a commenter on the stock.
And then when someone clicks on 

118
00:07:39,440 --> 00:07:42,840
the comment button that you just
added in your app, it would do a

119
00:07:42,840 --> 00:07:49,360
permissions check. 
Does Sam have comment permission

120
00:07:50,120 --> 00:07:51,920
for this? 
And then behind the scenes it 

121
00:07:51,920 --> 00:07:54,680
would check, you know, is Sam a 
commenter? 

122
00:07:54,800 --> 00:07:57,920
Yes, perfect. 
Then you have access and the way

123
00:07:57,920 --> 00:08:00,280
you would do that, I should have
done this before. 

124
00:08:01,760 --> 00:08:05,000
One of the features that we have
in the playground is you can 

125
00:08:05,000 --> 00:08:06,680
kind of it's almost like test 
driven development. 

126
00:08:06,680 --> 00:08:13,560
You can put in that that that 
question and then kind of work 

127
00:08:13,560 --> 00:08:16,480
to get the schema in place and 
the, you know, a test 

128
00:08:16,480 --> 00:08:18,720
relationship data to kind of 
show that, oh, this is working. 

129
00:08:19,040 --> 00:08:25,640
Actually, let me try that. 
So this test relationships is 

130
00:08:25,640 --> 00:08:28,840
kind of a way you can add in 
relationship data. 

131
00:08:29,920 --> 00:08:33,200
So there's some example data 
that was already pre populated 

132
00:08:33,200 --> 00:08:34,600
when we switched to this 
example. 

133
00:08:36,440 --> 00:08:40,880
And this test data is the stuff 
that's like, you know, auto 

134
00:08:40,880 --> 00:08:44,320
completing here. 
So there's like a doc called 

135
00:08:44,320 --> 00:08:46,560
first doc. 
The way you read this is that 

136
00:08:46,560 --> 00:08:48,960
this is the type and this is 
like it's ID. 

137
00:08:50,480 --> 00:08:53,960
So for the sake of testing our 
schema changes that we made, 

138
00:08:53,960 --> 00:08:58,000
let's say on 1st dock, we want 
to add our new comment 

139
00:08:58,000 --> 00:09:03,480
permission and let's see if Sam 
has access to it. 

140
00:09:04,320 --> 00:09:07,000
Well, we haven't written any 
relationships via the test 

141
00:09:07,000 --> 00:09:09,240
relationship. 
So obviously it's, it's failing.

142
00:09:09,360 --> 00:09:14,760
Like the answer is, is no. 
This, this kind of tree down 

143
00:09:14,760 --> 00:09:18,360
here is the path of computation 
that's taking place. 

144
00:09:18,720 --> 00:09:22,560
So how that maps is? 
Because I was asking about 

145
00:09:22,560 --> 00:09:26,400
before, so that's perfect. 
Since comment is defined as the 

146
00:09:26,600 --> 00:09:29,480
the kind of set of commenters 
and the set of people who have 

147
00:09:29,920 --> 00:09:34,200
edit access, it's kind of 
checking is Sam a commenter? 

148
00:09:34,320 --> 00:09:36,320
No. 
Is does Sam have edit 

149
00:09:36,320 --> 00:09:37,240
permissions? 
No. 

150
00:09:38,040 --> 00:09:41,360
In order to compute what an edit
permission is, it's it's anyone 

151
00:09:41,360 --> 00:09:43,520
who's a writer. 
So that's why this tree is kind 

152
00:09:43,520 --> 00:09:46,240
of populated that way. 
And again, we didn't write the 

153
00:09:46,240 --> 00:09:48,000
relationship, so of course I 
don't have permission. 

154
00:09:49,040 --> 00:09:54,280
So let's do that. 
So I think the document we want 

155
00:09:55,000 --> 00:09:59,960
was first doc, you know, to 
emulate what your application 

156
00:09:59,960 --> 00:10:05,880
would do. 
I'm writing commenter for 

157
00:10:05,880 --> 00:10:09,560
myself. 
And the moment I do that, all of

158
00:10:09,560 --> 00:10:13,000
a sudden everything goes green 
because I'm a commenter. 

159
00:10:15,600 --> 00:10:24,160
Like another thing we could show
is let's see is sorry, the 

160
00:10:24,160 --> 00:10:26,280
screen is a little constrained 
because we're trying to make it 

161
00:10:26,280 --> 00:10:28,840
visible. 
But I'll add another one here, 

162
00:10:28,840 --> 00:10:32,200
which is remember, I'm just a 
commenter on this doc. 

163
00:10:33,000 --> 00:10:38,560
So what about what about view? 
Like, because, you know, we 

164
00:10:38,560 --> 00:10:40,600
didn't write a relationship. 
Sam is also a viewer. 

165
00:10:40,600 --> 00:10:44,200
It's kind of like the the 
parallel to like, you know, the 

166
00:10:44,600 --> 00:10:45,760
kind of scenario that we talked 
about. 

167
00:10:46,000 --> 00:10:47,840
I don't have to put that Sam is 
a viewer too. 

168
00:10:50,520 --> 00:10:53,800
I automatically have view 
permissions because schema says 

169
00:10:53,800 --> 00:10:55,880
that if you're a commenter, 
you're also a viewer. 

170
00:10:57,440 --> 00:11:02,800
What does, what does like, I 
guess the data return look like 

171
00:11:02,800 --> 00:11:05,800
on something like this. 
So like I know features in my 

172
00:11:05,800 --> 00:11:09,120
app if you're a view only like 
I'm not going to show a comment 

173
00:11:09,120 --> 00:11:11,120
button so it doesn't have that 
pain. 

174
00:11:11,720 --> 00:11:13,960
How how do you actually like 
determine that? 

175
00:11:13,960 --> 00:11:16,320
And what's a payload look like? 
Yeah. 

176
00:11:16,320 --> 00:11:19,800
So the, I mean the payload 
itself is essentially a simple 

177
00:11:19,800 --> 00:11:23,600
yes or no to the question the 
application. 

178
00:11:23,640 --> 00:11:26,840
The most common way to use this 
is that in your application code

179
00:11:27,760 --> 00:11:31,960
you would wrap kind of the 
rendering of certain 

180
00:11:31,960 --> 00:11:35,320
functionality around you. 
You wrap permissions questions 

181
00:11:35,320 --> 00:11:40,040
around that rendering code and 
so on the server for a web app 

182
00:11:40,040 --> 00:11:42,680
for example, you would make the 
permissions check, you know, do 

183
00:11:42,680 --> 00:11:45,760
you have comment access and if 
you wanted to hide that comment 

184
00:11:45,760 --> 00:11:49,120
button based on the access, the 
permission chip, you would make 

185
00:11:49,120 --> 00:11:50,840
the check. 
And if the answer came back, no,

186
00:11:51,000 --> 00:11:53,200
you wouldn't render it. 
It was yes. 

187
00:11:53,200 --> 00:11:54,960
Then you would. 
I'm kind of thinking like 

188
00:11:54,960 --> 00:11:58,880
through like React server 
components and they really push 

189
00:11:58,880 --> 00:12:01,160
for like each one of those to 
have its own kind of 

190
00:12:01,480 --> 00:12:03,520
functionality and scoping and 
things like that. 

191
00:12:03,520 --> 00:12:08,000
And in my head, like I don't 
want to hit SPICE DB 12 times 

192
00:12:08,000 --> 00:12:09,800
for like, is it a view? 
Is it a view? 

193
00:12:09,800 --> 00:12:12,120
Is it a view? 
And is a comment like that sort 

194
00:12:12,120 --> 00:12:14,880
of thing. 
What do you see people typically

195
00:12:14,880 --> 00:12:17,960
do? 
Like is it a top level just hit 

196
00:12:17,960 --> 00:12:23,360
SPICE DB and then kind of push 
all that back in both? 

197
00:12:23,720 --> 00:12:28,120
So you see both where OK. 
One nice thing is that the 

198
00:12:28,120 --> 00:12:33,200
typical, the typical lengthy of 
hitting SPICE DB is usually in 

199
00:12:33,200 --> 00:12:38,480
the single to like very, very 
low double digit milliseconds. 

200
00:12:38,480 --> 00:12:42,120
So the actual latency is pretty 
low if things are configured 

201
00:12:42,120 --> 00:12:47,000
correctly. 
The other option is to we have 

202
00:12:47,000 --> 00:12:50,920
bulk check AP is. 
So let's say you have like a 

203
00:12:51,120 --> 00:12:54,040
like a single page app, you 
could do essentially A bulk 

204
00:12:54,040 --> 00:12:58,360
check on a bunch of different 
permissions and kind of have a 

205
00:12:58,360 --> 00:13:01,200
provider that kind of sends it 
down your UI hierarchy. 

206
00:13:01,480 --> 00:13:03,680
That's another option. 
Of course they have. 

207
00:13:03,720 --> 00:13:06,560
These are all trade-offs you 
need to make for yourself in 

208
00:13:06,560 --> 00:13:08,560
your own applications. 
There's like, you know, you make

209
00:13:08,560 --> 00:13:11,000
a bowl check, but then 
permissions might change. 

210
00:13:11,800 --> 00:13:17,120
And so yeah, it's kind of left 
to the whole ad is like left to 

211
00:13:17,120 --> 00:13:19,320
the reader. 
Because we don't know your 

212
00:13:19,320 --> 00:13:21,440
application, we just give you 
the tools to figure out which 

213
00:13:21,600 --> 00:13:24,320
works best with how users you 
expect users to interact with 

214
00:13:24,320 --> 00:13:26,120
your application. 
Yeah, that makes sense. 

215
00:13:26,120 --> 00:13:29,280
I, I was just trying to wrap my 
head around like one of the 

216
00:13:29,280 --> 00:13:33,240
benefits of Jots or like you 
have most of the data in there 

217
00:13:33,320 --> 00:13:35,960
already on the first call 
because it's in the in the 

218
00:13:35,960 --> 00:13:39,480
cookie or wherever. 
And in this scenario, it's kind 

219
00:13:39,480 --> 00:13:43,560
of back to thinking about 
databases, caching, those sorts 

220
00:13:43,560 --> 00:13:47,600
of aspects to it as well. 
But like I said, a lot of times 

221
00:13:48,280 --> 00:13:52,400
people don't get to that point 
just because they make their 

222
00:13:53,440 --> 00:13:56,720
permissions checks as needed, 
just because the latency is so 

223
00:13:56,720 --> 00:13:59,120
low. 
And so it's not really a 

224
00:13:59,120 --> 00:14:02,280
concern. 
And you know, it's like when you

225
00:14:02,280 --> 00:14:05,200
have like a, let's say, like a 
20 millisecond round trip on a 

226
00:14:05,200 --> 00:14:08,160
permissions call, but the rest 
of your page takes like a second

227
00:14:08,160 --> 00:14:10,880
to load. 
It's not really a bottleneck. 

228
00:14:11,880 --> 00:14:13,960
The other thing is that a lot of
times these permissions checks 

229
00:14:13,960 --> 00:14:18,040
are fronting very complex kind 
of authorization driven views. 

230
00:14:18,360 --> 00:14:22,080
So thinking about like an admin 
portal, you log in and you 

231
00:14:22,080 --> 00:14:26,480
should only see the like 
whatever the things that you 

232
00:14:26,480 --> 00:14:29,320
have access to. 
That's actually a really complex

233
00:14:30,600 --> 00:14:35,240
either database query or in, in 
in some spicy B users cases, a 

234
00:14:35,560 --> 00:14:41,520
very, it's a spicy BAPI call. 
And so you wouldn't want that to

235
00:14:41,520 --> 00:14:45,760
be called without needing to 
make it that call. 

236
00:14:45,960 --> 00:14:48,280
So you wouldn't do that when you
log in, for example, because 

237
00:14:48,280 --> 00:14:49,680
like maybe they don't visit that
page. 

238
00:14:49,920 --> 00:14:53,120
You want to make that call right
as they visit that page because 

239
00:14:53,120 --> 00:14:57,080
you know, you want to kind of 
preserve that complexity for 

240
00:14:57,080 --> 00:14:58,760
someone's actually going to use 
that information. 

241
00:14:59,640 --> 00:15:02,200
Yeah, makes sense. 
Yeah, I can. 

242
00:15:02,840 --> 00:15:05,920
The the one like thing I keep 
thinking about is kind of like 

243
00:15:05,920 --> 00:15:10,000
super bases, role level access 
and and things like that and how

244
00:15:10,000 --> 00:15:12,160
granular we could possibly get 
with this. 

245
00:15:12,160 --> 00:15:16,320
And it feels like you could keep
going as far as you want with 

246
00:15:16,320 --> 00:15:18,920
it, which is crazy to me. 
Yeah, yeah. 

247
00:15:18,920 --> 00:15:24,680
And it really is neat because 
we, we provide kind of these 

248
00:15:24,680 --> 00:15:29,920
schema design consultations 
because I think people like, a 

249
00:15:29,920 --> 00:15:33,000
lot of times people like 
discover Spicy B, something 

250
00:15:33,000 --> 00:15:35,840
clicks and they're like, oh, I 
can totally model this thing. 

251
00:15:35,840 --> 00:15:38,920
And they start going on this 
like rabbit hole of like 

252
00:15:38,920 --> 00:15:41,600
learning and, and practicing and
kind of using, iterating with 

253
00:15:41,600 --> 00:15:43,640
the playground. 
And then they, they kind of 

254
00:15:43,640 --> 00:15:46,560
want, want to know like, is this
the right approach? 

255
00:15:46,960 --> 00:15:50,320
And so they get in contact with 
us and we, we kind of sit down 

256
00:15:50,320 --> 00:15:51,960
with them. 
It's cool to hear like they're, 

257
00:15:52,040 --> 00:15:54,440
they're don't know more about, 
learn about their domain and 

258
00:15:54,440 --> 00:15:57,600
hear about the use cases. 
And yeah, it's like you can 

259
00:15:57,600 --> 00:16:01,120
really model so many different 
things and the amount of 

260
00:16:01,120 --> 00:16:05,440
granularity really is dependent 
on like it, it's very like user 

261
00:16:05,440 --> 00:16:06,840
centric. 
It's like, what do your users 

262
00:16:06,840 --> 00:16:08,680
need? 
And if they need something that 

263
00:16:08,680 --> 00:16:11,240
granular, then you can do it. 
But sometimes we say, oh, you 

264
00:16:11,240 --> 00:16:13,000
don't actually need to go that 
that granular. 

265
00:16:13,000 --> 00:16:15,080
You can just do it in this way. 
And it's a lot more simple. 

266
00:16:15,080 --> 00:16:17,800
And they're like, oh, OK, they 
just were trying to do it in a 

267
00:16:17,800 --> 00:16:20,360
complex way because it was a new
thing and. 

268
00:16:20,880 --> 00:16:26,400
Overthinking it like, you know, 
Yeah, yeah, that's very cool. 

269
00:16:26,720 --> 00:16:29,520
Users, teams, roles, sharing. 
Is your permission system a 

270
00:16:29,520 --> 00:16:31,840
tangled mess? 
Every new feature means a week 

271
00:16:31,840 --> 00:16:34,120
untangling this mess. 
How about instead you have one 

272
00:16:34,120 --> 00:16:36,520
permission system with unlimited
possibilities? 

273
00:16:36,520 --> 00:16:39,320
Offset is that solution for you?
Eliminate authorization silos 

274
00:16:39,320 --> 00:16:41,720
and simplify your architecture 
with a centralized permissions 

275
00:16:41,720 --> 00:16:45,280
platform. 1 authorization system
for your entire application 

276
00:16:45,280 --> 00:16:47,040
ecosystem. 
Are your developers sick of 

277
00:16:47,040 --> 00:16:49,400
writing authorization rules 
every time your business needs 

278
00:16:49,400 --> 00:16:51,080
change? 
There's a better way. 

279
00:16:51,200 --> 00:16:53,960
Offset delivers a centralized 
authorization system, so you can

280
00:16:53,960 --> 00:16:56,200
define permissions once and 
enforce them everywhere. 

281
00:16:56,520 --> 00:16:58,840
With Offset's flexible 
configuration language, you can 

282
00:16:58,840 --> 00:17:01,800
adapt to complex business models
without rewriting your code. 

283
00:17:02,520 --> 00:17:04,839
Worried about scale? 
Offset is built for global scale

284
00:17:04,839 --> 00:17:07,280
and performance, ensuring a 
lightning fast and reliable 

285
00:17:07,280 --> 00:17:09,520
experience for your users, no 
matter where they are. 

286
00:17:09,880 --> 00:17:12,480
And with strong consistency 
guarantees, you can ensure 

287
00:17:12,480 --> 00:17:15,720
uniform access control across 
all your systems, protecting 

288
00:17:15,720 --> 00:17:18,040
sensitive data and building 
trust with your users. 

289
00:17:19,920 --> 00:17:22,359
Set stop building off Z start 
building valley. 

290
00:17:23,079 --> 00:17:26,560
So Sam, I, I know you kind of 
have been pulling around AI like

291
00:17:26,560 --> 00:17:28,560
all of us. 
And we were talking like before 

292
00:17:28,560 --> 00:17:31,360
we got started with a little bit
of vibe coding that you were 

293
00:17:31,360 --> 00:17:34,480
doing. 
You also have like a little MCP 

294
00:17:34,480 --> 00:17:37,360
kind of example. 
Do you want to show that off? 

295
00:17:37,360 --> 00:17:40,480
Kind of the next step past the 
sandboxer. 

296
00:17:40,600 --> 00:17:45,360
Yeah, we'll be happy to. 
So the background to this was 

297
00:17:45,360 --> 00:17:49,680
that like, I think a lot of 
engineers, we've been hearing 

298
00:17:49,760 --> 00:17:51,800
like vibe coding as a concept a 
lot. 

299
00:17:51,800 --> 00:17:55,800
And you know, just for the sake 
of intellectual curiosity, I was

300
00:17:55,800 --> 00:17:56,920
like, I got to try it for 
myself. 

301
00:17:56,920 --> 00:18:04,320
And so I kind of created this 
contract for myself where I was 

302
00:18:04,320 --> 00:18:07,800
going to vibe code something. 
And to get them the most out of 

303
00:18:07,800 --> 00:18:10,240
that experience, I decided I'm 
not going to edit code by hand. 

304
00:18:10,240 --> 00:18:13,040
I'm just going to use prompts, 
let the AI do everything. 

305
00:18:13,720 --> 00:18:16,680
It's going to be a project from 
scratch and see how it goes. 

306
00:18:16,680 --> 00:18:20,280
And so, Long story short, I 
coded an MCP server. 

307
00:18:21,320 --> 00:18:25,640
MCP is model context protocol 
originally designed by Anthropic

308
00:18:25,800 --> 00:18:30,880
as a way to integrate external 
data sources into CLOD or now 

309
00:18:30,880 --> 00:18:34,920
any other LLM and like a 
structured way of plugging in 

310
00:18:35,080 --> 00:18:38,400
like data and actions. 
Yeah, I think it's. 

311
00:18:38,640 --> 00:18:41,680
Tooling on the other side too, 
like you can make actual calls, 

312
00:18:41,720 --> 00:18:43,840
right? 
So exposes external data and 

313
00:18:43,840 --> 00:18:48,880
like actions to do on that data 
and so I think they call it like

314
00:18:48,880 --> 00:18:53,520
the USB of AI data. 
I've never heard that, but 

315
00:18:53,520 --> 00:18:55,920
that's a great analogy. 
Depending on your experience of 

316
00:18:55,920 --> 00:18:58,360
the USB, is either plus or minus
so. 

317
00:18:58,560 --> 00:19:04,600
It's USBC only like it's. 
I guess so and so, yeah, yeah, 

318
00:19:05,320 --> 00:19:08,800
Long story short, kind of vibe 
coded and then within two hours 

319
00:19:08,800 --> 00:19:14,360
I had a very, very well working 
MCB server that fronts by CB. 

320
00:19:15,280 --> 00:19:21,080
It only cost me I think $2.37 of
token, token usage. 

321
00:19:22,280 --> 00:19:24,520
Yeah, it's. 
Not sufficient vibe coding 

322
00:19:24,520 --> 00:19:27,120
folks. 
Yeah, yeah. 

323
00:19:27,120 --> 00:19:30,080
And I think it really ended up 
that way because I was guiding 

324
00:19:30,080 --> 00:19:33,280
it so much. 
And maybe that was a take away 

325
00:19:33,280 --> 00:19:37,760
from the vibe coding aspect of 
this project, which was I felt 

326
00:19:37,760 --> 00:19:43,080
like I was managing like a team.
I was very, very specific with 

327
00:19:43,080 --> 00:19:44,280
my guidance and things like 
that. 

328
00:19:44,280 --> 00:19:46,520
And kind of with that outcomes 
were pretty good. 

329
00:19:47,360 --> 00:19:49,480
But it's like my brain was tired
in a different way. 

330
00:19:49,480 --> 00:19:53,240
I was just like, I felt like I 
was yeah, like coaching and and 

331
00:19:53,240 --> 00:19:55,800
like managing more than anything
else, which is kind of an 

332
00:19:55,800 --> 00:20:00,800
interesting take away. 
But yeah, I let me get let me 

333
00:20:00,800 --> 00:20:03,760
share a different window. 
Actually, before I share a 

334
00:20:03,760 --> 00:20:05,200
different window. 
Can you go back to the 

335
00:20:05,200 --> 00:20:06,640
playground? 
Yeah, absolutely. 

336
00:20:06,640 --> 00:20:12,960
Let's do this. 
So for this example, it actually

337
00:20:12,960 --> 00:20:18,840
is based off of this schema in 
the playground. 

338
00:20:19,000 --> 00:20:20,600
So you know, people who are 
watching. 

339
00:20:20,600 --> 00:20:23,000
When I kind of dive into this in
more detail, it's a it's a more 

340
00:20:23,000 --> 00:20:26,800
involved schema, but this schema
implements user defined roles. 

341
00:20:27,240 --> 00:20:30,720
So this is something where if 
you go into, let's say an admin 

342
00:20:30,960 --> 00:20:35,600
dashboard, there may be some 
built in roles like admin 

343
00:20:35,920 --> 00:20:39,680
editor, reader, whatever. 
But you can also like there's an

344
00:20:39,680 --> 00:20:43,720
empty input box where you can 
say commenter, you can create 

345
00:20:43,840 --> 00:20:47,480
user defined roles, you can 
create new roles and then assign

346
00:20:47,480 --> 00:20:50,240
them to different resources. 
And so this is how that's 

347
00:20:50,240 --> 00:20:54,880
implemented with SPICE DB. 
So the main take away from that 

348
00:20:54,880 --> 00:20:59,360
is that there's a level of 
interaction that happens because

349
00:20:59,720 --> 00:21:02,320
you know, you have to create the
role and then you have to assign

350
00:21:02,320 --> 00:21:05,920
users to that role and then that
role has certain abilities. 

351
00:21:05,920 --> 00:21:08,800
That new role that you just 
created has new abilities and 

352
00:21:08,800 --> 00:21:10,560
and and a user gets to define 
that. 

353
00:21:10,560 --> 00:21:14,480
So think of like a few levels of
indirection that happened with 

354
00:21:14,480 --> 00:21:18,160
user based user defined roles. 
So knowing that I'm going to 

355
00:21:18,160 --> 00:21:22,960
share a different screen. 
So this is cloud desktop. 

356
00:21:24,320 --> 00:21:30,080
Cloud Desktop is also an MCP 
client, which is why I'm, I'm 

357
00:21:30,120 --> 00:21:35,800
kind of bringing it up now. 
I already have an MCP, the Spice

358
00:21:35,800 --> 00:21:39,480
DBMCP server running locally on 
my machine and this is connected

359
00:21:39,480 --> 00:21:42,600
to that. 
So if you, they just changed 

360
00:21:42,600 --> 00:21:47,360
their UI recently. 
So you can see that by seeing 

361
00:21:47,360 --> 00:21:49,840
down here. 
There's Spice DB, that's the MCB

362
00:21:49,840 --> 00:21:51,160
server that's currently 
connected. 

363
00:21:51,560 --> 00:21:56,560
And then you can see the various
tools that are defined in the 

364
00:21:56,560 --> 00:21:59,640
server and that are now 
accessible to clawed. 

365
00:22:01,560 --> 00:22:05,720
We also have a spicy B server 
running and that is pre loaded 

366
00:22:05,720 --> 00:22:08,600
with the schema that we just saw
and some sample data. 

367
00:22:08,720 --> 00:22:11,960
There's a project and and some 
roles on that project and some 

368
00:22:11,960 --> 00:22:17,240
users all defined. 
So one thing you can do is like 

369
00:22:17,520 --> 00:22:22,120
the reason why I found this 
fascinating is that you have 

370
00:22:22,120 --> 00:22:25,800
this complex authorization model
in place. 

371
00:22:26,000 --> 00:22:29,000
You have some real data to fill 
out that model. 

372
00:22:29,120 --> 00:22:32,120
Basically you have like a 
snapshot of your application 

373
00:22:32,440 --> 00:22:35,760
running. 
You can reason about it in like 

374
00:22:35,760 --> 00:22:38,600
natural language now. 
So one example is like, let's 

375
00:22:38,600 --> 00:22:40,400
say you're a new developer on 
the team. 

376
00:22:40,400 --> 00:22:42,720
You can obviously look at the 
schema and try to understand it,

377
00:22:42,720 --> 00:22:49,440
but you could also come here and
just say let's see, sorry they 

378
00:22:49,440 --> 00:22:57,000
changed the they change the UI. 
Here you go. 

379
00:22:57,000 --> 00:23:01,360
So the MCP server has prompts 
built in. 

380
00:23:03,440 --> 00:23:06,200
Another benefit of vibe coding 
was that I just told it to make 

381
00:23:06,640 --> 00:23:08,960
use of every single MCP feature 
you could. 

382
00:23:09,440 --> 00:23:11,920
So we have prompts so we can say
analyze schema. 

383
00:23:12,640 --> 00:23:18,560
And this basically is a built in
prompt that you can give and 

384
00:23:18,560 --> 00:23:21,480
let's see what it does. 
I keep wanting to do this at 

385
00:23:21,480 --> 00:23:24,200
work so this is probably going 
to motivate me a little more. 

386
00:23:25,600 --> 00:23:30,200
I encourage you to vibe code it.
Yeah, we do have all of our oh 

387
00:23:30,200 --> 00:23:34,320
gosh, what are they called? 
Like LLM based text based on our

388
00:23:34,320 --> 00:23:36,280
docs. 
So I think I can pull it in. 

389
00:23:36,840 --> 00:23:41,160
Cool. 
So yeah, it goes through and I 

390
00:23:41,160 --> 00:23:43,240
don't know if we want to read 
all this, but basically it 

391
00:23:43,240 --> 00:23:47,440
analyzes all the objects to find
and the relations, the 

392
00:23:47,440 --> 00:23:55,000
permissions, you know, explains 
kind of like how those 

393
00:23:55,000 --> 00:23:58,160
permissions are constructed and 
has some pretty interesting 

394
00:23:58,160 --> 00:24:03,840
analysis and. 
So essentially like you drop us 

395
00:24:03,840 --> 00:24:06,000
came in and it's actually going 
to do this, right? 

396
00:24:06,520 --> 00:24:07,920
Yeah, you can also just paste it
in. 

397
00:24:08,360 --> 00:24:11,800
This is running against a live 
Spice DB instance, which is kind

398
00:24:11,800 --> 00:24:12,880
of cool. 
That's wild. 

399
00:24:14,840 --> 00:24:18,800
Yeah, you could also some of the
other prompts are this like 

400
00:24:18,800 --> 00:24:23,960
modal thing you can define 
where, sorry I need to pull up 

401
00:24:25,000 --> 00:24:33,400
you fill this in with the 
correct data, but let me see. 

402
00:24:35,360 --> 00:24:40,560
So for example, if we have so 
this is explain permissions 

403
00:24:40,560 --> 00:24:41,960
check. 
So it's like I'm going to do a 

404
00:24:41,960 --> 00:24:44,840
ask it a permission question and
it's going to explain to us like

405
00:24:44,920 --> 00:24:48,800
how it got there. 
So if I say the resource type is

406
00:24:48,800 --> 00:24:53,360
defined as a project, the 
project name is Pied Piper. 

407
00:24:58,040 --> 00:25:02,160
And let's say permission, call 
it. 

408
00:25:07,000 --> 00:25:12,320
It's an interesting permission. 
How about resolve? 

409
00:25:13,000 --> 00:25:17,200
It's like resolve. 
Oh, sorry to issue. 

410
00:25:25,040 --> 00:25:26,480
Oh take that back. 
Oh, there it is. 

411
00:25:28,120 --> 00:25:30,720
So is intriguing. 
How far down the Silicon Valley 

412
00:25:30,720 --> 00:25:34,960
do we go? 
Issue was server resolve and 

413
00:25:34,960 --> 00:25:41,160
then the subject type is a user 
and the idea is the idea. 

414
00:25:41,240 --> 00:25:51,640
The idea, I mean the idea, OK, 
so it's going to basically this 

415
00:25:51,640 --> 00:25:54,240
is the resulting prompt, It's 
going to ask this permission 

416
00:25:54,240 --> 00:25:57,280
question. 
Can this user take this resolve 

417
00:25:57,280 --> 00:26:00,960
action on this specific issue? 
That's cool. 

418
00:26:06,920 --> 00:26:10,080
And so it's using like a 
language model to then run 

419
00:26:10,080 --> 00:26:16,040
against Spice TV, right? 
So it's, this is a cloud desktop

420
00:26:16,040 --> 00:26:19,240
specific thing. 
It's now trying to run a tool 

421
00:26:19,240 --> 00:26:22,960
check permission. 
So this tool is essentially 

422
00:26:22,960 --> 00:26:25,960
calling a SPICE DB API, the same
API you would use in your 

423
00:26:25,960 --> 00:26:27,720
applications to check a 
permission. 

424
00:26:28,880 --> 00:26:30,480
So I'm going to just say always 
allow. 

425
00:26:32,720 --> 00:26:36,760
So it interpreted that natural 
language question into a SPICE 

426
00:26:36,760 --> 00:26:38,760
DB API call. 
That's cool. 

427
00:26:38,960 --> 00:26:42,400
Which is a tool that the MCP 
server exposes. 

428
00:26:44,920 --> 00:26:46,680
Got the answer back here. 
So it says. 

429
00:26:49,160 --> 00:26:52,080
Maybe the downside is like it's 
too many words because the API 

430
00:26:52,080 --> 00:26:54,920
call just returns like. 
Almost needs to just be like and

431
00:26:54,920 --> 00:26:57,840
told me and Jason or. 
Yeah, well, you can. 

432
00:26:58,000 --> 00:27:02,000
This specific prompt does tell 
it to explain itself, which is 

433
00:27:02,000 --> 00:27:04,800
why it's super long. 
But it says, yeah, this user 

434
00:27:04,800 --> 00:27:08,760
does have resolve permission. 
It gives you what this 

435
00:27:08,760 --> 00:27:10,680
permission allows. 
So the result what that 

436
00:27:10,680 --> 00:27:13,160
permission, that resolve thing 
actually means. 

437
00:27:13,680 --> 00:27:16,320
And then it gives you the 
breakdown of like how it got 

438
00:27:16,320 --> 00:27:18,800
that way. 
So it says that that user has a 

439
00:27:19,800 --> 00:27:23,080
has a relation assigned on that.
So that user was assigned to 

440
00:27:23,080 --> 00:27:24,480
that issue. 
It was his issue. 

441
00:27:25,040 --> 00:27:27,680
And so therefore it has the 
resolve permission. 

442
00:27:28,760 --> 00:27:30,960
And then it gives you the chain 
of like, remember I said that 

443
00:27:30,960 --> 00:27:36,560
there's a bunch of indirection. 
And so it's that user was an 

444
00:27:36,560 --> 00:27:39,320
admin and a developer. 
And that developer role means 

445
00:27:39,320 --> 00:27:43,600
that it has this relation on 
this project and that it kind of

446
00:27:43,600 --> 00:27:48,000
walks you through step by step 
of like the logic behind the 

447
00:27:48,000 --> 00:27:49,560
permission site. 
You wrote the scheme itself. 

448
00:27:49,560 --> 00:27:51,800
You would know this. 
But again, if you were a new 

449
00:27:51,920 --> 00:27:54,120
developer on the team and you're
just trying to come up to speed,

450
00:27:54,120 --> 00:27:57,720
it's like a nice educational 
companion to getting up to 

451
00:27:57,720 --> 00:28:03,680
speed. 
And like another scenario that 

452
00:28:04,720 --> 00:28:09,400
was interesting was independent 
of me building this, one of our 

453
00:28:09,880 --> 00:28:14,360
spicy B community members built 
his own MCP server because he 

454
00:28:14,360 --> 00:28:16,880
wanted to approach it more from 
like an enterprise perspective 

455
00:28:16,880 --> 00:28:20,280
where let's say you're 
non-technical and you wanted to 

456
00:28:20,280 --> 00:28:25,040
be able to do compliance, like 
ask compliance questions. 

457
00:28:26,440 --> 00:28:31,000
He referenced, he wrote this 
article and he posed a question 

458
00:28:31,000 --> 00:28:33,880
like what if someone wanted to 
have like there's a specific 

459
00:28:33,880 --> 00:28:35,640
phrase for it, which I can't 
remember directly, but it's 

460
00:28:35,680 --> 00:28:40,560
basically like having knowledge 
about who has access to what 

461
00:28:40,840 --> 00:28:44,520
like beforehand so that you can 
essentially write reports and 

462
00:28:44,520 --> 00:28:53,120
things like that. 
And so one example of of kind of

463
00:28:53,120 --> 00:28:58,440
some compliance questions you 
can ask, let me grab one, are 

464
00:28:58,440 --> 00:29:05,480
let's say like a project gets 
deprecated and you wanted to you

465
00:29:05,480 --> 00:29:14,560
wanted to know who to notify. 
So I will ask the question. 

466
00:29:15,800 --> 00:29:17,560
So the project pipe Piper is not
deprecated. 

467
00:29:17,560 --> 00:29:20,040
Find all the users who have 
access to it so they can be 

468
00:29:20,040 --> 00:29:22,760
notified. 
And we know by looking at the 

469
00:29:22,760 --> 00:29:25,800
schema that that's not 
straightforward because there 

470
00:29:25,800 --> 00:29:29,560
are a lot of different roles and
those roles have a level of 

471
00:29:29,560 --> 00:29:31,600
indirection. 
So to actually figure out who 

472
00:29:31,680 --> 00:29:33,920
has access to pipe Piper means 
that you have to go through 

473
00:29:33,920 --> 00:29:37,520
every single permission and 
resolve them. 

474
00:29:38,120 --> 00:29:41,560
And so again, alternatively, in 
like a like a role based system,

475
00:29:41,960 --> 00:29:44,360
you know, you have to find all 
the roles and maybe like do a 

476
00:29:44,840 --> 00:29:48,360
write a sequel query with Jots. 
Maybe you have a search function

477
00:29:48,440 --> 00:29:52,160
like in your admin portal. 
But with this, you just ask it 

478
00:29:52,160 --> 00:29:57,120
kind of this question and behind
the scenes it's actually making 

479
00:29:57,560 --> 00:30:02,600
a couple Spice DBAPI calls 
that's. 

480
00:30:07,800 --> 00:30:13,080
And due to, you know, non 
determinism, I really don't know

481
00:30:13,080 --> 00:30:14,880
what it's going to say every 
time I do this. 

482
00:30:16,720 --> 00:30:18,600
But one thing it's doing is it's
calling this thing called look 

483
00:30:18,600 --> 00:30:22,200
up subjects. 
That API is essentially you give

484
00:30:22,200 --> 00:30:25,200
it a resource and a permission 
and it kind of does like a 

485
00:30:25,200 --> 00:30:27,160
reverse call. 
It's like who has this 

486
00:30:27,160 --> 00:30:30,280
permission on this resource? 
So instead of asking can this 

487
00:30:30,280 --> 00:30:32,560
person do this thing on this 
resource, it's the other way. 

488
00:30:32,880 --> 00:30:33,520
How? 
Crazy. 

489
00:30:33,520 --> 00:30:36,160
Have you ever seen this? 
Like millions and millions of 

490
00:30:36,160 --> 00:30:39,800
users. 
What's that like in a system 

491
00:30:39,800 --> 00:30:41,800
that has like, let's say 
1,000,000 users? 

492
00:30:41,800 --> 00:30:46,000
Do you expect this to like a 
call like this to vary to a 

493
00:30:46,000 --> 00:30:50,320
great degree compared to like, 
you know, 10,000 users? 

494
00:30:51,600 --> 00:30:54,040
From Spice TV's perspective. 
Yeah, Spice TV. 

495
00:30:54,880 --> 00:30:58,640
Performance wise, we have so 
this API, you know, it really 

496
00:30:58,640 --> 00:31:00,320
depended on the shape of your 
data. 

497
00:31:01,720 --> 00:31:05,520
But so that look up API call is 
one thing. 

498
00:31:05,520 --> 00:31:10,640
We have a product called 
Materialize that makes it 

499
00:31:10,640 --> 00:31:14,240
performant for more complex 
scenarios. 

500
00:31:14,920 --> 00:31:18,080
So you can have essentially 
like, you know, 1,000,000 user 

501
00:31:18,080 --> 00:31:21,640
look up at the end of one of 
these queries that still takes 

502
00:31:21,640 --> 00:31:23,920
in the order of like 
milliseconds. 

503
00:31:27,840 --> 00:31:31,960
So it's kind of doing its 
reasoning and thinking it did a 

504
00:31:31,960 --> 00:31:33,920
look up subjects, which is like 
the most obvious thing to do 

505
00:31:33,920 --> 00:31:35,920
first. 
It's like who has access? 

506
00:31:36,360 --> 00:31:39,800
It was access to this thing, but
it's also kind of going through 

507
00:31:39,800 --> 00:31:43,120
and kind of verifying those 
results. 

508
00:31:43,600 --> 00:31:45,720
I think with like a few 
relationship calls. 

509
00:31:45,800 --> 00:31:48,320
I mean, it's going to explain to
us what it does at some point, 

510
00:31:48,320 --> 00:32:01,690
but 
it's kind of identified that 

511
00:32:01,690 --> 00:32:03,970
that project has different roles
associated with it. 

512
00:32:03,970 --> 00:32:09,240
So it's kind of walking the the 
kind of like logical tree of 

513
00:32:09,240 --> 00:32:12,120
like what The Who, who has 
access to that or who has that 

514
00:32:12,120 --> 00:32:19,800
role applied? 
I like it how it says user, user

515
00:32:20,400 --> 00:32:22,240
user. 
This is interesting. 

516
00:32:26,160 --> 00:32:30,600
The normally I think I don't 
know what happened, but it 

517
00:32:30,600 --> 00:32:34,880
usually gives out the actual 
name, but you can kind of see 

518
00:32:34,880 --> 00:32:37,320
like, oh, it did find any all 
the people who did it. 

519
00:32:37,320 --> 00:32:44,560
I wonder if one of these, yeah, 
you got all the the names back 

520
00:32:44,560 --> 00:32:47,440
from this, but again, 
undetermined. 

521
00:32:47,440 --> 00:32:48,280
I don't know why. 
Exactly. 

522
00:32:50,520 --> 00:32:52,280
That's the fun of L aloms right 
there. 

523
00:32:52,800 --> 00:32:56,920
So this is kind of like, yeah, 
like you ask kind of a, a 

524
00:32:56,920 --> 00:33:01,160
non-technical question to a very
technical system and you can get

525
00:33:01,160 --> 00:33:05,240
kind of responses back in. 
Again, I can't stress enough, 

526
00:33:05,240 --> 00:33:08,480
this is for educated purposes. 
I would not do this on a live 

527
00:33:08,480 --> 00:33:11,320
spicy B instance. 
But let's say in that like a 

528
00:33:11,440 --> 00:33:13,320
maybe in like a mere 
environment, like you can 

529
00:33:13,320 --> 00:33:16,440
actually start answering like, 
yeah, really complex questions 

530
00:33:16,440 --> 00:33:19,920
that you know, your permissions 
data isn't simply, you know, can

531
00:33:19,920 --> 00:33:24,080
someone do this or not. 
It really does shape kind of 

532
00:33:24,080 --> 00:33:26,320
like what value people are 
getting for your application. 

533
00:33:26,320 --> 00:33:28,440
Like what sort of compliance 
things are necessary? 

534
00:33:28,440 --> 00:33:31,400
Like is our is our application 
permission data in a good in a 

535
00:33:31,400 --> 00:33:32,600
good spot? 
Is it accurate? 

536
00:33:33,120 --> 00:33:34,640
Those are the things that you 
can start auditing. 

537
00:33:35,960 --> 00:33:39,280
I would imagine you can get like
a sense of what features are 

538
00:33:39,280 --> 00:33:42,440
being used and things like that 
too, just based on, you know, 

539
00:33:42,440 --> 00:33:47,520
our our Google Docs scenario 
like are they only using URL 

540
00:33:47,520 --> 00:33:52,720
links first, you know, is it 
just org only permission access 

541
00:33:52,720 --> 00:33:54,920
like that sort of level of 
things too and. 

542
00:33:57,680 --> 00:34:00,360
Then I think the last scenario I
kind of mentioned is again more 

543
00:34:00,360 --> 00:34:04,960
as like a developer companion. 
So again, maybe you're running 

544
00:34:04,960 --> 00:34:07,760
kind of a test instance of your 
production schema. 

545
00:34:09,199 --> 00:34:11,080
But let's say you're like 
wanting, you're adding a new 

546
00:34:11,080 --> 00:34:15,600
feature and you want to set up a
test test environment. 

547
00:34:16,280 --> 00:34:19,120
You know, you could set that up 
yourself. 

548
00:34:19,120 --> 00:34:24,199
Like maybe you have some kind of
like scaffolding code in your 

549
00:34:24,199 --> 00:34:26,159
test environment that you would 
write relationships and do all 

550
00:34:26,159 --> 00:34:29,320
that stuff or you just tell it 
to do it in English. 

551
00:34:29,320 --> 00:34:31,639
You say set up a scenario by 
writing the appropriate 

552
00:34:31,639 --> 00:34:34,960
relationships so that there's a 
new role auditor and that user 

553
00:34:34,960 --> 00:34:37,159
Jared has that role. 
So that's like the end state of 

554
00:34:37,159 --> 00:34:39,120
what your test wants to test, 
let's say. 

555
00:34:39,159 --> 00:34:45,040
So you just tell it to do it. 
I intentionally only put a 

556
00:34:45,040 --> 00:34:49,800
single right tool that's exposed
in this, which is right 

557
00:34:49,800 --> 00:34:52,280
relationship. 
I intentionally didn't have it. 

558
00:34:52,360 --> 00:34:54,600
So that's what it's trying to do
because it knows it needs to 

559
00:34:54,600 --> 00:34:58,520
write a new relationship. 
So it's actually writing the new

560
00:34:58,520 --> 00:35:01,360
role because remember that level
of indirection, it's trying to 

561
00:35:01,360 --> 00:35:05,560
role first. 
And now it's writing Jared as 

562
00:35:05,560 --> 00:35:10,960
that new role. 
And I didn't have, I 

563
00:35:10,960 --> 00:35:13,520
intentionally didn't put in 
right schema functionality 

564
00:35:13,520 --> 00:35:17,600
because like you're saying, like
you don't want to have example 

565
00:35:17,600 --> 00:35:20,400
code out there that does the 
does poor practices. 

566
00:35:20,720 --> 00:35:22,400
I didn't want someone to 
accidentally use this. 

567
00:35:22,400 --> 00:35:26,400
Like I wrote warnings everywhere
saying I do not run this against

568
00:35:26,400 --> 00:35:29,240
production, but in case someone 
does like at least they can't. 

569
00:35:30,200 --> 00:35:33,280
The worst they can do is add 
some extra things. 

570
00:35:33,560 --> 00:35:36,560
At least they can't destroy 
their entire information system.

571
00:35:37,120 --> 00:35:41,480
Yes, it can always be 
challenging providing cool 

572
00:35:41,480 --> 00:35:45,000
things and like neat stuff and 
like, don't do this ever, 

573
00:35:45,000 --> 00:35:47,400
please. 
But here's something to think 

574
00:35:47,400 --> 00:35:50,800
about. 
Say I created the role, added 

575
00:35:50,800 --> 00:35:54,280
that role for Jared, and then 
it's adding Jared having that 

576
00:35:55,120 --> 00:35:58,800
that role for a project. 
So it's kind of working through 

577
00:35:58,800 --> 00:36:00,520
its thing and now it's checking 
its work. 

578
00:36:01,640 --> 00:36:03,800
I've never really thought about 
this until I started watching 

579
00:36:04,480 --> 00:36:10,680
like for testing API calls and 
just like or non structured 

580
00:36:10,680 --> 00:36:12,800
thoughts going through them. 
I've never really thought about 

581
00:36:12,800 --> 00:36:15,520
like really pushing those 
through this, but that might be 

582
00:36:15,520 --> 00:36:19,160
an interesting thing to do. 
I think with as an application 

583
00:36:19,160 --> 00:36:23,560
developer, I've come into places
where I spent more time setting 

584
00:36:23,560 --> 00:36:26,280
up the test scenario and testing
the thing itself, right? 

585
00:36:26,280 --> 00:36:27,880
And then you get this whole 
thing around. 

586
00:36:28,200 --> 00:36:30,280
Is it a unit test? 
Is an integration test. 

587
00:36:30,800 --> 00:36:34,240
And then kind of like the the 
disparity between kind of the 

588
00:36:34,240 --> 00:36:37,960
idea of unit test being things 
that are kind of isolated 

589
00:36:38,680 --> 00:36:40,840
functionality testing versus 
like integration tests where 

590
00:36:40,840 --> 00:36:42,680
there's like a lot of different 
environmental variables that 

591
00:36:42,680 --> 00:36:45,840
might be affecting kind of like 
the reliability of that test. 

592
00:36:45,840 --> 00:36:49,640
So it's like you're writing a 
bunch of like almost like 

593
00:36:49,640 --> 00:36:52,880
parallel application code. 
Whereas with this it's like, you

594
00:36:52,880 --> 00:36:55,800
know, maybe the, you know, in 
the future where this becomes 

595
00:36:55,800 --> 00:36:58,960
like reliable. 
Yeah, your your scaffolding code

596
00:36:58,960 --> 00:37:01,560
essentially might be just 
describing the scenario in 

597
00:37:01,560 --> 00:37:03,160
product terms. 
Yeah. 

598
00:37:03,600 --> 00:37:07,400
And like, sometimes I think of 
like these scenarios as a 

599
00:37:07,640 --> 00:37:10,880
elementary school kid hitting 
your stuff like that doesn't 

600
00:37:10,880 --> 00:37:12,320
know anything about how it 
should work. 

601
00:37:12,320 --> 00:37:17,160
And like you find things and 
it's like, ah well, TDD land, I 

602
00:37:17,160 --> 00:37:18,920
should probably add something 
over there. 

603
00:37:18,920 --> 00:37:21,000
And I actually put some good 
tests in. 

604
00:37:21,120 --> 00:37:24,640
It yeah, yeah. 
But yeah, it kind of did its 

605
00:37:24,640 --> 00:37:26,600
thing. 
It verified itself says like 

606
00:37:26,640 --> 00:37:29,600
Jared is now there's an auditor 
role and it's attached to Pied 

607
00:37:29,600 --> 00:37:33,240
Piper, the project and Jared has
that role and it verified it. 

608
00:37:33,240 --> 00:37:34,680
So that's cool. 
Test away. 

609
00:37:36,920 --> 00:37:39,040
Yeah. 
So I think, you know, there's a 

610
00:37:39,040 --> 00:37:42,920
lot of potential here. 
I think again, wrapped all in 

611
00:37:42,920 --> 00:37:46,440
the caveat that like this is all
non deterministic, but as far as

612
00:37:46,440 --> 00:37:50,280
an educational tool, like you 
got this running, you paste in 

613
00:37:50,280 --> 00:37:53,320
any SPICE DB schema that you are
building yourself where you've 

614
00:37:53,320 --> 00:37:55,560
kind of come across and you just
want to learn more about it. 

615
00:37:56,000 --> 00:37:58,040
It's a great way to like try 
things out. 

616
00:37:58,040 --> 00:38:02,240
And because SPICE DB itself is 
a, it's a service that's 

617
00:38:02,240 --> 00:38:04,440
running. 
Your application could also be 

618
00:38:04,440 --> 00:38:07,000
talking to at the same time. 
You can interact with it from 

619
00:38:07,000 --> 00:38:09,960
both places. 
I love, I love the fact like 

620
00:38:09,960 --> 00:38:13,240
someone new coming into this 
too, it's like fully describing 

621
00:38:13,240 --> 00:38:15,320
English, like what it's going 
through and all of that. 

622
00:38:15,320 --> 00:38:19,120
Like, you know, for a developer,
I'd rather like see the code 

623
00:38:19,160 --> 00:38:21,280
things going on. 
But like for someone just 

624
00:38:21,280 --> 00:38:24,440
getting started or like 
understanding it, this is this 

625
00:38:24,440 --> 00:38:25,360
is awesome. 
Yeah. 

626
00:38:25,760 --> 00:38:31,360
Yeah, and I don't know, I, I 
don't know if I put a URL for 

627
00:38:31,360 --> 00:38:33,520
the repo for this, but you can 
try it out. 

628
00:38:34,120 --> 00:38:36,280
It's. 
Yeah, we'll get it later and 

629
00:38:36,480 --> 00:38:37,840
throw it in the notes. 
That sounds good. 

630
00:38:38,240 --> 00:38:41,640
Cool. 
Yeah, I think for today this 

631
00:38:41,640 --> 00:38:45,360
might be a good place to stop. 
Like I said, I really hope I can

632
00:38:46,080 --> 00:38:50,520
come back and kind of like go 
more in depth around like what's

633
00:38:50,520 --> 00:38:52,960
possible with spicy meat. 
I think we only touched on that 

634
00:38:53,080 --> 00:38:57,480
about going granular. 
But I mean, really, I think that

635
00:38:57,640 --> 00:39:02,320
if I could leave one take away 
is that you can have your cake 

636
00:39:02,320 --> 00:39:05,560
and eat it too. 
It's like you can have the exact

637
00:39:05,560 --> 00:39:08,480
permissions model that supports 
the, the, the product you want 

638
00:39:08,480 --> 00:39:11,040
to build, but not have to be 
responsible for it. 

639
00:39:12,640 --> 00:39:15,240
Whether you use the open source 
project and you kind of like use

640
00:39:15,240 --> 00:39:20,200
spicy to model or you use an 
offset product where you fully 

641
00:39:21,040 --> 00:39:23,960
delegate the infrastructure and,
and we managed all that stuff 

642
00:39:23,960 --> 00:39:25,720
for you and you just build your 
application. 

643
00:39:26,840 --> 00:39:30,440
It really is something that 
something so critical you can 

644
00:39:30,440 --> 00:39:34,040
have it just off your plate. 
It really is freeing as 

645
00:39:34,040 --> 00:39:37,520
application developer. 
I'll I'll ask a question that's 

646
00:39:37,520 --> 00:39:39,320
like probably not the thing that
none. 

647
00:39:39,320 --> 00:39:43,160
So maybe we'll chat a little bit
differently here, but I feel 

648
00:39:43,160 --> 00:39:47,240
like I've only seen one 
competitor in the space doing 

649
00:39:47,240 --> 00:39:52,760
similar things and work or yes, 
work OS purchase them. 

650
00:39:52,760 --> 00:39:59,040
So is there, how do I ask this 
correctly Auth Zed is is kind of

651
00:39:59,040 --> 00:40:02,520
the key player in RBAC for what 
I've seen. 

652
00:40:02,520 --> 00:40:06,080
Is there other folks doing this 
and like is there any like 

653
00:40:06,080 --> 00:40:09,240
thoughts around comparisons and 
you know where you put in 

654
00:40:09,240 --> 00:40:10,880
position yourself in the 
industry? 

655
00:40:11,440 --> 00:40:14,360
Yeah, yeah. 
I think I referenced it earlier,

656
00:40:14,360 --> 00:40:19,040
but the UX of Reback and 
Zanzibar has become really 

657
00:40:19,040 --> 00:40:21,680
popular. 
And so I think that's the one 

658
00:40:21,720 --> 00:40:25,160
consistent theme you'll see in 
terms of like competitors or 

659
00:40:25,160 --> 00:40:27,240
alternative kind of reback 
implementations. 

660
00:40:28,360 --> 00:40:31,720
And that's nice because while 
there's no standard, like it's 

661
00:40:31,720 --> 00:40:34,920
not portable, but you know, you 
can think about it in a similar 

662
00:40:34,920 --> 00:40:36,960
way where it's like you can 
start with your applications. 

663
00:40:36,960 --> 00:40:40,520
Like what if I could architect 
my application so that I'm 

664
00:40:40,520 --> 00:40:43,560
asking these types of questions 
where I need to make access 

665
00:40:43,560 --> 00:40:47,520
control decisions. 
And then you go into like, OK, 

666
00:40:47,520 --> 00:40:49,240
what's the specific solution I 
want to run? 

667
00:40:49,240 --> 00:40:54,200
And that's where there is quite 
a bit of difference for Spicy B.

668
00:40:54,240 --> 00:40:57,400
We were, we treated the paper 
almost like gospel. 

669
00:40:57,440 --> 00:41:00,680
Like we were like, if they 
figured this out, we're going to

670
00:41:00,680 --> 00:41:04,120
do exactly what they did. 
And so that was our kind of like

671
00:41:04,160 --> 00:41:06,960
North Stars in terms of building
and designing Spicy B. 

672
00:41:08,440 --> 00:41:10,760
That doesn't mean it was like, 
that's the only way to do it. 

673
00:41:10,960 --> 00:41:15,440
Like I think some competitors, 
you know, traded off certain 

674
00:41:15,440 --> 00:41:18,920
things because they, they felt 
that their use cases that they 

675
00:41:18,920 --> 00:41:22,160
wanted to support didn't need 
certain things or had like 

676
00:41:22,240 --> 00:41:24,720
alternative versions of the 
things from the paper that fit 

677
00:41:25,000 --> 00:41:26,280
kind of how their approach 
better. 

678
00:41:27,040 --> 00:41:32,560
And so I think that the main 
reback invitations I've seen are

679
00:41:33,440 --> 00:41:38,200
so there's work OSS FGA product 
which is based off of warrant, 

680
00:41:38,200 --> 00:41:40,800
which is the the product that 
they they acquired. 

681
00:41:42,480 --> 00:41:47,400
They yeah, you know, it's, it's 
very much kind of Zanzibar ask. 

682
00:41:47,800 --> 00:41:53,800
I don't think they have well, 
they have the notion of kind of 

683
00:41:53,800 --> 00:41:56,520
those like snapshot kind of 
tokens. 

684
00:41:58,240 --> 00:42:01,480
But other than that, I think 
they also have this ability to 

685
00:42:02,880 --> 00:42:05,680
integrate with kind of the rest 
of that work OS ecosystem. 

686
00:42:08,080 --> 00:42:11,560
Okta has an FGA project is what 
FGA is fine. 

687
00:42:11,560 --> 00:42:15,440
Grain authorization is kind of 
kind of the the more enterprise 

688
00:42:15,440 --> 00:42:20,400
name for Rebec. 
And I think their thing is that 

689
00:42:20,400 --> 00:42:23,760
they have FGA which they also 
have an open source version of 

690
00:42:23,760 --> 00:42:28,960
it and similarly kind of it's 
integrated with Okta for kind of

691
00:42:30,520 --> 00:42:33,120
authentication. 
And so that's kind of another 

692
00:42:33,920 --> 00:42:36,920
another alternative. 
And then there's a lot of 

693
00:42:36,920 --> 00:42:41,160
libraries that have kind of a 
Reback kind of UX, but behind 

694
00:42:41,160 --> 00:42:45,600
the scenes are either policy or 
ABAC. 

695
00:42:46,120 --> 00:42:51,040
And so yeah, just an alternative
kind of like way of collecting 

696
00:42:51,040 --> 00:42:54,320
the data that you need. 
So with Reback solutions, you 

697
00:42:54,320 --> 00:42:58,040
know, you have the graph where 
you kind of you write 

698
00:42:58,040 --> 00:43:00,400
relationship data and you use 
the graph to answer the 

699
00:43:00,400 --> 00:43:04,280
questions. 
With ABAC or policy solutions, 

700
00:43:04,880 --> 00:43:07,200
they are kind of collecting all 
the information that the policy 

701
00:43:07,200 --> 00:43:09,160
needs from like databases or 
wherever they need. 

702
00:43:09,440 --> 00:43:13,160
And then like they grab all that
stuff and they run the policy on

703
00:43:13,160 --> 00:43:16,360
it and they answer the question.
But the the UX of it looks kind 

704
00:43:16,360 --> 00:43:21,520
of like an RBAC system. 
And so there's servos is kind of

705
00:43:21,520 --> 00:43:24,840
one example of that they. 
Run into that often. 

706
00:43:25,360 --> 00:43:27,520
Yeah. 
But yeah, it's really 

707
00:43:27,520 --> 00:43:31,440
interesting how yeah, the, the, 
the Zanzibar UX has become the 

708
00:43:31,440 --> 00:43:37,560
thing that really is become 
popular And you know, I think 

709
00:43:37,560 --> 00:43:40,760
with Spice DB, like I said, we 
kind of took the UX and combined

710
00:43:40,760 --> 00:43:43,160
it with like the distributed 
systems like lessons, but. 

711
00:43:43,600 --> 00:43:46,680
I love the schema capabilities 
too, like it feels like it 

712
00:43:46,680 --> 00:43:49,440
simplifies everything so. 
Yeah, yeah. 

713
00:43:49,440 --> 00:43:53,800
And I think there's also kind of
this like working group that's 

714
00:43:53,800 --> 00:43:58,560
trying to standardize some of 
these things, but it's it's 

715
00:43:58,560 --> 00:44:01,720
subtly different. 
It's not necessarily like 

716
00:44:01,760 --> 00:44:04,560
Zanzibar and Rebec, like the way
we've been focused, it's kind of

717
00:44:04,840 --> 00:44:07,880
melding a lot of different 
authorization models and then 

718
00:44:08,240 --> 00:44:12,240
weirdly trying to use the like 
Sansbar kind of UX is kind of 

719
00:44:12,240 --> 00:44:15,320
like the, the unifying thought 
around some of those things. 

720
00:44:15,320 --> 00:44:18,840
But like, you know, 
authorization is, is is complex.

721
00:44:19,400 --> 00:44:21,640
So inevitably you're going to 
have different takes on like 

722
00:44:21,640 --> 00:44:25,360
what works well. 
But yeah, there's, it's really 

723
00:44:25,360 --> 00:44:28,200
cool because that just kind of 
shows that people are finally 

724
00:44:28,200 --> 00:44:30,960
paying attention to this space. 
Yeah, like really trying. 

725
00:44:30,960 --> 00:44:35,240
And so maybe not as quickly as 
AI, but there's a lot of 

726
00:44:35,240 --> 00:44:38,160
progress that's being made in a 
short amount of time. 

727
00:44:38,160 --> 00:44:40,840
And so I think like it's really 
cool to have different, 

728
00:44:42,200 --> 00:44:44,840
different approaches to kind of 
this, this problem space. 

729
00:44:45,280 --> 00:44:49,640
I feel like there's so much more
happening in AI that requires 

730
00:44:49,640 --> 00:44:54,520
both auth and authentication and
authorization that it, it's 

731
00:44:54,520 --> 00:44:57,400
amazing to me, like the stuff 
we're running into already. 

732
00:44:57,400 --> 00:45:00,760
So, you know, I don't know in 
the next 6 months what, what 

733
00:45:00,800 --> 00:45:03,600
both of our kind of areas are 
going to look like. 

734
00:45:03,600 --> 00:45:06,720
But I, I would say, I guess I'll
leave it with this. 

735
00:45:06,720 --> 00:45:10,400
If, if you're looking to kind of
get sure of the project, try out

736
00:45:10,400 --> 00:45:13,960
to the community version of 
fusion off and then try out the 

737
00:45:13,960 --> 00:45:17,720
open source version of Spice DB 
and like your next product could

738
00:45:17,720 --> 00:45:20,440
like take off from there. 
No problem. 

739
00:45:20,440 --> 00:45:22,960
So awesome. 
Well, thanks Sam. 

740
00:45:22,960 --> 00:45:25,640
I really appreciate you coming 
out and can't wait for our next 

741
00:45:25,640 --> 00:45:27,600
version of maybe some live 
coding of it too. 

742
00:45:28,080 --> 00:45:28,680
Thanks. 
Yeah. 

743
00:45:28,680 --> 00:45:32,240
No, I really appreciate having 
me on and I really hope I can 

744
00:45:32,240 --> 00:45:34,560
come back for that. 
Absolutely, Zach. 

745
00:45:34,560 --> 00:45:36,280
Soon. 
Bye.

