Skip to content

Commit 89fd19d

Browse files
authored
feat: configure Permission Service using CLI guide (#864)
1 parent d1cf6df commit 89fd19d

File tree

2 files changed

+81
-1
lines changed

2 files changed

+81
-1
lines changed

docs/guides/cli/15_config-identity-service.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ory get identity-config <project-id> --format yaml > identity-config.yaml
5454

5555
## Import Configuration to Ory Cloud
5656

57-
To start using using the configuration from a self-hosted Ory Kratos instance in the Ory Cloud Identity Service, import the
57+
To start using the configuration from a self-hosted Ory Kratos instance in the Ory Cloud Identity Service, import the
5858
configuration file with the CLI:
5959

6060
```shell
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
id: configure-permission-service
3+
title: Configure Permission Service
4+
sidebar_position: 17
5+
---
6+
7+
Using the Ory CLI, you can quickly adjust the configuration of the Ory Cloud Permission Service and apply config from the Cloud
8+
environment to self-hosted Ory Keto instances.
9+
10+
:::tip
11+
12+
Ory Keto is the open-source project that powers the Ory Cloud Permission Service.
13+
14+
:::
15+
16+
This feature is useful for fluently moving your local setup to the Cloud, or for working on the configuration and testing
17+
different settings in the safety of the local development environment.
18+
19+
To work with the Ory Cloud Permission Service, you must have an active Ory Cloud project. Use the
20+
[CLI](./config-with-cli#create-ory-cloud-project) or the [Ory Console](https://console.ory.sh/) to create one.
21+
22+
## Export Configuration from Ory Cloud
23+
24+
To get your project's Permission Service configuration, run this command:
25+
26+
:::info
27+
28+
You must be signed in to an Ory Cloud account to perform this action. Read
29+
[this document](./cli-basics#use-cli-with-existing-cloud-account) to learn more.
30+
31+
:::
32+
33+
```bash
34+
## List all available projects
35+
ory list projects
36+
37+
## Get config
38+
ory get permission-config <project-id> --format yaml
39+
```
40+
41+
The `--format` flag defines the format of the output file. You can choose one of `yaml` ,`json`, or `json-pretty`.
42+
43+
Getting the configuration in the YAML format produces output that is ready to use with self-hosted Ory Keto.
44+
45+
### Export to File
46+
47+
For a convenient way to get the Permission Service configuration working in self-hosted Ory Keto, save the configuration to a YAML
48+
file.
49+
50+
Run this command:
51+
52+
```bash
53+
ory get permission-config <project-id> --format yaml > identity-config.yaml
54+
```
55+
56+
## Import Configuration to Ory Cloud
57+
58+
To start using the configuration from a self-hosted Ory Keto instance in the Ory Cloud Permission Service, import the
59+
configuration file with the CLI:
60+
61+
```shell
62+
ory update permission-config <project-id> --file config.yaml
63+
```
64+
65+
## Adjust Specific Keys
66+
67+
You can adjust specific keys in the configuration using the `ory patch` CLI command.
68+
69+
Running this sample command sets the `/limit/max_read_depth` key value to `3`:
70+
71+
```shell
72+
ory patch permission-config <project-id> \
73+
--replace '/limit/max_read_depth=3'
74+
```
75+
76+
:::note
77+
78+
Read [this document](./config-with-cli) to learn more about adjusting project configuration with the Ory CLI.
79+
80+
:::

0 commit comments

Comments
 (0)