Skip to content

Commit 169a4b8

Browse files
committed
fix grammar
1 parent 735de08 commit 169a4b8

File tree

12 files changed

+39
-39
lines changed

12 files changed

+39
-39
lines changed

pages/spicedb/concepts/consistency.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Consistency is provided via the [Consistency message][msg] on supported API call
4848

4949
#### Minimize Latency
5050

51-
`minimize_latency` will attempt to minimize the latency of the API call by selecting data that is most likely exist in the cache.
51+
`minimize_latency` will attempt to minimize the latency of the API call by selecting data that is most likely to exist in the cache.
5252

5353
<Callout type="warning">
5454
If used exclusively, this can lead to a window of time where the [New Enemy Problem] can occur.
@@ -130,13 +130,13 @@ SpiceDB returns ZedTokens from the APIs that perform permission checks or modify
130130

131131
### Storing ZedTokens
132132

133-
There are scenarios where it makes sense to store ZedTokens in an applications primary database.
133+
There are scenarios where it makes sense to store ZedTokens in an application's primary database.
134134
The goal of this workflow is to ensure the application can query SpiceDB with consistency that is causally tied to the content of the protected resource.
135135

136136
Stored ZedTokens should be updated under these events:
137137

138138
- The resource is created or deleted
139-
- The contents of the resource changes
139+
- The contents of the resource change
140140
- Adding or removing access to the resource (e.g. writing a relationship)
141141

142142
When these events happen, a new ZedToken is either returned or it should be requested by performing a check with full consistency.

pages/spicedb/concepts/datastore-migrations.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ For all software that maintains data, there can be updates to code that rely on
3131
The process of updating data to use new versions of software is called _migrating_.
3232

3333
SpiceDB users will see migrations crop up in two places: when they update versions of SpiceDB and when they write backwards incompatible changes to their schema.
34-
This document's focus is on the former.
34+
This document's focus is on the former; the latter is documented [here].
35+
36+
[here]: ../modeling/migrating-schema
3537

3638
### SpiceDB migration tooling
3739

pages/spicedb/concepts/datastores.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ Since the relationship integrity feature signs each individual relationship, it
149149
Schema is also currently unverified, so an untrusted party could change it as well.
150150
Support for schema changes will likely come in a future version.
151151

152-
**Setting up relationship integrity**
152+
##### Setting up relationship integrity
153+
153154
To run with relationship integrity, new flags must be given to SpiceDB:
154155

155156
```zed
@@ -161,7 +162,7 @@ spicedb serve ...existing flags...
161162

162163
Place the generated key contents (which must support an HMAC key) in `some.key`
163164

164-
Deployment Process
165+
##### Deployment Process
165166

166167
1. Start with a **clean** datastore for SpiceDB. **At this time, migrating an existing SpiceDB installation is not supported.**
167168
2. Run the standard `migrate` command but with relationship integrity flags included.

pages/spicedb/getting-started/coming-from/cancancan.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ A quick recap on the components and their purpose:
3333

3434
CanCanCan is a *library* (gem) designed to help model authorization in Ruby on Rails projects.
3535
The fundamental idea behind most authorization libraries is that access control can be modeled by reusing as much as possible from within your existing web framework.
36-
For cancancan, developers defines their models from within an `Ability` class.
36+
For cancancan, developers define their models from within an `Ability` class.
3737
Engine logic is implemented within the library such that developers can simply load the `Ability` class within their `Controller` classes to enforce their models.
3838
Data outside of the request context is left open ended, but most often is fetched from the primary database using ActiveRecord.
3939

pages/spicedb/getting-started/coming-from/opa.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ Adopting SpiceDB can be a powerful tool for enabling a shift towards centralizin
6565

6666
## When to use OPA instead of SpiceDB
6767

68-
OPA excels where in scenarios where it can be easily embedded or ran alongside an existing workload.
68+
OPA excels in scenarios where it can be easily embedded or ran alongside an existing workload.
6969
Because it is a fairly open-ended how one deals with data in OPA deployments, it shines best as a solution when access control decisions don't require much data.

pages/spicedb/getting-started/protecting-a-blog.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ docker run --rm -p 50051:50051 authzed/spicedb serve --grpc-preshared-key "t_you
3131

3232
The first step to integrating any software is ensuring you have an API client.
3333

34-
Each tool is installed with its ecosystem's package management tools:
34+
Each client is installed with its ecosystem's package management tools:
3535

3636
<Tabs items={['zed', 'Node', 'Go', 'Python', 'Ruby', 'Java']}>
3737
<Tabs.Tab>
@@ -113,11 +113,11 @@ This example defines two types of objects that will be used in the permissions s
113113
Each post can have two kinds of relations to users: `reader` and `writer`.
114114
Each post can have two permissions checked: `read` and `write`.
115115
The `read` permission unions together both readers and writers, so that any writer is implicitly granted read, as well.
116-
Feel free to start with design to modify and test your own experiments in the [playground].
116+
Feel free to modify and test your own experiments in the [playground].
117117

118118
[playground]: https://play.authzed.com/s/mVBBpf5poNd8/schema
119119

120-
With a schema designed, we can now move on using our client to apply that schema to the Permission System.
120+
With a schema designed, we can now move on to using our client to apply that schema to the Permission System.
121121

122122
<Callout type="info">
123123
Similar to applying schema changes for relational databases, all changes to a schema must be backwards compatible.
@@ -314,7 +314,7 @@ public class App {
314314

315315
## Storing Relationships
316316

317-
After a permission system has its schema applied, it is ready to have its relationships be created, touched, or deleted.
317+
After a permission system has its schema applied, it is ready to have its relationships created, touched, or deleted.
318318
Relationships are live instances of relations between objects.
319319
Because the relationships stored in the system can change at runtime, this is a powerful primitive for dynamically granting or revoking access to the resources you've modeled.
320320
When applications modify or create rows in their database, they will also typically create or update relationships.
@@ -639,17 +639,17 @@ public class App {
639639
## Checking Permissions
640640

641641
Permissions Systems that have stored relationships are capable of performing permission checks.
642-
Checks do not only test for the existence of direct relationships, but will also compute and traverse transitive relationships.
643-
For example, in our example schema, writers have both write and read, so there's no need to create a read relationship for a subject that is already a writer.
642+
Checks not only test for the existence of direct relationships, but also compute and traverse transitive relationships.
643+
For example, in our example schema, writers have both write and read permissions, so there's no need to create a read relationship for a subject that is already a writer.
644644

645645
<Callout type="info">
646646
In addition to checking _permissions_, it is also possible to perform checks on _relations_ to determine membership.
647647

648-
However, this goes against best practice: permissions can be redefined in backwards compatible ways by changing schema, so it's ideal to rely on permissions as the contract between SpiceDB and applications querying SpiceDB.
648+
However, this goes against best practice: permissions can be redefined in backwards compatible ways by changing the schema, so it's ideal to rely on permissions as the contract between SpiceDB and applications querying SpiceDB.
649649
</Callout>
650650

651651
<Callout type="warning">
652-
In order to get read-after-write consistency, you must provide a [ZedToken] from the WriteRelationships response or request [full consistency].
652+
When doing a permission check, in order to get read-after-write consistency, you must provide a [ZedToken] from the WriteRelationships response or request [full consistency].
653653

654654
[ZedToken]: /spicedb/concepts/consistency#zedtokens
655655
[full consistency]: /spicedb/concepts/consistency#fully-consistent

pages/spicedb/modeling/attributes.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ Feature flag authorization can be enabled with boolean attributes.
2222
[Wildcards](/spicedb/concepts/schema#wildcards) are a way to implement boolean attributes.
2323
Wildcards modify a type so that a relationship can be written to all objects of a resource type but not individual objects.
2424

25-
In the example below, the schema enforces the following authorization logic: a user can only view a document if the user is related to the document as viewer and editing is enabled for the document.
26-
To enable document editing in the example below, you need to establish a wildcard relationship that connects all users to the document using the ```edit_enabled``` wildcard relation.
27-
A user will have ```edit``` permission on the document if they are related to the document as an ```editor``` and they relate to the document through ```edit_enabled```.
25+
In the example below, the schema enforces the following authorization logic: a user will have ```edit``` permission on the document if they are related to the document as an ```editor``` and they relate to the document through ```edit_enabled```.
2826
Both are required because ```editor``` and ```edit_enabled``` are [intersected](/spicedb/concepts/schema#-intersection) at the ```edit``` permission definition.
27+
To enable document editing, you need to establish a relationship that connects all users to the document using the ```edit_enabled``` relation: `document:somedocument#edit_enabled@user:*`.
2928

3029
<InlinePlayground reference="p6ltnJZ2Zso7" />
3130

pages/spicedb/modeling/developing-a-schema.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ relation reader: user | anotherobjecttype
7070

7171
## Validating our schema
7272

73-
To validate that our schema is correct, both [zed] and [Playground] supports the writing of _test relationships_ as data writing tests against our schema.
73+
To validate that our schema is correct, both [zed] and [Playground] support the writing of _test relationships_ as data writing tests against our schema.
7474
Once we've [created test relationships][understanding-rels], we can define tests in three ways:
7575

7676
- **Check Watches**: live checks performed as we edit the schema
@@ -108,7 +108,7 @@ assertFalse:
108108
- "document:specificdocument#reader@user:anotheruser"
109109
```
110110

111-
Validation can be run by clicking the `Validate` button in the Playground or using the `zed validate` command.
111+
Validations can be run by clicking the `Validate` button in the Playground or by using the `zed validate` command.
112112

113113
### Expected Relations
114114

@@ -190,9 +190,9 @@ As a naive solution, we could create a `reader` relationship for every user when
190190

191191
Instead, we'd ideally like a user with role `writer` to be **implicitly** allowed to a read a document, such that we only ever need to write _one_ relationship representing the user's **actual** relation/role to the document.
192192

193-
The solution to this problem is the second concept available within the Schema Language: **permissions**
193+
The solution to this problem is the second concept available within the Schema Language: **permissions**.
194194

195-
A `permission` in schema defines a permission _computed_ from one or more other relations or permissions.
195+
A `permission` in a schema defines a permission _computed_ from one or more other relations or permissions.
196196

197197
Let's take our schema again from above:
198198

@@ -281,9 +281,9 @@ Note that the contents of the angled brackets for `differentuser` and `specificu
281281
### Preparing to inherit permissions
282282

283283
As we've seen above, we can use `permission` to define _implicit_ permissions, such as a `view` permission consisting of users either the `reader` or `writer` role.
284-
Implicit permissions on a specific object type, however, are often insufficient: Sometimes permissions need to be **inherited** between object types.
284+
Implicit permissions on a specific object type, however, are often insufficient: sometimes permissions need to be **inherited** between object types.
285285

286-
As an example: Imagine that we add the concept of an `organization` to our permissions system, where any user that is an administrator of an organization automatically gains the ability to `view` any `document` within that organization; how would we define such a permissions schema?
286+
As an example: imagine that we add the concept of an `organization` to our permissions system, where any user that is an administrator of an organization automatically gains the ability to `view` any `document` within that organization; how would we define such a permissions schema?
287287

288288
### Defining the organization type
289289

@@ -347,7 +347,7 @@ Here we've chosen to call this relation `docorg`, but it could be called anythin
347347

348348
### Adding the relationship
349349

350-
Now that we've defined the `relation` to hold our new relationship, we can add a test relationship in our test relationships:
350+
Now that we've defined the `relation` to hold our new relationship, we can add a test relationship:
351351

352352
```relationship filename="Test Relationships"
353353
document:specificdocument#docorg@organization:someorg

pages/spicedb/modeling/recursion-and-max-depth.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ group:secondgroup#member@group:thirdgroup#member
4848
group:thirdgroup#member@group:firstgroup#member
4949
```
5050

51-
Attempts by SpiceDB to compute a permission answer will walk from `resource:someresource#viewer`
51+
When computing a permission answer for `resource:someresource`, SpiceDB will attempt this walk: `resource:someresource#viewer`
5252
-> `group:firstgroup#member` -> `group:secondgroup#member` -> `group:thirdgroup#member` ->
5353
`group:firstgroup#member` -> ..., causing a cycle.
5454

@@ -103,7 +103,7 @@ as SpiceDB assume the permissions graph is a [tree].
103103

104104
#### Overhead
105105

106-
From a practical perspective, tracking of visiting objects when computing `CheckPermission` and
106+
From a practical perspective, tracking of visited objects when computing `CheckPermission` and
107107
other permissions queries results in having significant amount of overhead over the wire and in
108108
memory to track the full set of encountered objects and check for duplicates.
109109

pages/spicedb/modeling/representing-users.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { Callout } from 'nextra/components'
44

55
Within a Permissions System, a [CheckPermission] call is always made between an object representing the *resource* and an object representing a *subject*: The API call returns whether the *subject* has the specified permission on the *resource*.
66

7-
The choice of how to represent subjects can have large downstream effects on the design of a permissions system.
8-
97
[CheckPermission]: https://buf.build/authzed/api/docs/main:authzed.api.v1#CheckPermission
108

119
## Representing users as subjects
@@ -34,7 +32,7 @@ As the `sub` field is **guaranteed** to be stable for that particular user (if a
3432

3533
<Callout type="info">
3634

37-
If you have *multiple* authentication provides, then the recommendation is to define a subject type for *each* provider, to ensure a clean namespace:
35+
If you have *multiple* authentication providers, then the recommendation is to define a subject type for *each* provider, to ensure a clean namespace:
3836

3937
```zed
4038
/** githubuser represents a user from GitHub */
@@ -67,7 +65,7 @@ Some databases allow various sequences to reuse IDs.
6765

6866
<Callout type="warning">
6967

70-
It is typically **not recommended** to use an e-mail address to represent a user as as a subject in SpiceDB.
68+
It is typically **not recommended** to use an e-mail address to represent a user as a subject in SpiceDB.
7169

7270
</Callout>
7371

0 commit comments

Comments
 (0)