feat(historian): OPC UA HistoryUpdate in the node manager + HistoryUpdate authorization (T6)
- OtOpcUaNodeManager overrides HistoryUpdateData / HistoryDeleteRawModified / HistoryDeleteAtTime, block-bridging to the optional IHistorianDataUpdater under the shared HistoryRead batch limiter + deadline. Insert/Replace/Update map to HistoryUpdateMode; Remove, IsDeleteModified, events and structure data are BadHistoryOperationUnsupported. Per-item codes stitched back in request order (MinValue SourceTimestamp => BadInvalidTimestamp, untypeable value => BadTypeMismatch); success clears the base's pre-seeded Unsupported error. - HistoryWrite AccessLevel bit OR-ed in for historized nodes when an updater is wired (raw + UNS); it is dispatch-load-bearing in the SDK base. OtOpcUaSdkServer.SetHistorianDataUpdater; the hosted service assigns it from an optional HistorianUpdaterHolder before SetSink, clears it on stop. - AuthorizeHistoryUpdate: ACL on => scoped OpcUaOperation.HistoryUpdate decision (replaces the role check); ACL off => #563 key re-check + new OpcUaDataPlaneRoles.HistoryUpdate role, conferred by ApiKeyInterimRoleMapper only from a Cluster-scoped HistoryUpdate grant (WriteOperate does not). - AdminUI ACL editor offers NodePermissions.HistoryUpdate. Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using ZB.MOM.WW.OtOpcUa.Core.Abstractions;
|
||||
|
||||
namespace ZB.MOM.WW.OtOpcUa.Runtime.Historian;
|
||||
|
||||
/// <summary>
|
||||
/// DI carrier for the optional <see cref="IHistorianDataUpdater"/> the selected historian backend supplies.
|
||||
/// A holder (rather than a nullable registration) lets "this backend cannot modify history" be registered
|
||||
/// explicitly as <see cref="None"/>, so consumers resolve one type and branch on <see cref="Updater"/>.
|
||||
/// </summary>
|
||||
/// <param name="Updater">The backend's updater, or <c>null</c> when HistoryUpdate is unsupported.</param>
|
||||
public sealed record HistorianUpdaterHolder(IHistorianDataUpdater? Updater)
|
||||
{
|
||||
/// <summary>No updater: every HistoryUpdate is reported unsupported.</summary>
|
||||
public static readonly HistorianUpdaterHolder None = new((IHistorianDataUpdater?)null);
|
||||
}
|
||||
Reference in New Issue
Block a user