billions-napkin-42120
01/11/2025, 1:32 AMbrief-egg-61061
01/11/2025, 1:32 AMbrief-egg-61061
01/11/2025, 1:32 AMPOST /opl/syntax/check
You can send your OPL code in the request body to validate its syntax [Ory Keto API Reference](https://www.ory.sh/docs/keto/reference/rest-api). 3. Apply the OPL to your Keto instance: For self-hosted Keto, you typically apply the OPL by including it in your Keto configuration file. The exact method may depend on your deployment setup. 4. Use the REST API to manage relationships and check permissions: Once your OPL is applied, you can use the REST API endpoints to create relationships and check permissions based on your defined model. These operations don't directly involve the OPL code, but they work within the structure and rules you've defined with OPL. It's important to note that the OPL defines the structure and rules of your permission model, while the REST API is used for operations within that model. The OPL isn't something you interact with directly through the API after it's been applied to your Keto instance. If you're having trouble with the specifics of applying OPL to your self-hosted Keto instance, you might want to check the Keto documentation or reach out to the Ory community for more detailed guidance, as the exact process can depend on your specific setup and deployment method. [Ory Community Slack](https://www.ory.sh/docs/ecosystem/community#videos) might be a good place to get more specific help with your self-hosted setup.billions-napkin-42120
01/11/2025, 1:39 AMbillions-napkin-42120
01/11/2025, 1:40 AMbillions-napkin-42120
01/11/2025, 1:41 AMbrief-egg-61061
01/11/2025, 1:41 AMbrief-egg-61061
01/11/2025, 1:41 AMnamespace_config.ts
) with your permission model defined using the Ory Permission Language. 3. Use the Ory CLI to update the OPL in your Ory Network project. You can do this with the following command: ory update opl --file /path/to/namespace_config.ts
This command is documented in the [Ory CLI Reference](https://www.ory.sh/docs/cli/ory-update-opl). 4. After updating the OPL, you need to configure your Helm chart to use this updated configuration. In your Helm values file or command, you should set the hydra.existingSecret
value to point to a Kubernetes Secret that contains your Ory Network project configuration. Here's an example of how you might set this up: bash kubectl create secret generic my-ory-config --from-literal=dsn=<your-dsn> \ --from-literal=secrets.system=<your-system-secret> helm install \ --set 'hydra.existingSecret=my-ory-config' \ ory/keto
This approach allows you to manage your OPL configuration through the Ory Network while still running Keto in a self-hosted environment. Remember, the exact setup might vary depending on your specific configuration and requirements. If you need more detailed guidance, I recommend checking the [Ory Keto Kubernetes Helm Chart documentation](https://www.ory.sh/docs/hydra/self-hosted/kubernetes-helm-chart) or reaching out to the Ory community for support with your specific setup.billions-napkin-42120
01/11/2025, 2:30 AMno project was specified
brief-egg-61061
01/11/2025, 2:30 AMbrief-egg-61061
01/11/2025, 2:30 AMnamespace_config.yaml
) with your permission model defined using the Ory Permission Language. 2. In your Helm values file (usually named values.yaml
), you can include the OPL configuration under the keto.config
section. Here's an example of how it might look: yaml keto: config: namespaces: - id: files name: Files - id: folders name: Folders
3. When installing or upgrading your Helm chart, you can use this values file: bash helm install my-keto ory/keto -f values.yaml
or bash helm upgrade my-keto ory/keto -f values.yaml
Regarding the error you encountered (no project was specified
), this error typically occurs when using Ory CLI commands without specifying a project. However, for a self-hosted Keto instance, you shouldn't need to use these CLI commands. If you're still encountering issues, you might want to check your Kubernetes Job configuration to ensure it's not trying to use Ory Network-specific commands or configurations. For more detailed information on configuring Keto with Kubernetes Helm Chart, you can refer to the [Ory Hydra Kubernetes Helm Chart documentation](https://www.ory.sh/docs/hydra/self-hosted/kubernetes-helm-chart). While this documentation is for Hydra, many of the principles apply to Keto as well, as they are both part of the Ory ecosystem. If you continue to face difficulties, you might want to reach out to the [Ory Community Slack](https://www.ory.sh/docs/ecosystem/community#videos) for more specific help with your self-hosted Keto setup on Kubernetes.billions-napkin-42120
01/11/2025, 4:54 PMnamespaces.location=file://<path_to_file>
. This isn't documented anywhere and is being asked by multiple people: https://github.com/ory/keto/discussions/1450#discussioncomment-10167982brief-egg-61061
01/11/2025, 4:54 PMbrief-egg-61061
01/11/2025, 4:55 PMnamespaces.location=file://<path_to_file>
. 3. You can also reference the GitHub discussion you mentioned to provide context and show that multiple users are looking for this information. 4. If you feel comfortable, you could even submit a pull request with the added documentation, which would be greatly appreciated by the Ory team and community. 5. Additionally, you might want to comment on the GitHub discussion you linked, mentioning that you've created an issue (or pull request) to address this documentation gap. This can help other users tracking that discussion. By taking these steps, you're contributing to improving the Ory documentation and helping future users avoid the same confusion. The Ory team and community will appreciate your effort to make the project more accessible and user-friendly.sticky-evening-48842
04/10/2025, 11:28 AMnamespaces
key in your configuration file from an array of literal namespaces to an object, specifying the location of the OPL file/URL to watch.
Before:
namespaces:
- id: 0
name: document
- id: 1
name: folder
- id: 2
name: group
After:
namespaces:
location: file:///opl.ts
I haven't been able to test this yet, but I have been asking Ory's AI similar questions to no avail.