gentle-gpu-60935
02/19/2025, 2:16 PMbrief-egg-61061
02/19/2025, 2:16 PMbrief-egg-61061
02/19/2025, 2:16 PMgentle-gpu-60935
02/19/2025, 2:43 PMbrief-egg-61061
02/19/2025, 2:43 PMbrief-egg-61061
02/19/2025, 2:43 PMory get permission-config --project <project-id> --workspace <workspace-id> --format yaml > permission-config.yaml
2. Use this configuration file with your self-hosted Keto instance. Additionally, you can create and edit OPL rules directly in your configuration files for your local Keto instance. So, to answer your question directly: Yes, it is possible to apply OPL to your local, self-hosted Keto instance. The OPL is an integral part of Keto, regardless of whether you're using Ory Network or self-hosting.gentle-gpu-60935
02/19/2025, 2:44 PMbrief-egg-61061
02/19/2025, 2:44 PMbrief-egg-61061
02/19/2025, 2:45 PMpermission-config.yaml
in your local Ory Keto instance, you can follow these steps: 1. First, ensure that you have exported the configuration from Ory Network as mentioned in the [Ory CLI documentation](https://www.ory.sh/docs/guides/cli/configure-permission-service): ory get permission-config --project <project-id> --workspace <workspace-id> --format yaml > permission-config.yaml
2. Once you have the permission-config.yaml
file, you need to incorporate it into your local Keto configuration. According to the [Keto configuration documentation](https://www.ory.sh/docs/keto/reference/configuration), Keto can load configuration from a file using the -c
or --config
flag. 3. Rename your permission-config.yaml
to keto.yaml
or whatever name you prefer for your Keto configuration file. 4. Start your local Keto instance with the configuration file: keto serve -c path/to/keto.yaml
Replace path/to/keto.yaml
with the actual path to your configuration file. 5. Keto will now use the permissions configuration you exported from Ory Network. It's important to note that the exported configuration might need some adjustments to work in a self-hosted environment. For example, you might need to modify database connection strings or other environment-specific settings. Also, keep in mind that Keto supports various configuration formats including JSON, YAML, and TOML. You can choose the format that best suits your needs. If you need to make changes to the configuration, you can edit the YAML file directly. For more advanced usage and configuration options, refer to the [Keto configuration reference](https://www.ory.sh/docs/keto/reference/configuration). Remember that when self-hosting, you're responsible for managing the configuration and ensuring it's properly set up for your environment.