Warda-DNSDocs Warda: from ward — to protect, guardian
v0.9.3

In every plan, an account is an administrator or a member (internal/auth, role of the account: admin or member):

Role What it does
Administrator (admin) Everything: the accounts and their groups, the system, the backups and their restore, the updates, the password and the second factor of the emergency account.
Member (member) The everyday use: the dashboard, "something is broken" on a device, their own account, and, with Warda Business, the unblock requests for their devices. It changes nothing for the others.

Groups of accounts (Warda Business, business.roles; beta: open to every installation during the beta): an administrator makes groups of accounts, names them (1 to 64 characters) and gives each group roles of a fixed catalogue; nobody makes a role of their own. An account has the union of the roles of its groups, plus the everyday use of a member. The catalogue (it will grow over the next versions; the identifiers never change):

Role of the catalogue Identifier What it allows
Full administration full Everything, like the group Administrators, both sensitive actions included.
Accounts and groups accounts Creates and changes the accounts and the groups, never with more rights than its own; from 0.8.2 the same rule for the rights given to the groups of the directory at their sign-in.
Emergency account breakglass Resets the password and the second factor of the emergency account admin; reads the accounts.
Backups and restore backups Backup password, download and restore of a backup.
System and updates system Settings, updates, terms, anonymous statistics, SIEM export, restarts, diagnostic.
Network network Local DNS, DNS services and their certificate, DHCP, map and tools of the network.
Everyday management everyday Devices, people, groups of devices, hours of Internet, rules, suggestions, requests, the addresses watched for known breaches, the restricted mode of the objects and the protection outside the home; reads the network.
Reports and logs reports Reads the queries, the reports, the alerts and the administration log.
Read-only readonly Reads everything an administrator sees and changes nothing; the values that may carry a secret (the addresses of the lists and of the upstream servers) are shown without their path to the accounts that do not change the system.

What the permissions are: 9 areas, each read (R) or changed (W, which includes reading), and 2 sensitive actions kept apart (—: no access):

Area or action Administrator Member full accounts breakglass backups system network everyday reports readonly
home: dashboard, devices seen, pause or unblock a device, reports of the people W W W W W W W W W W W
devices: rename, place, merge, rules of a device, quarantine, restricted mode of the objects, protection outside the home W — W — — — — — W — R
household: people, groups, hours of Internet, holidays, requests, addresses watched for known breaches W — W — — — — — W — R
rules: rules, suggestions and their automatic blocking, protections (the mining pools and, from 0.8.2, the reputation of the domains included), blocked services, pause of the network, collective base, data loss prevention, unblock requests, AI services, device policies W — W — — — — — W — R
reports: query log of the whole network, reports, alerts, administration log, security center, use of the AI services, company reports W — W — — — — — W R R
network: local DNS, DNS services and certificate, DHCP, map, tools, network check, exposure on the Internet W — W — — — — W R — R
system: settings, updates, terms, anonymous statistics, SIEM export, restarts, diagnostic, high availability, sites W — W — — — W — — — R
backups: backup password and download W — W — — W — — — — R
accounts: accounts, temporary passwords, second factors, groups and their roles, users of the directory and, from 0.8.2, their sign-in W — W W R — — — — — R
backups.restore: restore a backup (it replaces every account) yes — yes — — yes — — — — —
breakglass.manage: password and second factor of the emergency account yes — yes — yes — — — — — —

The member column is also every account's floor: each account has the everyday use (home) whatever its groups. The routes of one's own account (password, second factor, own dashboard, consent to the reports, invitations, unblock requests, GET /api/v1/me/devices, and from 0.8.0 the addresses of one's own person watched for breaches, GET /api/v1/me/breaches, and the test of a password, GET /api/v1/pwned-range) are open to every account, and so is the query log of its own devices (GET /api/v1/queries, home read: see Query log); the whole network needs reports read. A few routes need two areas: the profile of a group changed from Device policies also needs household written, and so do the import and the removal of the people of the directory; a pairing of high availability (make a code, join) needs backups.restore, since it gives the whole configuration, accounts included, to the other box or replaces the one of this box.

  • The group Administrators (key administrators) always exists, holds every role, and cannot be renamed, removed nor lose a role; its members are the administrators (role admin). The emergency account is always in it, and at least one account always remains in it. Without Warda Business, putting an account in it or taking it out is choosing Administrator or Member.
  • Delegation: an account gives only rights it has itself (a group, a role of a group, the groups of an account), and never changes, resets or removes an account that has rights it does not have (auth.CheckManage, auth.CheckGroup).
  • The accounts of the directory (from 0.8.2, source directory): made at the first sign-in of a person of the directory, without a password of their own; their role is given again at each sign-in by the Rights of the groups of the directory (see Sign-in of the people of the directory). Those settings follow the delegation: only an account that has every right of the groups of accounts they map, in the settings saved and in the new ones, saves them (403 otherwise), so an account with the role Accounts and groups cannot map its own group of the directory to the group Administrators, nor change anything once that group (or one with more rights than its own) is mapped.
  • The emergency account (admin, breakglass in the database) is never deleted, never made a member, never taken out of Administrators; the routes of the accounts never change it. Its password and second factor are reset by their own routes, POST /api/v1/breakglass/password and POST /api/v1/breakglass/totp/reset (permission breakglass.manage: an administrator, or the role Emergency account); warda reset-password admin uses them.
  • Restore a backup (POST /api/v1/backups/restore) needs backups.restore: an administrator, or the role Backups and restore. The backup password and the download need backups.write. The System page opens with system.read or backups.read; each of its parts follows its own area: an account with the role Backups and restore alone sees only the backups there, and with Read-only too it uses the backups while the rest of the page stays read-only.
  • Without Warda Business the groups are ignored: every account is an administrator or a member, and an account whose rights come from other groups acts as a member (the page Roles and groups says so). The groups stay, and count again when the plan gives Warda Business; the check of the delegation counts them even while they are ignored. Creating, renaming or removing a group, or changing the groups of an account, answers 402 without Warda Business.
  • Upgrade from 0.6.7 (and a backup made before 0.6.8, restored): owners, administrators and the emergency account become administrators; operators become members of a new group Everyday management (everyday, role everyday), auditors members of a new group Read-only (readonly, role readonly), each group created only when needed; members stay members. Nobody loses a right. The account created at the installation is an administrator, as the emergency account.
  • The API token and the warda commands act as an administrator.
  • The interface shows each account only the pages of the menu it can open; a page it can only read shows a banner ("Your rights let you see this page, not change it"), its controls turned off. Business → Roles and groups makes and changes the groups (name, roles, members), shows the catalogue as a table with the two sensitive actions, and what each account may do (its effective rights). Each group is a row of its own with its roles ("Roles: …", or "No role yet" and what to do) and its members, each with Remove, and the buttons Add members (a list of the accounts the signed-in account may add), Edit roles and Delete the group (never on Administrators); each change asks the password again. An empty page says where to start: create a group, choose its roles, then add its members. Administration → Access to Warda chooses Administrator or Member for each account without Warda Business, and its groups with it; so does Give an access from the card of a person.
  • Log: account.role (name: old → new), account.groups, group.create, group.rename, group.roles, group.delete, breakglass.reset_password, breakglass.totp_reset.
  • Enforcement: one table (routePermissions in internal/httpapi/roles.go) gives every route of the API its permission — an area read, an area changed, a sensitive action, or one's own account; a route without a declared permission stops the service at start, and the tests check every route against every role of the catalogue.

API: a route the rights do not allow answers 403 {"error": "your role does not allow this", "state": "signed_in"}; GET /api/v1/session gives permissions ("area.read", "area.write", and "backups.restore", "breakglass.manage" when held), which the interface uses for its pages and buttons. GET /api/v1/roles gives the areas, the actions, the catalogue (roles: id, label, access by area, actions), the groups (groups: key, name, roles, members), groups_active (false without Warda Business) and feature. GET /api/v1/accounts gives each account with its groups and its permissions. POST /api/v1/accounts takes role (admin, the default, or member) and optional groups (which then decide); PUT /api/v1/accounts/{id}/role ({"role": "member", "confirm_password": "…"}) takes admin or member; PUT /api/v1/accounts/{id}/groups ({"groups": [2, 5], "confirm_password": "…"}); POST /api/v1/account-groups (name, roles), PATCH /api/v1/account-groups/{id} (name or roles; the members are given by account) and DELETE /api/v1/account-groups/{id} (402 without Warda Business). Every change of an account or of a group asks the password of the signed-in account again (confirm_password); the token does not.