alert-television-7506
12/04/2023, 12:59 PMnumerous-match-50854
12/03/2023, 11:04 AMccurl --location 'localhost:4466/relation-tuples/check' \
--header 'Content-Type: application/json' \
--data '{
"namespace" : "videos",
"object" : "/cats/1.mp4",
"relation" : "owner",
"subject_id" : "*"
}'
plain-wall-73248
11/28/2023, 7:44 AMbumpy-telephone-79609
11/26/2023, 1:23 PM/relation-tuples/check/openapi
of the oryd/keto:v0.11.1
return 200 OK when the relation tuple doesn't exist (and the allowed
property of the JSON response is false) ?astonishing-morning-18498
11/24/2023, 8:17 PMorange-guitar-65918
11/24/2023, 11:54 AMplain-wall-73248
11/22/2023, 6:35 AMcurved-florist-98287
11/20/2023, 12:43 PMsqlite
as a DB engine? I tried it and it didn't workout, am I missing something.great-pillow-43960
11/19/2023, 10:58 PMUser
, which represents a user
• Offer
, which represents a group giving access to one or more products, and with which users can be associated
• Product
, which represents the resources accessible to User
, with or without belonging to an Offer
.
I would therefore like to be able to define a start date and an end date when I link a User
to an Offer
or a `Product`*.*
Thank you in advance for your reply. Don't hesitate to let me know if you need more information about my case.stocky-horse-99685
11/17/2023, 9:50 AMUser
which is the user
• Person
which is owned by a User
(a 1:1 relationship) and a manager can view multiple Person
.. a Person
works and has multiple Workday
• Workday
which is a resource we would like to protect .. it can only be viewed by the creator and the person who manages the Person
We would like to separate the concern of permissions from our API such that we can point to Keto to fetch the permissions and this concern is being handled there instead of being implicitly encoded in backend of the API. There are a few questions though:
• When listing Workday
for a Person
we would like to retrieve the identifiers which the user has access to. We also would like to sort the Workday
on certain attributes inside our backend. However the documentation states that using the list API you cannot sort on any attribute? Also you might want to filter on a specific attribute, leaving out workdays .. The domain model of our API is in that sense still strongly coupled with permissions.. What would you do to solve this?
• How would you deal with large amount of access permissions ? It's very likely that there will be many Workday
entities for a specific Person
.. so if we list all our workdays for the past 3 years, how would Keto handle this?
• When we insert a entity via our API into the database, the Keto API also needs to be updated.. what's the typical strategy to do that? Using a event model, you'll have a audit log of what happend to the permissions and the keto permissions model can be updated through this by ingesting the events. However using a eventful model it will be come eventually consistent, which can be troublesome when you emit a event when adding a Workday
and right after list your workdays. The consumer of the events which will update has some latency (eventual consistent). Would you instead use RPC instead? So when adding a Workday
reach out to Keto as well? The downside of that is though, that if the database of our API works, but Keto is down you won't get the permission :)flat-continent-29959
11/11/2023, 5:20 AMswift-gpu-30509
11/10/2023, 10:03 PMCLI
.
One another thing, is it possible to give multiple namespaces to Keto, in a single file? I know it cannot parse multiple entries (JSON or Yaml) since it tries to convert the incoming reading data to namespace.Namespace
which is a single item. Many thanks in advance.magnificent-application-93453
11/07/2023, 5:59 PMjolly-breakfast-43519
11/05/2023, 4:12 PMgreat-crayon-86888
11/05/2023, 8:10 AMgreat-crayon-86888
11/05/2023, 12:29 AMgreat-crayon-86888
11/04/2023, 1:05 PMadorable-article-65467
11/01/2023, 3:26 PMjolly-breakfast-43519
10/31/2023, 12:45 PMjolly-breakfast-43519
10/31/2023, 10:27 AMquick-twilight-72852
10/27/2023, 5:04 PMPositions
that a subject can see. When I provide a subject ID in the GET /relationship-tuples request, it doesn't respect this field. Am I doing something wrong? I would expect the response to be empty given that the subject_id test
does not have a relationship to any of the namespaces
import { Namespace, SubjectSet, Context } from "<@U010S8T03NG>/permission-namespace-types"
class User implements Namespace { }
class Position implements Namespace {
related: {
manager: Position[]
viewers: User[]
}
permits = {
view: (ctx: Context): boolean =>
this.related.viewers.includes(ctx.subject) ||
this.related.manager.traverse(p => p.permits.view(ctx))
}
}
class Req implements Namespace {
related: {
positions: Position[]
}
}
class SensitiveFields implements Namespace {
related: {
positions: Position[]
}
}
jolly-breakfast-43519
10/25/2023, 9:13 AMwhite-twilight-17165
10/13/2023, 12:40 PMClients
, Groups
and Users
. If a User
is a member of a Group
which is an accessor of a Client
, then the User
has permission to access
the client.
My OPL file:
import { Namespace, SubjectSet, Context } from "@ory/keto-namespace-types";
class User implements Namespace {}
class Group implements Namespace {
related: {
member: User[];
};
}
class Client implements Namespace {
related: {
accessor: SubjectSet<Group, "member">[];
};
permits = {
access: (ctx: Context) => this.related.accessor.includes(ctx.subject),
};
}
My relations in RTS (I have no idea what this syntax is officially called:
Group:admin#member@User:woodywoodsta
Client:uptime-kuma#accessor@Group:admin
My relations in JSON, as queried from what I currently have loaded into keto:
{
"relation_tuples": [
{
"namespace": "Client",
"object": "uptime-kuma",
"relation": "accessor",
"subject_set": {
"namespace": "Group",
"object": "admin",
"relation": ""
}
},
{
"namespace": "Group",
"object": "admin",
"relation": "member",
"subject_set": {
"namespace": "User",
"object": "woodywoodsta",
"relation": ""
}
}
],
"next_page_token": ""
}
If I check using a POST check with a body of:
{
"namespace": "Client",
"object": "uptime-kuma",
"relation": "access",
"subject_set": {
"namespace": "User",
"object": "woodywoodsta"
}
}
I get false
, however it is my understanding that the this.related.accessor.includes(ctx.subject)
portion of my OLP effectively defines the subject set rewrite. What am I misunderstanding here?crooked-jewelry-20746
10/09/2023, 7:17 AMlittle-dawn-70381
10/04/2023, 12:48 PMlively-florist-69665
10/04/2023, 2:56 AMrough-tent-30417
10/02/2023, 5:19 PMalert-carpenter-73575
09/27/2023, 11:54 PMhigh-rose-8124
09/27/2023, 10:19 PMrelation-tuples/check
, but for list I set the object to *
and that's my object reference for this type of relation for getting a list of objects from the db.rapid-lion-15850
09/21/2023, 12:07 PM