Role-Based Access Control for Relays #192
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mirror the same schema concepts in NIP 29 at relay scope:
role
role-label
role-color (hue)
role-order
role-permission
role-access (if relay wants relay-level access semantics)
This keeps 29/43 conceptually consistent.
Validation behavior (minimal but strict)
Relay SHOULD reject:
@hodlbod By zooid are you referencing caravel repo?
@hodlbod Posting a concrete plan here so #192 is ready once the NIP-29 work is accepted and implemented.
NIP-43 Follow-up Plan (after NIP-29)
Gating condition
Start this only after:
Goal
Mirror the NIP-29 RBAC model at relay scope, with consistent tag grammar and minimal ambiguity.
Scope for #192
Validation/behavior expectations
Relay SHOULD reject:
Also keep explicit language that role-order does not imply privilege.
PR strategy (granular)
NIP-43 PR 1: New relay role/admin/member schema
NIP-43 PR 2: Interop + migration notes
Implementation sequence (Zooid + Flotilla)
If this structure looks good, I’ll keep #192 as the execution tracker and begin with NIP-43 PR 1 only after the NIP-29 PR is accepted so that the scope is fixed for this issue after comparing with #47.
Also imo 2 PR's would be more appropriate for this issue due to the the topics it touches upon. Lmk your thoughts.
Zooid is a relay implementation tailored to multi-tenant and compatibility with flotilla: https://gitea.coracle.social/coracle/zooid
@hodlbod Had a few doubts:
9000–9009as the permission kinds. For relay-level permissions, should role-permission reference NIP-43 kinds (8000, 8001) instead? Or should we define new permission identifiers?deriveSupportedMethods+ManagementMethodbased admin check should remain as fallback, but should we also add new NIP-86 methods (e.g.listRelayRoles,setRelayUserRoles) as a convenience API in this PR?No really, just wanted to be consistent with the numbering and in case there was a protocol that i was not aware of being followed for the naming.
@hodlbod ill start working on this as soon as #220 is satisfactory. Does that work?
Ok, I was thinking through this and we need to take a different approach due to the divergence between nip 29 roles and relay-level roles. I think it's better that roles get defined at the relay level and referenced by groups (groups can still create their own specific roles). However, at the relay level we need to avoid the RPC style management stuff nip 29 has.
dtag and allow for assignmentFirst pass implemented in
cd28085d11