How does Blowater want authorization to work?

Reply to this note

Please Login to reply.

Discussion

You asked the key question.

The future Blowater will be more like Discord and treat each relay as its separate place.

First of all, it need roles.

Relay Owner, Relay Admin, Normal users etc

If we also assumes that relays don't need to update its code to support special client features. Then, I would like to have relay owner sending an event that describes all kinds of resources & roles relevant to this client, such as

{

roles: {

admin: {

write: "all"

read: "all"

},

normal_user: {

write: ["resource_1"]

read: ["resource_1", "resource_2"]

},

}

then, in the tag of kind-1s and other events, blowater will attach the resource type

{

tags: [

["resource_type", "resource_2"]

]

}

Something like this. It's like a type system for resource access control.

If relays do not support it, Blowater can just do it on client side.

Of course, it's always better if some relay implementation support it. This is another reason that I am writing a tiny JS relay implementation. I can do this kind of end-2-end expriment quickly.

But Blowater does not even have these features yet. So it's not an immediate problem to solve yet.