Files
scadaproj/impeccable/Secrets.md
T
2026-11-13 14:40:42 -05:00

9.4 KiB
Raw Blame History

ZB.MOM.WW.Secrets.Ui — shared secrets administration

Reviewed November 12, 2026. Mode: Operate. Mockup · Shared contract.

Scope

Deeply inspected all five UI components (SecretsList, SecretEditor, ConfirmDeleteModal, RevealButton, and the Secrets page) and their state/mutation paths. The component is embedded in sister hosts; it is not an independent shell. /admin/secrets is provided by the library and some hosts provide their own wrappers/routes. Source uses Theme 0.2.0 centrally (ZB.MOM.WW.Secrets/Directory.Packages.props:75); a consuming host can resolve a newer transitive version. Verify the actual restored package graph per host before concluding which theme assets execute.

Paths below are relative to ZB.MOM.WW.Secrets/src/ZB.MOM.WW.Secrets.Ui/. Review is source-based; no privileged reveal/delete was performed. The concept uses synthetic metadata and no real values.

Findings

SEC-01 · P1 · Editor fields are visually labeled but unnamed programmatically

Evidence: Components/SecretEditor.razor:13–43 uses TechField with inputs/select lacking id or independent accessible labels. Shared TechField.razor:4 has no for attribute.

Impact: keyboard/screen-reader users lack reliable names for name, description, content type and value.

Recommendation: implement DS-02 once in Theme and connect every editor field. Add required hints, name-format help and field-local errors using a stable ID contract. Keep the new-value password field masked; never prefill it with the stored current secret value.

Acceptance: label activation focuses each control; errors are named/associated; correct input is preserved after failure. Owner: Theme + Secrets UI. Suggested commands: harden, clarify.

SEC-02 · P1 · Delete dialog has no accessible name or modal focus lifecycle

Evidence: Components/ConfirmDeleteModal.razor:35–61 renders role="dialog" aria-modal="true", but does not associate its heading with the dialog. No initial focus, focus containment, Escape handler, inert background or return-focus mechanism exists in this component.

Impact: users can navigate behind the modal, lose the selected secret context, or struggle to cancel a destructive task.

Recommendation: use the common accessible confirmation recipe with a heading ID, initial Cancel focus, contained focus, safe dismissal, and return to the originating Delete button. Preserve namespaced styles: the file documents a real Bootstrap .modal collision; replacing its classes blindly would reintroduce invisibility.

Acceptance: open from a specific row, hear “Delete secret [name]?”, tab only inside the dialog, cancel/Escape safely, and return to that row. After deletion, place focus on the next logical row or heading. Owner: Secrets UI; shared behavior may later move to Theme. Suggested commands: harden.

SEC-03 · P2 · List loading failure has no local recovery state

Evidence: Components/SecretsList.razor:24–29 handles loading and loaded markup; :110–113 directly awaits Store.ListAsync without a component-local error/retry branch. Host boundaries may catch exceptions, so a whole-application failure is not asserted.

Impact: the shared component cannot itself show an actionable load error while keeping context; after a successful mutation a reload failure can obscure what committed.

Recommendation: distinguish initial loading, load failure, empty, filtered empty, saving, committed-but-refresh-failed and loaded. Add a local retry with status announcement; keep “change saved” separate from reload outcome.

Acceptance: simulated store failure does not render “No secrets” or imply a successful change was rolled back; retry reloads metadata without redisclosing values. Owner: Secrets UI. Suggested commands: harden, onboard.

SEC-04 · P2 · Wide metadata and repeated actions need stronger row context

Evidence: Components/SecretsList.razor:31–41 renders eight columns with a blank action header; :64–76 repeats Reveal/Rotate/Delete labels for each row. There is no search or progressive metadata detail.

Impact: locating a named secret and distinguishing row actions becomes harder as inventory grows; technical KEK/revision columns compete with the name and update time.

Recommendation: keep name, description and updated state prominent; put content type, KEK and revision in an expandable details area or responsive secondary columns. Add a visibly labeled name filter if scale warrants it. Give actions names such as “Rotate [secret name]”; preserve all authorization gates. Avoid changing to clickable rows with no keyboard alternative.

Acceptance: filter/clear and zero-match states work, long names remain readable, each repeated action has unambiguous context, and all metadata is still reachable at 390px. Owner: Secrets UI. Suggested commands: layout, adapt, clarify.

SEC-05 · P2 · Reveal state should have explicit focus and exposure feedback

Evidence: Components/RevealButton.razor:12–35 swaps a button for a value/error and Hide control; :145–149 clears state only on Hide. It has no live status/focus handling or exposure-duration policy.

Impact: users may miss failure/success after the initiating button is removed; sensitive values can remain onscreen unintentionally.

Recommendation: announce only “Value revealed” or the failure, never the plaintext; ensure Hide is easy to reach and focus returns predictably. Evaluate an explicit timed reveal policy with the owner, with a warning/extension if required for use. Auto-hide is a proposed product decision, not a claimed security defect. Do not put plaintext into an ARIA live region, tooltip, URL, screenshot fixture or audit payload.

Acceptance: failed audit still prevents reveal, Hide clears the visible value, keyboard focus remains logical, and no announcement includes plaintext. Owner: Secrets UI. Suggested commands: harden, clarify.

SEC-06 · P1 · Switching editor targets can carry a previous draft into another secret

Evidence: Components/SecretsList.razor:16–20 renders one SecretEditor without a target-specific @key; :115–124 changes Add/Rotate target while leaving that component in place. Components/SecretEditor.razor:89–105 sets the new name on every rotate parameter change, but loads metadata only once through _metadataLoaded. _value, _description, _contentType and restore-confirmation state are not reset when ExistingName changes. The submit at :154–161 encrypts the retained value and writes retained metadata under the new target name.

Impact: changing from Rotate A to Rotate B can show B's name with A's draft value, description and content type. A subsequent submit can apply a draft intended for another secret. This is a source-established state-retention path; it was not exercised against a real store.

Recommendation: key the editor by mode and secret identity, or implement an explicit target-change lifecycle that cancels superseded loads and resets the entire draft before loading the new target's metadata. Make draft discard deliberate and clear, and retain failed-save drafts only for the same target. Disable or sequence target switching while a mutation is pending; do not let late completions close a newer editor.

Acceptance: begin rotating A, enter a synthetic new value, switch to B, and confirm B has B's metadata and a blank value. Switch Rotate → Add and confirm a clean draft. Test A→B during a delayed metadata read and pending save; no stale result or value may attach to B. Owner: Secrets UI. Suggested commands: harden.

Preserve

  • Metadata-only listing and masked new values.
  • Separate manage and reveal policies, including handler-level authorization.
  • Reveal fails closed if its audit write fails.
  • Mutation success remains success if later audit logging fails; do not invite a retry of an already committed mutation.
  • Tombstone semantics and cache invalidation after mutation.
  • In-page editor rather than unnecessary create/rotate modal.

Rollout and validation

Fix SEC-01/02/06 in the shared library first; exercise it inside at least two actual hosts, including one Bootstrap host. Then SEC-03/04/05 with fake stores, synthetic metadata, no real credentials. Check manage-only, reveal-authorized, denied, store-failure, audit-failure, long names, empty inventory, failed refresh after commit, keyboard and narrow layouts. Finish with Impeccable audit and polish. Source inspection does not establish live screen-reader behavior or host-level contrast conformance.

Independent verification

A second source review checked all five UI components, policy gates, editor identity/state handling, mutation commit boundaries, reveal/audit ordering, and Theme field semantics. SEC-06 was added from that pass. The combined source detector emitted no findings in Secrets UI; its four warnings were Overview vendor CSS. No real secret was revealed, created, rotated or deleted.

Rendered proposal previews

These are proposed UI artifacts with illustrative data, not screenshots of the current application. All use the same shared stylesheet. See verification and limits.

Secrets

Interactive HTML · Desktop PNG · Mobile PNG

Proposed Secrets desktop UI