Skip to content

fix: renew root from CA health, policy on the extension save path, per-application lease policy (lane L) - #913

Merged
rubenvdlinde merged 7 commits into
developmentfrom
fix/issue-leftovers
Oct 2, 2026
Merged

rubenvdlinde merged 7 commits into
developmentfrom
fix/issue-leftovers

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Leftovers of three partly fixed issues, plus one copy bug from a live check.

Fixes #741
Fixes #746 (the points that are not a policy call; points 1 and 2 wait for a decision, see below)
Refs #753 (point 3; point 1 is done in #888, point 2 waits for a decision)

#741: renew the root from the CA health section

The POST /api/v1/ca/renew-root endpoint had no caller. The CA health section in the admin settings now has a "Renew root" button. It opens a confirmation dialog (src/dialogs/CaRenewRootConfirmDialog.vue); only the confirm posts. The result line names how many suites were signed again.

  • tests/components/CaHealthSection.spec.js: the button exists, the first click only opens the dialog and posts nothing, confirm posts to renew-root, cancel posts nothing. Red before (no button), green after.
  • CACertificateControllerTest::testCaWritesRefuseARegularUser: renewRoot, renewIntermediate and retryBootstrap each declare #[AuthorizedAdminSetting(AdminSettings::class)] and no #[NoAdminRequired], which is what makes the middleware refuse a regular user. The endpoint was already admin-only, so this test pins existing behaviour; it is not red before.

#746: the browser extension applies the org password policy

A login saved or updated from the extension skipped the strength floor and the breach block. The rules now live in src/policy/rules.js and src/health/hibpMatch.js, with no Nextcloud page imports, and the extension bundles that same code (as it already does for crypto and TOTP). The web app's policy.js and hibp.js call the same functions, so the two clients cannot drift.

  • The worker reads GET /api/settings/policy, the endpoint the web app uses, and refuses before anything is encrypted, on both save and update.
  • After a form submit, the in-page bar explains the refusal and shows only a close button, instead of offering a save.
  • An unreadable policy or an unavailable breach service never blocks, as in the web app.
  • The breach lookup uses the new POST /api/v1/breach-check/range with the prefix in the body (fix(privacy): SIEM failures never log the sink URL, breach-check prefix leaves the URL (lane B, 3 of 3) #911, merged in here).
  • tests/extension/savePolicy.spec.js drives the worker's real message router with the vault and HTTP client faked. 4 of its tests are red on the old worker, all 10 green now.

Extension strings are English, like the rest of the extension, which has no translation layer.

Left open: point 1 (which expiry wins) and point 2 (what "Enforce expiry policy" does) are policy calls, already on the decision list in POLICY.md.

#753 point 3: lease policy per application

  • New GET /api/v1/applications/{id}/lease-policy answers the policy in force, the stored override and the instance values, plus canEdit. Admin or the application's registrant only; anyone else gets the same 404 as a missing application, anonymous gets 401.
  • ApplicationLeasePolicyForm.vue sits in the leases panel. An admin saves the override; an empty field inherits the instance value (sent as null). The registrant sees the policy read-only, because the existing PUT stays admin-only. Who may change it was not widened here.
  • Tests: LeaseAdminControllerTest (5 new getPolicy cases, including the 404 for another user and no service call), LeaseServiceTest (2), tests/components/ApplicationLeasePolicyForm.spec.js (5).
  • Not done: the form does not cap a per-application maximum at the instance maximum. The server does not enforce that either, and whether it should is a policy call.

Export dialog in CXF mode

Already fixed on development by #888: src/dialogs/ExportDialog.vue picks the CXF warning when the mode is CXF, tests/dialogs/ExportDialog.spec.js ("says CXF for a CXF export and CSV for a CSV export") passes, and all 37 catalogues carry the CXF string with CXF in it. The live sighting was most likely an older or cached bundle. No change here.

Translations

New strings are in all 37 catalogues, and the .js catalogues were rebuilt. npm run test:l10n passes.

Live check owed

  1. As admin, open the admin settings, CA health section. Press "Renew root", cancel, then press it again and confirm. Expect a new root expiry date and a "Root renewed" line with the suite count.
  2. Turn on the org policy with a minimum strength of 3. In the extension, log in to a site with the password password. Expect the bar to say Keepiq did not save the login, and no new secret in the vault.
  3. As admin, open an application's detail page. Set a maximum lease TTL of 1800 and save. Expect "In force now" to show 1800. Log in as the registrant: the policy shows read-only. Log in as another user: no policy section.

Checks

checks: pending, coordinator runs check.sh

Inherited findings: phpcs warnings for a missing class-level @spec tag on LeaseService and LeaseAdminController, and eslint no-undef on chrome across browser-extension/ (which npm run lint does not cover), were already there and are not touched.

🤖 Generated with Claude Code

…ation

The renew-root endpoint had no caller, so an admin warned about the
root's expiry could not act on it. The CA health section now has a
renew root button that opens a confirmation dialog; only the confirm
posts, and the result names how many suites were signed again.
A controller test pins the admin-only posture of every CA write.

Fixes #741
The extension saved and updated logins without the strength floor or the
breach block that the web app applies. The rules now live in
src/policy/rules.js and src/health/hibpMatch.js, free of Nextcloud page
imports, and the extension bundles the same code. The worker reads the
same policy endpoint, refuses before encrypting, and the in-page bar
explains the refusal instead of offering a save.

Refs #746
…l page

The per-application lease-policy override had a PUT and no screen. A new
GET /api/v1/applications/{id}/lease-policy answers the policy in force,
the stored override and the instance values, for an admin or the
application's registrant (404 for anyone else). The leases panel now
shows a form: an admin saves the override, an empty field inherits the
instance value, and the registrant sees it read-only.

Refs #753
…e now expects

Development moved the range route to POST with the prefix in the body
(keepiq#866). The extension's new lookup follows it, with a test that
the prefix never appears in the URL.

Refs #746
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/keepiq @ 6f5e249

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
test-l10n ✅
format ❌
check-l10n-js ✅
check-schema-l10n ✅
composer ✅ ✅ 114/114
npm ✅ ✅ 660/660
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌
Newman ✅
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-10-02 10:22 UTC

Download the full PDF report from the workflow artifacts.

…overs

# Conflicts:
#	l10n/be.js
#	l10n/be.json
#	l10n/bg.js
#	l10n/bg.json
#	l10n/bs.js
#	l10n/bs.json
#	l10n/ca.js
#	l10n/ca.json
#	l10n/cs.js
#	l10n/cs.json
#	l10n/da.js
#	l10n/da.json
#	l10n/de.js
#	l10n/de.json
#	l10n/el.js
#	l10n/el.json
#	l10n/en.js
#	l10n/en.json
#	l10n/es.js
#	l10n/es.json
#	l10n/et.js
#	l10n/et.json
#	l10n/fi.js
#	l10n/fi.json
#	l10n/fr.js
#	l10n/fr.json
#	l10n/ga.js
#	l10n/ga.json
#	l10n/hr.js
#	l10n/hr.json
#	l10n/hu.js
#	l10n/hu.json
#	l10n/is.js
#	l10n/is.json
#	l10n/it.js
#	l10n/it.json
#	l10n/lb.js
#	l10n/lb.json
#	l10n/lt.js
#	l10n/lt.json
#	l10n/lv.js
#	l10n/lv.json
#	l10n/mk.js
#	l10n/mk.json
#	l10n/mt.js
#	l10n/mt.json
#	l10n/nb.js
#	l10n/nb.json
#	l10n/nl.js
#	l10n/nl.json
#	l10n/pl.js
#	l10n/pl.json
#	l10n/pt.js
#	l10n/pt.json
#	l10n/rm.js
#	l10n/rm.json
#	l10n/ro.js
#	l10n/ro.json
#	l10n/ru.js
#	l10n/ru.json
#	l10n/sk.js
#	l10n/sk.json
#	l10n/sl.js
#	l10n/sl.json
#	l10n/sq.js
#	l10n/sq.json
#	l10n/sr.js
#	l10n/sr.json
#	l10n/sv.js
#	l10n/sv.json
#	l10n/tr.js
#	l10n/tr.json
#	l10n/uk.js
#	l10n/uk.json
@rubenvdlinde

Copy link
Copy Markdown
Contributor Author

Local checks on 24d4c24: composer check:strict 0, vitest 0, Hydra gates 0, npm lint, stylelint, test:l10n, check:l10n-js, check:schema-l10n and check:manifest 0; format was red on five new files and is fixed (prettier). After merging development (60eab09): PHPUnit 1560 tests OK, vitest 1129 of 1129, format, test:l10n and check:l10n-js 0.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/keepiq @ 36c7d4c

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
test-l10n ✅
format ✅
check-l10n-js ✅
check-schema-l10n ✅
composer ✅ ✅ 114/114
npm ✅ ✅ 660/660
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌
Newman ✅
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-10-02 10:37 UTC

Download the full PDF report from the workflow artifacts.

rubenvdlinde added a commit that referenced this pull request Oct 2, 2026
…accounts

Lane L (#913) landed as a squash, so its files conflicted with the copies
this branch carried: the lane L files take development's version, the
service worker and the save-policy test keep this branch's per-account
form, the l10n catalogues take development's and the new keys are applied
again, and the app version stays 0.3.4-unstable.20261002180000.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant