The panel's account of a customer is named username_customerdomain - their
username in their own WeKan, an underscore, their domain - and that is the
name they sign in with: the part after the last underscore picks the domain,
and only that domain's database is asked about the username before it. A
bare username, or the customer e-mail address, still works while exactly one
domain lists it, and is refused rather than guessed when two do. An account
made with the older username-domain name takes the new one at its next login.
tests/cloudPanel.test.cjs covers the name, the separator, the domain that
does not list the username and the shared domain.
Thanks to xet7 !
CloudPanelBleed. Any site administrator of any WeKan could set the Cloud
Panel Domain and its SuperAdmin in Admin Panel / People / Cloud and then
make the server connect to any MongoDB server with credentials of their
choosing - Test connection and Import build a MongoClient from the
domain's database settings. A customer is the administrator of their own
WeKan container, so a customer could reach MongoDB servers on the internal
network.
The Cloud Panel now exists only where the server has CLOUD=<its domain>
(models/lib/cloudPanel.js cloudDomainFromEnv). The domain is never read
from the database, the browser or the REST API; the People / Cloud pane is
gone and cloudPanelGetSettings / cloudPanelSetSettings always refuse. Every
cloudPanel* method except cloudPanelWhoAmI passes the CLOUD gate before
anything else, its argument checks included, and the one MongoClient built
from data that is not the environment (withSource) has the gate in its own
body. A refusal is recorded in Admin Panel / Problems under the new keys
authz.cloud-panel-off, authz.cloud-panel-access and
authn.cloud-admin-address (bleed CloudPanelBleed; none disables an
account).
- Cloud Admins: on the CLOUD container its site administrators - the first
registered user is one - not disabled, never a customer's account. They
have Admin Panel / Cloud (/admin/cloud/<pane>, a tab shown only for a
Cloud Admin at the CLOUD address): Domains, Invoices, Tickets, Chat,
Cloudflare, Caddy, Allowed addresses. /cloud stays the customers' panel.
- Customer login: a password login handler, ahead of accounts-password's
and after the timing normalization, only at the CLOUD address, only for a
name exactly one domain with its own database lists, never for a name an
account of the panel's own has. The password is checked against that
customer's own database hash with Accounts._checkPasswordAsync, under an
id no local account has; a disabled or password-less account there is
refused, and so is a wrong 2FA code. On success a local non-admin account
without a password, services.cloudCustomer, which sees exactly its own
domain: info, invoices, tickets and chat.
- Support boards: one WeKan board per domain, "Support: <domain>", lists
Open / In progress / Done for tickets and Chat with one card whose
comments are the support chat (Board View / Chat shows them as a chat).
Cloud Admins are board admins, customers Comment only: they read and
comment but cannot create, edit, move, archive or delete a card nor
manage the board; the panel adds their tickets into Open. The earlier
cloudChatMessages are moved once into the chat card; imported
Rocket.Chat and SandChat conversations go there too.
- Allowed addresses: IPv4, IPv6 and CIDR ranges (models/lib/cloudAddresses.js).
When set, a Cloud Admin login (resume included) from elsewhere is refused
and recorded, and so is a Cloud Admin method. A list without the saver's
own address is refused; CLOUD_ADMIN_ANY_ADDRESS=true sets it aside for a
locked-out operator.
Tests: tests/cloudPanel.test.cjs, tests/cloudAddresses.test.cjs,
tests/cloudPanelAccess.test.cjs (the real methods and login handler without
and with CLOUD), tests/cloudPanelGate.test.cjs (the MongoClient source scan),
server/lib/tests/cloudPanel.security.tests.js and
tests/playwright/specs/cloud-panel.e2e.js (negative without CLOUD; the
positive part runs with CLOUD=localhost WEKAN_TEST_CLOUD=true). The guards
that pin board inserts, comment inserts, card-reading paths, copy/move
methods, the Admin Panel tabs and method areas list the panel's support
board and its methods, with the reason.
Thanks to xet7 !
Admin Panel / People / Cloud names the Cloud Panel Domain and its
SuperAdmin - an existing administrator, by username or e-mail address - as
Weddy's Cloud Panel does (caddy-wekan-plugin). At that domain, /cloud is an
Admin-Panel-style page:
- Domains, a table page: domain, customer name and e-mail, billing e-mail,
start and end date, and where its data is - its own WeKan container and
MongoDB database (connection string, or host, port, database, username,
password, authentication database, replica set, TLS; no password is
fine), or shared with this WeKan as an Organization claiming the domain.
Passwords are written on the server and never sent back.
- Import into this WeKan: a domain's own WeKan database merged into this
one - its boards and all hanging off them, accounts matched by e-mail
address or created (never administrators, no login tokens), everybody in
the domain's Organization - and the domain then shares this WeKan. A dry
run first. Ten containers and ten databases become one of each.
- Invoices of the hosting, recorded by the SuperAdmin, earlier ones too;
each customer sees their own, paid or not and when.
- Chat per domain between its customer and the SuperAdmin, with earlier
Rocket.Chat and SandChat conversations imported.
- CloudFlare: the DNS records of every domain, created and updated; a
record of another kind is reported, never replaced.
- Caddy: the Caddyfile of every domain, loaded through its admin API.
The panel answers only at its own domain, checked on the server by every
method. A shared domain's Organization claims its host only after the same
refusals as an Organization admin's: never the instance's own address,
never another Organization's (TenantBleed). Requests go only to
CloudFlare's API and the Caddy admin API an administrator set, without
redirects (SyncBleed).
44 new strings are translated in every language. Lower-confidence
translations: chr, ay, ak, bm, ee, bi, ace, bo, dz, bua, cv, ba, csb, bho,
an, co, ff, fj, gn, gv, haw, iu, kl, kw, ks, kok, ig, ha, fur, hsb, ht, la,
lg, lld, mg, mi, nah, nap, nd, nso, ny, om, pap, qu, rm, rn, rup, rw, sah,
sc, scn, se, sm, sn, so, ss, tlh, vo, wal, ve-PP, wa, wa-RR, szl, zgh, tig,
ve, ts, tn, st, wo, to, tpi, yi, uz-AR, wuu-Hans, yue_CN, ve-CC and vl-SS.
Thanks to xet7 !
Admin Panel / People / Cloud and the Cloud Panel (73db2a28c3) are removed from
WeKan, with their methods, route, menu item, docs and tests. Many domains from
one Weddy is a Weddy feature: there every domain's WeKan is in one process,
where Node.js WeKan containers would have to work together, which gets
complicated. It is written in Go in caddy-wekan-plugin.
The translations of its strings stay: WeKan, Weddy and the rest use the same
WeKan translations.
Thanks to xet7 !
Weddy (wekan/caddy-wekan-plugin) runs a WeKan for every domain, each in its own
directory - files/domains/<domain>/files/db/ for its database - and starts
the first domain's WeKan with WEDDY_CLOUD_DIR, every customer's with
WEDDY_TENANT=true.
- Admin Panel / People / Cloud, only in that first WeKan and only for a site
admin (a per-tenant admin's whitelisted menu never has it): Cloud Panel
Domain, e.g. cloud.wekan.team, and SuperAdmin Username, a username or
e-mail address.
- /cloud, the Cloud Panel, where the SuperAdmin is taken at the Cloud Panel
Domain: Settings with the left menus Domains and CloudFlare, in the Admin
Panel's layout. Domains is a table page - Domain, Customer name, Customer
email address, Billing email address, Start Date, End Date and the TLS
Weddy got - with a form to add and edit. CloudFlare is a write-only API
key field.
- server/methods/cloudPanel.js checks in every method again that the caller is
the SuperAdmin and the request's Host is the Cloud Panel Domain - not
X-Forwarded-Host, which a client could send itself. The collections are not
published. Every change writes WEDDY_CLOUD_DIR/domains.json for Weddy; the
key goes to cloudflare.json, mode 0600, and is never sent back.
- models/lib/cloudPanel.js has the rules, shared by client and server; its
domain rule is the same as Weddy's, since the name becomes a directory.
- Customers' WeKans show none of it.
The 15 new strings are added as pending Transifex, written in Finnish, and
translated into every other locale. Low-confidence translations: ace ak an ay
ba bho bi bm bo bua chr co csb cv dz ee ff fj fo fur gn gv haw hsb ht ig iu
kl kok ks kw lg lld mai mi nah nap nd nso oc om pap qu rm rn rup rw sah sc scn
se sm sn so ss st szl tig tlh tn to tpi ts uz-AR ve ve-CC ve-PP vo wa wa-RR
wal wo wuu-Hans yi zgh. Transifex translations replace them when they arrive.
tests/cloudPanel.test.cjs: the rules with their negatives, and the security
properties the source keeps. The node suites pass, 2160 of 2160. The
templates are not compiled here (no Jade compiler in this sandbox); a Meteor
build checks them. docs/Platforms/FOSS/Weddy/Cloud-Panel.md is the design.
Thanks to xet7 !