curved-florist-98287
12/10/2023, 7:58 AMchilly-king-10285
12/10/2023, 7:58 AMchilly-king-10285
12/10/2023, 7:58 AMfiles with the relations owner and access defined. When a user, say demeter, uploads a file, the file gets assigned a UUID, for example ec788a82-a12e-45a4-b906-3e69f78c94e4. The application adds the following relationship to Ory Keto through the write-API: ec788a82-a12e-45a4-b906-3e69f78c94e4#owner@demeter Now, if demeter wants to share the file with another user, say athena, the application translates that request into a write-API request adding the following relationship to Ory Keto: ec788a82-a12e-45a4-b906-3e69f78c94e4#access@athena This way, Ory Keto helps manage access control at an object level in the application. For more details, you can refer to the [Ory Keto documentation](https://www.ory.sh/docs/keto/examples/olymp-file-sharing#a-basic-down-to-earth-full-feature-example).curved-florist-98287
12/10/2023, 7:59 AMchilly-king-10285
12/10/2023, 7:59 AMchilly-king-10285
12/10/2023, 8:04 AMcurved-florist-98287
12/10/2023, 8:04 AMchilly-king-10285
12/10/2023, 8:04 AMchilly-king-10285
12/10/2023, 8:05 AMid, version, upstream, and match. Here's a general example: json { "id": "some-id", "version": "v0.1.3", "upstream": { "url": "<http://my-backend-service>", "preserve_host": true, "strip_path": "/api/v1" }, "match": { "url": "<http://my-app/some-route/<.*>>", "methods": ["GET", "POST"] }, "authenticators": [{ "handler": "anonymous", "config": { "subject": "anon" } }], "authorizer": { "handler": "allow" }, "mutators": [{ "handler": "noop" }] } In this example, the match object defines the URL(s) this Access Rule should match. The upstream object defines the location of the server where requests matching this rule should be forwarded to. The authenticators, authorizer, and mutators are handlers that inspect HTTP requests, ensure permissions, and transform credentials respectively. For more specific details on how to create an access rule for the file sharing application, you would need to refer to the [Ory Oathkeeper documentation](https://www.ory.sh/docs/oathkeeper/api-access-rules).