mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
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 !
119 lines
2.5 KiB
CSS
119 lines
2.5 KiB
CSS
/* Cloud Panel (docs/Features/Admin-Panel/Cloud-Panel.md). The layout is the
|
|
Admin Panel's (.setting-content, the left menu, the table page); only the
|
|
panel's own forms, the plan, the Caddyfile and the chat are styled here. */
|
|
.cloud-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-width: 40em;
|
|
gap: 0.3em;
|
|
}
|
|
.cloud-form .billing-checkbox {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.4em;
|
|
}
|
|
.cloud-database {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.3em;
|
|
}
|
|
.cloud-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.5em;
|
|
margin-block: 0.8em;
|
|
}
|
|
.cloud-caddyfile {
|
|
white-space: pre-wrap;
|
|
overflow-wrap: anywhere;
|
|
background: #f5f5f5;
|
|
padding: 0.8em;
|
|
}
|
|
.cloud-plan .cloud-plan-create {
|
|
color: #2e7d32;
|
|
}
|
|
.cloud-plan .cloud-plan-update {
|
|
color: #8a6d00;
|
|
}
|
|
.cloud-chat-messages {
|
|
list-style: none;
|
|
padding-inline-start: 0;
|
|
max-height: 60vh;
|
|
overflow-y: auto;
|
|
}
|
|
.cloud-chat-messages li {
|
|
margin-block-end: 0.6em;
|
|
}
|
|
.cloud-chat-messages li.is-mine {
|
|
text-align: end;
|
|
}
|
|
.cloud-chat-who {
|
|
font-weight: bold;
|
|
}
|
|
.cloud-chat-text {
|
|
white-space: pre-wrap;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.cloud-invoice-void td {
|
|
text-decoration: line-through;
|
|
color: #777;
|
|
}
|
|
|
|
/* Labelled native checkboxes: the app-wide material form rule
|
|
(client/components/forms/forms.css) hides native checkboxes three ways -
|
|
display, visibility, an offset - which left these with a label and no box
|
|
to tick or see ticked. All three are undone, as in cardFlow.css. */
|
|
.cloud-panel input[type="checkbox"] {
|
|
display: inline-block;
|
|
visibility: visible;
|
|
position: static;
|
|
inset-inline-start: auto;
|
|
width: 16px;
|
|
height: 16px;
|
|
min-height: 0;
|
|
margin: 0;
|
|
margin-inline-end: 4px;
|
|
flex: none;
|
|
}
|
|
|
|
/* Support tickets: the support board's Open / In progress / Done lists, side
|
|
by side as Board View / Lists draws a board, wrapping on a narrow screen. */
|
|
.cloud-ticket-columns {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 0.8em;
|
|
align-items: flex-start;
|
|
margin-block: 0.8em;
|
|
}
|
|
.cloud-ticket-column {
|
|
flex: 1 1 14em;
|
|
min-width: 0;
|
|
max-width: 24em;
|
|
background: #e8e8e8;
|
|
border-radius: 4px;
|
|
padding: 0.5em;
|
|
}
|
|
.cloud-ticket-column-title {
|
|
font-size: 1em;
|
|
margin: 0 0 0.5em;
|
|
}
|
|
.cloud-ticket {
|
|
background: #fff;
|
|
border-radius: 3px;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
padding: 0.5em;
|
|
margin-block-end: 0.5em;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
.cloud-ticket-title {
|
|
font-weight: bold;
|
|
}
|
|
.cloud-ticket-description {
|
|
white-space: pre-wrap;
|
|
margin-block: 0.3em;
|
|
}
|
|
.cloud-info th {
|
|
text-align: start;
|
|
padding-inline-end: 1em;
|
|
}
|