feat(secrets-ui): add metadata filtering and private reveal outcomes
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# SEC-05–06 reviewed source and browser evidence
|
||||
|
||||
Follows accepted SEC-01 `f07bd3c` and SEC-02–04 `510d15d` in the managed worktree. Parent independently reviewed the generation/auth/logger/filter/focus changes without blockers, then authorized the scoped commit after rendered verification. This is source acceptance; UI1.0.0 packaging/publication and older binary compatibility remain SEC-07.
|
||||
|
||||
## Implemented behavior
|
||||
|
||||
**SEC-05:** a visibly associated local name filter searches only already-loaded metadata names, case-insensitively with trimmed search terms. Clear restores the full metadata inventory and returns keyboard focus to the search input. Empty inventory and zero matches are distinct, with count/status and clear recovery. Filtering performs no value reads or list reloads. The table has a caption, column headers, exact-name row headers, labelled keyboard-scrollable region and contextual Reveal/Rotate/Delete button names. Name, description and UTC time are primary; content type, KEK, revision and updated-by remain available in native keyboard-operable details. Long technical metadata uses a bounded labelled scroll region with stacked terms. Exact names key rows, preventing a revealed value from being reused under another row when filtering. Delete focus fallback considers visible matching rows, then the stable inventory heading.
|
||||
|
||||
**SEC-06:** one stable ThemeButton changes Reveal/Hide presentation, preserves its ID, uses BusyText/aria-busy and prevents duplicates before authorization awaits. Rendered callbacks capture their target generation/mode so an obsolete Hide click cannot become another target’s Reveal. A persistent non-sensitive live status owns outcome announcements; detailed failure text is separately associated with the control. Plaintext appears only in the intentional bounded value region, in the Theme’s ink and mono type. It is absent from status, labels, URL, audit fields and focus interop. Values remain visible until Hide, row removal/filtering or navigation; no timer or auto-hide policy was added.
|
||||
|
||||
A reveal captures name/auth/logger and resolves the audit actor before store waits. Per-target cancellation and generations reject stale reads or audit completions. Hide, target changes and disposal clear rendered plaintext. A failed success audit still prevents disclosure, and existing failure logging retains actor/name without value. The narrow `secrets-reveal.js` adapter receives only a DOM root reference, restores the stable control only when body/root has unclaimed focus, and leaves a different focused control alone. Its imported handle is scoped/disposed, with no persistent listeners. Tests use strict exact-module stubs; authorization/audit assertions remain intact. The test fake’s optional before-read delay supports deterministic actual slow browser cases while retaining normal behavior when unset.
|
||||
|
||||
## State matrix
|
||||
|
||||
| State/transition | Observed result |
|
||||
|---|---|
|
||||
| Initial | Metadata only, Reveal control, empty stable outcome region |
|
||||
| Authorizing/read pending | Disabled action with Revealing text; one read/audit despite duplicate activation |
|
||||
| Authorized read + successful audit | Current-target plaintext only in labelled scroll region; generic Value revealed status |
|
||||
| Store/cipher failure | No plaintext, failure outcome and error, existing failure audit semantics |
|
||||
| Success-audit failure | Fail closed, no plaintext, error association and warning without the value |
|
||||
| Hide | Clear plaintext, stable control/ID, Value hidden outcome |
|
||||
| Target/row removed during read | Cancel and reject obsolete result, no disclosure under the next row |
|
||||
| Target changed during audit | Captured original audit target; no stale plaintext/current outcome |
|
||||
| Circuit provider disposed during read | No late service resolution, no plaintext/audit success after removal |
|
||||
| Focus moves elsewhere while pending | Completion leaves the claimed focus alone |
|
||||
| Filter excludes all | Zero-match explanation, Clear recovery; no false empty-store claim |
|
||||
|
||||
## Verification
|
||||
|
||||
- SEC-05 regressions against old source: **6 failed** (`SEC05-red.*`). One initial fixture lacked authorization registration; corrected before retaining the final meaningful six-case red probe. Whole UI then **75 passed** (`SEC05-after.*`).
|
||||
- SEC-06 six added regressions against old source: **6 failed** (`SEC06-red.*`). They cover non-sensitive outcome/Hide identity, target reset, out-of-order read, duplicate authorization, deferred audit and disposed scope.
|
||||
- Final clean → forced mapped official restore → whole Release suite: **81 passed, 0 failed, 0 skipped** (`SEC05-06-clean.log`, `SEC05-06-official-restore.log`, `SEC05-06-after.*`). All69 baseline identities/outcomes remain;12 regressions added (`SEC05-06-test-identities.json`). Both synthetic hosts build with zero warnings/errors. Actual graph/audit JSON retained; no audit/skip suppression or framework upgrade.
|
||||
- Exact shared dependency is published **Theme1.0.1**, nupkg SHA256 `995b117b0245577598c91404ed7957c071ebe3413696c8be48b419c9deb1bd5d`. Task-local package directory `/tmp/scada-secrets-theme101-official-packages`, official source metadata and hash are recorded in `SEC05-06-official-package.json`. `official-NuGet.Config` maps private IDs to official Gitea and public IDs to NuGet; the initial two-unmapped-source NU1507 failure is retained separately and corrected without suppression.
|
||||
- **93/93** final browser checks, **zero page errors**, Chromium **145.0.7632.6** (`SEC05-06-confirmation/results.json`). Six viewport captures plus two intentional synthetic payload captures were inspected. All selected body/control/status/value text pairs exceed4.5:1; measured minimum **5.144:1**, maximum **16.877:1**. These are measured selectors, not a claim about every external host stylesheet.
|
||||
- Both real integration modes: exact linked OtOpcUa per-page wrapper with its actual vendored Bootstrap at **http://127.0.0.1:57520**, and global-interactive composition with ScadaBridge’s actual Bootstrap at **http://127.0.0.1:57522**. UI is still source assembly0.6.6.0; no UI1.0.0 package claim. Official CSS/fonts and current source module bytes match exactly at both origins (`SEC05-06-served-assets.json`, seven assets/host).
|
||||
- Matrix covers1440px,390px and actual **200% native Chromium zoom** via the shared disposable extension helper (`chrome.tabs.setZoom`): effective CSS width720/DPR2, no CSS zoom or page-scale substitute. Zoom uses viewport capture at document top to avoid scrolled/full-page raster cropping; bounded long-value geometry is measured and separately captured at100%. Document width stays bounded; table, technical metadata and800-character synthetic value panes scroll locally.
|
||||
- Actual keyboard/behavior cases: local case-insensitive filtering without reads; no-match/Clear focus; long404-character name and long KEK/actor; native details; contextual actions; slow reveal busy/disabled; focus claimed elsewhere; stable Reveal/Hide; failed audit withheld; filtering out a pending row; only current-row audit; metadata scrolling; role boundaries/HTTP403; reduced-motion preference and self-hosted font loading.
|
||||
|
||||
## First inspection corrections retained
|
||||
|
||||
`SEC05-06-first` is explicitly **not accepted**. It detected a superseded unpublished1.0.1 candidate in the global NuGet cache despite a matching assembly version. Cached SHA `0c3bc699465c935525a77a01ff05f8c4f332a1b3363f5918af61add339babdab` differed from the official package; its old unscoped header CSS failed six row-header checks. Parent confirmed/remediated that known cache. The preceding accepted Theme1.0.0 cache matched its published SHA, so earlier proof was unaffected. Confirmation uses only the isolated official cache and central1.0.1 row-header rule; there is no local shared header/grid copy.
|
||||
|
||||
Two initial keyboard-scroll measurements sampled immediately at a scroll boundary/before native progress. Confirmation sets a known left origin, sends actual ArrowRight and waits for real scroll movement. Revealed data now explicitly uses shared ink rather than Bootstrap’s code-color default, with measured contrast. All first/confirmation artifacts remain; no further broad polish loop was run.
|
||||
|
||||
## Limits and next gate
|
||||
|
||||
Only synthetic loopback fixtures were exercised; no keys, LDAP, SQL, fleet services, deployments or production secrets were accessed. The earlier no-Bootstrap diagnostic remains in SEC-03 evidence; final styling uses each actual host’s vendored CSS. These fixtures validate exact wrapper/interactive/assets contracts, not every production host route or authentication deployment. SEC-07 must still prove Ui1.0.0 + Abstractions0.6.6 clean-source packages, exact nuspec floors/asset bytes, published Core0.6.2/0.6.3 and replicator compatibility, isolated restore, version collision checks and release review before publication. Core/backend source/global version is unchanged.
|
||||
Reference in New Issue
Block a user