Skip to content

Commit 23523f0

Browse files
committed
more grammar fixes
1 parent 71340d1 commit 23523f0

File tree

7 files changed

+37
-32
lines changed

7 files changed

+37
-32
lines changed

pages/spicedb/concepts/caveats.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ A few important notes:
119119
This allows for **partial** binding of data at write time.
120120
- The Context is a `structpb`, which is defined by Google [and represents JSON-like data](https://pkg.go.dev/google.golang.org/protobuf/types/known/structpb).
121121
- To send 64-bit integers, encode them as strings.
122-
- A relationship cannot be duplicated, with or without a caveat, e.g. two relationships that differ only on their use of a caveat cannot both exist.
122+
- A relationship cannot be duplicated, with or without a caveat. In other words, two relationships that differ only on their use of a caveat cannot both exist.
123123
- When deleting a relationship, a caveat does not need to be specified; the matching relationship will be deleted if present.
124124

125125
## Providing Caveat Context via the API
@@ -157,7 +157,7 @@ In the case of `PERMISSIONSHIP_CONDITIONAL_PERMISSION`, SpiceDB will also return
157157
[states]: https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.CheckPermissionResponse.Permissionship
158158
[check-resp]: https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.CheckPermissionResponse
159159

160-
## `LookupResources` and `LookupSubjects`
160+
### `LookupResources` and `LookupSubjects`
161161

162162
Similarly to **CheckPermission**, both **LookupResources** and **LookupSubjects** can be provided with additional context and will return one of the two permission states for each of the results found (either has permission or conditionally has permission).
163163

@@ -175,7 +175,7 @@ LookupResourcesRequest {
175175
}
176176
```
177177

178-
### Providing Caveat Context with `zed CLI
178+
## Providing Caveat Context with `zed CLI`
179179

180180
When using `zed` command-line tool to interact with SpiceDB, the context can be provided using the `--caveat-context` flag.
181181
The caveat context should be a JSON representation that matches the types defined in the schema.
@@ -209,7 +209,7 @@ zed check -r resource:specificresource#view -p view -s user:specificuser --cavea
209209

210210
## Full Example
211211

212-
A full example of a schema with caveats can be found below, which allows users to `view` a resource if they are directly a `viewer` or they are a`viewer` within the correct IP CIDR range:
212+
A full example of a schema with caveats can be found below, which allows users to `view` a resource if they are directly a `viewer` or if they are a `viewer` within the correct IP CIDR range:
213213

214214
### Schema
215215

pages/spicedb/concepts/datastores.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For more information, refer to the [Datastore Migration documentation](/spicedb/
4141
</Callout>
4242

4343
- Recommended for multi-region deployments, with configurable region awareness
44-
- Enables horizontal scalablity by adding more SpiceDB and CockroachDB instances
44+
- Enables horizontal scalability by adding more SpiceDB and CockroachDB instances
4545
- Resiliency to individual CockroachDB instance failures
4646
- Query and data balanced across the CockroachDB
4747
- Setup and operational complexity of running CockroachDB

pages/spicedb/concepts/expiring-relationships.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@ import { InlinePlayground } from '@/components/playground';
1111
A common use case is to model relationships that expire after a certain time.
1212
This is useful for granting temporary access to a resource.
1313

14-
Until now, caveats were the recommended way to support time-bound permissions, but that has some limitations:
14+
Before version 1.40, [caveats] were the recommended way to support time-bound permissions, but that has some limitations:
15+
16+
[caveats]: caveats
1517

1618
- It requires clients to provide the `now` timestamp.
1719
This is additional complexity for clients.
1820
- Expired caveats are not automatically garbage collected.
1921
This can lead to many caveated relationships in the system and increase the costs of loading and evaluating those into the runtime.
2022

21-
SpiceDB supports expiring relationships, which lets users define relationships that expire at a given time.
23+
SpiceDB supports expiring relationships, which lets users define relationships that expire at a given time. The time must be specified in [RFC 3339 format].
24+
25+
[RFC 3339 format]: https://datatracker.ietf.org/doc/html/rfc3339#section-5.8
2226

2327
<Callout type="info">
2428
The clock used to determine if a relationship is expired is that of the underlying SpiceDB datastore.
@@ -34,7 +38,7 @@ The novelty here is that users need to enable the feature using the `use` clause
3438
This is to disambiguate a caveat named `expiration` from the new expiration feature.
3539

3640
To enable expiration in your schema, add a `use expiration` clause to the top of the file.
37-
Then the relations subject to expiration are marked using `<type> with expiration`:
41+
Then the relations subject to expiration are marked using `<type> with expiration`. For example:
3842

3943
```zed
4044
use expiration
@@ -86,12 +90,12 @@ Set expirations on relationships in the Playground with the format `[expiration:
8690
resource:r1#folder@folder:folder1[expiration:2025-12-31T23:59:59Z]
8791
```
8892

89-
or specify expirations in RFC 3339 format in the `Expiration` column in the Relationship grid editor.
93+
or specify expirations in the `Expiration` column in the Relationship grid editor.
9094
<br/><InlinePlayground reference="naky4PZ86uTc"/>
9195

9296
## zed
9397

94-
Use the `--expiration-time` flag to pass the expiration time of the relationship in RFC 3339 format:
98+
Use the `--expiration-time` flag to pass the expiration time of the relationship:
9599

96100
```shell zed
97101
zed relationship create resource:r1 folder folder:folder1 --expiration-time "2025-12-31T23:59:59Z"

pages/spicedb/concepts/schema.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ definition document {
7777
```
7878

7979
<Callout type="info">
80-
In the above example, the `user` on `reader` does not contain a sub-relation
80+
In the above example, the `user` on `reader` does not contain a sub-relation.
8181

8282
Occasionally you will see a subject which has a sub-relation such as `usergroup:admins#members` which refers not just to the `usergroup` as a whole, but the set of members which have that relation to the `usergroup`.
8383

@@ -181,7 +181,7 @@ Permissions support four kinds of operations: **union**, **intersection**, **exc
181181

182182
#### `+` (Union)
183183

184-
Unions together the relations/permissions referenced
184+
Unions together the relations/permissions referenced.
185185

186186
Union is the most common operation and is used to join different relations or permissions together to form a set of allowed subjects.
187187

@@ -193,7 +193,7 @@ permission combined = reader + writer
193193

194194
#### `&` (Intersection)
195195

196-
Intersects the set of subjects found for the relations/permissions referenced
196+
Intersects the set of subjects found for the relations/permissions referenced.
197197

198198
Intersection allows for a permission to only include those subjects that were found in **both** relations/permissions.
199199

@@ -205,9 +205,9 @@ permission read_and_write = reader & writer
205205

206206
#### `-` (Exclusion)
207207

208-
Excludes the set of subjects found for the right side relation/permission from those found in the left side relation/permission
208+
Excludes the set of subjects found for the right side relation/permission from those found in the left side relation/permission.
209209

210-
Exclusion allows for computing the difference between two sets of relations/permissions
210+
Exclusion allows for computing the difference between two sets of relations/permissions.
211211

212212
For example, to grant a permission to a user that is `reader` but not the `writer` of a document:
213213

@@ -217,7 +217,7 @@ permission can_only_read = reader - writer
217217

218218
#### `->` (Arrow)
219219

220-
Arrows allow for "walking" the heirarchy of relations (and permissions) defined for an **object** of a subject, referencing a permission or relation on the _resulting_ subject's object.
220+
Arrows allow for "walking" the hierarchy of relations (and permissions) defined for an **object** of a subject, referencing a permission or relation on the _resulting_ subject's object.
221221

222222
For example, imagine a schema where a document is found under a folder:
223223

@@ -260,7 +260,7 @@ definition document {
260260

261261
The expression `parent_folder->read` indicates to "walk" from the `parent_folder` of the `document`, and then to include the subjects found for the `read` permission of that folder.
262262

263-
Making use of a `union`, we can also include the local `reader` relation, allowing the `read` permission on a document can check whether a user is a `reader` of a document or a `reader` of its parent folder.
263+
Making use of a `union`, we can also include the local `reader` relation, allowing the `read` permission on a document to check whether a user is a `reader` of a document or a `reader` of its parent folder.
264264

265265
```zed
266266
definition user {}
@@ -298,7 +298,7 @@ definition document {
298298
For example, in:
299299

300300
```
301-
defintion resource {
301+
definition resource {
302302
relation parent: group#member
303303
permission someperm = parent->something
304304
}
@@ -379,7 +379,6 @@ In the above example, the user must be in the `member` relation for _all_ groups
379379

380380
<Callout type="warning">
381381
Intersection arrows can impact performance since they require loading **all** results for the arrow. This is especially a concern for arrows that traverse relationship graphs with a high branching factor.
382-
results for the arrow, it can impact performance if the arrow is very wide.
383382
</Callout>
384383

385384
### Naming Permissions
@@ -455,7 +454,7 @@ Admin permission on resources is then defined as the direct owner of the resourc
455454

456455
Relation traversals can be modeled using intermediate, synthetic relations.
457456

458-
Given the example hierarchy, portfolio can have folders, folders can have documents, we’d like a viewer of a portfolio to also be able to read documents contained in its folders.
457+
Given the example hierarchy below, where a portfolio can have folders and folders can have documents, we’d like a viewer of a portfolio to also be able to read documents contained in its folders.
459458
The read on documents could be thought of as:
460459

461460
```

pages/spicedb/concepts/watch.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ import { InlinePlayground } from '@/components/playground';
55

66
The [Watch API] in SpiceDB enables clients to monitor changes made to [Relationships] within the system.
77

8-
Watch events are generated when relationships are created, touched, or deleted through the [WriteRelationships], [DeleteRelationships], or the bulk import API.
8+
Watch events are generated when relationships are created, touched, or deleted through the [WriteRelationships], [DeleteRelationships] or [BulkImportRelationships] APIs.
99

1010
[Watch API]: https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.WatchService
1111
[Relationships]: relationships
1212
[WriteRelationships]: https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.PermissionsService.WriteRelationships
1313
[DeleteRelationships]: https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.PermissionsService.DeleteRelationships
14+
[BulkImportRelationships]: https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.BulkImportRelationshipsRequest
1415

1516
## Subscribing to Watch
1617

pages/spicedb/concepts/zanzibar.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In homeage, AuthZed maintained a Dune-related naming scheme for their own projec
3333
### Popularizing ReBAC
3434

3535
**Re**lationship-**b**ased **A**ccess **C**ontrol (ReBAC) is a one of the paradigms for the design of authorization systems.
36-
The core idea behind ReBAC is that the existence of a chain relationships between a subject and a resource defines access.
36+
The core idea behind ReBAC is that the existence of a chain of relationships between a subject and a resource defines access.
3737
This abstraction alone is able to model all other existing authorization paradigms including the very popular RBAC and ABAC designs.
3838
The concept was originally described by Carrie Gates in a 2006 paper entitled [Access Control Requirements for Web 2.0 Security and Privacy][web2-paper] with Facebook cited as an early adopter of this paradigm.
3939
However, it wouldn't be until the publication of the Zanzibar paper in 2019 that ReBAC would achieve popularity outside of applications that weren't already leveraging graph abstractions for their data.
@@ -49,10 +49,10 @@ For more information on ReBAC, see the [documentation for Relationships][rels].
4949

5050
### New Enemy Problem
5151

52-
The New Enemy Problem is scenario where unauthorized access can occur when changes to permissions and the resources they protect are not updated together [consistently].
52+
The New Enemy Problem is a scenario where unauthorized access can occur when changes to permissions and the resources they protect are not updated together [consistently].
5353
SpiceDB solves this problem with configurable consistency and ZedTokens, its version of Zookies.
5454

55-
This term was first introduced in the Zanzibar paper where solving this problem was a fundamental design goal:
55+
The term "Zookies" was first introduced in the Zanzibar paper where solving this problem was a fundamental design goal:
5656

5757
>ACL checks must respect the order in which users modify ACLs and object contents to avoid unexpected sharing behaviors.
5858
>Specifically, our clients care about preventing the "new enemy" problem, which can arise when we fail to respect the ordering between ACL updates or when we apply old ACLs to new content.
@@ -110,9 +110,9 @@ SpiceDB instead offers a [Schema Language][schema] that internally compiles into
110110

111111
Zanzibar [does not disambiguate][disambiguate] between relations that define access and those that exist purely in the abstract.
112112

113-
SpiceDB introduces new terms and syntax to differentiate relations into two concepts Relations and Permissions.
113+
SpiceDB introduces new terms and syntax to differentiate relations into two concepts: Relations and Permissions.
114114

115-
Permissions are best thought of "public API" being consumed by applications to check access.
115+
Permissions are best thought of as the "public API" being consumed by applications to check access.
116116
Permissions are defined using set semantics referred to in Zanzibar parlance as
117117
"computed usersets".
118118

@@ -141,19 +141,20 @@ Zanzibar only supports Google's internal [Spanner] service for tuple-storage.
141141

142142
SpiceDB supports a variety of datastores; including [Cloud Spanner].
143143

144-
You can learn more about datastores in the [Datastore documentation].
144+
You can learn more about datastores in the [Datastores documentation].
145145

146146
[Spanner]: https://static.googleusercontent.com/media/research.google.com/en//archive/spanner-osdi2012.pdf
147147
[Cloud Spanner]: https://cloud.google.com/spanner/
148148
[Datastore documentation]: ./datastores
149149

150150
### Consistency
151151

152-
Zanzibar supports a [ContentChangeCheck API][ccc-api] and the ability specify "at least as fresh" as a Zookie.
152+
Zanzibar supports a [ContentChangeCheck API][ccc-api] and the ability to specify "at least as fresh" as a Zookie.
153153

154-
SpiceDB simplifies this workflow by allowing API requests to specify their consistency behavior in addition to implementing ZedTokens, the analogue of Zanzibar's Zookies.
154+
SpiceDB simplifies this workflow by allowing API requests to specify their consistency behavior in addition to implementing ZedTokens, the analogue of Zanzibar's Zookies. See [Consistency] for more details.
155155

156156
[ccc-api]: https://zanzibar.tech/#annotations/spicedb/content-change-check
157+
[Consistency]: consistency
157158

158159
### Identifiers
159160

pages/spicedb/ops/observability.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ In order to operate SpiceDB in a reliable and performant fashion, SpiceDB expose
99

1010
## Prometheus
1111

12-
Every SpiceDB [command] has a configurable HTTP server that serves observability data.
12+
Every SpiceDB [command] has a configurable HTTP server that serves observability data.
1313

14-
A [Prometheus metrics endpoint][prom-endpoint] at can be found on this server at the path `/metrics`.
14+
A [Prometheus metrics endpoint][prom-endpoint] can be found on this server at the path `/metrics`.
1515

1616
Available metrics include operational information about the Go runtime and serving metrics for any servers that are enabled.
1717

@@ -22,7 +22,7 @@ Available metrics include operational information about the Go runtime and servi
2222

2323
Every SpiceDB [command] has a configurable HTTP server that serves observability data.
2424

25-
[pprof endpoints][go-pprof] for various types of profiles can be found on this server at the path: `/debug/pprof`.
25+
[pprof endpoints][go-pprof] for various types of profiles can be found on this server at the path `/debug/pprof`.
2626

2727
The types of profiles available are:
2828

0 commit comments

Comments
 (0)