feature: Manager-only accounts, and the Router Manager's first administrator.
Release / release (push) Successful in 20s
Release / release (push) Successful in 20s
This commit is contained in:
1 parent
b1e6d9cd0b
commit
af3127d1e8
9 files changed
+259
-47
No files matched your search
@@ -401,3 +401,56 @@ a `SystemExit` carrying its message, so setup records it.
|
||||
Consequences: The diagnostics need nothing the setup provides and cannot collide with the real
|
||||
services. After the first success they never run again, also not after an upgrade or a reboot.
|
||||
The page shows log lines to whoever reaches the internal network during the first setup.
|
||||
|
||||
## ADR-18: Manager-only accounts are a second kind of user; the package can create the first admin
|
||||
|
||||
Status: Accepted
|
||||
|
||||
Context: The Router Manager needs a first administrator before anyone has added users, as other
|
||||
packages create a default user from their debconf answers. Such an account, and others that only
|
||||
manage the router, have no person behind them and need no VPN access. A VPN user is an
|
||||
`inetOrgPerson`, which requires a last name and a common name, and its certificate needs the
|
||||
names. The Manager is configured before the router's directory exists during an installation.
|
||||
|
||||
Decision: A user is one of two kinds in `ou=users`, fixed when it is added: a VPN user, an
|
||||
`inetOrgPerson` with the three person attributes and a certificate, or a Manager-only account,
|
||||
an `account`, `simpleSecurityObject` and `vpnRouterAccount` (ADR-19) with the name, the password,
|
||||
an optional e-mail address for notifications, and no certificate. `add` with all three person
|
||||
attributes adds a VPN user and without the first and the last name a Manager-only account; one
|
||||
name without the rest is refused. The CLI and the API add both kinds; the Manager's dialog
|
||||
requires the names unless Manager access only is chosen, which offers the e-mail address only.
|
||||
Answers carry `manager_only`, and `update` changes only the e-mail address of a Manager-only
|
||||
account. The Manager's package asks `admin_username` and `admin_password`; with both
|
||||
it writes them to a root-only file, clears the answers, and `vpn-router-setup` creates the account
|
||||
after it provisions the directory, adds it to `admins` (creating the group when missing) and
|
||||
removes the file. Without a name nothing is created. `vpnrouter_users` knows only the directory,
|
||||
so setup can use it before PostgreSQL's driver can be loaded; `web` and `vpn-router-user` revoke
|
||||
refresh tokens after the operations of `vpnrouter_auth.REVOKING`.
|
||||
|
||||
Consequences: A Manager-only account cannot become a VPN user, as LDAP cannot change an entry's
|
||||
structural class and its password hash cannot be copied; it is removed and added again instead.
|
||||
It has no certificate, so OpenVPN and road-warrior access refuse it. The administrator's password
|
||||
is on disk only until setup has run.
|
||||
|
||||
## ADR-19: The package has an LDAP schema of its own under a UUID OID
|
||||
|
||||
Status: Accepted
|
||||
|
||||
Context: A Manager-only account (ADR-18) is an `account`, which allows no `mail`, yet notifications
|
||||
need an address for it; no standard auxiliary class allows `mail` except `extensibleObject`, which
|
||||
allows every attribute. Authorization scopes for users of both kinds may follow. An attribute or
|
||||
class of its own needs an OID, and the package has no registered arc.
|
||||
|
||||
Decision: The package defines its schema, `cn=vpn-router,cn=schema,cn=config`, which
|
||||
`vpnrouter_ldap.provision` adds when missing and keeps as `SCHEMA_ATTRIBUTE_TYPES` and
|
||||
`SCHEMA_OBJECT_CLASSES`. Its OID is `2.25.98477352595735834532404256531620013001`, made from a
|
||||
random UUID under the arc 2.25 (ITU-T X.667), which needs no registration; attribute types are
|
||||
under `.1` and object classes under `.2`. The first version has the attribute `vpnRouterScope`
|
||||
(multi-valued, case-insensitive strings) and the auxiliary class `vpnRouterAccount`,
|
||||
`MAY ( mail $ vpnRouterScope )`. Manager-only accounts have the class from their creation, so an
|
||||
e-mail address can be added later without changing their classes; VPN users get it once scopes are
|
||||
used.
|
||||
|
||||
Consequences: The schema check stays strict. New attributes extend `vpnRouterAccount`, and their
|
||||
OIDs continue the arcs. Nothing reads `vpnRouterScope` yet. The OID must never be reused for
|
||||
anything else.
|
||||
Reference in new issue
Block a user