Skip to content

Align AAS implementation with what can be mapped to official DPP spec and implement the preview spec of the DPP (data model and interface)#276

Merged
barnstee merged 25 commits intomainfrom
erichb3
Mar 9, 2026
Merged

Align AAS implementation with what can be mapped to official DPP spec and implement the preview spec of the DPP (data model and interface)#276
barnstee merged 25 commits intomainfrom
erichb3

Conversation

@barnstee
Copy link
Copy Markdown
Member

@barnstee barnstee commented Mar 4, 2026

No description provided.

barnstee and others added 18 commits December 15, 2025 12:14
…on in the stack we observed, further small bug fixes and namespace cleanup.
* Fix website formatting

* Add support for writing UA data variables, support for reading complex types and removal of more dead code.

* More code cleanup, UI cleanup and implement write data node from the UI.

* Node values hardening and add owner to UI display.

* Add save updated nodeset values functionality.

* Improve OPC UA logging.

* Add session cache to reduce the number of UA servers we're starting and help with persistency.

* Checking for correct user ID during DB operations. Also protecting admin entries as well as entries for everyone.

* Re-arrange landing page to make the most often used items appear first.

* Bug fixes.

* whitespace fix

* Update features description text.

* Fix typo.

* Implemented copy of nodeset and bug fixes. A few UI improvements, too.

* Add correct Razor components.

* Bug fix.

* Code cleanup.

* Fix unit test to properly test paging and also fix CloudLibSync.

* Fix memory leak.

* Update UACloudLibraryServer/UAClientServer/UAClient.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Bug fixes.

* Bug fix.

* Update NuGets only.

* Add retry mechanism for UA server init when Cloud Lib is not running in container and a port is already in use on the host machine.

* whitespace fix.

* whitespace fix.

* Dataplane Signaling API, initial checkin.

* Bug fix.

* GetAllAssetAdminShells

* Support for Google Login
Docker-Compose supporting Launch from Visual Studio

* Solution update

* Sloution fix

* fix whitespace

* Implements GetAllAssetAdministrationShells and GetAllSubmodels

* PR Comment Updates

* Several NullExceptionPointer fixes
reCAPTCHA by default disabled - enable requires reCAPTCHA ClientId and SecurityKey

* Paging fix
Some more APIs

* Final cleanup for AAS REST APIs

* Added comment about GetConceptDescription(s)ByID - needs review!

* Whitespace fixes

* Fixes in response to Pull Request comments

* Removed retired function

* whitespace fix

* csproj clean

* Fix for ValidateSession (CreateSession) lock #252

* Cleanup config

* Cloud Library configuration settings - documenting in README.md

* Enhance the robustness of UAClient.CreateSessionAsync. For StartServer, have max retry of 1000. Attempt to create a session, even when an invalid nodesetIdentifier is an input parameter.

* Add DisplayName and Description to NodesetViewerNode

* Code cleanup

* Concept Description FIx up - temporarily we use OPC/UA to access the data. We'll compare that to the database-only appraoch.

* Bug fix - GetNodesetOfTypeById - wasn't using the identifier passed to it.

* dotnet-format

* userid at wrong location in api call

* README.md types fixed

* Code cleanup (comments) and unused using

* Change variable name for consistency

* Code cleanup (comments)

* Code cleanup and use idShort everywhere that we are getting the value from the REST API.

* Code cleanup

* Moved two helper functions to the top of the source file.

* code cleanup

* Making sure "userId" is consistently used as the variable name.

* Make userId the first parameter to improve API consistency, readability, etc.

* GetAllAssetAdministrationShells: Add decoding of idShort

* Review comment removed.

* Removing review comments.

* Cleanup authorization policies.

* Cleanup TODOs in the code (delete completed ones, add new ones still outstanding) and implement exactly the AAS APIs used by Catena-X.

* Fix naming.

* Fix query for AAS submodel references and code cleanup.

* Implement basic AAS discovery, but persistence remains to be implemented.

* Cleanup usings, cleanup whitespace, Copilot CR feedback.

* Initial Documentation of Database

* Readmy typo fix and additions

* Added Docs folder and Database Setup Readme 1st draft

* Update approval code and make sure no-one accesses EF directly other than our data provider.

* simplified Linq statements in EF queries.

* NullPointer exception fix for CloudLibSync

* restore readme

* synced

* undo edit

* sln restore

* changed docs to Docs to make consistent

---------

Co-authored-by: barnstee <erichb@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Paul Yao <paul@paulyao.com>
Co-authored-by: Chris Muench <muenchris@c-labs.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the legacy AAS/AdminShell model + registry/discovery API surface that was backed by persisted reference tables, and introduces a preview Digital Product Passport (DPP) data model and lifecycle API that browses DPP content from the OPC UA address space.

Changes:

  • Added DPP domain model, API response wrappers, a browsing service, and lifecycle controller endpoints.
  • Removed large portions of the legacy AdminShell/AAS models and the associated registry/discovery/description controllers.
  • Cleaned up EF Core persistence by dropping now-unused AAS-related tables and updating migrations/snapshots.

Reviewed changes

Copilot reviewed 89 out of 90 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
UACloudLibraryServer/Views/Browser/Index.cshtml Updates view imports to the new models namespace.
UACloudLibraryServer/Startup.cs Registers DPPService in DI (and keeps AAS env service registration).
UACloudLibraryServer/Models/ValueObject.cs Removes legacy AAS IEC61360 helper type.
UACloudLibraryServer/Models/ValueList.cs Removes legacy AAS IEC61360 helper type.
UACloudLibraryServer/Models/UnitId.cs Removes legacy AAS IEC61360 helper type.
UACloudLibraryServer/Models/SubmodelElementStruct.cs Removes legacy SME type not mapped in the new approach.
UACloudLibraryServer/Models/SubmodelElementList.cs Narrows supported SME list item types and drops extra fields/constructors.
UACloudLibraryServer/Models/SubmodelElementCollection.cs Narrows supported SME collection item types and drops extra fields/constructors.
UACloudLibraryServer/Models/SubmodelElement.cs Simplifies SME base type (semanticId only) but keeps polymorphism annotation.
UACloudLibraryServer/Models/SubmodelDescriptor.cs Removes legacy registry descriptor model.
UACloudLibraryServer/Models/Submodel.cs Simplifies submodel representation to semanticId + elements.
UACloudLibraryServer/Models/SpecificAssetId.cs Removes persisted specific-asset-id entities used by discovery APIs.
UACloudLibraryServer/Models/ServiceMessageEnvelope.cs Removes unused service envelope type.
UACloudLibraryServer/Models/ServiceDescription.cs Removes legacy service description model.
UACloudLibraryServer/Models/SemanticId.cs Removes legacy SemanticId wrapper type.
UACloudLibraryServer/Models/Result.cs Simplifies Result.Messages payload to List<string>.
UACloudLibraryServer/Models/Resource.cs Removes legacy AAS resource model.
UACloudLibraryServer/Models/RelationshipElement.cs Removes legacy AAS SME type.
UACloudLibraryServer/Models/ReferenceElement.cs Removes legacy AAS SME type.
UACloudLibraryServer/Models/Reference.cs Removes legacy reference/key model (and associated DB persistence).
UACloudLibraryServer/Models/Referable.cs Removes legacy referable base type.
UACloudLibraryServer/Models/Range.cs Removes legacy AAS SME type.
UACloudLibraryServer/Models/Qualifier.cs Removes legacy qualifier model.
UACloudLibraryServer/Models/ProtocolInformationSecurityAttributes.cs Removes legacy endpoint protocol security attributes model.
UACloudLibraryServer/Models/ProtocolInformation.cs Removes legacy endpoint protocol model.
UACloudLibraryServer/Models/PathResolver.cs Adds JSON-node dot-path get/set helper for DPP payload manipulation.
UACloudLibraryServer/Models/PaginationParameters.cs Removes legacy paging helper (used by removed AAS controllers).
UACloudLibraryServer/Models/PagedResultMetadata.cs Removes legacy paging metadata model.
UACloudLibraryServer/Models/PagedResult.cs Removes legacy paging result wrapper.
UACloudLibraryServer/Models/OperationVariable.cs Removes legacy AAS operation variable model.
UACloudLibraryServer/Models/Operation.cs Removes legacy AAS operation SME type.
UACloudLibraryServer/Models/ObjectAttributes.cs Removes legacy object attributes model.
UACloudLibraryServer/Models/MultiLanguageProperty.cs Refactors to inherit from SubmodelElement and removes legacy fields/constructors.
UACloudLibraryServer/Models/ModelingKind.cs Removes legacy modeling-kind enum.
UACloudLibraryServer/Models/ModelTypes.cs Removes legacy model-type enum used for AAS polymorphism.
UACloudLibraryServer/Models/ModelReferenceElement.cs Removes legacy AAS reference element specialization.
UACloudLibraryServer/Models/ModelReference.cs Removes legacy model reference type.
UACloudLibraryServer/Models/MetaModelNameAttribute.cs Removes legacy metamodel naming attribute.
UACloudLibraryServer/Models/MessageType.cs Removes legacy message type enum (paired with removed Message).
UACloudLibraryServer/Models/Message.cs Removes legacy message structure.
UACloudLibraryServer/Models/MatchMode.cs Removes legacy reference matching mode enum.
UACloudLibraryServer/Models/LevelType.cs Removes legacy IEC61360 level type enum.
UACloudLibraryServer/Models/LangStringIEC61360.cs Removes legacy IEC61360 localized-string wrapper.
UACloudLibraryServer/Models/LangString.cs Simplifies LangString (drops metamodel attrs and copy ctor).
UACloudLibraryServer/Models/Kind.cs Removes legacy Kind model.
UACloudLibraryServer/Models/KeyElements.cs Removes legacy key-elements enum.
UACloudLibraryServer/Models/Key.cs Removes legacy key model (and DB persistence).
UACloudLibraryServer/Models/IdentifierKeyValuePair.cs Removes legacy identifier key/value pair type.
UACloudLibraryServer/Models/Identifier.cs Removes legacy identifier wrapper type.
UACloudLibraryServer/Models/Identifiable.cs Removes legacy identifiable base type.
UACloudLibraryServer/Models/HasSemantics.cs Removes legacy semantics base type.
UACloudLibraryServer/Models/HasExtensions.cs Removes legacy extensions base type.
UACloudLibraryServer/Models/HasDataSpecification.cs Removes legacy data specification helper type.
UACloudLibraryServer/Models/GlobalReferenceElement.cs Simplifies to string GRValue and inherits directly from SubmodelElement.
UACloudLibraryServer/Models/GlobalReference.cs Removes legacy global reference type.
UACloudLibraryServer/Models/File.cs Removes legacy AAS file SME type.
UACloudLibraryServer/Models/Extension.cs Removes legacy extension model.
UACloudLibraryServer/Models/Entity.cs Removes legacy AAS entity SME type.
UACloudLibraryServer/Models/Endpoint.cs Removes legacy endpoint model.
UACloudLibraryServer/Models/EmbeddedDataSpecification.cs Removes legacy embedded data specification model.
UACloudLibraryServer/Models/DppModel.cs Adds preview DPP data model with polymorphic DPP elements.
UACloudLibraryServer/Models/DppApiResponse.cs Adds DPP API response/result/message records and status-code constants.
UACloudLibraryServer/Models/Descriptor.cs Removes legacy registry descriptor base type.
UACloudLibraryServer/Models/DataSpecificationIEC61360.cs Removes legacy IEC61360 specification content model.
UACloudLibraryServer/Models/DataSpecificationContent.cs Removes legacy data spec content wrapper.
UACloudLibraryServer/Models/DataElement.cs Removes legacy AAS DataElement base type.
UACloudLibraryServer/Models/ConceptDescription.cs Removes legacy AAS concept description model.
UACloudLibraryServer/Models/Capability.cs Removes legacy AAS capability SME type.
UACloudLibraryServer/Models/BrowserModel.cs Moves browser view-model into Opc.Ua.Cloud.Library.Models namespace.
UACloudLibraryServer/Models/Blob.cs Removes legacy AAS blob SME type.
UACloudLibraryServer/Models/BasicEvent.cs Removes legacy AAS basic event SME type.
UACloudLibraryServer/Models/AssetKind.cs Removes legacy asset-kind enum.
UACloudLibraryServer/Models/AssetInformation.cs Removes legacy asset information model.
UACloudLibraryServer/Models/AssetAdministrationShellEnvironment.cs Removes legacy AAS environment root model.
UACloudLibraryServer/Models/AssetAdministrationShellDescriptor.cs Removes legacy AAS descriptor model.
UACloudLibraryServer/Models/AssetAdministrationShell.cs Removes legacy AAS model.
UACloudLibraryServer/Models/AnnotatedRelationshipElement.cs Removes legacy annotated relationship SME type.
UACloudLibraryServer/Models/AdministrativeInformation.cs Removes legacy administrative info model.
UACloudLibraryServer/Models/AASProperty.cs Refactors to inherit from SubmodelElement and removes legacy fields/constructors.
UACloudLibraryServer/Migrations/ApplicationDbContextModelSnapshot.cs Updates snapshot (EF version + removes AAS-persistence entities).
UACloudLibraryServer/Migrations/20260202092409_AASCleanup.cs Adds migration to drop AAS persistence tables.
UACloudLibraryServer/Migrations/20260202092409_AASCleanup.Designer.cs Adds migration designer output for the cleanup migration.
UACloudLibraryServer/DPPService.cs Adds service to browse/build DPP objects and resolve elements by path.
UACloudLibraryServer/Controllers/DescriptionApiController.cs Removes legacy /api/v3.0/description endpoint/controller.
UACloudLibraryServer/Controllers/DPPLifecycleApiController.cs Adds DPP lifecycle endpoints for reading DPPs and elements.
UACloudLibraryServer/Controllers/AssetAdministrationShellRegistryApiController.cs Removes legacy AAS registry controller.
UACloudLibraryServer/Controllers/AssetAdministrationShellBasicDiscoveryApiController.cs Removes legacy AAS discovery controller.
UACloudLibraryServer/CloudLibDataProvider.cs Removes persistence helpers for specific asset IDs.
UACloudLibraryServer/AssetAdministrationShellEnvironmentService.cs Removes DB-backed descriptor APIs and simplifies submodel browsing output.
UACloudLibraryServer/AppDbContext.cs Removes PersistedSpecificAssetIds DbSet and entity configuration.
Files not reviewed (1)
  • UACloudLibraryServer/Migrations/20260202092409_AASCleanup.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

barnstee added 4 commits March 4, 2026 14:30
…tency and to enable the built-in Json polymorphism in .Net10. Newtonsoft is just used for Captcha and nodeset values serialization now.
@muenchris
Copy link
Copy Markdown
Collaborator

muenchris commented Mar 9, 2026

Exception in CloudLibSync for CSPPlusForMachine....is this expected?
The error is caught and the sync continues

Error uploading http://opcfoundation.org/UA/CSPPlusForMachine/, 3596794538: InternalServerError System.ArgumentException: IdentifierMissing
at Opc.Ua.NodeId.Parse(String text)
at Opc.Ua.Export.UANodeSet.Import(ISystemContext context, UANode node)
at Opc.Ua.Export.UANodeSet.Import(ISystemContext context, NodeStateCollection nodes, Boolean linkParentChild)
at Opc.Ua.Cloud.Library.NodeSetIndex.NodeModelFactoryOpc.ImportNodeSet() in C:\github\OPCFoundation\UA-CloudLibrary\UACloudLibraryServer\NodeSetIndex\NodesetModelFactoryOpc.cs:line 87
at Opc.Ua.Cloud.Library.CloudLibDataProvider.IndexNodeSetModelAsync(UANodeSet nodeset, UANameSpace uaNamespace) in C:\github\OPCFoundation\UA-CloudLibrary\UACloudLibraryServer\CloudLibDataProvider.cs:line 522
at Opc.Ua.Cloud.Library.CloudLibDataProvider.UploadNamespaceAndNodesetAsync(String userId, UANameSpace uaNamespace, String values, Boolean overwrite) in C:\github\OPCFoundation\UA-CloudLibrary\UACloudLibraryServer\CloudLibDataProvider.cs:line 376
at Opc.Ua.Cloud.Library.Controllers.InfoModelController.UploadNamespaceAsync(UANameSpace uaNamespace, Boolean overwrite, String values) in C:\github\OPCFoundation\UA-CloudLibrary\UACloudLibraryServer\Controllers\InfoModelController.cs:line 261
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

@barnstee
Copy link
Copy Markdown
Member Author

barnstee commented Mar 9, 2026

Exception in CloudLibSync for CSPPlusForMachine....is this expected? The error is caught and the sync continues

Error uploading http://opcfoundation.org/UA/CSPPlusForMachine/, 3596794538: InternalServerError System.ArgumentException: IdentifierMissing at Opc.Ua.NodeId.Parse(String text) at Opc.Ua.Export.UANodeSet.Import(ISystemContext context, UANode node) at Opc.Ua.Export.UANodeSet.Import(ISystemContext context, NodeStateCollection nodes, Boolean linkParentChild) at Opc.Ua.Cloud.Library.NodeSetIndex.NodeModelFactoryOpc.ImportNodeSet() in C:\github\OPCFoundation\UA-CloudLibrary\UACloudLibraryServer\NodeSetIndex\NodesetModelFactoryOpc.cs:line 87 at Opc.Ua.Cloud.Library.CloudLibDataProvider.IndexNodeSetModelAsync(UANodeSet nodeset, UANameSpace uaNamespace) in C:\github\OPCFoundation\UA-CloudLibrary\UACloudLibraryServer\CloudLibDataProvider.cs:line 522 at Opc.Ua.Cloud.Library.CloudLibDataProvider.UploadNamespaceAndNodesetAsync(String userId, UANameSpace uaNamespace, String values, Boolean overwrite) in C:\github\OPCFoundation\UA-CloudLibrary\UACloudLibraryServer\CloudLibDataProvider.cs:line 376 at Opc.Ua.Cloud.Library.Controllers.InfoModelController.UploadNamespaceAsync(UANameSpace uaNamespace, Boolean overwrite, String values) in C:\github\OPCFoundation\UA-CloudLibrary\UACloudLibraryServer\Controllers\InfoModelController.cs:line 261 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

This is a problem with that particular nodeset.

@barnstee barnstee merged commit 9442552 into main Mar 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants