You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sign in to [AuthZed Cloud](https://app.authzed.cloud) and click on the **+Create** button to create a Permissions System (PS) and fill in the necessary details:
15
+
16
+
- The type can be either "Production" or "Development".
17
+
- Give it a name.
18
+
- Choose the underlying datastore.
19
+
- The update channel can be either be `rapid` or `regular` which determines the behavior of automatic updates when new SpiceDB releases are made available:
20
+
-`rapid` gets the latest release immediately.
21
+
-`regular` is one release behind.
22
+
- Add SpiceDB deployments:
23
+
- Give them a name.
24
+
- Choose the region where the deployment will live.
25
+
- Choose the number of vCPUs for your deployment. The recommendation is to start with 2 vCPUs and then monitor the Metrics and change it based on your workload.
26
+
- Choose the number of replicas to deploy SpiceDB with primarily read workloads. The recommendation is 3 but will depend on your latency requirements.
27
+
28
+
## Configuring Access
29
+
30
+
Before using the Permissions System, let's configure access to it.
31
+
This functionality enables organizations to apply the principle of least-privilege to services accessing SpiceDB.
32
+
For example, read-only tokens can be created for services that should never need to write to SpiceDB.
33
+
Read more about it [here](https://authzed.com/docs/authzed/concepts/restricted-api-access)
34
+
35
+
Let’s start by creating a **Service Account** which is something that represents your unique workload.
36
+
We recommend creating a Service Account for each application that will access the SpiceDB API.
37
+
Add a name such as `blog-app` and a description before hitting Save.
38
+
39
+
Now let’s create a **token**.
40
+
Tokens are long-lived credentials for Service Accounts.
41
+
SpiceDB clients must provide a Token in the Authorization header of an API request to perform actions granted to the Service Account.
42
+
Click on the `blog-app` service account you just created and then the Tokens item in the menu.
43
+
Create a token by providing a name and description.
44
+
45
+
Let’s now provide a **Role** and attach a **Policy** to that Role.
46
+
A Role defines rules for accessing the SpiceDB API.
47
+
Roles are bound to Service Accounts.
48
+
Click the Roles -> Create Role and provide a name and a description.
49
+
Add the following permissions for this demo:
50
+
51
+
```
52
+
ReadSchema
53
+
WriteSchema
54
+
DeleteRelationships
55
+
ReadRelationships
56
+
WriteRelationships
57
+
CheckPermission
58
+
```
59
+
60
+
Finally, let’s create a Policy.
61
+
Policies are what bind Roles to a Service Account.
62
+
Click on Policies -> Create policy.
63
+
Provide a name and a description and pick the Service Account and Role created in the steps above to bind the two.
0 commit comments