Gate Warden implements a hybrid access control system combining ACL, RBAC, and ABAC models, storing data in a document-based structure using the @wxn0brp/db-core interface.
users collection)User<A> object
_id: User identifierroles: Array of role IDs assigned to the userattrib: Object containing user attributes of type Aroles collection)Role object
_id: Role identifiername: Role nameacl/{entityId} collections)ACLRule object
p: Permission flags (bitmask)uid (optional): Specific user ID for the rule
role/{roleId} collections)RoleEntity object
_id: Entity IDp: Permission flags (bitmask)abac/{entityId} collections)ABACRule object
flag: Permission flag this rule applies tocondition: Object defining the attribute conditions that must be metWhen checking access permissions, Gate Warden evaluates in the following order:
The first check that grants access (returns true/1) determines the access result.