From d26b1427980092d76a9889004dc1849d7a53205d Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Thu, 19 Nov 2026 20:13:22 -0800 Subject: [PATCH 1/4] fix: warn when an operator's Verify does not succeed cloud_operator_verify() raised every result as information, so a revoked token read like success. Use a warning unless the status is Ok, as cloud_accounts.php does. Signed-off-by: Thomas Vincent --- include/operator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/operator.php b/include/operator.php index 1367b6d..9b9f933 100644 --- a/include/operator.php +++ b/include/operator.php @@ -21,6 +21,7 @@ use Somethingwithproof\Cloud\DeviceRepository; use Somethingwithproof\Cloud\SystemClock; use Somethingwithproof\Cloud\Verifier; +use Somethingwithproof\Cloud\VerifyStatus; use Somethingwithproof\Cloud\Drivers; /** @return list */ @@ -59,5 +60,5 @@ function cloud_operator_verify(int $id, int $user): void { throw new RuntimeException('Account unavailable'); } $status = (new Verifier(Drivers::production(), cloud_credentials(), $accounts))->verify($account, $user); - raise_message('cloud_operator_verify', $status->message(), MESSAGE_LEVEL_INFO); + raise_message('cloud_operator_verify', $status->message(), $status === VerifyStatus::Ok ? MESSAGE_LEVEL_INFO : MESSAGE_LEVEL_WARN); } From c0a05165893756421d32d56e301af61fe98513ed Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Thu, 19 Nov 2026 20:14:19 -0800 Subject: [PATCH 2/4] fix: confirm before deleting a cloud account Delete removed the account, its vault credential, series mappings, resources and observations on the first POST. The first POST now shows a confirmation page; only the repeated POST with confirm=1 deletes. page-permissions.php checks both steps. Signed-off-by: Thomas Vincent --- cloud_accounts.php | 20 +++++++++++++++++++- lib/AccountsPage.php | 23 +++++++++++++++++++++++ locales/LC_MESSAGES/ar-SA.mo | Bin 17878 -> 18402 bytes locales/LC_MESSAGES/es-419.mo | Bin 15708 -> 16139 bytes locales/LC_MESSAGES/es-ES.mo | Bin 15708 -> 16139 bytes locales/LC_MESSAGES/hi-IN.mo | Bin 22385 -> 23056 bytes locales/LC_MESSAGES/zh-CN.mo | Bin 13783 -> 14159 bytes locales/po/ar-SA.po | 9 +++++++++ locales/po/cacti.pot | 9 +++++++++ locales/po/es-419.po | 9 +++++++++ locales/po/es-ES.po | 9 +++++++++ locales/po/hi-IN.po | 9 +++++++++ locales/po/zh-CN.po | 9 +++++++++ tests/bin/page-permissions.php | 20 ++++++++++++++++---- 14 files changed, 112 insertions(+), 5 deletions(-) diff --git a/cloud_accounts.php b/cloud_accounts.php index a5accf4..2c136af 100644 --- a/cloud_accounts.php +++ b/cloud_accounts.php @@ -127,7 +127,25 @@ header('Location: cloud_accounts.php'); exit; case 'delete': - if ($cloud_accounts->delete((int) get_filter_request_var('id'), $cloud_user)) { + $cloud_id = (int) get_filter_request_var('id'); + + // Deleting drops the stored credential and collected data for good, + // so the first POST only asks; the confirmation form sends the second. + if ((string) get_nfilter_request_var('confirm') !== '1') { + $cloud_account = $cloud_accounts->find($cloud_id); + + if ($cloud_account !== null) { + top_header(); + $cloud_page->renderDeleteConfirm($cloud_account); + bottom_footer(); + exit; + } + + header('Location: cloud_accounts.php'); + exit; + } + + if ($cloud_accounts->delete($cloud_id, $cloud_user)) { raise_message( 'cloud_deleted', __('The account and its collected data were deleted. Its Cacti devices and graphs were left in place.', 'cloud'), diff --git a/lib/AccountsPage.php b/lib/AccountsPage.php index f91ee32..cb42c94 100644 --- a/lib/AccountsPage.php +++ b/lib/AccountsPage.php @@ -183,6 +183,29 @@ public function renderEdit(?Account $account, array $input = [], array $errors = . ''; } + /** + * The step before a delete: the account's name, what deleting removes, + * and a form that repeats the delete with confirm=1. + */ + public function renderDeleteConfirm(Account $account): void { + html_start_box(__('Delete', 'cloud'), '100%', '', '3', 'center', ''); + + print '' . html_escape(__( + 'Delete %s? This removes the account, its stored credential, series mappings, resources and observations, and cannot be undone. Its Cacti devices and graphs are left in place.', + $account->name, + 'cloud' + )) . ''; + + print '
' + . '' + . '' + . '' + . '' + . '
' . html_escape(__('Cancel', 'cloud')) . ''; + + html_end_box(); + } + private function credentialSummary(Account $account): string { return match ($account->credentialSource) { CredentialSource::Vault => $this->credentials->hasVaultCredential($account->id) diff --git a/locales/LC_MESSAGES/ar-SA.mo b/locales/LC_MESSAGES/ar-SA.mo index 9f5602eae7ff7f1e15e6fe19e73bd079db81c71b..6a525d02b4c830d30c542c5f52a76a717bb57b58 100644 GIT binary patch delta 3429 zcmYk;eQ;FO8OQM_Gy%h#5Rd=~a6vC{(YJ2v1}`~-_JF~V#vK83UJJ>)rQ%jUWv%WMqhVCU6lLul~BQ9;Lta0=xYQ1xeV z4E`1em^vh|p-;hzm-{Uy^7>8n3UQjSv$^P>yA|1at9GyawA)&wC2ht_StGUm@>i=WqggSV#Z%85#PtJ83-!BdC!+ zfs^nEvMTl#>W$yQpX2Ys^477z06I`_b^x_{hr{|KNEh}hY6jm7J&)WkM}-Vu z4J%L&T80`}EouoGQ8TeSEI*0r=tNlm2I@`U#X9^0>W$|zt#V1|eYlMBnsHixGOttd z4LphS@$aa$EXofCP>ka#--wLWYLF(j4(H)E)PPT+*7_W3;Qgo>yM*fSQ`FK_@-X#R zJ)ZerLS_>c8u=O28=VguTtH1(HVZZahvN-65m)0~sP=uR4$q)w>OIsX!e8J6cm?O+az0&+d+^)n;U*mI z1OwZJ+QbJ@Q~op5QoM#ts-41&&VN4{t=UdqLsNVZuVk716!n0ouMMX1WgJWS*P;Dk z{l}<*e2FJ<>2<;B$SE?rjq-6^f&ay|xMI2)+rZA^p+RYODVgj+W-T*X)UH2*{Mu_=^tr#FIvzADJl4phSOtC)AH#q*0zr{nb8TFw3sHu7uHFd{vB)*T!@NYO8%gcjyi&6LQ#{;+yug0%X zOEQujtLII}HmpPq^voRQU+4ck71cP7!#x65qNctHOK=aezw87uYjzRqa3ot_Q@$3z zjveUWE2tNF7uVxORJ+^fGHbXNU&P~SGMb{=dBGc`a1rI!u>3Y^LW*?g`XV9%X%}QBG&bsKJFBgD-@?qDG#xfWLH@ zhgzCSEWob2k;; zI1c}V594UgUK6(BA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tK8?840& ziAAX0v;liy9j4(ocnAK9gJ|D6kSnBMD(X|a2Mh2Aq)qF=XHE^wz+lKw71g5}I_u?s zqB{5w>do8s4|hitTay0-+4jNz4cKxbP5VDvIZy0F8$oDWD)E)IIl)d49S z#1n+3LrL?iDNuTrm`YSBLs~+x_JX8u!%TuDV#|nPB8T8>8VSB&i^=>yY3pcBtRz7lLclop>CZ$BQvBuvl3ja{=CO?_D z&&##+iu_#be;VTm%SqQ_qraqHiiuXFk7*q}-K{1j8k<*; F{2zAnBwGLg diff --git a/locales/po/ar-SA.po b/locales/po/ar-SA.po index 0bcc00a..d19c7da 100644 --- a/locales/po/ar-SA.po +++ b/locales/po/ar-SA.po @@ -211,6 +211,15 @@ msgstr "الحد الشهري" msgid "Save" msgstr "حفظ" +#: lib/AccountsPage.php +#, php-format +msgid "Delete %s? This removes the account, its stored credential, series mappings, resources and observations, and cannot be undone. Its Cacti devices and graphs are left in place." +msgstr "هل تريد حذف %s؟ سيؤدي ذلك إلى حذف الحساب وبيانات الاعتماد المخزّنة وتعيينات السلاسل والموارد والملاحظات، ولا يمكن التراجع عنه. ستُبقى أجهزته ورسومه البيانية في Cacti." + +#: lib/AccountsPage.php +msgid "Cancel" +msgstr "إلغاء" + #: lib/AccountsPage.php msgid "Stored in the vault" msgstr "مخزّنة في الخزنة" diff --git a/locales/po/cacti.pot b/locales/po/cacti.pot index ade056a..a43602e 100644 --- a/locales/po/cacti.pot +++ b/locales/po/cacti.pot @@ -213,6 +213,15 @@ msgstr "" msgid "Save" msgstr "" +#: lib/AccountsPage.php +#, php-format +msgid "Delete %s? This removes the account, its stored credential, series mappings, resources and observations, and cannot be undone. Its Cacti devices and graphs are left in place." +msgstr "" + +#: lib/AccountsPage.php +msgid "Cancel" +msgstr "" + #: lib/AccountsPage.php msgid "Stored in the vault" msgstr "" diff --git a/locales/po/es-419.po b/locales/po/es-419.po index 70613ab..852d8c4 100644 --- a/locales/po/es-419.po +++ b/locales/po/es-419.po @@ -211,6 +211,15 @@ msgstr "Límite mensual" msgid "Save" msgstr "Guardar" +#: lib/AccountsPage.php +#, php-format +msgid "Delete %s? This removes the account, its stored credential, series mappings, resources and observations, and cannot be undone. Its Cacti devices and graphs are left in place." +msgstr "¿Eliminar %s? Se eliminarán la cuenta, su credencial almacenada, las asignaciones de series, los recursos y las observaciones, y no se puede deshacer. Se conservarán sus dispositivos y gráficos de Cacti." + +#: lib/AccountsPage.php +msgid "Cancel" +msgstr "Cancelar" + #: lib/AccountsPage.php msgid "Stored in the vault" msgstr "Almacenada en la bóveda" diff --git a/locales/po/es-ES.po b/locales/po/es-ES.po index 8a849cc..0063e3b 100644 --- a/locales/po/es-ES.po +++ b/locales/po/es-ES.po @@ -211,6 +211,15 @@ msgstr "Límite mensual" msgid "Save" msgstr "Guardar" +#: lib/AccountsPage.php +#, php-format +msgid "Delete %s? This removes the account, its stored credential, series mappings, resources and observations, and cannot be undone. Its Cacti devices and graphs are left in place." +msgstr "¿Eliminar %s? Se eliminarán la cuenta, su credencial almacenada, las asignaciones de series, los recursos y las observaciones, y no se puede deshacer. Se conservarán sus dispositivos y gráficos de Cacti." + +#: lib/AccountsPage.php +msgid "Cancel" +msgstr "Cancelar" + #: lib/AccountsPage.php msgid "Stored in the vault" msgstr "Almacenada en la bóveda" diff --git a/locales/po/hi-IN.po b/locales/po/hi-IN.po index a982eec..8f87029 100644 --- a/locales/po/hi-IN.po +++ b/locales/po/hi-IN.po @@ -211,6 +211,15 @@ msgstr "मासिक सीमा" msgid "Save" msgstr "सहेजें" +#: lib/AccountsPage.php +#, php-format +msgid "Delete %s? This removes the account, its stored credential, series mappings, resources and observations, and cannot be undone. Its Cacti devices and graphs are left in place." +msgstr "%s हटाएँ? इससे खाता, उसका संग्रहीत क्रेडेंशियल, सीरीज़ मैपिंग, संसाधन और अवलोकन हट जाएँगे, और इसे पूर्ववत नहीं किया जा सकता। उसके Cacti डिवाइस और ग्राफ़ यथावत रखे जाएँगे।" + +#: lib/AccountsPage.php +msgid "Cancel" +msgstr "रद्द करें" + #: lib/AccountsPage.php msgid "Stored in the vault" msgstr "वॉल्ट में संग्रहीत" diff --git a/locales/po/zh-CN.po b/locales/po/zh-CN.po index 0486adf..bcba113 100644 --- a/locales/po/zh-CN.po +++ b/locales/po/zh-CN.po @@ -211,6 +211,15 @@ msgstr "每月上限" msgid "Save" msgstr "保存" +#: lib/AccountsPage.php +#, php-format +msgid "Delete %s? This removes the account, its stored credential, series mappings, resources and observations, and cannot be undone. Its Cacti devices and graphs are left in place." +msgstr "删除 %s?这将删除该账户、其已存储的凭据、序列映射、资源和观测数据,且无法撤销。其 Cacti 设备和图表将保留。" + +#: lib/AccountsPage.php +msgid "Cancel" +msgstr "取消" + #: lib/AccountsPage.php msgid "Stored in the vault" msgstr "已存入凭据库" diff --git a/tests/bin/page-permissions.php b/tests/bin/page-permissions.php index c8d7279..5c368f0 100644 --- a/tests/bin/page-permissions.php +++ b/tests/bin/page-permissions.php @@ -26,7 +26,8 @@ * norealm Console only: both pages are denied * * Then shows that a delete sent as GET, or as POST without the csrf-magic - * token, has no effect, and that the same delete as a proper POST works. + * token, has no effect, that a proper POST asks for confirmation, and that + * the confirmed delete works. * Then it saves an account with a vault credential through the form and * searches every response, the Cacti log, and every plugin table for the * credential (#32). Last (#45), it views a cloud graph as users allowed and @@ -208,12 +209,23 @@ function perm_login($user) { perm_expect($exists(), 'a delete POST without the csrf-magic token has no effect'); list(, $list) = perm_http($base . 'cloud_accounts.php', $jar); -perm_http( +list(, $confirm) = perm_http( $base . 'cloud_accounts.php', $jar, array('__csrf_magic' => perm_token($list), 'action' => 'delete', 'id' => $probe) ); -perm_expect(!$exists(), 'the same delete as a POST with the token removes the account'); +perm_expect( + $exists() && strpos($confirm, 'name="confirm" value="1"') !== false + && strpos($confirm, '') === false, + 'a delete POST with the token asks for confirmation, escapes the name, and removes nothing' +); + +perm_http( + $base . 'cloud_accounts.php', + $jar, + array('__csrf_magic' => perm_token($confirm), 'action' => 'delete', 'id' => $probe, 'confirm' => '1') +); +perm_expect(!$exists(), 'the confirmed delete removes the account'); // A credential saved through the form must come back in no response, no // log line, and no plugin table. @@ -404,7 +416,7 @@ function perm_login($user) { perm_http( $base . 'cloud_accounts.php', $revokedJar, - array('__csrf_magic' => perm_token($before), 'action' => 'delete', 'id' => $graphAccount) + array('__csrf_magic' => perm_token($before), 'action' => 'delete', 'id' => $graphAccount, 'confirm' => '1') ); perm_expect( (int) db_fetch_cell_prepared('SELECT COUNT(*) FROM plugin_cloud_account WHERE id = ?', array($graphAccount)) === 1, From 4c37a7c2fef69d2aab9349b4b16103e255ef21ec Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Thu, 19 Nov 2026 20:14:59 -0800 Subject: [PATCH 3/4] fix: drop the vault credential when an account leaves the vault Saving an account with a file or instance credential kept its old vault ciphertext. Switching back with the credential box empty then reused a possibly revoked token without a prompt. The save now calls CredentialStore::forget() and records the credential change; a credential typed with a non-vault source is no longer stored. Signed-off-by: Thomas Vincent --- cloud_accounts.php | 9 ++++++++- tests/bin/page-permissions.php | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cloud_accounts.php b/cloud_accounts.php index 2c136af..23570de 100644 --- a/cloud_accounts.php +++ b/cloud_accounts.php @@ -103,7 +103,14 @@ $cloud_saved = $cloud_accounts->save($cloud_parsed->account, $cloud_user); $cloud_raw = trim((string) get_nfilter_request_var('credential')); - if ($cloud_saved > 0 && $cloud_raw !== '') { + if ($cloud_saved > 0 && $cloud_parsed->account->credentialSource !== \Somethingwithproof\Cloud\CredentialSource::Vault) { + // A credential kept in the vault would come back, unprompted, if the + // account were switched back to it with the box left empty. + if ($cloud_credentials->hasVaultCredential($cloud_saved)) { + $cloud_credentials->forget($cloud_saved); + $cloud_accounts->recordCredentialChange($cloud_saved, $cloud_user); + } + } elseif ($cloud_saved > 0 && $cloud_raw !== '') { try { $cloud_credentials->storeVaultCredential($cloud_saved, new \Somethingwithproof\Cloud\Secret($cloud_raw)); $cloud_accounts->recordCredentialChange($cloud_saved, $cloud_user); diff --git a/tests/bin/page-permissions.php b/tests/bin/page-permissions.php index 5c368f0..ad3a616 100644 --- a/tests/bin/page-permissions.php +++ b/tests/bin/page-permissions.php @@ -311,6 +311,21 @@ function perm_login($user) { } } +// Moving the account to a credential file drops the vault copy, so +// switching back later cannot revive it. +list(, $edit) = perm_http($base . 'cloud_accounts.php?action=edit&id=' . $account, $jar); +perm_http($base . 'cloud_accounts.php', $jar, array( + '__csrf_magic' => perm_token($edit), 'action' => 'save', 'id' => $account, 'provider' => 'digitalocean', + 'name' => $probeName, 'poller_id' => 1, + 'credential_source' => 'file', 'credential_file' => '/etc/cacti/cloud-probe.json', 'collect_interval' => 300, + 'discover_interval' => 3600, 'request_share' => 50, 'enabled' => 'on', +)); +perm_expect( + db_fetch_cell_prepared('SELECT credential_source FROM plugin_cloud_account WHERE id = ?', array($account)) === 'file' + && (int) db_fetch_cell_prepared('SELECT COUNT(*) FROM plugin_cloud_secret WHERE account_id = ?', array($account)) === 0, + 'switching an account from the vault to a credential file removes the stored credential' +); + perm_expect( count($responses) === 6 && $leaks === array(), 'the credential appears in no response, log, or table' . ($leaks === array() ? '' : ': ' . implode( From b934a7d949df07adf31c91db84cc6b432f8ff530 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Thu, 19 Nov 2026 20:15:58 -0800 Subject: [PATCH 4/4] docs: describe the Operator realm and Cloud Operations page The milestone and install sections still named two realms and two pages. List Cloud Operator and Cloud Operations, say that Admin inherits Operator, and that the administrator needs no separate Operator grant. Translated guides and their source hashes follow. Signed-off-by: Thomas Vincent --- README.md | 4 ++-- docs/i18n/ar-SA/README.md | 6 +++--- docs/i18n/es-419/README.md | 6 +++--- docs/i18n/es-ES/README.md | 6 +++--- docs/i18n/hi-IN/README.md | 6 +++--- docs/i18n/zh-CN/README.md | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 5aaf43b..2e15dbd 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ Out of scope: changing cloud resources, creating or mirroring provider alarms, b - **A guarded install.** On PHP below 8.2, or without ext-openssl, install and enable are refused with a message, and the rest of Cacti keeps working. - **Lifecycle.** Install, upgrade, and uninstall through Cacti's Plugins page. Upgrades are ordered and survive interruption. Uninstall keeps the plugin's tables unless you clear *Keep Plugin Tables on Uninstall*. -- **Separate realms.** *Cloud Admin* opens **Cloud Accounts**; *Cloud View* opens **Cloud Health**. Both pages are under Management. +- **Separate realms.** *Cloud Admin* opens **Cloud Accounts**; *Cloud Operator* opens **Cloud Operations**; *Cloud View* opens **Cloud Health**. Admin inherits Operator, and Operator inherits View. All three pages are under Management. - **Accounts and credentials.** Add, edit, verify, and delete accounts. A credential is either encrypted in the database with a key file kept outside it (AES-256-GCM), or read from a file on the poller. Credentials are write-only in the UI and are redacted from logs. - **The collector.** It starts from each poller run, one instance per poller, within a time budget. It takes a lease per account, runs discovery on its own interval, and reads metrics only for the plugin's own active data sources. - **Health.** Per-account collection, discovery, resource, and freshness state, plus warnings for an unusable vault key, unsafe credential files, and intervals the poller cannot honour. @@ -86,7 +86,7 @@ These steps install the milestone 2 code for evaluation. They require Cacti 1.2. Replace `cacti` with the user that runs your web server and poller. The file holds 32 raw bytes or 64 hexadecimal characters. Back it up with the database; without it, stored credentials must be entered again. 3. In Cacti, open **Configuration > Plugins**, then install and enable *Cloud*. 4. Under **Configuration > Settings > Cloud**, set *Vault Key File* if you used another path. *Collector Time Budget* (default 240 seconds) must stay below the poller interval. -5. Grant *Cloud Admin* or *Cloud View* to users and groups under **Configuration > Users**. Installing grants both realms to the administrator. +5. Grant *Cloud Admin*, *Cloud Operator* or *Cloud View* to users and groups under **Configuration > Users**. Installing grants Cloud Admin and Cloud View to the administrator; Cloud Admin includes Operator access, so the administrator needs no separate Operator grant. 6. Add accounts under **Management > Cloud Accounts**, then check **Management > Cloud Health** for warnings. ## Compatibility targets diff --git a/docs/i18n/ar-SA/README.md b/docs/i18n/ar-SA/README.md index 2aeb067..9e5e778 100644 --- a/docs/i18n/ar-SA/README.md +++ b/docs/i18n/ar-SA/README.md @@ -1,4 +1,4 @@ - + [English](../../../README.md) | [简体中文](../zh-CN/README.md) | [हिन्दी](../hi-IN/README.md) | [Español (España)](../es-ES/README.md) | [Español (Latinoamérica)](../es-419/README.md) | [العربية](README.md) @@ -62,7 +62,7 @@ - **تثبيت محمي بفحوص.** عند استخدام PHP أقدم من 8.2 أو دون ext-openssl، يُرفض التثبيت والتفعيل مع رسالة، ويستمر باقي Cacti في العمل. - **دورة الحياة.** التثبيت والترقية وإلغاء التثبيت عبر صفحة إضافات Cacti. الترقيات مرتّبة وتتحمل الانقطاع. يحتفظ إلغاء التثبيت بجداول الإضافة إلا إذا ألغيت تحديد *Keep Plugin Tables on Uninstall*. -- **نطاقات منفصلة.** يفتح *Cloud Admin* صفحة **Cloud Accounts**؛ ويفتح *Cloud View* صفحة **Cloud Health**. كلاهما ضمن Management. +- **نطاقات منفصلة.** يفتح *Cloud Admin* صفحة **Cloud Accounts**؛ ويفتح *Cloud Operator* صفحة **Cloud Operations**؛ ويفتح *Cloud View* صفحة **Cloud Health**. يرث Admin صلاحيات Operator، ويرث Operator صلاحيات View. الصفحات الثلاث ضمن Management. - **الحسابات وبيانات الاعتماد.** إضافة الحسابات وتعديلها والتحقق منها وحذفها. تُشفّر بيانات الاعتماد إما في قاعدة البيانات بمفتاح في ملف خارجها (AES-256-GCM)، أو تُقرأ من ملف على المستطلع. لا تُعرض بيانات الاعتماد للقراءة في الواجهة، وتُحجب من السجلات. - **الجامع.** يبدأ من كل تشغيل للمستطلع، بمثيل واحد لكل مستطلع، ضمن ميزانية زمنية. يحصل على حجز مؤقت لكل حساب، ويشغّل الاكتشاف بفاصله الخاص، ولا يقرأ إلا مقاييس مصادر البيانات النشطة التي تملكها الإضافة. - **الصحة.** حالة الجمع والاكتشاف والموارد والحداثة لكل حساب، مع تحذيرات بشأن مفتاح خزنة غير صالح، وملفات اعتماد غير آمنة، وفواصل لا يستطيع المستطلع الالتزام بها. @@ -85,7 +85,7 @@ استبدل `cacti` بالمستخدم الذي يشغّل خادم الويب والمستطلع. يحتوي الملف على 32 بايت خام أو 64 محرفًا ست عشريًا. انسخه احتياطيًا مع قاعدة البيانات؛ بدونه يجب إدخال بيانات الاعتماد المخزّنة مجددًا. 3. في Cacti، افتح **Configuration > Plugins**، ثم ثبّت *Cloud* وفعّله. 4. ضمن **Configuration > Settings > Cloud**، اضبط *Vault Key File* إن استخدمت مسارًا آخر. يجب أن تبقى *Collector Time Budget* (افتراضيًا 240 ثانية) أقل من فاصل المستطلع. -5. امنح *Cloud Admin* أو *Cloud View* للمستخدمين والمجموعات ضمن **Configuration > Users**. يمنح التثبيت النطاقين للمسؤول. +5. امنح *Cloud Admin* أو *Cloud Operator* أو *Cloud View* للمستخدمين والمجموعات ضمن **Configuration > Users**. يمنح التثبيت المسؤولَ Cloud Admin وCloud View؛ ويتضمن Cloud Admin صلاحيات Operator، فلا يحتاج المسؤول إلى منح Operator بشكل منفصل. 6. أضف الحسابات ضمن **Management > Cloud Accounts**، ثم تحقق من التحذيرات في **Management > Cloud Health**. diff --git a/docs/i18n/es-419/README.md b/docs/i18n/es-419/README.md index f522eeb..5e7e8c5 100644 --- a/docs/i18n/es-419/README.md +++ b/docs/i18n/es-419/README.md @@ -1,4 +1,4 @@ - + [English](../../../README.md) | [简体中文](../zh-CN/README.md) | [हिन्दी](../hi-IN/README.md) | [Español (España)](../es-ES/README.md) | [Español (Latinoamérica)](README.md) | [العربية](../ar-SA/README.md) @@ -62,7 +62,7 @@ Quedan fuera del alcance: modificar recursos de nube, crear o replicar alarmas d - **Instalación protegida.** Con PHP anterior a 8.2 o sin ext-openssl, se rechazan la instalación y la activación con un mensaje, y el resto de Cacti sigue funcionando. - **Ciclo de vida.** Instalación, actualización y desinstalación desde la página de complementos de Cacti. Las actualizaciones siguen un orden y sobreviven a interrupciones. La desinstalación conserva las tablas del complemento salvo que desmarque *Keep Plugin Tables on Uninstall*. -- **Ámbitos separados.** *Cloud Admin* abre **Cloud Accounts**; *Cloud View* abre **Cloud Health**. Ambas páginas están en Management. +- **Ámbitos separados.** *Cloud Admin* abre **Cloud Accounts**; *Cloud Operator* abre **Cloud Operations**; *Cloud View* abre **Cloud Health**. Admin hereda Operator, y Operator hereda View. Las tres páginas están en Management. - **Cuentas y credenciales.** Añadir, editar, verificar y eliminar cuentas. Las credenciales se cifran en la base de datos con un archivo de clave externo (AES-256-GCM), o se leen desde un archivo en el sondeador. En la interfaz solo pueden escribirse y se ocultan en los registros. - **El recopilador.** Se inicia en cada ejecución del sondeador, una instancia por sondeador, dentro de un presupuesto de tiempo. Adquiere una concesión temporal por cuenta, ejecuta el descubrimiento con su propio intervalo y solo lee métricas de las fuentes de datos activas que pertenecen al complemento. - **Salud.** Estado de recopilación, descubrimiento, recursos y vigencia por cuenta, junto con advertencias sobre claves de bóveda inutilizables, archivos de credenciales inseguros e intervalos que el sondeador no puede cumplir. @@ -85,7 +85,7 @@ Estos pasos instalan el código del hito 2 para evaluarlo. Requieren Cacti 1.2.3 Sustituya `cacti` por el usuario que ejecuta el servidor web y el sondeador. El archivo contiene 32 bytes sin procesar o 64 caracteres hexadecimales. Haga una copia de seguridad junto con la base de datos; sin él tendrá que volver a introducir las credenciales almacenadas. 3. En Cacti, abra **Configuration > Plugins** e instale y active *Cloud*. 4. En **Configuration > Settings > Cloud**, configure *Vault Key File* si ha utilizado otra ruta. *Collector Time Budget* (240 segundos de forma predeterminada) debe ser menor que el intervalo del sondeador. -5. Conceda *Cloud Admin* o *Cloud View* a usuarios y grupos en **Configuration > Users**. La instalación concede ambos ámbitos al administrador. +5. Conceda *Cloud Admin*, *Cloud Operator* o *Cloud View* a usuarios y grupos en **Configuration > Users**. La instalación concede Cloud Admin y Cloud View al administrador; Cloud Admin incluye el acceso de Operator, así que el administrador no necesita una concesión aparte de Operator. 6. Añada cuentas en **Management > Cloud Accounts** y compruebe si hay advertencias en **Management > Cloud Health**. diff --git a/docs/i18n/es-ES/README.md b/docs/i18n/es-ES/README.md index f147db7..3cb27de 100644 --- a/docs/i18n/es-ES/README.md +++ b/docs/i18n/es-ES/README.md @@ -1,4 +1,4 @@ - + [English](../../../README.md) | [简体中文](../zh-CN/README.md) | [हिन्दी](../hi-IN/README.md) | [Español (España)](README.md) | [Español (Latinoamérica)](../es-419/README.md) | [العربية](../ar-SA/README.md) @@ -62,7 +62,7 @@ Quedan fuera del alcance: modificar recursos de nube, crear o replicar alarmas d - **Instalación protegida.** Con PHP anterior a 8.2 o sin ext-openssl, se rechazan la instalación y la activación con un mensaje, y el resto de Cacti sigue funcionando. - **Ciclo de vida.** Instalación, actualización y desinstalación desde la página de complementos de Cacti. Las actualizaciones siguen un orden y sobreviven a interrupciones. La desinstalación conserva las tablas del complemento salvo que desmarque *Keep Plugin Tables on Uninstall*. -- **Ámbitos separados.** *Cloud Admin* abre **Cloud Accounts**; *Cloud View* abre **Cloud Health**. Ambas páginas están en Management. +- **Ámbitos separados.** *Cloud Admin* abre **Cloud Accounts**; *Cloud Operator* abre **Cloud Operations**; *Cloud View* abre **Cloud Health**. Admin hereda Operator, y Operator hereda View. Las tres páginas están en Management. - **Cuentas y credenciales.** Añadir, editar, verificar y eliminar cuentas. Las credenciales se cifran en la base de datos con un fichero de clave externo (AES-256-GCM), o se leen desde un fichero en el sondeador. En la interfaz solo pueden escribirse y se ocultan en los registros. - **El recopilador.** Se inicia en cada ejecución del sondeador, una instancia por sondeador, dentro de un presupuesto de tiempo. Adquiere una concesión temporal por cuenta, ejecuta el descubrimiento con su propio intervalo y solo lee métricas de las fuentes de datos activas que pertenecen al complemento. - **Salud.** Estado de recopilación, descubrimiento, recursos y vigencia por cuenta, junto con advertencias sobre claves de bóveda inutilizables, ficheros de credenciales inseguros e intervalos que el sondeador no puede cumplir. @@ -85,7 +85,7 @@ Estos pasos instalan el código del hito 2 para evaluarlo. Requieren Cacti 1.2.3 Sustituya `cacti` por el usuario que ejecuta el servidor web y el sondeador. El fichero contiene 32 bytes sin procesar o 64 caracteres hexadecimales. Haga una copia de seguridad junto con la base de datos; sin él tendrá que volver a introducir las credenciales almacenadas. 3. En Cacti, abra **Configuration > Plugins** e instale y active *Cloud*. 4. En **Configuration > Settings > Cloud**, configure *Vault Key File* si ha utilizado otra ruta. *Collector Time Budget* (240 segundos de forma predeterminada) debe ser menor que el intervalo del sondeador. -5. Conceda *Cloud Admin* o *Cloud View* a usuarios y grupos en **Configuration > Users**. La instalación concede ambos ámbitos al administrador. +5. Conceda *Cloud Admin*, *Cloud Operator* o *Cloud View* a usuarios y grupos en **Configuration > Users**. La instalación concede Cloud Admin y Cloud View al administrador; Cloud Admin incluye el acceso de Operator, así que el administrador no necesita una concesión aparte de Operator. 6. Añada cuentas en **Management > Cloud Accounts** y compruebe si hay advertencias en **Management > Cloud Health**. diff --git a/docs/i18n/hi-IN/README.md b/docs/i18n/hi-IN/README.md index bc0d0a6..0b86ed4 100644 --- a/docs/i18n/hi-IN/README.md +++ b/docs/i18n/hi-IN/README.md @@ -1,4 +1,4 @@ - + [English](../../../README.md) | [简体中文](../zh-CN/README.md) | [हिन्दी](README.md) | [Español (España)](../es-ES/README.md) | [Español (Latinoamérica)](../es-419/README.md) | [العربية](../ar-SA/README.md) @@ -62,7 +62,7 @@ Cacti डिवाइस अनुमतियाँ अब भी प्रत - **सुरक्षित स्थापना जाँच।** PHP 8.2 से नीचे या ext-openssl के बिना स्थापना और सक्षम करना संदेश के साथ अस्वीकार होता है, और बाकी Cacti काम करता रहता है। - **जीवनचक्र।** Cacti के Plugins पृष्ठ से इंस्टॉल, अपग्रेड और अनइंस्टॉल करें। अपग्रेड क्रमबद्ध हैं और रुकावट सहते हैं। *Keep Plugin Tables on Uninstall* को अचयनित न करने तक अनइंस्टॉल प्लगइन तालिकाएँ रखता है। -- **अलग अनुमति क्षेत्र।** *Cloud Admin* से **Cloud Accounts**, और *Cloud View* से **Cloud Health** खुलता है। दोनों पृष्ठ Management में हैं। +- **अलग अनुमति क्षेत्र।** *Cloud Admin* से **Cloud Accounts**, *Cloud Operator* से **Cloud Operations**, और *Cloud View* से **Cloud Health** खुलता है। Admin को Operator की, और Operator को View की पहुँच विरासत में मिलती है। तीनों पृष्ठ Management में हैं। - **खाते और क्रेडेंशियल।** खाते जोड़ें, संपादित करें, सत्यापित करें और हटाएँ। क्रेडेंशियल या तो बाहर रखी कुंजी फ़ाइल से डेटाबेस में एन्क्रिप्ट होता है (AES-256-GCM), या पोलर की फ़ाइल से पढ़ा जाता है। UI में क्रेडेंशियल केवल लिखे जा सकते हैं और लॉग में छिपाए जाते हैं। - **संग्राहक।** यह हर पोलर निष्पादन पर, प्रति पोलर एक इंस्टेंस के रूप में और समय बजट में शुरू होता है। यह प्रति खाते लीज़ लेता है, अपने अंतराल पर खोज चलाता है और केवल प्लगइन के अपने सक्रिय डेटा स्रोतों के मेट्रिक पढ़ता है। - **स्वास्थ्य।** प्रति-खाता संग्रह, खोज, संसाधन और ताज़गी की स्थिति, साथ में अनुपयोगी वॉल्ट कुंजी, असुरक्षित क्रेडेंशियल फ़ाइल और पोलर के पूरा न कर सकने वाले अंतराल की चेतावनियाँ। @@ -85,7 +85,7 @@ Cacti डिवाइस अनुमतियाँ अब भी प्रत `cacti` को वेब सर्वर और पोलर चलाने वाले उपयोगकर्ता से बदलें। फ़ाइल में 32 मूल बाइट या 64 हेक्साडेसिमल वर्ण होते हैं। डेटाबेस के साथ बैकअप लें; इसके बिना संग्रहीत क्रेडेंशियल दोबारा दर्ज करने होंगे। 3. Cacti में **Configuration > Plugins** खोलें, फिर *Cloud* इंस्टॉल और सक्षम करें। 4. **Configuration > Settings > Cloud** में, अलग पथ उपयोग किया हो तो *Vault Key File* सेट करें। *Collector Time Budget* (डिफ़ॉल्ट 240 सेकंड) पोलर अंतराल से कम होना चाहिए। -5. **Configuration > Users** में उपयोगकर्ताओं और समूहों को *Cloud Admin* या *Cloud View* दें। इंस्टॉल करने पर प्रशासक को दोनों क्षेत्र मिलते हैं। +5. **Configuration > Users** में उपयोगकर्ताओं और समूहों को *Cloud Admin*, *Cloud Operator* या *Cloud View* दें। इंस्टॉल करने पर प्रशासक को Cloud Admin और Cloud View मिलते हैं; Cloud Admin में Operator पहुँच शामिल है, इसलिए प्रशासक को अलग से Operator देने की ज़रूरत नहीं है। 6. **Management > Cloud Accounts** में खाते जोड़ें, फिर **Management > Cloud Health** पर चेतावनियाँ जाँचें। diff --git a/docs/i18n/zh-CN/README.md b/docs/i18n/zh-CN/README.md index 1d14272..32ec371 100644 --- a/docs/i18n/zh-CN/README.md +++ b/docs/i18n/zh-CN/README.md @@ -1,4 +1,4 @@ - + [English](../../../README.md) | [简体中文](README.md) | [हिन्दी](../hi-IN/README.md) | [Español (España)](../es-ES/README.md) | [Español (Latinoamérica)](../es-419/README.md) | [العربية](../ar-SA/README.md) @@ -62,7 +62,7 @@ Cacti 设备权限仍限制各用户可用的行和操作;未映射对象需 - **带保护检查的安装。** PHP 低于 8.2 或缺少 ext-openssl 时,会拒绝安装和启用并给出提示,Cacti 的其他部分继续工作。 - **生命周期。** 通过 Cacti 插件页面安装、升级和卸载。升级按顺序执行,并可从中断中恢复。除非取消 *Keep Plugin Tables on Uninstall*,否则卸载会保留插件表。 -- **独立权限域。** *Cloud Admin* 打开 **Cloud Accounts**;*Cloud View* 打开 **Cloud Health**。两个页面均位于 Management 下。 +- **独立权限域。** *Cloud Admin* 打开 **Cloud Accounts**;*Cloud Operator* 打开 **Cloud Operations**;*Cloud View* 打开 **Cloud Health**。Admin 继承 Operator,Operator 继承 View。三个页面均位于 Management 下。 - **账户和凭据。** 添加、编辑、验证和删除账户。凭据使用保存在数据库外的密钥文件在数据库内加密(AES-256-GCM),或从轮询器上的文件读取。界面中凭据只能写入,日志中会对其进行遮蔽。 - **采集器。** 每次轮询器运行时启动,每个轮询器一个实例,并受时间预算约束。它为每个账户取得租约,以独立间隔执行发现,并仅读取插件自有的活动数据源对应的指标。 - **健康状态。** 显示每账户的采集、发现、资源和新鲜度状态,并对不可用的凭据库密钥、不安全的凭据文件,以及轮询器无法满足的间隔发出警告。 @@ -85,7 +85,7 @@ Cacti 设备权限仍限制各用户可用的行和操作;未映射对象需 将 `cacti` 替换为运行 Web 服务器和轮询器的用户。文件包含 32 个原始字节或 64 个十六进制字符。请将其与数据库一同备份;没有它,必须重新输入已存储的凭据。 3. 在 Cacti 中打开 **Configuration > Plugins**,然后安装并启用 *Cloud*。 4. 在 **Configuration > Settings > Cloud** 中,如果使用了其他路径,请设置 *Vault Key File*。*Collector Time Budget*(默认 240 秒)必须小于轮询器间隔。 -5. 在 **Configuration > Users** 中向用户和组授予 *Cloud Admin* 或 *Cloud View*。安装会向管理员授予这两个权限域。 +5. 在 **Configuration > Users** 中向用户和组授予 *Cloud Admin*、*Cloud Operator* 或 *Cloud View*。安装会向管理员授予 Cloud Admin 和 Cloud View;Cloud Admin 包含 Operator 访问权限,因此管理员无需单独授予 Operator。 6. 在 **Management > Cloud Accounts** 下添加账户,然后在 **Management > Cloud Health** 中检查警告。