flat-rose-25983
04/10/2023, 4:03 PMchilly-king-10285
04/10/2023, 4:03 PMchilly-king-10285
04/10/2023, 4:05 PMyaml # ... namespaces: - id: 0 name: groups - id: 1 name: reports #...
2. Define the permissions for your roles. For example, you can create permissions for finance
, marketing
, and community
departments with edit
and view
access to the reports. You can find an example of how to define these permissions in the [RBAC guide](https://www.ory.sh/docs/keto/guides/rbac#rbac-with-ory-keto). 3. To check whether a user has access to a specific resource, you can use Ory Keto's [check-API](https://www.ory.sh/docs/keto/concepts/api-overview#check-relation-tuple). You'll need to authenticate the user reliably to provide the subject to Keto. This can be achieved by using [Ory Identities](https://www.ory.sh/kratos/docs/) or any other authentication system. You can find an example of how to encode the check request in the [simple access check guide](https://www.ory.sh/docs/keto/guides/simple-access-check-guide#synchronous-authorization-flow). 4. To integrate Ory Keto SDK with your self-hosted Ory Keto Permission Server, consult the Ory Keto [REST](https://www.ory.sh/docs/keto/reference/rest-api) and [gRPC](https://www.ory.sh/docs/keto/reference/rest-api) API documentation. You can find the source code for the generated SDKs in the [Ory Keto SDKs GitHub repository](https://github.com/ory/sdk/tree/master/clients/keto/). By following these steps, you should be able to integrate Ory Keto with your Ory Kratos setup for role-based authorization.