Why does webtyp/access exist? Auth and RBAC never meet. webtyp/auth manages identities (users, passwords, sessions) and webtyp/rbac manages permissions (roles, assignments). The logic to tie them together (e.g. create a user from an email and immediately assign a role) should not belong to either, nor should it be repeated in every application. This repo provides that bridge.
- Two Narrow Interfaces: The
Moduleexpects an implementation forUsersandRoles.authority.Modulefrom auth andrbac.Servicefrom rbac fit perfectly. The concrete types are wired by the application in its composition root. - One Module = One Project: A single
access.Moduleserves exactly onewebtyp/rbacproject (Deps.ProjectID). - Assurance Choice: The operations can demand a single-factor session or a multi-factor session via
Deps.Assurance. - Wire Shapes: The operations speak the standard list/save/delete JSON wire shapes required by
webtyp/viewandcrudview. - Audit Log: The module owns the
access_audittable. All changes via operations are audited.
flowchart TD
app --> access
access --> Users
access --> Roles
access --> access_audit
People and assignments — diagram
The people list comes from Users.ListUsers (authority.Module.ListUsers).
When assigning a role, a picked person (user_id) wins over the e-mail; the e-mail alone serves to invite someone who has never signed in. See the assign flow diagram.

