diff --git a/ZB.MOM.WW.Secrets/README.md b/ZB.MOM.WW.Secrets/README.md index dd13293..9d9ec5d 100644 --- a/ZB.MOM.WW.Secrets/README.md +++ b/ZB.MOM.WW.Secrets/README.md @@ -146,6 +146,38 @@ SQL-Server store; once per node for per-node SQLite on a shared KEK). See the op **metadata only**; revealing a value requires the `secrets:reveal` authorization policy and is audited. Add/rotate/delete require `secrets:manage`. +### UI 1.0.0 integration + +The UI release is independent of the Core/store/replicator versions. Its reviewed dependency set is +`ZB.MOM.WW.Secrets.Ui` 1.0.0, `ZB.MOM.WW.Secrets.Abstractions` 0.6.6 and `ZB.MOM.WW.Theme` 1.0.1. +Keep an older host’s Core/backend versions separate; update an explicit Abstractions pin together +with the UI to avoid a dependency downgrade. The global source version stays 0.6.6; this UI release +does not publish Core/backend 0.6.6 set. + +Load Bootstrap before ``, and serve Razor class library static assets. The UI supplies +its own namespaced confirmation styling and imports its dialog/reveal DOM adapters from +`_content/ZB.MOM.WW.Secrets.Ui/js/`. No host Bootstrap modal plugin or separate scoped-CSS bundle +is required for those adapters. Use a supported modern browser with native `dialog.showModal`. + +A globally interactive host can route the RCL page. A host with static routing must instead own +one `/admin/secrets` wrapper carrying `@rendermode InteractiveServer`, restate the manage policy, +and render `` as its child. Registering that wrapper and the RCL’s routable assembly +together creates a duplicate route; do not add a nested render mode to the RCL page. + +The name filter searches loaded metadata only. Values remain hidden until an authorized, +successfully audited Reveal; they stay visible until Hide, row removal/filtering, or navigation. +A failed reveal audit withholds the value. Add/Rotate drafts and pending callbacks belong to their +exact target. A committed mutation whose metadata refresh fails is reported as saved with Retry +refresh; retry never replays the credential change. Manage and reveal policies remain distinct. + +Abstractions 0.6.6 adds the default `IMasterKeyProvider.GetSnapshot()` contract and a caller-owned, +zeroed-on-disposal `MasterKeySnapshot`. Legacy providers still implement the original key/id +members; providers with rotating sources should implement an atomic snapshot. `SecretName` now +normalizes and limits names to 450 characters. Check legacy names longer than 450, including +tombstones, before adoption; this UI work includes no schema or data migration. Exact binary +compatibility results, package provenance and host acceptance are recorded in +[UI consistency validation](docs/ui-consistency-validation.md). + ## Clustered deployments Storage is local SQLite by default, which is correct for a single-process app and wrong the diff --git a/ZB.MOM.WW.Secrets/docs/ui-consistency-validation.md b/ZB.MOM.WW.Secrets/docs/ui-consistency-validation.md new file mode 100644 index 0000000..137322f --- /dev/null +++ b/ZB.MOM.WW.Secrets/docs/ui-consistency-validation.md @@ -0,0 +1,68 @@ +# Secrets UI consistency validation + +## Release preparation + +UI-only project version 1.0.0; required Abstractions 0.6.6; exact shared Theme 1.0.1. Shared +`Directory.Build.props` and Core/backend source versions remain 0.6.6 without a backend release. +The package pair is not published until its clean-source artifact/dependency review is accepted. + +## Source acceptance + +- Target/draft/pending operation isolation: `f07bd3c`,34 baseline → 50 UI tests. +- Field labels/error associations, accessible confirmation lifecycle and committed/read recovery: + `510d15d`, 69 tests and actual keyboard/focus proofs in per-page/global host modes. +- Name-only metadata filtering, native secondary details, contextual actions, keyed rows and + generation-bound audited reveal: `46556db`, 81 tests; 93 final rendered checks across both actual + integration modes, 1440/390px/native200% browser zoom; zero page errors. +- The exact Theme 1.0.1 nupkg hash is + `995b117b0245577598c91404ed7957c071ebe3413696c8be48b419c9deb1bd5d`. + Selected UI text contrasts measured 5.144:1–16.877:1. CSS/fonts and source DOM module bytes were + checked in both hosts. Runtime evidence is under + `components/ui-theme/validation/secrets-ui` from the monorepo root; see its SEC01, + SEC02-04 and SEC05-06 reports and retained TRX/browser artifacts. + +## Preserved security and state contracts + +Metadata listing/filtering never reads values. Each public handler checks its own policy. +Reveal requires a successful audit before plaintext enters current rendered state; status, +labels, URLs, interop arguments and audit payloads exclude values. Hide, row removal, navigation, +target changes and disposal clear disclosure. There is no timer-based auto-hide policy. +Mutation audit failure after commit does not turn a successful write into failure or skip captured +cache eviction. Retry after list failure reads only; it never repeats a committed credential change. + +## Dependency compatibility gate + +Before publication, exercise actual published Core 0.6.2/0.6.3 and matching supported SQL-Server/Akka +replicator binaries with Abstractions 0.6.6, rather than recompiling the old implementation from +current source. Include an old-compiled key provider to prove the added default interface method, +real envelope encryption/rewrap/tamper checks, disposable SQLite persistence/tombstones and offline +replication contract/message paths. Record exact graphs/audits and all actual package hashes. +Live SQL/cluster deployment is outside this local binary smoke proof. + +The new 450-character normalized name limit is a behavior boundary, not a schema migration. +Compatibility proof is bounded to valid names. Existing longer names/tombstones require a host +inventory decision before adopting Abstractions 0.6.6. The default snapshot implementation copies +the legacy key/id API; a rotating provider must supply an atomic snapshot if it needs that guarantee. + +## Artifact and host gate + +Freeze a clean committed library source revision and pass it explicitly as both SourceRevisionId +and RepositoryCommit when packing. Pack exactly UI 1.0.0 and Abstractions 0.6.6; inspect their nuspec +IDs/versions/floors and hash them. Keep unpublished candidates out of shared NuGet caches; isolated +restores must verify package bytes/source rather than assembly version alone. A stale unpublished +Theme 1.0.1 candidate was caught during source validation and replaced by exact official bytes. + +Use isolated local candidate feeds plus mapped official feeds for a fresh restore, then run both +packaged synthetic hosts: the exact OtOpcUa per-page wrapper with its Bootstrap and the global +interactive host with ScadaBridge Bootstrap. Verify one route, live controls, DOM assets, role +boundaries, fail-closed reveal, committed outcomes and keyboard/focus behavior. Check version +collisions again immediately before any exact package publication. Publication requires final +artifact/dependency review; there is no wildcard push step. + +## Rollout and rollback + +Hosts adopt UI 1.0.0, Abstractions 0.6.6 and Theme 1.0.1 together through reviewed pins; keep their +current Core/store/replicator version unless separately upgrading it. Preserve the previous host +and immutable package artifacts. Roll back UI/assets together without replaying mutations, +removing tombstones or changing keys/storage formats. Preserve target isolation when feasible. +No application deployment or production-secret operation is part of this validation. diff --git a/ZB.MOM.WW.Secrets/src/ZB.MOM.WW.Secrets.Ui/ZB.MOM.WW.Secrets.Ui.csproj b/ZB.MOM.WW.Secrets/src/ZB.MOM.WW.Secrets.Ui/ZB.MOM.WW.Secrets.Ui.csproj index ea1de1d..8d51d3d 100644 --- a/ZB.MOM.WW.Secrets/src/ZB.MOM.WW.Secrets.Ui/ZB.MOM.WW.Secrets.Ui.csproj +++ b/ZB.MOM.WW.Secrets/src/ZB.MOM.WW.Secrets.Ui/ZB.MOM.WW.Secrets.Ui.csproj @@ -2,6 +2,8 @@ ZB.MOM.WW.Secrets.Ui + + 1.0.0 true