diff --git a/.gitignore b/.gitignore index a8f6cb9fd..945647994 100644 --- a/.gitignore +++ b/.gitignore @@ -61,4 +61,8 @@ target *.tgz .tgz -tgz \ No newline at end of file +tgz + +## Backup Files +*.bck +*.bak diff --git a/CHANGELOG.md b/CHANGELOG.md index 82018a3b3..9cc638b06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,28 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [released] +## [v1.4.0] - 14-12-2023 + +## Added +- Added script to automate the uploading of various passport types +- Added script to delete data from the data provider +- Added check for empty or null contractIds with retry attempts +- Added descriptive logs to search and create methods + +## Updated +- Updated ingress settings and backend configuration in the helm chart +- Refactored helm values to show only user relevant settings + +## Issued Fixed +- Fixed the timeout time for each negotiation +- Fixed the long waiting time by implementing timeout when doing the negotiation +- Fixed the null contract ids creation + +## Deleted +- Remove the legacy style to register/delete the testdata from the data provider + + ## [released] ## [v1.3.1] - 08-11-2023 diff --git a/INSTALL.md b/INSTALL.md index 93de904cf..b9f1d1d92 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -31,10 +31,18 @@ You must have [Helm](https://helm.sh/), [Minikube](https://minikube.sigs.k8s.io ## Install +### First Step: Configuration + +First configure the [`values.yaml`](./charts/digital-product-pass/values.yaml) file with the secrets and the necessary configuration for starting the application correctly. + +> **TIP**: For a correct Catena-X integration get the correct credentials from the Portal! You can also place this secrets in a Vault so that the credentials are safe! + +### Second Step: Deployment + To install the application using the configured helm charts use the following command from the project root directory: ```bash -helm install digital-product-pass ./charts/digital-product-pass -f charts/digital-product-pass/values.yaml -f charts/digital-product-pass/values-int.yaml +helm install digital-product-pass ./charts/digital-product-pass -f charts/digital-product-pass/values.yaml ``` > **NOTE**: This command will deploy the complete application. diff --git a/README.md b/README.md index 61059ea64..613b67226 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ In particular, the appliction is used to access the battery passport data provid Here is a preview from the DPP App UI, where we visualize a test battery passport in this case. -![General Info View](./docs/arc42/GraphicBatteryPassportViewGeneralInfo.png) +![General Info View](./docs/arc42/media/GraphicBatteryPassportViewGeneralInfo.png) > **Note**: For more information check the [documentation section](./docs/README.md) @@ -56,6 +56,7 @@ To get started you can have a look into our documentation: | ---------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Arc42](./docs/arc42/Arc42.md) | Main Architecture Document (Arc42) of Digital Product Pass Application | | [Administration Guide](./docs/admin%20guide/Admin_Guide.md) | Administration Guide explaining the infrastructure and how to configure the application | +| [Data Retrieval Guide](./docs/data%20retrieval%20guide/DataRetrievalGuide.md) | Guide on how to retrieve data from the Catena-X Network as the Digital Product Pass | | [Backend Documentation](./consumer-backend/productpass/readme.md) | Backend documentation Product Passport App | | [Deployment in Hotel Budapest](./deployment/README.md) | Technical Guide - Deployment in ArgoCD Hotel Budapest (integration environment) | | [Docker Overview](./docker/README.md) | Overview on general docker commands | diff --git a/charts/digital-product-pass/templates/deployment-backend.yaml b/charts/digital-product-pass/templates/deployment-backend.yaml index 0fa380312..4ddacb504 100644 --- a/charts/digital-product-pass/templates/deployment-backend.yaml +++ b/charts/digital-product-pass/templates/deployment-backend.yaml @@ -84,8 +84,8 @@ spec: - name: backend-config mountPath: /app/config - name: pvc-backend - mountPath: /app/data - subPath: data + mountPath: /app/data/process + subPath: data/process - name: pvc-backend mountPath: /app/log subPath: log diff --git a/charts/digital-product-pass/values-dev.yaml b/charts/digital-product-pass/values-dev.yaml index baf7cdbd9..09a58dc17 100644 --- a/charts/digital-product-pass/values-dev.yaml +++ b/charts/digital-product-pass/values-dev.yaml @@ -104,4 +104,5 @@ oauth: enabled: true bpn: *bpn roleCheck: - enabled: false \ No newline at end of file + enabled: false + diff --git a/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/config/DtrConfig.java b/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/config/DtrConfig.java index a23885c93..26ab220cb 100644 --- a/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/config/DtrConfig.java +++ b/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/config/DtrConfig.java @@ -152,6 +152,7 @@ public static class Timeouts{ Integer negotiation; Integer transfer; Integer digitalTwin; + Integer dtrRequestProcess; /** GETTERS AND SETTERS **/ public Integer getSearch() { @@ -179,6 +180,14 @@ public Integer getDigitalTwin() { public void setDigitalTwin(Integer digitalTwin) { this.digitalTwin = digitalTwin; } + + public Integer getDtrRequestProcess() { + return dtrRequestProcess; + } + + public void setDtrRequestProcess(Integer dtrRequestProcess) { + this.dtrRequestProcess = dtrRequestProcess; + } } /** diff --git a/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/http/controllers/api/ContractController.java b/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/http/controllers/api/ContractController.java index a553567f5..ad66e8036 100644 --- a/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/http/controllers/api/ContractController.java +++ b/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/http/controllers/api/ContractController.java @@ -155,6 +155,7 @@ public Response create(@Valid @RequestBody DiscoverySearch searchBody) { return httpUtil.buildResponse(response, httpResponse); } String processId = processManager.initProcess(); + LogUtil.printMessage("Creating process [" + processId + "] for "+searchBody.getType() + ": "+ searchBody.getId()); ConcurrentHashMap> dataModel = null; if(dtrConfig.getTemporaryStorage().getEnabled()) { try { @@ -187,7 +188,7 @@ public Response create(@Valid @RequestBody DiscoverySearch searchBody) { for(Dtr dtr: dtrs){ Long validUntil = dtr.getValidUntil(); - if(validUntil == null || validUntil < currentTimestamp){ + if(dtr.getContractId() == null || dtr.getContractId().isEmpty() || validUntil == null || validUntil < currentTimestamp){ requestDtrs = true; // If the cache invalidation time has come request Dtrs break; } @@ -270,7 +271,7 @@ public Response search(@Valid @RequestBody Search searchBody) { response = httpUtil.getBadRequest("No processId was found on the request body!"); return httpUtil.buildResponse(response, httpResponse); } - + String processId = searchBody.getProcessId(); if(processId.isEmpty()){ response = httpUtil.getBadRequest("Process id is required for decentral digital twin registry searches!"); @@ -286,9 +287,12 @@ public Response search(@Valid @RequestBody Search searchBody) { return httpUtil.buildResponse(response, httpResponse); } Boolean childrenCondition = searchBody.getChildren(); + String logPrint = "[" + processId + "] Creating search for "+searchBody.getIdType() + ": "+ searchBody.getId(); if(childrenCondition != null){ + LogUtil.printMessage(logPrint + " with drilldown enabled"); process = processManager.createProcess(processId, childrenCondition, httpRequest); // Store the children condition }else { + LogUtil.printMessage(logPrint + " with drilldown disabled"); process = processManager.createProcess(processId, httpRequest); } Status status = processManager.getStatus(processId); diff --git a/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/managers/DtrSearchManager.java b/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/managers/DtrSearchManager.java index 63f5154a9..999163b44 100644 --- a/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/managers/DtrSearchManager.java +++ b/consumer-backend/productpass/src/main/java/org/eclipse/tractusx/productpass/managers/DtrSearchManager.java @@ -69,7 +69,7 @@ public class DtrSearchManager { private ConcurrentHashMap> dtrDataModel; private ConcurrentHashMap catalogsCache; private final long searchTimeoutSeconds; - private final long negotiationTimeoutSeconds; + private final long dtrRequestProcessTimeout; private final String fileName = "dtrDataModel.json"; private String dtrDataModelFilePath; private State state; @@ -93,8 +93,7 @@ public DtrSearchManager(FileUtil fileUtil, JsonUtil jsonUtil, DataTransferServic this.dtrDataModelFilePath = this.createDataModelFile(); this.dtrDataModel = this.loadDtrDataModel(); this.searchTimeoutSeconds = this.dtrConfig.getTimeouts().getSearch(); - this.negotiationTimeoutSeconds = this.dtrConfig.getTimeouts().getNegotiation(); - + this.dtrRequestProcessTimeout = this.dtrConfig.getTimeouts().getDtrRequestProcess(); } /** GETTERS AND SETTERS **/ @@ -205,7 +204,7 @@ public void run() { } public void searchEndpoint(String processId, String bpn, String endpoint){ //Search Digital Twin Catalog for each connectionURL with a timeout time - Thread asyncThread = ThreadUtil.runThread(searchDigitalTwinCatalogExecutor(endpoint), "ProcessDtrDataModel"); + Thread asyncThread = ThreadUtil.runThread(searchDigitalTwinCatalogExecutor(endpoint), "SearchEndpoint"+processId+"-"+bpn+"-"+endpoint); try { if (!asyncThread.join(Duration.ofSeconds(searchTimeoutSeconds))) { asyncThread.interrupt(); @@ -228,11 +227,11 @@ public void searchEndpoint(String processId, String bpn, String endpoint){ if (contractOffers instanceof LinkedHashMap) { Dataset dataset = (Dataset) jsonUtil.bindObject(contractOffers, Dataset.class); if (dataset != null) { - Thread singleOfferThread = ThreadUtil.runThread(createAndSaveDtr(dataset, bpn, endpoint, processId), "CreateAndSaveDtr"); + Thread singleOfferThread = ThreadUtil.runThread(createAndSaveDtr(dataset, bpn, endpoint, processId), "CreateAndSaveDtr-"+processId+"-"+bpn+"-"+endpoint); try { - if (!singleOfferThread.join(Duration.ofSeconds(negotiationTimeoutSeconds))) { + if (!singleOfferThread.join(Duration.ofSeconds(this.dtrRequestProcessTimeout))) { singleOfferThread.interrupt(); - LogUtil.printWarning("Failed to retrieve the Catalog due a timeout for the URL: " + endpoint); + LogUtil.printWarning("Failed to retrieve do contract negotiations due a timeout for the URL: " + endpoint); return; } } catch (InterruptedException e) { @@ -246,11 +245,11 @@ public void searchEndpoint(String processId, String bpn, String endpoint){ return; } contractOfferList.parallelStream().forEach(dataset -> { - Thread multipleOffersThread = ThreadUtil.runThread(createAndSaveDtr(dataset, bpn, endpoint, processId), "CreateAndSaveDtr"); + Thread multipleOffersThread = ThreadUtil.runThread(createAndSaveDtr(dataset, bpn, endpoint, processId), "CreateAndSaveDtr-"+processId+"-"+bpn+"-"+endpoint); try { - if (!multipleOffersThread.join(Duration.ofSeconds(negotiationTimeoutSeconds))) { + if (!multipleOffersThread.join(Duration.ofSeconds(this.dtrRequestProcessTimeout))) { multipleOffersThread.interrupt(); - LogUtil.printWarning("Failed to retrieve the Catalog due a timeout for the URL: " + endpoint); + LogUtil.printWarning("Failed to retrieve the contract negotiations due a timeout for the URL: " + endpoint); } } catch (InterruptedException e) { throw new RuntimeException(e); @@ -426,16 +425,22 @@ private Runnable createAndSaveDtr(Dataset dataset, String bpn, String connection public void run() { try { Offer offer = dataTransferService.buildOffer(dataset, 0); - String builtDataEndpoint =CatenaXUtil.buildDataEndpoint(connectionUrl); + String builtDataEndpoint = CatenaXUtil.buildDataEndpoint(connectionUrl); IdResponse negotiationResponse = dataTransferService.doContractNegotiation(offer, bpn, builtDataEndpoint); if (negotiationResponse == null) { return; } - Negotiation negotiation = dataTransferService.seeNegotiation(negotiationResponse.getId()); + Integer millis = dtrConfig.getTimeouts().getNegotiation() * 1000; // Set max timeout from seconds to milliseconds + // If negotiation takes way too much time give timeout + Negotiation negotiation = ThreadUtil.timeout(millis, ()->dataTransferService.seeNegotiation(negotiationResponse.getId()), null); if (negotiation == null) { LogUtil.printWarning("It was not possible to do ContractNegotiation for URL: " + connectionUrl); return; } + if(negotiation.getContractAgreementId() == null || negotiation.getContractAgreementId().isEmpty()){ + LogUtil.printError("It was not possible to get an Contract Agreemment Id for the URL: " + connectionUrl); + return; + } Dtr dtr = new Dtr(negotiation.getContractAgreementId(), connectionUrl, offer.getAssetId(), bpn, DateTimeUtil.addHoursToCurrentTimestamp(dtrConfig.getTemporaryStorage().getLifetime())); if (dtrConfig.getTemporaryStorage().getEnabled()) { addConnectionToBpnEntry(bpn, dtr); diff --git a/consumer-backend/productpass/src/main/java/utils/ThreadUtil.java b/consumer-backend/productpass/src/main/java/utils/ThreadUtil.java index d92333315..da95667a0 100644 --- a/consumer-backend/productpass/src/main/java/utils/ThreadUtil.java +++ b/consumer-backend/productpass/src/main/java/utils/ThreadUtil.java @@ -134,12 +134,12 @@ public static V timeout(Integer milliseconds, Callable function, V timeou { try { ExecutorService executor = Executors.newSingleThreadExecutor(); - Future future = executor.submit(function); boolean timeout = false; V returnObject = null; try { + Future future = executor.submit(function); returnObject = future.get(milliseconds, TimeUnit.MILLISECONDS); - } catch (TimeoutException e) { + } catch (Exception e) { timeout = true; } executor.shutdownNow(); diff --git a/consumer-backend/productpass/src/main/resources/application.yml b/consumer-backend/productpass/src/main/resources/application.yml index e6b597717..7294a64c6 100644 --- a/consumer-backend/productpass/src/main/resources/application.yml +++ b/consumer-backend/productpass/src/main/resources/application.yml @@ -83,7 +83,8 @@ configuration: subModel: "/submodel-descriptors" timeouts: search: 10 - negotiation: 40 + negotiation: 10 + dtrRequestProcess: 40 transfer: 10 digitalTwin: 20 temporaryStorage: diff --git a/deployment/infrastructure/testing/testdata/testdata-payload.json b/deployment/infrastructure/testing/testdata/testdata-payload.json index a8e246432..714f9ae07 100644 --- a/deployment/infrastructure/testing/testdata/testdata-payload.json +++ b/deployment/infrastructure/testing/testdata/testdata-payload.json @@ -15,11 +15,19 @@ "odrl:or": [ { "@type": "Constraint", - "odrl:leftOperand": "PURPOSE", + "odrl:leftOperand": "Membership", "odrl:operator": { "@id": "odrl:eq" }, - "odrl:rightOperand": "DPP" + "odrl:rightOperand": "active" + }, + { + "@type": "Constraint", + "odrl:leftOperand": "FrameworkAgreement.sustainability", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "active" } ] } @@ -2306,6 +2314,45 @@ "semanticId": "urn:bamm:io.catenax.transmission.transmission_pass:1.0.0#TransmissionPass" } ] + }, + { + "catenaXId": "urn:uuid:b2c4c99d-f187-45ad-905b-e2c4e1ededba", + "specificAssetIds": [ + { + "name": "manufacturerPartId", + "value": "XYZ78901", + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + }, + { + "name": "partInstanceId", + "value": "ABC123", + "allowedBpns": ["BPNL00000003CRHL", "BPNL00000000CBA5"] + } + ], + "type": "physicalDimensions", + "description": [ + { + "language": "en", + "text": "Physical Dimensions shell descriptor" + } + ], + "submodels": [ + { + "name": "physicalDeminsions", + "data": { + "partInstanceId": "ABC123", + "physicalDimensionsProperty": { + "width": 1000.0, + "length": 20000.1, + "weight": 100.7, + "diameter": 0.03, + "height": 0.1 + } + }, + "description": "Physical Dimensions Submodel", + "semanticId": "urn:bamm:io.catenax.shared.physical_dimension:2.0.0#PhysicalDimensions" + } + ] } ] } diff --git a/docs/RELEASE_USER.md b/docs/RELEASE_USER.md index c350cdba9..b867ce359 100644 --- a/docs/RELEASE_USER.md +++ b/docs/RELEASE_USER.md @@ -23,6 +23,16 @@ # Release Notes Digital Product Pass Application User friendly relase notes without especific technical details. +**November 14 2023 (Version 1.4.0)** +*14.12.2023* + +### Added +#### DPP test data uploader +A script is refactored to upload/remove testdata set from the data provider setup. This speeds up the automatic uploading of various passes types into the provider's digital twin registry, data service and EDC connector. + +### Updated +#### Optimize contract negotiation time +There was a long waiting time during the contract negotiation. This time is now reduced and the negotiation is perfomred faster. **November 08 2023 (Version 1.3.1)** *08.11.2023* diff --git a/docs/admin guide/Admin_Guide.md b/docs/admin guide/Admin_Guide.md index 65e0711d7..2552c0069 100644 --- a/docs/admin guide/Admin_Guide.md +++ b/docs/admin guide/Admin_Guide.md @@ -1,417 +1,564 @@ - - -# Product Passport Administrator Guide Documentation - -![C-X Logo](./CXLogo.png) - -Version: v1.5
-Latest Revision Mar 30, 2023 - -## Table of Contents - -1. [Table of contents](#table-of-contents) -2. [Introduction](#introduction) -3. [Getting Started Guide](#getting-started-guide) -4. [Deployment Configuration](#deployment-configuration) -5. [Local Keycloak Configuration](#local-keycloak-configuration) -6. [Helm Charts Configuration](#helm-charts-configuration) -7. [Consumer Backend Configuration](#consumer-backend-configuration) - 7.1 [Backend Application Configuration](#backend-application-configuration) - 7.2 [Spring Boot Configuration](#spring-boot-configuration) - - 7.3 [Spring Boot Logging Configuration](#spring-boot-logging-configuration) -8. [Postman Collection](#postman-collection) -9. [Secrets Management](#secrets-management) -10. [EDC Provider Configuration](#edc-provider-configuration) - 10.1 [Documentation Description](#documentation-description) - 10.2 [Asset Configuration](#asset-configuration) - 10.3 [Policies Configuration](#policies-configuration) - 10.4 [Contract Definition Configuration](#contract-definition-configuration) - 10.5 [Digital Twin Registration](#digital-twin-registration) -11. [NOTICE](#notice) - -## Introduction - -This guide contains all the available information for an administrator to configure, operate and deploy the Product Passport Application. - -At the moment the Application does not offers any type of administration interface within the Frontend UI, however a series of configurations can be performed in order to administrate it. - -Here you will find all the guides related with the configuration of the Product Passport Application Infrastructure/Environment as well as the Frontend and Backend Systems. - -## Getting Started Guide - -To start the configuration of the Product Passport Application please follow this getting started guide for configuring a local stand-alone enviroment (for all components) and install guide to install the application with frontend and backend: - -| Name | Location | Link | -|-----------------------| -------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Getting Started Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docs/GETTING-STARTED.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docs/GETTING-STARTED.md) | -| Install Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/INSTALL.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/INSTALL.md) | - -## Deployment Configuration - -In order to deploy the application in an environment we use Helm Charts to configure the Kubernetes pods and containers. - -All the information about deploying you can find in this resource: - -| Name | Location | Link | -| ---- | -------- | ---- | -| Technical Guide for Development | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/README.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/README.md) | - -## Local Keycloak Configuration - -All the authentication and authorization is managed by Catena-X IAM, however there is a possibility to configure a local Keycloak Instance for testing and development purposes. - -Therefore in order to configure the users and roles for the application the administration needs to import the Realm Configuration File into their local Keycloak instance hosted in a docker container. - -Additionally two test users shall be created and the correct roles shall be assigned: - -**User 1:** "company 1 user" (OEM, Dismantler) -**User 2:** "company 2 user" (Recycler) - -Follow the [Local Keycloak Setup Guide](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/README.md) in order to set up the users, and their passwords correctly: - -| Name | Location | Link | -| ---- | -------- | ---- | -| Local Keycloak Setup Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/README.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/README.md) | -| Realm Configuration File | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/realm.json](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/realm.json) | - -## Helm Charts Configuration - -At the moment, the Product Passport Application is hosted in two environments: - -| | Application Runtime Environment | ArgoCD - Deployment Platform | -| - | -------- | ---- | -| **Development** | [https://materialpass.dev.demo.catena-x.net/](https://materialpass.dev.demo.catena-x.net/) | [https://argo.dev.demo.catena-x.net/](https://argo.dev.demo.catena-x.net/) | -| **Integration** | [https://materialpass.int.demo.catena-x.net/](https://materialpass.int.demo.catena-x.net/) | [https://argo.int.demo.catena-x.net/](https://argo.int.demo.catena-x.net/) | -| **Beta** | [https://materialpass.beta.demo.catena-x.net/](https://materialpass.beta.demo.catena-x.net/) | [https://argo.beta.demo.catena-x.net/](https://argo.beta.demo.catena-x.net/) | - -All the values for the helm charts are configured for each environment and set up in the Product Passport Application source code: - -| Name | Location | Link | -| ---- | -------- | ---- | -| Helm Charts Main Directory | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts) | -| Digital Product Pass | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts/digital-product-pass](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts/digital-product-pass) | -| EDC Consumer Helm Charts | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/helm/edc-consumer](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/helm/edc-consumer) | -| MOCK EDC Provider Helm Charts | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/helm/edc-provider](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/helm/edc-provider) | - -## Consumer Backend Configuration - -In order to communicate with the Catena-X Services there is a Consumer Backend that manages user sessions, provide APIs to access information, etc. - -All the information about the backend services is described in this documentation: - -| Name | Location | Link | -| ---- | -------- | ---- | -| Consumer Backend Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/consumer-backend/productpass/readme.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/consumer-backend/productpass/readme.md) | -| Open API - Swagger | GitHub | [https://materialpass.int.demo.catena-x.net/swagger-ui/index.html](https://materialpass.int.demo.catena-x.net/swagger-ui/index.html) | - -### Backend Application Configuration -The configurations of log levels and other variables can be set in the following file: - -| Name | Location | Link | -|-----------------------------------| -------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Backend Application Configuration | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/application.yml](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/application.yml) | - -### Spring Boot Configuration - -The Consumer Backend is running over a Spring Boot server, therefore a application configuration file was created to set up mandatory parameters like the Keycloak host, and the security constrains for accessing each API and Services: - -| Name | Location | Link | -| ---- | -------- | ---- | -| Spring Boot Server Configuration | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/application.yml](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/application.yml) | - -All the application utilizes these variables to configure the utilities (tools) and other controllers/services. - - -### Spring Boot Logging Configuration - -In order to manage the logs from the application a XML file was set, it contains the configuration from the log format and output, as well as the role back and file configuration: - -| Name | Location | Link | -| ---- | -------- | ---- | -| Spring Boot Logging Configuration | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/logback-spring.xml](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/logback-spring.xml) | - -## Postman Collection - -In order to document and test easily the API that are set up and used by the Product Passport Application, there were set a series of Postman Collections that can be found here: - -| Name | Location | Link | -| ---- | -------- | ---- | -| Postman Collection Directory | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/postman](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/postman) | -| Postman Getting Started Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/postman/README.md](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/postman/README.md) | - -## Secrets Management - -In order to set up the secret management please follow this guide: - -| Name | Location | Link | -| ---- | -------- | ---- | -| Secrets Management Documentation | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/docs/SECRETS_MANAGEMENT.md](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/docs/SECRETS_MANAGEMENT.md) | - - -## EDC Provider Configuration - -When configuring your EDC Provider you need to take info consideration the following guidelines and formats: - -> **_NOTE:_** -*Please take into consideration following our Postman Collection while setting your EDC Provider* - -### Documentation Description - -**All variables are written in the following notation: ***{{ VARIABLE_NAME }}***** - -All the configurations are in JSON notation and follow the [EDC Configuration from Catena-X](https://github.com/eclipse-tractusx/tractusx-edc) and the [Eclipse Foundation](https://github.com/eclipse-edc/Connector). - -### Asset Configuration - -When configurating you EDC provider you will be able to set some assets which reference to a certain endpoint. - -> **_INFO:_** *All public assets must be registered in a SubModel from a Digital Twin in the Digital Twin Registry.* - -#### **Variables:** - -| Name | Description | Example Value | -|-------------------------|----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| AssetId | Combination of Digital Twin and Sub Model UUIDs | **Example value for asset**: 32aa72de-297a-4405-9148-13e12744028a-699f1245-f57e-4d6b-acdb-ab763665554a
**Example value for registry**: digital-twin-registry | -| AssetType | The type of the Asset | **Example value for asset**: Asset
**Example value for registry**: data.core.digitalTwinRegistry | -| Description | Simple description of the asset | Battery Passport Test Data | -| DataProviderEndpointUrl | URL to the endpoint which stores and serves the data, basically a Database that retrieves plain text/json data for a certain API | **Example value for asset**: [https://materialpass.int.demo.catena-x.net/provider_backend/data/{{DigitalTwinId}}-{{DigitalTwinSubmodelId}}](https://materialpass.int.demo.catena-x.net/provider_backend/data/{{DigitalTwinId}}-{{DigitalTwinSubmodelId}})
**Example value for registry**: [https://materialpass.int.demo.catena-x.net/semantics/registry](https://materialpass.int.demo.catena-x.net/semantics/registry) | -| DigitalTwinId | Id from the Digital Twin | 32aa72de-297a-4405-9148-13e12744028a | -| DigitalTwinSubmodelId | Sub Model Id registered in the Digital Twin Registry | 699f1245-f57e-4d6b-acdb-ab763665554a | - - -#### **Format and Fields:** - -``` -{ - "@context": {}, - "asset": { - "@type": "{{AssetType}}", - "@id": "{{AssetId}}", - "properties": { - "description": "{{Description}}" - "contenttype": "application/json" - } - }, - "dataAddress": { - "@type": "DataAddress", - "type": "HttpData", - "proxyPath": "true", - "proxyBody": "true", - "proxyMethod": "true", - "proxyQueryParams": "true", - "baseUrl": "{{DataProviderEndpointUrl}}" - } -} -``` -When configurating your EDC provider you will be able to set some assets which reference to a certain endpoint. - - -### Policies Configuration -Policies are important for configuration the **access, prohibitions, obligations and permissions to certain assets.** - -A policy can have more and less configurations, depending of the restrictions you want to give to each asset. - -Here we specify a simple policy with just the USAGE permission, so we are able to retrieve the whole asset without obligations and prohibitions. - -#### Usage Policies - -| Policy Name | Description | -| ---- | -------- | -| Usage Permission Policy | In order to use/access the assets from the EDC Provider the Usage Policy is required | - -> **_NOTE:_** -*At the moment only Usage Permission Policies are assigned to assets, however restriction policies could be also configured if it is required for a specific use case.* - -#### **Variables:** - -| Name | Description | Example Value | -| ---- | -------- | ---- | -| PolicyId | UUID that identifies the policy in the EDC Connector | ad8d2c57-cf32-409c-96a8-be59675b6ae5 | -| PermissionType | DID Permission Type | PolicyDefinitionRequestDto | -| PermissionActionType | Defines the action allowed when the permission is assigned to an asset. In case of the usage policy the value "USE" is necessary | "USE" | -| BPN | Consumer's Business Partner Number | BPNL000000000000 | - -#### **Format and Fields:** - -``` -{ - "@context": { - "odrl": "http://www.w3.org/ns/odrl/2/leftOperand" - }, - "@type": "{{PermissionType}}", - "@id": "{{PolicyId}}", - "policy": { - "@type": "Policy", - "odrl:permission" : [{ - "odrl:action": "{{PermissionActionType}}", - "odrl:constraint": { - "odrl:constraint": { - "@type": "LogicalConstradev", - "odrl:or": [ - { - "@type": "Contraint", - "odrl:leftOperand": "BusinessPartnerNumber", - "odrl:operator": "EQ", - "odrl:rightOperand": "{{BPN}}" - } - ] - } - } - }] - } -} -``` - - -### Contract Definition Configuration - -Contract definitions allow us to expose the assets and link them to a contract policy and a access policy. - -> **_INFO:_** *Remember that all **policies and assets** you bind to a contract **must be defined in the same EDC Connector** and linked though their ID in the configuration from the contract.* - -#### **Variables:** - -| Name | Description | Example Value | -| ---- | -------- |-----------------------------------------------------------------------------------------------------------------------------------------------| -| ContractDefinitionId | UUID that identifies the policy in the EDC Connector | 76b50bfc-ec19-457f-9911-a283f0d6d0df | -| AssetId | Combination of Digital Twin and Sub Model UUIDs | **Example value for asset**: 32aa72de-297a-4405-9148-13e12744028a-699f1245-f57e-4d6b-acdb-ab763665554a
**Example value for registry**: digital-twin-registry | -| AccessPolicyId | Policy that allows/restricts/enforces asset access constrains | ad8d2c57-cf32-409c-96a8-be59675b6ae5 | -| ContractPolicyId | Policy that allows/restricts/enforces contract constrains | ad8d2c57-cf32-409c-96a8-be59675b6ae5 | - - -#### **Format and Fields:** - -> **_INFO:_** *For testing proposes and in order to ease the access to your assets we are going to define the **same policy as accessPolicy and as contractPolicy**. However, you are recommended to configure two separated policies and specify them adapting each one of them to your specific needs.* - -``` -{ - "@context": {}, - "@id": "{{ContractDefinitionId}}", - "@type": "ContractDefinition", - "accessPolicyId": "{{AccessPolicyId}}", - "contractPolicyId": "{{ContractPolicyId}}", - "assetsSelector" : { - "@type" : "CriterionDto", - "operandLeft": "https://w3id.org/edc/v0.0.1/ns/id", - "operator": "=", - "operandRight": "{{AssetId}}" - } -} -``` - -### Digital Twin Registration - -Once you finish the configuration, to make the endpoint public configure in the following way your Digital Twin: - - > **_INFO:_** *You need to be able to request tokens for the **Catena-X Central IAM** in order to **configure Digital Twins** in the Registry.* - - - -#### **Variables:** - -| Name | Description | Example Value | -| ---- | -------- | ---- | -| DigitalTwinId | Manually generated DID that contains a UUID | 32aa72de-297a-4405-9148-13e12744028a | -| DigitalTwinSubmodelId | Sub Model Id registered in the Digital Twin Registry | 699f1245-f57e-4d6b-acdb-ab763665554a | -| PartInstanceId | Battery passport attribute - part instance Id | X123456789012X12345678901234566 | -| EDCProviderUrl | URL to the endpoint which contains the EDC Provider | [https://materialpass.int.demo.catena-x.net](https://materialpass.int.demo.catena-x.net) | -| BPN | OPTIONAL: The endpoint address can include a BPN number, which shall lead to the EDC Provider, and return the contracts when called from an EDC Consumer | BPNL000000000000 | -| SubmodelIdShort | EXACT STRING REQUIRED: The submodel id of the battery passports needs to be exactly the string: "batteryPass" | **batteryPass** | -| BammModelVersionId | The semantic version of the asset passport model, currently the latest version v3.0.1 is used | urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass | - -> **_INFO:_** *It is important that the "SubmodelIdShort" is set in the correct format and that the EDCProviderUrl points to an valid EDC Provider, that providers valid contracts configured in the structure defined here.* - - -#### **Format and Fields:** - -``` -{ - "description": [ - { - "language": "en", - "text": "Battery Passport shell descriptor" - } - ], - "idShort": "Battery_{{PartInstanceId}}", - "id": "{{DigitalTwinId}}", - "specificAssetIds": [ - { - "name": "partInstanceId", - "value": "{{PartInstanceId}}" - } - ], - "submodelDescriptors": [ - { - "endpoints": [ - { - "interface": "SUBMODEL-3.0", - "protocolInformation": { - "href": "{{EDCProviderUrl}}/{{BPN}}/{{DigitalTwinId}}-{{DigitalTwinSubmodelId}}/submodel", - "endpointProtocol": "HTTP", - "endpointProtocolVersion": [ - "1.1" - ], - "subprotocol": "DSP", - "subprotocolBody": "id={{DigitalTwinId}}-{{DigitalTwinSubmodelId}}",dspEndpoint={{EDCProviderUrl}}/{{BPN}}", - "subprotocolBodyEncoding": "plain" - } - } - ], - "idShort": "{{SubmodelIdShort}}", - "id": "{{DigitalTwinSubmodelId}}", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "Submodel", - "value": "{{BammModelVersionId}}" - } - ] - }, - "description": [ - { - "language": "en", - "text": "Battery Passport Submodel" - } - ] - } - ] -} -``` - - - -> **_NOTE:_** -*The BPN number is not required for the configuration of the endpoint, just **make sure that the host is pointing to the EDC Provider**.* - - -## NOTICE - -This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - -- SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation -- Source URL: https://github.com/eclipse-tractusx/digital-product-pass - + + +# Product Passport Administrator Guide Documentation + +![C-X Logo](./CXLogo.png) + +Version: v2.0
+Latest Revision 13 Dec, 2023 + +## Table of Contents + +- [Product Passport Administrator Guide Documentation](#product-passport-administrator-guide-documentation) + - [Table of Contents](#table-of-contents) + - [Introduction](#introduction) + - [Getting Started Guide](#getting-started-guide) + - [Deployment Configuration](#deployment-configuration) + - [Local Keycloak Configuration](#local-keycloak-configuration) + - [Consumer Backend Configuration](#consumer-backend-configuration) + - [Backend Application Configuration](#backend-application-configuration) + - [Spring Boot Configuration](#spring-boot-configuration) + - [Spring Boot Logging Configuration](#spring-boot-logging-configuration) + - [Postman Collection](#postman-collection) + - [Secrets Management](#secrets-management) + - [EDC Provider Configuration](#edc-provider-configuration) + - [Documentation Description](#documentation-description) + - [Asset Configuration](#asset-configuration) + - [Variables:](#variables) + - [Format and Fields:](#format-and-fields) + - [Policies Configuration](#policies-configuration) + - [Usage Policies](#usage-policies) + - [Variables:](#variables-1) + - [Format and Fields:](#format-and-fields-1) + - [Contract Definition Configuration](#contract-definition-configuration) + - [Variables:](#variables-2) + - [Format and Fields:](#format-and-fields-2) + - [Digital Twin Registration](#digital-twin-registration) + - [Variables:](#variables-3) + - [Format and Fields:](#format-and-fields-3) + - [Digital Twin Registry Configuration](#digital-twin-registry-configuration) + - [Variables:](#variables-4) + - [Format and Fields:](#format-and-fields-4) + - [Item Relationship Service Integration](#item-relationship-service-integration) + - [NOTICE](#notice) + +## Introduction + +This guide contains all the available information for an administrator to configure, operate and deploy the Product Passport Application. + +At the moment the Application does not offers any type of administration interface within the Frontend UI, however a series of configurations can be performed in order to administrate it. + +Here you will find all the guides related with the configuration of the Product Passport Application Infrastructure/Environment as well as the Frontend and Backend Systems. + +## Getting Started Guide + +To start the configuration of the Product Passport Application please follow this getting started guide for configuring a local stand-alone enviroment (for all components) and install guide to install the application with frontend and backend: + +| Name | Location | Link | +|-----------------------| -------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Getting Started Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docs/GETTING-STARTED.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docs/GETTING-STARTED.md) | +| Install Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/INSTALL.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/INSTALL.md) | + +## Deployment Configuration + +In order to deploy the application in an environment we use Helm Charts to configure the Kubernetes pods and containers. + +All the information about deploying you can find in this resource: + +| Name | Location | Link | +| ---- | -------- | ---- | +| Technical Guide for Development | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/README.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/README.md) | + +## Local Keycloak Configuration + +All the authentication and authorization is managed by Catena-X IAM, however there is a possibility to configure a local Keycloak Instance for testing and development purposes. + +Therefore in order to configure the users and roles for the application the administration needs to import the Realm Configuration File into their local Keycloak instance hosted in a docker container. + +Additionally two test users shall be created and the correct roles shall be assigned: + +**User 1:** "company 1 user" (OEM, Dismantler) +**User 2:** "company 2 user" (Recycler) + +Follow the [Local Keycloak Setup Guide](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/README.md) in order to set up the users, and their passwords correctly: + +| Name | Location | Link | +| ---- | -------- | ---- | +| Local Keycloak Setup Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/README.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/README.md) | +| Realm Configuration File | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/realm.json](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docker/local/Keycloak/realm.json) | + + +All the values for the helm charts are configured for each environment and set up in the Product Passport Application source code: + +| Name | Location | Link | +| ---- | -------- | ---- | +| Helm Charts Main Directory | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts) | +| Digital Product Pass | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts/digital-product-pass](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts/digital-product-pass) | +| EDC Consumer Helm Charts | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/helm/edc-consumer](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/helm/edc-consumer) | +| MOCK EDC Provider Helm Charts | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/helm/edc-provider](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/deployment/helm/edc-provider) | + +## Consumer Backend Configuration + +In order to communicate with the Catena-X Services there is a Consumer Backend that manages user sessions, provide APIs to access information, etc. + +All the information about the backend services is described in this documentation: + +| Name | Location | Link | +| ---- | -------- | ---- | +| Consumer Backend Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/tree/main/consumer-backend/productpass/readme.md](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/consumer-backend/productpass/readme.md) | +| Open API - Swagger | GitHub | [https://materialpass.int.demo.catena-x.net/swagger-ui/index.html](https://materialpass.int.demo.catena-x.net/swagger-ui/index.html) | + +### Backend Application Configuration +The configurations of log levels and other variables can be set in the following file: + +| Name | Location | Link | +|-----------------------------------| -------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Backend Application Configuration | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/application.yml](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/application.yml) | + +### Spring Boot Configuration + +The Consumer Backend is running over a Spring Boot server, therefore a application configuration file was created to set up mandatory parameters like the Keycloak host, and the security constrains for accessing each API and Services: + +| Name | Location | Link | +| ---- | -------- | ---- | +| Spring Boot Server Configuration | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/application.yml](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/application.yml) | + +All the application utilizes these variables to configure the utilities (tools) and other controllers/services. + + +### Spring Boot Logging Configuration + +In order to manage the logs from the application a XML file was set, it contains the configuration from the log format and output, as well as the role back and file configuration: + +| Name | Location | Link | +| ---- | -------- | ---- | +| Spring Boot Logging Configuration | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/logback-spring.xml](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/src/main/resources/logback-spring.xml) | + +## Postman Collection + +In order to document and test easily the API that are set up and used by the Product Passport Application, there were set a series of Postman Collections that can be found here: + +| Name | Location | Link | +| ---- | -------- | ---- | +| Postman Collection Directory | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/postman](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/postman) | +| Postman Getting Started Guide | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/postman/README.md](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/postman/README.md) | + +## Secrets Management + +In order to set up the secret management please follow this guide: + +| Name | Location | Link | +| ---- | -------- | ---- | +| Secrets Management Documentation | GitHub | [https://github.com/eclipse-tractusx/digital-product-pass/blob/main/docs/SECRETS_MANAGEMENT.md](https://github.com/eclipse-tractusx/digital-product-pass/blob/main/docs/SECRETS_MANAGEMENT.md) | + + +## EDC Provider Configuration + +When configuring your EDC Provider you need to take info consideration the following guidelines and formats: + +> **_NOTE:_** +*Please take into consideration following our Postman Collection while setting your EDC Provider* + +### Documentation Description + +**All variables are written in the following notation: ***{{ VARIABLE_NAME }}***** + +All the configurations are in JSON notation and follow the [EDC Configuration from Catena-X](https://github.com/eclipse-tractusx/tractusx-edc) and the [Eclipse Foundation](https://github.com/eclipse-edc/Connector). + +### Asset Configuration + +When configurating you EDC provider you will be able to set some assets which reference to a certain endpoint. + +> **_INFO:_** *All public assets must be registered in a SubModel from a Digital Twin in the Digital Twin Registry.* + +#### Variables: + +| Name | Description | Example Value | +|-------------------------|----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| AssetId | Combination of Digital Twin and Sub Model UUIDs | **Example value for asset**: urn:uuid:0ec8cf2b-f58e-3f13-b5ef-e7dd01d15b19
**Example value for registry**: digital-twin-registry | +| AssetType | The type of the Asset | **Example value for asset**: Asset
**Example value for registry**: data.core.digitalTwinRegistry | +| Description | Simple description of the asset | Battery Passport Test Data | +| DataProviderEndpointUrl | URL to the endpoint which stores and serves the data, basically a Database that retrieves plain text/json data for a certain API | **Example value for asset**: [https://materialpass.int.demo.catena-x.net/provider_backend/data/{{DigitalTwinSubmodelId}}](https://materialpass.int.demo.catena-x.net/provider_backend/data/{{DigitalTwinSubmodelId}})
**Example value for registry**: [https://materialpass.int.demo.catena-x.net/semantics/registry/api/v3.0](https://materialpass.int.demo.catena-x.net/semantics/registry/api/v3.0) | +| DigitalTwinId | Id from the Digital Twin | urn:uuid:de98db6e-8e05-5d8e-8ae8-9f702cf5c396 | +| DigitalTwinSubmodelId | Sub Model Id registered in the Digital Twin Registry | urn:uuid:555c5513-5e52-2d7d-0904-fe90829252de | + + +#### Format and Fields: + +```json +{ + "@context": {}, + "asset": { + "@type": "{{AssetType}}", + "@id": "{{AssetId}}", + "properties": { + "description": "{{Description}}" + "contenttype": "application/json" + } + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "proxyPath": "true", + "proxyBody": "true", + "proxyMethod": "true", + "proxyQueryParams": "true", + "baseUrl": "{{DataProviderEndpointUrl}}" + } +} +``` +When configurating your EDC provider you will be able to set some assets which reference to a certain endpoint. + + +### Policies Configuration +Policies are important for configuration the **access, prohibitions, obligations and permissions to certain assets.** + +A policy can have more and less configurations, depending of the restrictions you want to give to each asset. + +Here we specify a simple policy with just the USAGE permission, so we are able to retrieve the whole asset without obligations and prohibitions. + +#### Usage Policies + +| Policy Name | Description | +| ---- | -------- | +| Usage Permission Policy | In order to use/access the assets from the EDC Provider the Usage Policy is required | + +> **_NOTE:_** +*At the moment only Usage Permission Policies are assigned to assets, however restriction policies could be also configured if it is required for a specific use case.* + +#### Variables: + +| Name | Description | Example Value | +| ---- | -------- | ---- | +| PolicyId | UUID that identifies the policy in the EDC Connector | ad8d2c57-cf32-409c-96a8-be59675b6ae5 | +| PermissionType | DID Permission Type | PolicyDefinitionRequestDto | +| PermissionActionType | Defines the action allowed when the permission is assigned to an asset. In case of the usage policy the value "USE" is necessary | "USE" | +| BPN | Consumer's Business Partner Number | BPNL000000000000 | + +#### Format and Fields: + +To allow partners to access information use this policy with the BPN number included: + +```json +{ + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "{{PermissionType}}", + "@id": "{{PolicyId}}", + "policy": { + "@type": "Policy", + "odrl:permission" : [{ + "odrl:action": "{{PermissionActionType}}", + "odrl:constraint": { + "odrl:constraint": { + "@type": "LogicalConstraint", + "odrl:or": [ + { + "@type": "Contraint", + "odrl:leftOperand": "BusinessPartnerNumber", + "odrl:operator": "EQ", + "odrl:rightOperand": "{{BPN}}" + } + ] + } + } + }] + } +} +``` + +For framework agreement and membership in Catena-X check add this policy: + +```json +{ + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "{{PermissionType}}", + "@id": "{{PolicyId}}", + "policy": { + "@type": "Policy", + "odrl:permission" : [ + { + "odrl:action":"{{PermissionActionType}}", + "odrl:constraint": { + "@type": "LogicalConstraint", + "odrl:and": [ + { + "@type": "Constraint", + "odrl:leftOperand": "Membership", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "active" + }, + { + "@type": "Constraint", + "odrl:leftOperand": "FrameworkAgreement.sustainability", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "active" + } + ] + } + } + ] + } +} + +``` + +> *NOTE*: If your SSI credentials do not include both membership and framework agreement, you can use the `odrl:or` keyword instead of the default `odrl:and` keyword. Make sure you credentials are correctly configured in order to access the resources in the EDC from your providers. + + +### Contract Definition Configuration + +Contract definitions allow us to expose the assets and link them to a contract policy and a access policy. + +> **_INFO:_** *Remember that all **policies and assets** you bind to a contract **must be defined in the same EDC Connector** and linked though their ID in the configuration from the contract.* + +#### Variables: + +| Name | Description | Example Value | +| ---- | -------- |-----------------------------------------------------------------------------------------------------------------------------------------------| +| ContractDefinitionId | UUID that identifies the policy in the EDC Connector | 76b50bfc-ec19-457f-9911-a283f0d6d0df | +| AssetId | Combination of Digital Twin and Sub Model UUIDs | **Example value for asset**: urn:uuid:0ec8cf2b-f58e-3f13-b5ef-e7dd01d15b19
**Example value for registry**: digital-twin-registry | +| AccessPolicyId | Policy that allows/restricts/enforces asset access constrains | ad8d2c57-cf32-409c-96a8-be59675b6ae5 | +| ContractPolicyId | Policy that allows/restricts/enforces contract constrains | ad8d2c57-cf32-409c-96a8-be59675b6ae5 | + + +#### Format and Fields: + +> **_INFO:_** *For testing proposes and in order to ease the access to your assets we are going to define the **same policy as accessPolicy and as contractPolicy**. However, you are recommended to configure two separated policies and specify them adapting each one of them to your specific needs.* + +```json +{ + "@context": {}, + "@id": "{{ContractDefinitionId}}", + "@type": "ContractDefinition", + "accessPolicyId": "{{AccessPolicyId}}", + "contractPolicyId": "{{ContractPolicyId}}", + "assetsSelector" : { + "@type" : "CriterionDto", + "operandLeft": "https://w3id.org/edc/v0.0.1/ns/id", + "operator": "=", + "operandRight": "{{AssetId}}" + } +} +``` + +### Digital Twin Registration + +Once you finish the configuration, to make the endpoint public configure in the following way your Digital Twin: + + > **_INFO:_** *You need to be able to request tokens for the **Catena-X Central IAM** in order to **configure Digital Twins** in the Registry.* + + + +#### Variables: + +| Name | Description | Example Value | +| ---- | -------- | ---- | +| DigitalTwinId | Manually generated DID that contains a UUID | urn:uuid:de98db6e-8e05-5d8e-8ae8-9f702cf5c396 | +| DigitalTwinSubmodelId | Sub Model Id registered in the Digital Twin Registry | urn:uuid:555c5513-5e52-2d7d-0904-fe90829252de| +| PartInstanceId | Battery passport attribute - part instance Id | X123456789012X12345678901234566 | +| EDCProviderUrl | URL to the endpoint which contains the EDC Provider | [https://materialpass.int.demo.catena-x.net](https://materialpass.int.demo.catena-x.net) | +| BPN | OPTIONAL: The endpoint address can include a BPN number, which shall lead to the EDC Provider, and return the contracts when called from an EDC Consumer | BPNL000000000000 | +| SubmodelIdShort | EXACT STRING REQUIRED: The submodel id of the battery passports needs to be exactly the string: "batteryPass" | **batteryPass** | +| BammModelVersionId | The semantic version from the submodel aspect, consult the CX-0096 for more options of the semantic version | urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass | + +> **_INFO:_** *It is important that the "SubmodelIdShort" is set in the correct format and that the EDCProviderUrl points to an valid EDC Provider, that providers valid contracts configured in the structure defined here.* + + + + +#### Format and Fields: + +```json +{ + "description": [ + { + "language": "en", + "text": "Battery Passport shell descriptor" + } + ], + "idShort": "Battery_{{PartInstanceId}}", + "id": "{{DigitalTwinId}}", + "specificAssetIds": [ + { + "name": "partInstanceId", + "value": "{{PartInstanceId}}" + } + ], + "submodelDescriptors":[ + { + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": "https://edc.data.plane/{{path}}/urn:uuid:777a3f0a-6d29-4fcd-81ea-1c27c1b870cc", + "endpointProtocol": "HTTP", + "endpointProtocolVersion": [ + "1.1" + ], + "subprotocol": "DSP", + "subprotocolBody": "{{body with information required by subprotocol}}", + "subprotocolBodyEncoding": "plain", + "securityAttributes": [ + { + "type": "NONE", + "key": "NONE", + "value": "NONE" + } + ] + } + } + ], + "idShort": "batteryPass", + "id": "urn:uuid:777a3f0a-6d29-4fcd-81ea-1c27c1b870cc", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "Submodel", + "value": "urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass" + } + ] + }, + "description": [ + { + "language": "en", + "text": "Battery Passport Submodel" + } + ], + { + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": "https://edc.data.plane/{{path}}/urn:uuid:777a3f0a-6d29-4fcd-81ea-1c27c1b870cc", + "endpointProtocol": "HTTP", + "endpointProtocolVersion": [ + "1.1" + ], + "subprotocol": "DSP", + "subprotocolBody": "id=urn:uuid:3e4a5957-f226-478a-ab18-79ced49d6195;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000", + "subprotocolBodyEncoding": "plain", + "securityAttributes": [ + { + "type": "NONE", + "key": "NONE", + "value": "NONE" + } + ] + } + } + ], + "idShort": "digitalProductPass", + "id": "urn:uuid:777a3f0a-6d29-4fcd-81ea-1c27c1b870cc", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "Submodel", + "value": "urn:samm:io.catenax.generic.digital_product_passport:3.0.0#DigitalProductPassport" + } + ] + }, + "description": [ + { + "language": "en", + "text": "Digital Product Passport Submodel" + } + ] + } + } + ] + } +``` +> **_NOTE:_** +*The BPN number is not required for the configuration of the endpoint, just **make sure that the host is pointing to the EDC Provider**.* + + +### Digital Twin Registry Configuration + +When configuring the digital twin registry behind the EDC Provider you should follow this EDC Registration guidelines: + +#### Variables: + +| Name | Description | Example Value | +|--------------|---------------------------------------------|---------------------------------------------------------------| +| registryUrl | The base url from the digital twin registry | https:///semantics/registry/api/v3.0 | +| registryName | The name from the asset for the registry | digital-twin-registry | + +> **IMPORTANT**: Is mandatory by the *Catena-X Standard CX-0002* from the Digital Twin Registry, the asset type should be `data.core.digitalTwinRegistry` in order to the digital product pass to find the asset in the EDC. + +#### Format and Fields: + +```json +{ + "@context": {}, + "asset": { + "@type": "data.core.digitalTwinRegistry", + "@id": "{{registryName}}", + "properties": { + "description": "Digital Twin Registry", + "contenttype": "application/json" + } + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "proxyPath": "true", + "proxyBody": "true", + "proxyMethod": "true", + "proxyQueryParams": "true", + "baseUrl": "{{registryUrl}}" + } +} +``` + + +## Item Relationship Service Integration + +For deploying and integrating the IRS (Item Relationship Service)[https://github.com/eclipse-tractusx/item-relationship-service] with the digital product pass application first deploy the [reference helm chart values](../../deployment/helm/irs) helm charts. + +For creating relationships between the digital twins register "singleLevelBomAsBuilt" and "singleLevelBomAsUsage" aspects which can be found here: [SingleLevelBomAsBuilt](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built) and [SingleLevelUsageAsBuilt](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_usage_as_built) + + + +> **IMPORTANT**!: The proxy configuration needs to be enabled exactly like it is configured in the dataAdress property above. + +The rest of the assets can be configured in the same way as the normal assets. + +## NOTICE + +This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). + +- SPDX-License-Identifier: Apache-2.0 +- SPDX-FileCopyrightText: 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/digital-product-pass + diff --git a/docs/arc42/Arc42.md b/docs/arc42/Arc42.md index 67ac08710..922a328a8 100644 --- a/docs/arc42/Arc42.md +++ b/docs/arc42/Arc42.md @@ -1,561 +1,816 @@ - - -# (CEC) ARC42 - Digital Product Pass Application Documentation - -![C-X Logo](./CXlogo.png) ![acr24 logo](./arc24logo.png) - -Version: v3.0
-Latest Revision: Aug. 11, 2023 - - -## Table of Contents - -- [(CEC) ARC42 - Digital Product Pass Application Documentation](#cec-arc42---digital-product-pass-application-documentation) - - [Table of Contents](#table-of-contents) - - [Introduction and Goals](#introduction-and-goals) - - [Requirements Overview](#requirements-overview) - - [Quality Goals](#quality-goals) - - [Architecture Constraints](#architecture-constraints) - - [System Scope and Context](#system-scope-and-context) - - [Application State Diagram](#application-state-diagram) - - [Technical Integration Design](#technical-integration-design) - - [Start Up Services Calls](#start-up-services-calls) - - [Create API Diagram](#create-api-diagram) - - [Create Flow Diagram](#create-flow-diagram) - - [Search API Diagram](#search-api-diagram) - - [Search API Flow](#search-api-flow) - - [Sign API + Decline API + Cancel API + Passport API + Status API Diagram](#sign-api--decline-api--cancel-api--passport-api--status-api-diagram) - - [Sign Flow](#sign-flow) - - [Decline API Flow](#decline-api-flow) - - [Cancel API Flow](#cancel-api-flow) - - [Status API Flow](#status-api-flow) - - [Passport API Flow](#passport-api-flow) - - [Business Context](#business-context) - - [Technical Context](#technical-context) - - [Runtime Environments](#runtime-environments) - - [Container Ecosystem](#container-ecosystem) - - [Kubernetes Container platform (gardener)](#kubernetes-container-platform-gardener) - - [Containers](#containers) - - [CI/CD](#cicd) - - [Documentation links](#documentation-links) - - [Catena-X Shared Services](#catena-x-shared-services) - - [Solution Strategy](#solution-strategy) - - [Architecture Diagram](#architecture-diagram) - - [Technology \& Architecture Detail](#technology--architecture-detail) - - [Frontend (User Interface - Client Side)](#frontend-user-interface---client-side) - - [Vue.js 3](#vuejs-3) - - [Vuetify](#vuetify) - - [Component Description](#component-description) - - [Backend (Server Side)](#backend-server-side) - - [Java 19](#java-19) - - [Spring Boot](#spring-boot) - - [Component Description](#component-description-1) - - [Infrastructure](#infrastructure) - - [Kubernetes and Helm Charts](#kubernetes-and-helm-charts) - - [Security Solution Strategy](#security-solution-strategy) - - [Building Block View](#building-block-view) - - [Blackbox Overall System](#blackbox-overall-system) - - [Whitebox Overall System](#whitebox-overall-system) - - [Runtime View](#runtime-view) - - [Deployment View](#deployment-view) - - [Cross-cutting Concepts](#cross-cutting-concepts) - - [Design Decisions](#design-decisions) - - [Searching View](#searching-view) - - [Battery Passport View](#battery-passport-view) - - [Quality Requirements](#quality-requirements) - - [Quality Scenarios](#quality-scenarios) - - [Risks and Technical Debts](#risks-and-technical-debts) - - [Glossary](#glossary) - - [NOTICE](#notice) - -## Introduction and Goals - -Within the Catena-X Network, Digital Product Passports are provided by manufacturers and can be exchanged in a standardized way. The data exchange standards are given by Catena-X and are used provide the product passport to different users in the network. - -This passports can be used for different products like **Batteries**, **Gearboxes**, etc. At the moment the only product implemented are **batteries**, so the user interface only displays product passports. In the near future it will be able to display any passport structure, over a generic product passport that will come in future versions. - -The digital product pass app provides an easy way to request a product passport from a manufacturer using the Catena-X network and standardized components and technologies. The passport will be displayed user-readable in an common browser. The app is used to access the passport data, which is provided by a manufacturer. Another interesting feature, is that you are able to scan a QR-code or by knowing the manufacturer and product-ID a user can request the passport over the Catena-X. On the other end, the manufacturer will provide passports with data elements, that the signed-in user is allowed to see the detailed information from a product. - -This application is developed by the **Digital Product Pass Team**, one of the members from **Catena-X Circular Economy Team**, aiming to contribute to the environmental cause, allowing recyclers, OEMs and dismantlers to know properties, dimensions and other important data related with a current product or material. - -### Requirements Overview - -The product passport consumer app is an web-based application developed in Vue.js, making it accessible using **standard browsers** (Chrome, Edge, Firefox, etc) for any user in the Catena-X Network. - -It displays a specific passport for each product, in the Catena-X network hosted in a backend system. Using the Catena-X data exchange standards to request and receive data from the network it leverages the users and roles provided by Catena-X by using the required shared components (IAM, EDC, SSI, EDC Discovery, Discovery Finder and BPN Discovery) as well as the new Decentral DT-Registry. - -The product passport consumer app UI follows the Catena-X CI layout, keeping things simple for the user while still providing the necessary information. - -A User can request a passport... - -* Either by scanning a **QR-code** which leads to the a passport view UI, allowing the user to visualize all the necessary/required information of a product. Making easier to dismantle it. -* In case a QR is not provided, the user is able to introduce the product id manually in a search field. - -As the data provider might not send every data field regarding to the users privileges, the application is flexible with its layout and data handling, displaying only what it receives. - -### Quality Goals - -1. Reference the release management process with its **Quality Gates** (security, test, documentation, etc) -2. Test created in cypress (reference to test cases) -3. CI Pipeline to reduce manual effort and error. Establish fast feedback. -4. Git branch concept with PR and review-approvals -5. Lint for code formatting and styling - -## Architecture Constraints - -Catena-X Standard to DataExchange, Trust and Security. **We follow the Catena-X Architecture Framework** - -FOSS Guardrails - -Guardrails for Data Souveranity **We follow the Data Souveranity Guardrails from PI5** - -## System Scope and Context - -The Product Passport Application is a Catena-X terms a "blue" application. This means that it is a Business Application that accesses other "green" applications, like the BPN Discovery, EDC Discovery, Discovery Finder, Portal IAM (Keycloack), Secret Management (Hashi Corp Vault), which are provided by the Catena-X network. - -![System Scope and Context](./ContextDiagram.jpeg) - -### Application State Diagram - -This is the state diagram that describes the flow between the frontend and backend components of the application. - -![Application State Design](./StateDiagram.jpeg) - -### Technical Integration Design - -Complete technical interaction overview between frontend and backend - -The interaction between the Product Passport Application previous the "BatteryPass" Application, the EDC Connectors, the Digital Twin registry and other services is detailed in the following page: - -Here is a resume of the frontend and the backend communication. - - -![Technical Integration Resume](./TechnicalIntegrationResume.jpeg) - - -The APIs we see in the diagram are the responsibles for comunicating with the several different services from Catena-X. - -#### Start Up Services Calls - -During the start up from the backend 3 checks are performed. - - 1. Check the connection to the `EDC Consumer` - 2. Check if the BPN Number from the `Backend` and the `EDC Consumer` are the same - 3. Check if the BPN Number from the `Technical User` is the same as the `Backend` and the `EDC Consumer` - -> *NOTE*: This checks can be disabled at the `configuration.security.checks` properties in the helm charts - - -If the `configuration.dtr.central` is disabled the backend will also make a call to the `Discovery Finder` service to find the `BPN Discovey` and `EDC Discovey` services. - -#### Create API Diagram -The `/create` api is responsible for calling the `BPN Discovery` service searching for the BPN of a `manufacturerPartId` and validating if there is any `Decentral Digital Twin Registry` available for the BPN number found in the `EDC Discovery` service. - -If the property `configuration.dtr.temporaryStorage` is set a optimization will be made and the contractAgreementId will be temporary stored together with the DTR endpoint in order to speed up the Passport Search. At the end it will return the process for the user to search a passport. - - -![CreateDiagram](./CreateAPI.jpeg) - -Here is possible to see the complete flow of the create api. -##### Create Flow Diagram - - -![CreateFlow](./CreateProcessFlow.jpeg) - - -#### Search API Diagram - -At the `/search` API the user can search for a serialized Id and get its contract. The `Backend` will search for the Digital Twin and will return the contract for the first one that is found. - -A `sign token` (a sha256 hash) is return also and acts like a "session token" allowing just the user that created the process to sign or decline the contract. - -![Search API](./SearchAPI.jpeg) - -##### Search API Flow -Here we can see the search flow more in detail: - -![Search API Flow](./SearchFlow.jpeg) - - - -#### Sign API + Decline API + Cancel API + Passport API + Status API Diagram - -Once the user has the contract he can call the `/sign` API to start the negotiation process and the transfer of the passport. This means that the user accepted the policy and the framecontracts contained in the contract policy. - -The other option rather than `/sign` is the `/decline` API, that basically blocks the process and makes it invalid. This means that the user declined the specific contract that was found for this process. - -After the user signs the contract he can use the `/status` API to get the process status and see when it is ready to retrieve the passport using the API `/passport`. - -The API `/passport` will descrypt the passport file that is encrypted usint the session token "sign token", and will delete the file so that it is returned just once to the user and can not be accessed anymore. So a new passport will be always need to be requested. - - -> *NOTE*: The user can use `/cancel` to interrupt the negotiation process once it is signed by mistake if is the case. It will be only valid until the negotiation is made. - -![Sign API](./SignAPI.jpeg) - -##### Sign Flow - -Here is described in detail how the sign flow works: - -![Sign API Flow](./SignFlow.jpeg) - - -##### Decline API Flow - -Here is how the flow of decline works: - -![Decline API Flow](./DeclineFlow.jpeg) - -##### Cancel API Flow - -Here is how the flow of cancel works: - -![Cancel API Flow](./CancelFlow.jpeg) - -##### Status API Flow - -The get status API just gives the status for a existing process: - -![Status API Flow](./GetStatus.jpeg) - - -##### Passport API Flow - -This API is responsible for retrieving the passport json and some metadata from the contract exchange. - -![Passport API Flow](./PassportRetrievalFlow.jpeg) - - -Swagger Documentation: [https://materialpass.int.demo.catena-x.net/swagger-ui/inde x.html](https://materialpass.int.demo.catena-x.net/swagger-ui/index.html) - -### Business Context - -**Contents.** -Specification of all communication partners (users, IT-systems, …) with explanations of domain specific inputs and outputs or interfaces. Optionally you can add domain specific formats or communication protocols. - -**Motivation.** -All stakeholders should understand which data are exchanged with the environment of the system. - -**Form.** -All kinds of diagrams that show the system as a black box and specify the domain interfaces to communication partners. -Alternatively (or additionally) you can use a table. The title of the table is the name of your system, the three columns contain the name of the communication partner, the inputs, and the outputs. -***Diagram or Table*** -***Optionally: Explanation of external domain interfaces*** - -### Technical Context - -#### Runtime Environments - -At the moment, the Product Passport Application is hosted in three different environments: - -| Application Runtime Environments | URLs | -| ---- | ----------- | -| Development (DEV) | [https://materialpass.dev.demo.catena-x.net/](https://materialpass.dev.demo.catena-x.net/) | -| Integration (INT) | [https://materialpass.int.demo.catena-x.net/](https://materialpass.int.demo.catena-x.net/) | -| Beta (BETA) | [https://materialpass.beta.demo.catena-x.net/](https://materialpass.beta.demo.catena-x.net/) | - - -| ArgoCD Deployment | URLs | -| ---- | ----------- | -| Development (DEV) | [https://argo.dev.demo.catena-x.net/](https://argo.dev.demo.catena-x.net/) | -| Integration (INT) | [https://argo.int.demo.catena-x.net/](https://argo.int.demo.catena-x.net/) | -| Beta (BETA) | [https://argo.beta.demo.catena-x.net/](https://argo.beta.demo.catena-x.net/) | - - -#### Container Ecosystem - -##### Kubernetes Container platform (gardener) - -* Hotel Budapest (Development, Integration and Beta Environments) -* Namespace: - * product-material-pass - -##### Containers - -* EDC-Consumer Connector -* DPP-Frontend -* DPP-Backend -* PostgreSQL - -#### CI/CD - -* Managed by ArgoCD: - * [https://argo.dev.demo.catena-x.net/](https://argo.dev.demo.catena-x.net/) - * [https://argo.int.demo.catena-x.net/](https://argo.int.demo.catena-x.net/) - * [https://argo.beta.demo.catena-x.net/](https://argo.beta.demo.catena-x.net/) -* Source code management - GitHub Repository: - * [https://github.com/eclipse-tractusx/digital-product-pass](https://github.com/eclipse-tractusx/digital-product-pass) -* DevSecOps: - * [Intro | Catena-x - DevSecOps](https://catenax-ng.github.io/docs/getstarted/intro) -* Eclipse Tractus-X Release Guidelines: - * [Intro | Eclipse Tractus-X - Release Guidelines](https://eclipse-tractusx.github.io/docs/release) - - -#### Documentation links - -* [ARC42 Documentation](./Arc42.md) -* [GitHub Documentation](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docs) -* [Administration Guide](../admin%20guide/Admin_Guide.md) -* [API Documentation (Swagger)](https://materialpass.int.demo.catena-x.net/swagger-ui/index.html) - - -#### Catena-X Shared Services - -* IAM with Keycloak managed by Catena-X: - * [https://centralidp.int.demo.catena-x.net/auth/](https://centralidp.int.demo.catena-x.net/auth/) -* HashiCorp Vault to Store Secrets (https-certificate to access the connectors, *DB-credentials for our postgres db and Keycloak instances*): - * [https://vault.demo.catena-x.net/ui/vault/secrets/material-pass/](https://vault.demo.catena-x.net/ui/vault/secrets/material-pass/) - -## Solution Strategy - -### Architecture Diagram - -![Architecture Diagram](./GraphicArchitectureDiagram.jpeg) - -## Technology & Architecture Detail - -Our technology and architecture are based in the Catena-X Guidelines. However the specific technologies selected are: - -### Frontend (User Interface - Client Side) - -#### Vue.js 3 - -According to the [Vue documentation](https://vuejs.org/guide/introduction.html), Vue (pronounced /vjuː/, like **view** ) is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS, and JavaScript and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be they simple or complex. - -Vue.js in the version 3 allows us to build stable components and have control of all the application lifecycle. One advantage of Vue is that all the components that are build can be scalabled easily, allowing the structure to be generalized. - -In order to speed the development and build safe and stable components, a component has been selected. - -##### Vuetify - -Since we are required to follow the style guidelines from Catena-X, we selected Vuetify in its version 3.0.4, that is built using **Google's Material Design**, the selected Catena-X Style. - -According to the [Vuetify documentation](https://next.vuetifyjs.com/en/introduction/why-vuetify/), every component in Vuetify is handcrafted under the guise of [Google’s Material Design](https://material.io/) specification and comes with hundreds of customization options that fit any style or design; even if it’s not Material. This gives us flexibility when choosing and personalizing the style of the application, while still maintaining the **stability, scalability and security** from the components. And when compared with other frameworks, we can see that an new patch regarding security and stability is release every week, giving us safety that the library is constantly improved and tested. - -![Vue Framework Comparison](./GraphicVueFrameworkComparison2022.png) - -Another advantage from Vuetify is its documentation. There you are allowed to understand all the components and personalize them on-flight. Example: [Vuetify Alerts](https://next.vuetifyjs.com/en/components/alerts/). - -Here we can see the components from the frontend of the application: - -![Frontend Component](./GraphicFrontendComponent.jpg) - - -#### Component Description - -| Component | Description | -| ---- | ----------- | -| Landing Page View | This component is part of the User Interface (UI), it is also responsible of asking the Authentication Module if the user is authenticated and wait for being redirected to the Central IDP, IAM Services from Catena-X. | -| Search Passport View | This component is part of the User Interface (UI), it offers the user the possibility of searching by partInstanceId or Scanning a QR Code that contains the partInstanceId. | -| Passport Viewer View | This component is part of the User Interface (UI), it requests the Passport from the Backend, report errors from the backend, gives a timeout error if the request takes too long or retrieves the passport. | -| Authentication Module | Uses the following library: [https://www.npmjs.com/package/keycloak-js](https://www.npmjs.com/package/keycloak-js). This component is responsible for managing the user authentication, making Central IDP API calls, identifying users and requesting access token and refreshing it  | - -> **_INFO:_** *Just principal components with logics  are represented in this diagram, they are composed of several other smaller visual components, however they include no extra logic rather than displaying information to the user in the User Interface.* - -#### Backend (Server Side) - -The backend was built in order to give support to the frontend and provide dynamic data models, that can be stored in a persistence layer of the server. It also shall be responsible to communicate with the Catena-X network, authenticating the users and retrieving the necessary information in order that the frontend is able to visualize it to the user. - -##### Java 19 - -The latest version of Java was selected so we can have no problem in utilizing new Java Classes and libraries. Java is an object-oriented language and is one of the most maintainable languages. Because it is robustness, cross-platform capabilities, security features and because is easy of use, it has become one of the first choices when providing Internet solutions worldwide. - -###### Spring Boot - -We selected spring boot because it allows us to: - -* Consume different datasets from data-providers and process them for a flexible representation has no standard solution. -* Hiding fields with no values can be done in the computation or with the [Jackson Library](https://www.baeldung.com/jackson-ignore-null-fields) -* Exception Handling is quite comfortable within Java because of the type-safety. Don’t you something like @SneakyThrows and try to not use minor exceptions like RuntimeExceptions, because otherwise you don't have to deal with them explicitly. -* For session management there are [Session Scoped Beans](https://www.baeldung.com/spring-bean-scopes#2-session-scope) in Spring and they live within one http session. -* It allows us to comply with Catena-X security requirements and integrate Keycloak instances for authentication. - -To ease the understanding and get a general technical context of the backend the following diagram was created: - -![Backend Component](./GraphicBackendComponent.jpg) - -#### Component Description - -| Component | Description | -| ---- | ----------- | -| HTTP Controllers | The http controllers are the main components and they are responsible for handling the external HTTP calls and APIs allowing other systems to access data | -| Services | The services are second main component and they are  responsible of interacting and getting data of external systems | -| Listeners | This component is responsible for listening to events and executing logics when they occur | -| Configurations | This component is integrated in Spring Boot and with the Utils, they are responsible for setting the parameters and logics of the whole backend system.  | -| Data Managers | This component is responsible for storing and retrieving data. (At the moment no data is stored apart from configurations) | -| Middleware and Interceptors | These components are integrated with the HTTP Controllers, however they are responsible for the information and for adding logics between the requests. Thanks to this component that we are able to log all API calls coming from the Frontend or external systems | -| Exceptions | This component contains the exception definitions, they can be in Runtime Exeception or Normal Exception Types. | -| Utils | This component is the base for all the  components, we are able to manage such as, Catena-X Logics, Configuration Logics, Cryptography, Logging, etc...| - - -### Infrastructure - -#### Kubernetes and Helm Charts - -Containerization technology is used in order to ease the deployment and management process. Kubernetes is an open-source container orchestration platform that allows us to automate deployment, scale, and management of containerized applications using Docker containers. - -Helm is a package manager for Kubernetes and chart describes a set of Kubernetes resources such as deployment, pod, service, and other objects. Helm charts allow us to version the Kubernetes manifests and this lets us to install specific application/chart versions, means keeping the specific configurations for infrastructure as is in the code. Here, helm charts are used to provision battery passport components in different software runtime environments for instance, development, integration and pre-production which provides us a flexible way by having their separate configuration files for each infrastructure. - -[Gartner](https://blogs.gartner.com/tony-iams/use-platform-engineering-to-implement-devops-workflows-with-kubernetes/#:~:text=Gartner%20is%20seeing%20enterprises%20deploy%20Kubernetes%20at%20increasing,greater%20varieties%20of%20applications%20and%20servicing%20multiple%20teams.) is considered to deploy Kubernetes resources at increasing scale as they look towards the cloud-native applications for modernizing infrastructure and applications across the organizations, targeting greater varieties of applications and servicing multiple teams. - -[Argo CD platform](https://argoproj.github.io/cd/) is implemented as a Kubernetes controller and used as GitOps continuous delivery tool for Kubernetes. It is a declarative approach to define application components, configurations, and environments that should be versioned controlled. This allows us to manage application deployment and lifecycle that should be automated, auditable, and easy to understand. In this project, we used the Argo CD tool as a deployment platform where the Kubernetes cluster is running using Gartner, managed by the DevSecOps team. We used Argo CD to deploy the battery passport application components. - -### Security Solution Strategy - -In order to maintain the system safe and to comply with the quality gates a series of security applications are used. - -## Building Block View - -The system has certain building blocks which are illustrated below. -The primary battery passport application components are: - -* Consumer Frontend -* Consumer Backend -* EDC Consumer - -**Consumer Frontend:** A JavaScript-based user interface to request a battery passport from a battery manufacturer through Ecpilse Dataspace Connector (EDC) and Catena-X shared services, utilized by the consumer backend component. - -**Consumer Backend:** A Java-based backend system that manages a variety of passports, utilizes Catenax shared services, and handles requests from the frontend component. - -**EDC Consumer:** An Eclipse Dataspace Connector (EDC) is a gateway, used to establish a connection with the provider EDC in order to perform data transfer process, followed by certain steps such as requesting contract offers, doing contract negotiations, and transferring requested data once negotiations are agreed by both parties. - -There are different levels categorized concerning the application resources deployed for a specific tool: - -**Scope & Context:** A top-level defines the application runtime environment where application artifacts are deployed and running in a remote Kubernetes cluster in Argo CD (Hotel Budapest - INT) through helm charts. The deployed components are: "materialpass-edc" which refers to the consumer connector and "battery passport consumer application" refers to the consumer frontend (UI) application. - -**Level 1:** this level defines a deep dive into each deployment artifact: materialpass-edc, and digital-product-pass (consumer-ui and consumer-backend). In this layer, Kubernetes and helm resources are utilized using umbrella helm charts, consisting of some dependencies (container images) which are fetched from the GitHub registries. - -**Level 2:** A centralized source control repository where the source code and build artifacts are stored and version controlled. It also contains various git actions, for instance, the Build pipeline that publishes compiled applications onto the GitHub Container Packages Registry (GHCR) which is further accessed by the next level and other build actions that get triggered to verify the CatenaX quality gate requirements. - -**Level 3:** A development level where application source code is developed and built by developers. - -![Building Block View](./GraphicBulidingBlockView.jpg) - -### Blackbox Overall System - -![Blackbox Overall System](./GraphicBlackboxOverallSys.jpg) - -### Whitebox Overall System - -A developer who creates a new feature branch to work on a specific feature that would be later on introduced in the next application release. He pushes the branch into the remote git repository, opens a new pull request (PR), and involves others such as project developer(s) and maintainer(s) to review his work where they could also provide their comments. Once PR is approved, the changes will get merged into the develop/main repository. - -During the merge process, the build pipeline also known as Continuous integration (CI) gets triggered through a git action which builds the application artifacts, packages them into a docker image, and finally publishes the image onto the GitHub Container Registry with the tag holding latest commit SHA. In addition, other jobs are also executed which scan the code based on various criteria to fulfill the quality gate requirements. - -The application deployment is translated into Kubernetes resources through helm charts which are deployed in Argo CD. We take the advantage of built-in AutoSync feature of ArgoCD that does the Continuous Deployment(CD) job for us. This is done by matching the current and desired state of the application if there is a new code change or a new container image uploaded to a registry. - -![Whitebox Overall System](./GraphicWhiteboxOverallSys.png) - -| Name | Responsibility | -| ---- | -------------- | -| GitHub repository | Source Code Management (SCM), Version Controlling System (VCS) that stores and manages application source code and build files | -| Build and publish docker image | A Continuous Integration pipeline, used to build UI container image and upload it to the registry | -| Other Git actions | KICS (Code scan), Veracode (secret scan), Trivy (Container scan), SonarCloud (code quality scan), ESLint (code formatting) | -| GitHub Container Registry (GHCR) | A container registry to store and manage container images and version them with tags | -| Kubernetes deployment | Kubernetes manifest yaml files such as deployment, pod, service, ingress | -| Argo CD | Application runtime environment managed by DevSecOps team | - -## Runtime View - -* Behavioral view -* User Experience (UX) journey - -![Runtime View](./GraphicRuntimeView.png) - -## Deployment View - -![DeploymentView](./GraphicDeploymentView.jpg) - -## Cross-cutting Concepts - -![Cross Cutting Concepts](./GraphicCrossCuttingConcepts.jpg) - -## Design Decisions - -Designs are followed using the Catena-X Style Guidelines. - - -It was used a basic table, the logo, the footer and the avatar from Catena-X design guidelines: - -![Implementation View - Basic Table](./GraphicBasicTable.png) - -![Catena-X Logo Style Guidelines](./GraphicLogos.png) - -![Catena-X Avatar](./GraphicAvatar.png) - -### Searching View - -The Search view was also design following the Catena-X buttons and search style guides - -![QR Code and Search View](./GraphicSearchView.png) - -### Battery Passport View - -The passport view was designed following using Catena-X accordion guidelines. - -![Battery Passport View - General Information](./GraphicBatteryPassportViewGeneralInfo.png) - -![Battery Passport View - Electrochemical properties](./GraphicBatteryPassportView.png) - -## Quality Requirements - -As the Product Passport product is part of the Catena-X Network we are required to follow the quality requirements set by the Governance and Architecture Teams. - -### Quality Scenarios - -**QS-01: The user shall response with a user friendly way to every request, even in case of error.:** -When a used access the application and requests are performed from the frontend side, an error handling must be implemented in order to assure the correct user workflow within the application. - -**QS-02: The application needs to provide a intuitive UI to the user.:** -An user needs to be able to understand easily the application interface, in order to access the required data and to navigate thought the app. - -## Risks and Technical Debts - -**Who will be the owner of the application, who will maintain it?** - -## Glossary - -| Term | Definition | -| ---- | -------------- | -| EDC Connector | The Eclipse Data Space Connector provides a generic way to express, negotiate, and document the rules under which data is shared, and also with whom. | -| QG | Quality Gate, is a documentation, security & user satisfaction process defined by the Catena-X governance and architects in order to achieve common quality standards between the network. | -| IAM | Identity Access Management is a framework of policies and technologies to ensure that the right users (that are part of the ecosystem connected to or within an enterprise) have the appropriate access to technology resources. | -| DT-Reg | Digital Twin Registry is service of the Catena-X Semantic Layer that links IDS assets/artifacts/implementations (or rather: well-defined and cross-related subsets thereof) with their semantic descriptions and structure (aspect models as hosted in the Semantic Hub) | -| DAPS |The Dynamic Attribute Provisioning Service (DAPS) is a Federation Service of Identity and Trust (Authentication/Authorization), which is used by the traceability system. | -| BPDM | Business Partner Data Management is a system that has the goal of representing legal entities, sites and the specific additional addresses of a legal entity. | -| CD | Continuous Deployment is a software engineering approach in which software functionalities are delivered frequently and through automated deployments. | -| CI | Continuous Integration is a software engineering practice of merging all developers' working copies to a shared mainline several times a day. | -| Backend | Is the part of a computer system or application that is not directly accessed by the user, typically responsible for storing and manipulating data. | -| Frontend | Is the graphical user interface (UI) of a software that makes it easier to use | -| Git | Is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. | -| DevOps | Is a set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. | -| Repository | Is a database of digital content with an associated set of data management, search and access methods allowing application-independent access to the content, rather like a digital library, but with the ability to store and modify content in addition to searching and retrieving. | - - -## NOTICE - -This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - -- SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation -- Source URL: https://github.com/eclipse-tractusx/digital-product-pass + + +# (CEC) ARC42 - Digital Product Pass Application Documentation + +![C-X Logo](./media/CXlogo.png) ![acr42 logo](./media/arc42logo.png) + +| Version | v5.0 | +| ------- | ---- | + +Latest Revision: *Nov 20, 2023* + + +## Table of Contents + +- [(CEC) ARC42 - Digital Product Pass Application Documentation](#cec-arc42---digital-product-pass-application-documentation) + - [Table of Contents](#table-of-contents) + - [Introduction and Goals](#introduction-and-goals) + - [Requirements Overview](#requirements-overview) + - [Quality Goals](#quality-goals) + - [Architecture Constraints](#architecture-constraints) + - [System Scope and Context](#system-scope-and-context) + - [Application State Diagram](#application-state-diagram) + - [Technical Integration Design](#technical-integration-design) + - [Authentication \& Authorization](#authentication--authorization) + - [End User Token](#end-user-token) + - [Technical User Token](#technical-user-token) + - [Start Up Services Calls](#start-up-services-calls) + - [Data Retrieval Flow](#data-retrieval-flow) + - [Discovery Phase](#discovery-phase) + - [Digital Twin Registry Search Phase](#digital-twin-registry-search-phase) + - [Create API Sequence Diagram](#create-api-sequence-diagram) + - [Create Flow Diagram](#create-flow-diagram) + - [Digital Twin Search](#digital-twin-search) + - [Search with Drill Down](#search-with-drill-down) + - [Search API Sequence Diagram](#search-api-sequence-diagram) + - [Search API Flow](#search-api-flow) + - [Aspect Configuration](#aspect-configuration) + - [Data Negotiation and Transfer Phase](#data-negotiation-and-transfer-phase) + - [Agree API Sequence Diagram](#agree-api-sequence-diagram) + - [Agree Flow Diagram](#agree-flow-diagram) + - [Decline API Flow Diagram](#decline-api-flow-diagram) + - [Cancel API Flow Diagram](#cancel-api-flow-diagram) + - [Status API Flow Diagram](#status-api-flow-diagram) + - [Data API Flow Diagram](#data-api-flow-diagram) + - [Item Relationship Service Integration (Drill Down Functionality)](#item-relationship-service-integration-drill-down-functionality) + - [Input Parameters](#input-parameters) + - [Callback Url](#callback-url) + - [Important Notes](#important-notes) + - [Search API with IRS](#search-api-with-irs) + - [Search API Sequence with IRS](#search-api-sequence-with-irs) + - [Search API Flow with IRS](#search-api-flow-with-irs) + - [Drill Down Status Check with IRS](#drill-down-status-check-with-irs) + - [State API Description](#state-api-description) + - [Tree API Description](#tree-api-description) + - [Components API Description](#components-api-description) + - [Async Data Retrieval Sequence with IRS](#async-data-retrieval-sequence-with-irs) + - [Async Data Retrieval Flow with IRS](#async-data-retrieval-flow-with-irs) + - [Business Context](#business-context) + - [Technical Context](#technical-context) + - [Container Ecosystem](#container-ecosystem) + - [Kubernetes Container platform (gardener)](#kubernetes-container-platform-gardener) + - [Containers](#containers) + - [CI/CD](#cicd) + - [Documentation links](#documentation-links) + - [Catena-X Shared Services](#catena-x-shared-services) + - [Solution Strategy](#solution-strategy) + - [Architecture Diagram](#architecture-diagram) + - [Technology \& Architecture Detail](#technology--architecture-detail) + - [Frontend (User Interface - Client Side)](#frontend-user-interface---client-side) + - [Vue.js 3](#vuejs-3) + - [Vuetify](#vuetify) + - [Component Description](#component-description) + - [Backend (Server Side)](#backend-server-side) + - [Java 19](#java-19) + - [Spring Boot](#spring-boot) + - [Component Description](#component-description-1) + - [Infrastructure](#infrastructure) + - [Kubernetes and Helm Charts](#kubernetes-and-helm-charts) + - [Security Solution Strategy](#security-solution-strategy) + - [Building Block View](#building-block-view) + - [Blackbox Overall System](#blackbox-overall-system) + - [Whitebox Overall System](#whitebox-overall-system) + - [Runtime View](#runtime-view) + - [Deployment View](#deployment-view) + - [Cross-cutting Concepts](#cross-cutting-concepts) + - [Design Decisions](#design-decisions) + - [Searching View](#searching-view) + - [Battery Passport View](#battery-passport-view) + - [Digital Product Pass View](#digital-product-pass-view) + - [IRS Component Drill Down](#irs-component-drill-down) + - [Loading](#loading) + - [No Children Available](#no-children-available) + - [Tree of Components Available](#tree-of-components-available) + - [Error Occurred](#error-occurred) + - [Quality Requirements](#quality-requirements) + - [Quality Scenarios](#quality-scenarios) + - [Risks and Technical Debts](#risks-and-technical-debts) + - [Glossary](#glossary) + - [NOTICE](#notice) + +## Introduction and Goals + +Within the Catena-X Network, Digital Product Passports are provided by manufacturers and can be exchanged in a standardized way. The data exchange standards are given by Catena-X and are used provide the product passport to different users in the network. + +The digital product pass app provides an easy way to request a product passport from a manufacturer using the Catena-X network and standardized components and technologies. The passport will be displayed user-readable in an common browser. The app is used to access the passport data, which is provided by a manufacturer. Another interesting feature, is that you are able to scan a QR-code or by knowing the manufacturer and product-ID a user can request the passport over the Catena-X. On the other end, the manufacturer will provide passports with data elements, that the signed-in user is allowed to see the detailed information from a product. + +This passports can be used for different products like **Batteries**, **Gearboxes**, etc. The digital product pass frontend viewer at the moment supports tree types of passports: + + - Digital Product Pass + - Battery Pass + - Transmission Pass + +The digital product pass backend has the power to retrieve any aspect from the Catena-X Network. More information at the [Aspect Configuration]() + +This application is developed by the **Digital Product Pass Team**, one of the members from **Catena-X Circular Economy Use Case Team**, aiming to contribute to the environmental cause, allowing recyclers, OEMs and dismantlers to know properties, dimensions and other important data related with a current product or material. + +### Requirements Overview + +The product passport consumer app is an web-based application developed in Vue.js, making it accessible using **standard browsers** (Chrome, Edge, Firefox, etc) for any user in the Catena-X Network. + +It displays a specific passport for each product, in the Catena-X network hosted in a backend system. Using the Catena-X data exchange standards to request and receive data from the network it leverages the users and roles provided by Catena-X by using the required shared components (IAM, EDC, SSI, EDC Discovery, Discovery Finder and BPN Discovery) as well as the new Decentral DT-Registry. + +The product passport consumer app UI follows the Catena-X CI layout, keeping things simple for the user while still providing the necessary information. + +A User can request a passport... + +* Either by scanning a **QR-code** which leads to the a passport view UI, allowing the user to visualize all the necessary/required information of a product. Making easier to dismantle it. +* In case a QR is not provided, the user is able to introduce the product id manually in a search field. + +As the data provider might not send every data field regarding to the users privileges, the application is flexible with its layout and data handling, displaying only what it receives. + +### Quality Goals + +1. Reference the release management process with its **Quality Gates** (security, test, documentation, etc) +2. Test created in cypress (reference to test cases) +3. CI Pipeline to reduce manual effort and error. Establish fast feedback. +4. Git branch concept with PR and review-approvals +5. Lint for code formatting and styling + +## Architecture Constraints + +Catena-X Standard to DataExchange, Trust and Security. **We follow the Catena-X Architecture Framework** + +FOSS Guardrails + +Guardrails for Data Souveranity **We follow the Data Souveranity Guardrails from PI5** + +## System Scope and Context + +The Product Passport Application is a Catena-X terms a "blue" application. This means that it is a Business Application that accesses other "green" applications, like the BPN Discovery, EDC Discovery, Discovery Finder, Portal IAM (Keycloack), Secret Management (Hashi Corp Vault), which are provided by the Catena-X network. + + +![Data Retrieval Context](media/dataRetrieval/digitalProductPassContext.jpg) + +### Application State Diagram + +This is the state diagram that describes the flow between the frontend and backend components of the application. + +![Application State Design](./media/dataRetrieval/userFlow.jpg) + +### Technical Integration Design + +Complete technical interaction overview between frontend and backend + +The interaction between the Product Passport Application previous the "BatteryPass" Application, the EDC Connectors, the Digital Twin registry and other services is detailed in the following page: + +Here is a resume of the frontend and the backend communication. + + +![Technical Integration Resume](./media/dataRetrieval/dataRetrievalResume.jpg) + + +The APIs we see in the diagram are the responsibles for comunicating with the several different services from Catena-X. + +### Authentication & Authorization + +The authorization & authentication are dependent in the Portal Central IDP or a Keycloak instance. + +Here is an example of how the authentication & authorization works: + +![Authentication Flow](media/auth/authenticationFlow.jpg) + +The Digital Product Pass has two authorization methods: + +| Authorization Type | Description | +| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Portal Roles | Each digital product pass application contains an specific "AppId" provided by the portal in the Marketplace registration. And this Id shall be added to the configuration of the DPP Application in order to authenticate the user. If the end user contains any role added in the portal it will have access to the application if enabled. | +| Business Partner Number (BPN) | The digital product pass application contains a check for the "BPN" of the end user. An option is also to allow the user to login if he is belonging to the company of the configured "EDC" so no user can act in name of a specific company. | + +#### End User Token +All the APIs in the Backend except the `/health` API are secured by the usage of JWT Tokens generated by the `Keycloak` or the `Central IDP` service for the End User. + +The Frontend is the responsible for obtaining this token and refreshing it, so in this way **the User Session is administrated in the Frontend Browser**, remaining at the client and **is not stored at the Backend**. In this way the Backend is just responsible for identifying which user and with which roles is logged in. + +> **NOTE**: At the moment role authentication is not implemented, so the backend is going to return the same information without checking the role, just checking if the Token is valid. + +*Frontend Auth Configuration*: `frontend.productpass.idp_url` and `frontend.productpass.keycloak` configurations are required to be added and need to be valid in order that the frontend component works. + +```yaml +clientId: "" +realm: "" +onLoad: "login-required" +``` + +*Backend Auth Configuration*: `backend.application.configuration.keycloak` is required to be completed: +```yaml +realm: +resource: "" +tokenUri: 'https:///auth/realms//protocol/openid-connect/token' +userInfoUri: 'https:///auth/realms//protocol/openid-connect/userinfo' +``` + +#### Technical User Token +In order that the Backend can access different services like the `IRS` or the `BPN Disocovery` for example, it needs to obtain at the `Keycloak` or `Central IDP` the an **Technical User Token** + +*Backend Technical User Auth Configuration*: `backend.edc` is required to be completed: +```yaml +clientId: "" +clientSecret: "" +``` +#### Start Up Services Calls + +During the start up from the backend 3 checks are performed. + + 1. Check the connection to the `EDC Consumer` + 2. Check if the BPN Number from the `Backend` and the `EDC Consumer` are the same + 3. Check if the BPN Number from the `Technical User` is the same as the `Backend` and the `EDC Consumer` + +> *NOTE*: This checks can be disabled at the `configuration.security.checks` properties in the helm charts + + +If the `configuration.dtr.central` is disabled the backend will also make a call to the `Discovery Finder` service to find the `BPN Discovey` and `EDC Discovey` services. + + +### Data Retrieval Flow + +As detailed at the [Data Retrieval Guide Phases](../data%20retrieval%20guide/DataRetrievalGuide.md#data-retrieval-flow) there are 4 main phases required to retrieve data in the **Catena-X Network**: + + 1. Discovery Phase + 2. Digital Twin Registry Search Phase + 3. Digital Twin Search Phase + 4. Data Negotiation and Transfer Phase + +Below it is described how does the **Digital Product Pass** goes through this phases: +> **NOTE**: The APIs below have been simplified without their prefix however they are belonging to the `/api/contract/*` API Controller. + +#### Discovery Phase + +The **Digital Product Pass** application request the Discovery Service in startup gathering the `BPN Discovery` and the `EDC Discovery` endpoints. + +The keys used for searching the endpoints in the Discovery Service by default are: + +| Key | Service Name | +| --- | ------------ | +| bpn | EDC Discovery Service | +| manufacturerPartId | BPN Discovery Service | + +> **IMPORTANT NOTE**: This keys can be modified at the configuration (`backend.application.configuration.discovery.bpn.key` and `backend.application.configuration.discovery.edc.key`) +in case the keys used in the Discovery Service are another ones. + +#### Digital Twin Registry Search Phase +The **Digital Twin Registry Search Phase** as it is detailed at the [Data Retrieval Guide Phase 1 and 2](../data%20retrieval%20guide/DataRetrievalGuide.md#1-discovery-phase--2-digital-twin-registry-search-phase) is the junction of two main phases the *Discovery Phase* and the *Digital Twin Registry Search Phase* which are essential for starting the Digital Twin Search. + +The `/create` api is responsible for calling the `BPN Discovery` service searching for the BPN of a `manufacturerPartId` and validating if there is any `Decentral Digital Twin Registry` available for the BPN number found in the `EDC Discovery` service. +This is detailed [here](../data%20retrieval%20guide/DataRetrievalGuide.md#1-discovery-phase--2-digital-twin-registry-search-phase) in the Data Retrieval Guide. + +The API is called "**create**" because it is responsible for creating the **process** which will be responsible for doing the data retrieval in the Digital Product Pass. +Basically it creates a `processId` when the `Digital Twin Registries` are found and are available for searching Digital Twins. + +> **NOTE**: If the property `configuration.dtr.temporaryStorage` is set a optimization will be made and the contractAgreementId will be temporary stored together with the DTR endpoint in order to speed up the Passport Search. At the end it will return the process for the user to search a passport. + +##### Create API Sequence Diagram + +![CreateDiagram](./media/dataRetrieval/createApiSequence.jpg) + +##### Create Flow Diagram + +![CreateFlow](./media/dataRetrieval/createApiFlow.jpg) + + +#### Digital Twin Search + +The **Digital Twin Search** as it is detailed at the [Data Retrieval Guide Phase 3](../data%20retrieval%20guide/DataRetrievalGuide.md#3-digital-twin-search-phase-1) is the phase responsible for search in all the **Digital Twin Registries** found at the previous phase, finding and retrieving the searched **Digital Twin**. + +As described at the *Data Retrieval Guide* the **Digital Product Pass** Application is searching by default for the *partInstanceId* of an specific digital twin. + +> **NOTE**: This parameter can be changed in the request of the `/search` API, by including the `idType` property. + +At the `/search` API the user can search for a serialized Id and get its contract. The `Backend` will search for the Digital Twin and will return the contract for the first one that is found. + +A `sign token` (a sha256 hash) is return also and acts like a "session token" allowing just the user that created the process to sign or decline the contract. + +##### Search with Drill Down + +The search diagrams below describe the `Search` for digital twins without the **IRS Drill Down** enabled. For more information how it would look if the drill down is enabled by setting the `children` property to on or at the backend configuration param `backend.application.configuration.irs.enabled` to `true`, please look at this section: [Search API with IRS](#search-api-with-irs) + +##### Search API Sequence Diagram +![search Api Sequence](media/dataRetrieval/searchApiSequence.jpg) + +##### Search API Flow + +![Search API Flow](./media/dataRetrieval/searchApiFlow.jpg) + + +##### Aspect Configuration + +The Aspect search order and priority is defined at the configuration: `backend.configuration.passport.aspects`. + +Currently the default order of aspects is: + + 1. Digital Product Pass (urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport) + 2. Battery Pass (urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport) + 3. Transmission Pass (urn:bamm:io.catenax.transmission.transmission_pass:1.0.0#TransmissionPass) + +This means that first the backend will search in the digital twin if the digital product pass is available and then will search for the next ones. + +> **NOTE**: The backend is able to retrieve any aspect from the Catena-X Network, just configure the `semanticId` parameter in the `/api/contract/search` API request body and continue the data negotiation and transfer phase until the data retrieval. + +#### Data Negotiation and Transfer Phase + +The **Data Negotiation and Transfer Phase** as it is detailed at the [Data Retrieval Guide Phase 4](../data%20retrieval%20guide/DataRetrievalGuide.md#4-data-negotiation-and-transfer-phase-1) is the phase responsible for the final data transfer and negotiation. In this phase we retrieve the data using the EDC. + +Once the user has the contract he can call the `/agree` API to start the negotiation process and the transfer of the passport. This means that the user accepted the policy and the frame-contracts contained in the contract policy. + +The other option rather than `/agree` is the `/decline` API, that basically blocks the process and makes it invalid. This means that the user declined the specific contract that was found for this process. + +After the user signs the contract he can use the `/status` API to get the process status and see when it is ready to retrieve the passport using the API `/data`. + +The API `/data` will decrypt the passport file that is encrypted using the session token "sign token", and will delete the file so that it is returned just once to the user and can not be accessed anymore. So a new passport will be always need to be requested. + + +> *NOTE*: The user can use `/cancel` to interrupt the negotiation process once it is signed by mistake if is the case. It will be only valid until the negotiation is made. + +##### Agree API Sequence Diagram + +![Agree Api Sequence](media/dataRetrieval/agreeApiSequence.jpg) + +##### Agree Flow Diagram + +Here is described in detail how the sign flow works: + +![agree API Flow](./media/dataRetrieval/agreeApiFlow.jpg) + +##### Decline API Flow Diagram + +Here is how the flow of decline works: + +![Decline API Flow](./media/dataRetrieval/declineApiFlow.jpg) + +##### Cancel API Flow Diagram + +Here is how the flow of cancel works: + +![Cancel API Flow](./media/dataRetrieval/cancelApiFlow.jpg) + +##### Status API Flow Diagram + +The get status API just gives the status for a existing process: + +![Status API Flow](./media/dataRetrieval/statusApiFlow.jpg) + + +##### Data API Flow Diagram + +This API is responsible for retrieving the Aspect Model Payloads and some metadata from the contract exchange. + +![Passport API Flow](./media/dataRetrieval/dataApiFlow.jpg) + + +Swagger Documentation: [https://materialpass.int.demo.catena-x.net/swagger-ui/index.html](https://materialpass.int.demo.catena-x.net/swagger-ui/index.html) + + +### Item Relationship Service Integration (Drill Down Functionality) + +The Item Relationship Service [IRS] (**[tractusx/item-relationship-service](https://github.com/eclipse-tractusx/item-relationship-service)**) is responsible for providing the drill down functionality the Digital Product Pass application needs for finding the children of the current passports. + +The IRS ([charts reference implementation](../../deployment/helm/irs)) is deployed and attached to the EDC Consumer so that it can search in the network for the children of an specific `globalAssetId` and a `BPN`. + +> **NOTE**: The IRS Functionality can be deactivated by setting the following configuration at the `values.yaml` file to false: `backend.configuration.irs.enabled` or by setting the attribute `children` to false when the `/api/contract/search` API is called. + +##### Input Parameters +Before the Digital Product Pass Application requests the search for the children of a Digital Twin in the IRS `/jobs` [POST] API, it needs to identify some parameters to input in the Job Request: + +| Key | Description | +| ------- | ---- | +| **globalAssetId** | The `globalAssetId` is found in the Digital Twin retrieved from the `Digital Twin Registry` component found during the [Digital Twin Search](#digital-twin-search) | +| **bpn** | The `business partner number` is found at the `BPN Discovery` and is selected once the `Digital Twin` is found at a `Digital Twin Registry` | + +##### Callback Url +The backend from the Digital Product Pass is responsible for the IRS communications. In order to save the constant requesting for the IRS status in the `jobs/{jobId}` API, it will use the "callbackUrl" property when starting an IRS job. + +The callback url is contructed in the following way: + +``` +https:///api/irs/{processId}/{searchId}?status=COMPLETED&id={globalAssetId} +``` + +This are the following parameters: +| Key | Description | +| ------- | ---- | +| **processId** | Parameter generated by the `/create` api and identifies which process it belong to the job search. | +| **searchId** | The search id is a md5 hash generated by the backend based on the specific `globalAssetId`, the `processId` and other unique information. Therefore any attacks against the backend IRS search process can be executed. And in this way the IRS does not needs any authentication at the response header. +| **globalAssetId** | The `globalAssetId` is found in the Digital Twin retrieved from the `Digital Twin Registry` component found during the [Digital Twin Search](#digital-twin-search) | + +Once the callback url is called when the job is in state "COMPLETED" the backend will call the `jobs/{jobId}` API of the IRS to request the Job Information and populate the **tree data model** if children are available. + +##### Important Notes +These are important notes related to the IRS search. + +- The drill down functionality is fixed to `1 depth` because of processing time issues and because most of the cases the "allowed" depth visualization will be 1 level down because of the `one level up - one level down` rule +- The current version of the IRS ([`v4.1.0`](https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/4.1.0)) takes approximately 7 minutes to load the children. Because of this: + - Some timeouts were set at the backend and frontend components to prevent that the loading time is infinite +- The IRS is currently configured to call the "callback url" when the status "COMPLETED" is reached. In case the IRS is not responding for the timeout time it will be considered as an error. +- The drill down functionality is build in the way that data sovereignty is respected. This means: + - The Digital Product Pass applications knows where the information is, because of the digital twin retrieved at the IRS Response, however it will do the contract negotiation again searching for the `Digital Product Pass` aspect or any other aspect in the [**Aspect Search Order**](#aspect-configuration) + +#### Search API with IRS + +The `/search` api detailed at the [Digital Twin Search Phase](#digital-twin-search) is is responsible for finding the **Digital Twin** searched. + +When the IRS is enabled the `/search` API will also start in parallel the search for the children digital twins at the IRS component. It will create a Job using the `globalAssetId` attribute contained in the Digital Twin found. As detailed [above](#input-parameters). + +The Job parameters (*jobId, globalAssetId, jobStatus*) will be stored in the `meta.json` file from the process and can be accessed by the backend always when the frontend requests it using the `processId`. + +The backend will also create a single node tree for the Digital Twin that is already available. Creating a `treeDataModel.json` file at the process directory. + +##### Search API Sequence with IRS +![IRS Search Sequence](./media/irs/SearchAPIwithIRS.jpg) + +##### Search API Flow with IRS +![IRS Search Flow](media/irs/irsSearchFlow.jpg) + + +#### Drill Down Status Check with IRS + +Once the data is retrieved after calling the `/data` API the frontend will be requesting the backend for the current status of the IRS job which is searching for the children asyncronously. + +##### State API Description + +In order that the frontend knows what is the status for the digital twin drill down search done by the IRS component, it can call the `/api/irs/{processId}/state` API. It will return the current status of the Job. Basically the backend will be waiting for the call of the callbackUrl (More detailed information [here](#callback-url)) and will return the current status. + +States Available: + +For easing the processing the state API is a leight weighted and returns really fast the responses for redusing processing and waiting time. It matches the status from the HTTP protocol however they can mean different things: + +| Status Code | Status Name | Status Description +| ----------- | ----------- | ------------------ | +| **200** | OK | The job callback was done and children were found, the Job Description is returned | +| **404** | Not Found | The job callback was done and children were not found | +| **201** | No Content | This means that the job is still running and no job callback was done yet | +| **405** | Method Not Allowed | The method is not allowed to be called because the IRS property was not enabled at the `/search` method or the IRS configuration property was not enabled in the backend. +| **401** | Not Authorized | The authentication has expired or the token is not valid | +| **400** | Bad Request |There was an error when starting the IRS job or at the end of the job processing (when the timeout is reached after receiveing no response from the IRS) | +| **500** | Internal Server Error | There was an error while processing the drill down | + +##### Tree API Description + +The `/api/irs/{processId}/tree` returns the complete content of the **Tree Data Model** which contains the digital twins and the complete job information as well as the children structured in a node format. + +> **NOTE**: At the moment this API is not used by the frontend since the structure of the data is too detailed and big for the frontend processing. Its just ideal for storing and searching for data fast. + +##### Components API Description + +The `/api/irs/{processId}/components` API is called by the frontend when the `/api/irs/{processId}/state` API returns a `200` with `children available`. Additionally it is also called at the start of the search process for returning the inital tree with one digital twin. It returns a simplified/resumed version of the `/api/irs/{processId}/tree`, with a Array Node structure allowing the frontend to visualize the data in a more optimized way and making this API returning data more leight weighed. + +However the search using this API response is not ideal, better is to use the `/api/irs/{processId}/tree` API when searching for data. + +##### Async Data Retrieval Sequence with IRS +![IRS Search Flow](./media/irs/IRSDataSearch.jpg) + +##### Async Data Retrieval Flow with IRS +![IRS Data Apis Flow](media/irs/irsDataApisFlow.jpg) + + +### Business Context + +**Contents.** +Specification of all communication partners (users, IT-systems, …) with explanations of domain specific inputs and outputs or interfaces. Optionally you can add domain specific formats or communication protocols. + +**Motivation.** +All stakeholders should understand which data are exchanged with the environment of the system. + +**Form.** +All kinds of diagrams that show the system as a black box and specify the domain interfaces to communication partners. +Alternatively (or additionally) you can use a table. The title of the table is the name of your system, the three columns contain the name of the communication partner, the inputs, and the outputs. +***Diagram or Table*** +***Optionally: Explanation of external domain interfaces*** + +### Technical Context + +#### Container Ecosystem + +##### Kubernetes Container platform (gardener) + +* Hotel Budapest (Development, Integration and Beta Environments) +* Namespace: + * product-material-pass + +##### Containers + +* EDC-Consumer Connector +* DPP-Frontend +* DPP-Backend +* PostgreSQL + +#### CI/CD +* Source code management - GitHub Repository: + * [https://github.com/eclipse-tractusx/digital-product-pass](https://github.com/eclipse-tractusx/digital-product-pass) +* DevSecOps: + * [Intro | Catena-x - DevSecOps](https://catenax-ng.github.io/docs/getstarted/intro) +* Eclipse Tractus-X Release Guidelines: + * [Intro | Eclipse Tractus-X - Release Guidelines](https://eclipse-tractusx.github.io/docs/release) + + +#### Documentation links + +* [ARC42 Documentation](./Arc42.md) +* [GitHub Documentation](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/docs) +* [Administration Guide](../admin%20guide/Admin_Guide.md) +* [API Documentation (Swagger)](https://app.swaggerhub.com/apis/eclipse-tractusx-bot/digital-product-pass) +* [Data Retrieval Guide](../data%20retrieval%20guide/DataRetrievalGuide.md) + + +#### Catena-X Shared Services + +* IAM with Keycloak managed by Catena-X: + * [https://centralidp.int.demo.catena-x.net/auth/](https://centralidp.int.demo.catena-x.net/auth/) +* HashiCorp Vault to Store Secrets (https-certificate to access the connectors, *DB-credentials for our postgres db and Keycloak instances*): + * [https://vault.demo.catena-x.net/ui/vault/secrets/material-pass/](https://vault.demo.catena-x.net/ui/vault/secrets/material-pass/) + +## Solution Strategy + +### Architecture Diagram + +![Architecture Diagram](./media/GraphicArchitectureDiagram.jpeg) + +## Technology & Architecture Detail + +Our technology and architecture are based in the Catena-X Guidelines. However the specific technologies selected are: + +### Frontend (User Interface - Client Side) + +#### Vue.js 3 + +According to the [Vue documentation](https://vuejs.org/guide/introduction.html), Vue (pronounced /vjuː/, like **view** ) is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS, and JavaScript and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be they simple or complex. + +Vue.js in the version 3 allows us to build stable components and have control of all the application lifecycle. One advantage of Vue is that all the components that are build can be scalabled easily, allowing the structure to be generalized. + +In order to speed the development and build safe and stable components, a component has been selected. + +##### Vuetify + +Since we are required to follow the style guidelines from Catena-X, we selected Vuetify in its version 3.0.4, that is built using **Google's Material Design**, the selected Catena-X Style. + +According to the [Vuetify documentation](https://next.vuetifyjs.com/en/introduction/why-vuetify/), every component in Vuetify is handcrafted under the guise of [Google’s Material Design](https://material.io/) specification and comes with hundreds of customization options that fit any style or design; even if it’s not Material. This gives us flexibility when choosing and personalizing the style of the application, while still maintaining the **stability, scalability and security** from the components. And when compared with other frameworks, we can see that an new patch regarding security and stability is release every week, giving us safety that the library is constantly improved and tested. + +![Vue Framework Comparison](./media/GraphicVueFrameworkComparison2022.png) + +Another advantage from Vuetify is its documentation. There you are allowed to understand all the components and personalize them on-flight. Example: [Vuetify Alerts](https://next.vuetifyjs.com/en/components/alerts/). + +Here we can see the components from the frontend of the application: + +![Frontend Component](./media/GraphicFrontendComponent.jpg) + + +#### Component Description + +| Component | Description | +| ---- | ----------- | +| Landing Page View | This component is part of the User Interface (UI), it is also responsible of asking the Authentication Module if the user is authenticated and wait for being redirected to the Central IDP, IAM Services from Catena-X. | +| Search Passport View | This component is part of the User Interface (UI), it offers the user the possibility of searching by partInstanceId or Scanning a QR Code that contains the partInstanceId. | +| Passport Viewer View | This component is part of the User Interface (UI), it requests the Passport from the Backend, report errors from the backend, gives a timeout error if the request takes too long or retrieves the passport. | +| Authentication Module | Uses the following library: [https://www.npmjs.com/package/keycloak-js](https://www.npmjs.com/package/keycloak-js). This component is responsible for managing the user authentication, making Central IDP API calls, identifying users and requesting access token and refreshing it  | + +> **_INFO:_** *Just principal components with logics  are represented in this diagram, they are composed of several other smaller visual components, however they include no extra logic rather than displaying information to the user in the User Interface.* + +#### Backend (Server Side) + +The backend was built in order to give support to the frontend and provide dynamic data models, that can be stored in a persistence layer of the server. It also shall be responsible to communicate with the Catena-X network, authenticating the users and retrieving the necessary information in order that the frontend is able to visualize it to the user. + +##### Java 19 + +The latest version of Java was selected so we can have no problem in utilizing new Java Classes and libraries. Java is an object-oriented language and is one of the most maintainable languages. Because it is robustness, cross-platform capabilities, security features and because is easy of use, it has become one of the first choices when providing Internet solutions worldwide. + +###### Spring Boot + +We selected spring boot because it allows us to: + +* Consume different datasets from data-providers and process them for a flexible representation has no standard solution. +* Hiding fields with no values can be done in the computation or with the [Jackson Library](https://www.baeldung.com/jackson-ignore-null-fields) +* Exception Handling is quite comfortable within Java because of the type-safety. Don’t you something like @SneakyThrows and try to not use minor exceptions like RuntimeExceptions, because otherwise you don't have to deal with them explicitly. +* For session management there are [Session Scoped Beans](https://www.baeldung.com/spring-bean-scopes#2-session-scope) in Spring and they live within one http session. +* It allows us to comply with Catena-X security requirements and integrate Keycloak instances for authentication. + +To ease the understanding and get a general technical context of the backend the following diagram was created: + +![Backend Component](./media/GraphicBackendComponent.jpg) + +#### Component Description + +| Component | Description | +| ---- | ----------- | +| HTTP Controllers | The http controllers are the main components and they are responsible for handling the external HTTP calls and APIs allowing other systems to access data | +| Services | The services are second main component and they are  responsible of interacting and getting data of external systems | +| Listeners | This component is responsible for listening to events and executing logics when they occur | +| Configurations | This component is integrated in Spring Boot and with the Utils, they are responsible for setting the parameters and logics of the whole backend system.  | +| Data Managers | This component is responsible for storing and retrieving data. (At the moment no data is stored apart from configurations) | +| Middleware and Interceptors | These components are integrated with the HTTP Controllers, however they are responsible for the information and for adding logics between the requests. Thanks to this component that we are able to log all API calls coming from the Frontend or external systems | +| Exceptions | This component contains the exception definitions, they can be in Runtime Exeception or Normal Exception Types. | +| Utils | This component is the base for all the  components, we are able to manage such as, Catena-X Logics, Configuration Logics, Cryptography, Logging, etc...| + + +### Infrastructure + +#### Kubernetes and Helm Charts + +Containerization technology is used in order to ease the deployment and management process. Kubernetes is an open-source container orchestration platform that allows us to automate deployment, scale, and management of containerized applications using Docker containers. + +Helm is a package manager for Kubernetes and chart describes a set of Kubernetes resources such as deployment, pod, service, and other objects. Helm charts allow us to version the Kubernetes manifests and this lets us to install specific application/chart versions, means keeping the specific configurations for infrastructure as is in the code. Here, helm charts are used to provision battery passport components in different software runtime environments for instance, development, integration and pre-production which provides us a flexible way by having their separate configuration files for each infrastructure. + +[Gartner](https://blogs.gartner.com/tony-iams/use-platform-engineering-to-implement-devops-workflows-with-kubernetes/#:~:text=Gartner%20is%20seeing%20enterprises%20deploy%20Kubernetes%20at%20increasing,greater%20varieties%20of%20applications%20and%20servicing%20multiple%20teams.) is considered to deploy Kubernetes resources at increasing scale as they look towards the cloud-native applications for modernizing infrastructure and applications across the organizations, targeting greater varieties of applications and servicing multiple teams. + +[Argo CD platform](https://argoproj.github.io/cd/) is implemented as a Kubernetes controller and used as GitOps continuous delivery tool for Kubernetes. It is a declarative approach to define application components, configurations, and environments that should be versioned controlled. This allows us to manage application deployment and lifecycle that should be automated, auditable, and easy to understand. In this project, we used the Argo CD tool as a deployment platform where the Kubernetes cluster is running using Gartner, managed by the DevSecOps team. We used Argo CD to deploy the battery passport application components. + +### Security Solution Strategy + +In order to maintain the system safe and to comply with the quality gates a series of security applications are used. + +## Building Block View + +The system has certain building blocks which are illustrated below. +The primary battery passport application components are: + +* Consumer Frontend +* Consumer Backend +* EDC Consumer + +**Consumer Frontend:** A JavaScript-based user interface to request a battery passport from a battery manufacturer through Ecpilse Dataspace Connector (EDC) and Catena-X shared services, utilized by the consumer backend component. + +**Consumer Backend:** A Java-based backend system that manages a variety of passports, utilizes Catenax shared services, and handles requests from the frontend component. + +**EDC Consumer:** An Eclipse Dataspace Connector (EDC) is a gateway, used to establish a connection with the provider EDC in order to perform data transfer process, followed by certain steps such as requesting contract offers, doing contract negotiations, and transferring requested data once negotiations are agreed by both parties. + +There are different levels categorized concerning the application resources deployed for a specific tool: + +**Scope & Context:** A top-level defines the application runtime environment where application artifacts are deployed and running in a remote Kubernetes cluster in Argo CD (Hotel Budapest - INT) through helm charts. The deployed components are: "materialpass-edc" which refers to the consumer connector and "battery passport consumer application" refers to the consumer frontend (UI) application. + +**Level 1:** this level defines a deep dive into each deployment artifact: materialpass-edc, and digital-product-pass (consumer-ui and consumer-backend). In this layer, Kubernetes and helm resources are utilized using umbrella helm charts, consisting of some dependencies (container images) which are fetched from the GitHub registries. + +**Level 2:** A centralized source control repository where the source code and build artifacts are stored and version controlled. It also contains various git actions, for instance, the Build pipeline that publishes compiled applications onto the GitHub Container Packages Registry (GHCR) which is further accessed by the next level and other build actions that get triggered to verify the CatenaX quality gate requirements. + +**Level 3:** A development level where application source code is developed and built by developers. + +![Building Block View](./media/GraphicBulidingBlockView.jpg) + +### Blackbox Overall System + +![Blackbox Overall System](./media/GraphicBlackboxOverallSys.jpg) + +### Whitebox Overall System + +A developer who creates a new feature branch to work on a specific feature that would be later on introduced in the next application release. He pushes the branch into the remote git repository, opens a new pull request (PR), and involves others such as project developer(s) and maintainer(s) to review his work where they could also provide their comments. Once PR is approved, the changes will get merged into the develop/main repository. + +During the merge process, the build pipeline also known as Continuous integration (CI) gets triggered through a git action which builds the application artifacts, packages them into a docker image, and finally publishes the image onto the GitHub Container Registry with the tag holding latest commit SHA. In addition, other jobs are also executed which scan the code based on various criteria to fulfill the quality gate requirements. + +The application deployment is translated into Kubernetes resources through helm charts which are deployed in Argo CD. We take the advantage of built-in AutoSync feature of ArgoCD that does the Continuous Deployment(CD) job for us. This is done by matching the current and desired state of the application if there is a new code change or a new container image uploaded to a registry. + +![Whitebox Overall System](./media/GraphicWhiteboxOverallSys.png) + +| Name | Responsibility | +| ---- | -------------- | +| GitHub repository | Source Code Management (SCM), Version Controlling System (VCS) that stores and manages application source code and build files | +| Build and publish docker image | A Continuous Integration pipeline, used to build UI container image and upload it to the registry | +| Other Git actions | KICS (Code scan), Veracode (secret scan), Trivy (Container scan), SonarCloud (code quality scan), ESLint (code formatting) | +| GitHub Container Registry (GHCR) | A container registry to store and manage container images and version them with tags | +| Kubernetes deployment | Kubernetes manifest yaml files such as deployment, pod, service, ingress | +| Argo CD | Application runtime environment managed by DevSecOps team | + +## Deployment View + +![DeploymentView](./media/GraphicDeploymentView.jpg) + +## Cross-cutting Concepts + +![Cross Cutting Concepts](./media/GraphicCrossCuttingConcepts.jpg) + +## Design Decisions + +Designs are followed using the Catena-X Style Guidelines. + + +It was used a basic table, the logo, the footer and the avatar from Catena-X design guidelines: + +![Implementation View - Basic Table](./media/GraphicBasicTable.png) + +![Catena-X Logo Style Guidelines](./media/GraphicLogos.png) + +![Catena-X Avatar](./media/GraphicAvatar.png) + +### Searching View + +The Search view was also design following the Catena-X buttons and search style guides + +![QR Code and Search View](./media/GraphicSearchView.png) + +### Battery Passport View + +The passport view was designed following using Catena-X accordion guidelines. + +![Battery Passport View - General Information](./media/GraphicBatteryPassportViewGeneralInfo.png) + +![Battery Passport View - Electrochemical properties](./media/GraphicBatteryPassportView.png) + +### Digital Product Pass View + +Since the [v1.2.0](https://github.com/eclipse-tractusx/digital-product-pass/releases/tag/v1.2.0) release the `Digital Product Pass v1.0.0` Aspect is available to be visualized in the application. In the following example we can visualize a Battery Passport as Digital Product Pass: + +![Digital Product Pass - Serialization View](./media/DPPView1.jpg) + +![Digital Product Pass - Components View](./media/DPPView2.jpg) + +### IRS Component Drill Down + +The IRS Drill Down feature is available since the version [v1.3.0](https://github.com/eclipse-tractusx/digital-product-pass/releases/tag/v1.3.0) and it will display an tree of components in the frontend. + +The process of requesting the child components from the IRS takes a while aprox 7 minutes so the user is constantly informed of the progress from the IRS Job. + +#### Loading + +When the job is still running there will be displayed a spinner and a message saying that the search for components is going on. + +![IRS Component Loading](./media/irs/Loading.jpg) + +#### No Children Available + +When there is the case that the IRS Job returns a empty relationship array the frontend will display a No child component found warning, this means that the asset has no children available in the `Digital Twin Registries` of the BPN Number found for the current asset in the `BPN Discovery` endpoint. + +![IRS Component No Children Available](./media/irs/ChildNotFound.jpg) + +#### Tree of Components Available + +This is the success case, when there are components available in connection to the digital twin. + +In this case the user can click in the child `external link` button to open a new tab and start the search for a the Digital Product Pass + +![IRS Component Tree of Components](./media/irs/TreeOfComponents.jpg) + +#### Error Occurred + +In case the backend is not acesible or any other error ocurred the search for the child components will stop. This means that if the user want to search for the child components again it shall request the passport again since there was an error with this process. + +![IRS Component Error Occurred](./media/irs/ErrorOccured.jpg) + +## Quality Requirements + +As the Product Passport product is part of the Catena-X Network we are required to follow the quality requirements set by the Governance and Architecture Teams. + +### Quality Scenarios + +**QS-01: The user shall response with a user friendly way to every request, even in case of error.:** +When a used access the application and requests are performed from the frontend side, an error handling must be implemented in order to assure the correct user workflow within the application. + +**QS-02: The application needs to provide a intuitive UI to the user.:** +An user needs to be able to understand easily the application interface, in order to access the required data and to navigate thought the app. + +## Risks and Technical Debts + +**Who will be the owner of the application, who will maintain it?** + +## Glossary + +| Term | Definition | +| ---- | -------------- | +| EDC Connector | The Eclipse Data Space Connector provides a generic way to express, negotiate, and document the rules under which data is shared, and also with whom. | +| QG | Quality Gate, is a documentation, security & user satisfaction process defined by the Catena-X governance and architects in order to achieve common quality standards between the network. | +| IAM | Identity Access Management is a framework of policies and technologies to ensure that the right users (that are part of the ecosystem connected to or within an enterprise) have the appropriate access to technology resources. | +| DT-Reg | Digital Twin Registry is service of the Catena-X Semantic Layer that links IDS assets/artifacts/implementations (or rather: well-defined and cross-related subsets thereof) with their semantic descriptions and structure (aspect models as hosted in the Semantic Hub) | +| DAPS |The Dynamic Attribute Provisioning Service (DAPS) is a Federation Service of Identity and Trust (Authentication/Authorization), which is used by the traceability system. | +| BPDM | Business Partner Data Management is a system that has the goal of representing legal entities, sites and the specific additional addresses of a legal entity. | +| CD | Continuous Deployment is a software engineering approach in which software functionalities are delivered frequently and through automated deployments. | +| CI | Continuous Integration is a software engineering practice of merging all developers' working copies to a shared mainline several times a day. | +| Backend | Is the part of a computer system or application that is not directly accessed by the user, typically responsible for storing and manipulating data. | +| Frontend | Is the graphical user interface (UI) of a software that makes it easier to use | +| Git | Is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. | +| DevOps | Is a set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. | +| Repository | Is a database of digital content with an associated set of data management, search and access methods allowing application-independent access to the content, rather like a digital library, but with the ability to store and modify content in addition to searching and retrieving. | + + +## NOTICE + +This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). + +- SPDX-License-Identifier: Apache-2.0 +- SPDX-FileCopyrightText: 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/digital-product-pass diff --git a/docs/arc42/CancelFlow.jpeg b/docs/arc42/CancelFlow.jpeg deleted file mode 100644 index 7aa0fd8e1..000000000 Binary files a/docs/arc42/CancelFlow.jpeg and /dev/null differ diff --git a/docs/arc42/CreateAPI.jpeg b/docs/arc42/CreateAPI.jpeg deleted file mode 100644 index d30915f45..000000000 Binary files a/docs/arc42/CreateAPI.jpeg and /dev/null differ diff --git a/docs/arc42/CreateProcessFlow.jpeg b/docs/arc42/CreateProcessFlow.jpeg deleted file mode 100644 index 5c9593c24..000000000 Binary files a/docs/arc42/CreateProcessFlow.jpeg and /dev/null differ diff --git a/docs/arc42/DeclineFlow.jpeg b/docs/arc42/DeclineFlow.jpeg deleted file mode 100644 index bf3694a49..000000000 Binary files a/docs/arc42/DeclineFlow.jpeg and /dev/null differ diff --git a/docs/arc42/GetStatus.jpeg b/docs/arc42/GetStatus.jpeg deleted file mode 100644 index 518265a50..000000000 Binary files a/docs/arc42/GetStatus.jpeg and /dev/null differ diff --git a/docs/arc42/GraphicBatteryPassportView.png b/docs/arc42/GraphicBatteryPassportView.png deleted file mode 100644 index 319bd5aed..000000000 Binary files a/docs/arc42/GraphicBatteryPassportView.png and /dev/null differ diff --git a/docs/arc42/GraphicBatteryPassportViewGeneralInfo.png b/docs/arc42/GraphicBatteryPassportViewGeneralInfo.png deleted file mode 100644 index 4fa11510d..000000000 Binary files a/docs/arc42/GraphicBatteryPassportViewGeneralInfo.png and /dev/null differ diff --git a/docs/arc42/GraphicRuntimeView.png b/docs/arc42/GraphicRuntimeView.png deleted file mode 100644 index 9829affc5..000000000 Binary files a/docs/arc42/GraphicRuntimeView.png and /dev/null differ diff --git a/docs/arc42/PassportRetrievalFlow.jpeg b/docs/arc42/PassportRetrievalFlow.jpeg deleted file mode 100644 index 60babb313..000000000 Binary files a/docs/arc42/PassportRetrievalFlow.jpeg and /dev/null differ diff --git a/docs/arc42/SearchAPI.jpeg b/docs/arc42/SearchAPI.jpeg deleted file mode 100644 index fc153caa2..000000000 Binary files a/docs/arc42/SearchAPI.jpeg and /dev/null differ diff --git a/docs/arc42/SearchFlow.jpeg b/docs/arc42/SearchFlow.jpeg deleted file mode 100644 index a6843c982..000000000 Binary files a/docs/arc42/SearchFlow.jpeg and /dev/null differ diff --git a/docs/arc42/SignAPI.jpeg b/docs/arc42/SignAPI.jpeg deleted file mode 100644 index b3762dd7e..000000000 Binary files a/docs/arc42/SignAPI.jpeg and /dev/null differ diff --git a/docs/arc42/SignFlow.jpeg b/docs/arc42/SignFlow.jpeg deleted file mode 100644 index c6c8c9090..000000000 Binary files a/docs/arc42/SignFlow.jpeg and /dev/null differ diff --git a/docs/arc42/StateDiagram.jpeg b/docs/arc42/StateDiagram.jpeg deleted file mode 100644 index b212b4a49..000000000 Binary files a/docs/arc42/StateDiagram.jpeg and /dev/null differ diff --git a/docs/arc42/TechnicalIntegrationResume.jpeg b/docs/arc42/TechnicalIntegrationResume.jpeg deleted file mode 100644 index 5a28583a6..000000000 Binary files a/docs/arc42/TechnicalIntegrationResume.jpeg and /dev/null differ diff --git a/docs/arc42/CXlogo.png b/docs/arc42/media/CXlogo.png similarity index 100% rename from docs/arc42/CXlogo.png rename to docs/arc42/media/CXlogo.png diff --git a/docs/arc42/ContextDiagram.jpeg b/docs/arc42/media/ContextDiagram.jpeg similarity index 100% rename from docs/arc42/ContextDiagram.jpeg rename to docs/arc42/media/ContextDiagram.jpeg diff --git a/docs/arc42/media/DPPView1.jpg b/docs/arc42/media/DPPView1.jpg new file mode 100644 index 000000000..d0f880dd1 Binary files /dev/null and b/docs/arc42/media/DPPView1.jpg differ diff --git a/docs/arc42/media/DPPView2.jpg b/docs/arc42/media/DPPView2.jpg new file mode 100644 index 000000000..e1aece37e Binary files /dev/null and b/docs/arc42/media/DPPView2.jpg differ diff --git a/docs/arc42/GraphicArchitectureDiagram.jpeg b/docs/arc42/media/GraphicArchitectureDiagram.jpeg similarity index 100% rename from docs/arc42/GraphicArchitectureDiagram.jpeg rename to docs/arc42/media/GraphicArchitectureDiagram.jpeg diff --git a/docs/arc42/GraphicAvatar.png b/docs/arc42/media/GraphicAvatar.png similarity index 100% rename from docs/arc42/GraphicAvatar.png rename to docs/arc42/media/GraphicAvatar.png diff --git a/docs/arc42/GraphicBackendComponent.jpg b/docs/arc42/media/GraphicBackendComponent.jpg similarity index 100% rename from docs/arc42/GraphicBackendComponent.jpg rename to docs/arc42/media/GraphicBackendComponent.jpg diff --git a/docs/arc42/GraphicBasicTable.png b/docs/arc42/media/GraphicBasicTable.png similarity index 100% rename from docs/arc42/GraphicBasicTable.png rename to docs/arc42/media/GraphicBasicTable.png diff --git a/docs/arc42/media/GraphicBatteryPassportView.png b/docs/arc42/media/GraphicBatteryPassportView.png new file mode 100644 index 000000000..5f905c039 Binary files /dev/null and b/docs/arc42/media/GraphicBatteryPassportView.png differ diff --git a/docs/arc42/media/GraphicBatteryPassportViewGeneralInfo.png b/docs/arc42/media/GraphicBatteryPassportViewGeneralInfo.png new file mode 100644 index 000000000..b71697d15 Binary files /dev/null and b/docs/arc42/media/GraphicBatteryPassportViewGeneralInfo.png differ diff --git a/docs/arc42/GraphicBlackboxOverallSys.jpg b/docs/arc42/media/GraphicBlackboxOverallSys.jpg similarity index 100% rename from docs/arc42/GraphicBlackboxOverallSys.jpg rename to docs/arc42/media/GraphicBlackboxOverallSys.jpg diff --git a/docs/arc42/GraphicBulidingBlockView.jpg b/docs/arc42/media/GraphicBulidingBlockView.jpg similarity index 100% rename from docs/arc42/GraphicBulidingBlockView.jpg rename to docs/arc42/media/GraphicBulidingBlockView.jpg diff --git a/docs/arc42/GraphicCrossCuttingConcepts.jpg b/docs/arc42/media/GraphicCrossCuttingConcepts.jpg similarity index 100% rename from docs/arc42/GraphicCrossCuttingConcepts.jpg rename to docs/arc42/media/GraphicCrossCuttingConcepts.jpg diff --git a/docs/arc42/GraphicDeploymentView.jpg b/docs/arc42/media/GraphicDeploymentView.jpg similarity index 100% rename from docs/arc42/GraphicDeploymentView.jpg rename to docs/arc42/media/GraphicDeploymentView.jpg diff --git a/docs/arc42/GraphicDetailedDPPApp.jpg b/docs/arc42/media/GraphicDetailedDPPApp.jpg similarity index 100% rename from docs/arc42/GraphicDetailedDPPApp.jpg rename to docs/arc42/media/GraphicDetailedDPPApp.jpg diff --git a/docs/arc42/GraphicFrontendComponent.jpg b/docs/arc42/media/GraphicFrontendComponent.jpg similarity index 100% rename from docs/arc42/GraphicFrontendComponent.jpg rename to docs/arc42/media/GraphicFrontendComponent.jpg diff --git a/docs/arc42/GraphicHistoryPage.png b/docs/arc42/media/GraphicHistoryPage.png similarity index 100% rename from docs/arc42/GraphicHistoryPage.png rename to docs/arc42/media/GraphicHistoryPage.png diff --git a/docs/arc42/GraphicLogos.png b/docs/arc42/media/GraphicLogos.png similarity index 100% rename from docs/arc42/GraphicLogos.png rename to docs/arc42/media/GraphicLogos.png diff --git a/docs/arc42/GraphicQRCodeView.png b/docs/arc42/media/GraphicQRCodeView.png similarity index 100% rename from docs/arc42/GraphicQRCodeView.png rename to docs/arc42/media/GraphicQRCodeView.png diff --git a/docs/arc42/GraphicSearchView.png b/docs/arc42/media/GraphicSearchView.png similarity index 100% rename from docs/arc42/GraphicSearchView.png rename to docs/arc42/media/GraphicSearchView.png diff --git a/docs/arc42/GraphicVueFrameworkComparison2022.png b/docs/arc42/media/GraphicVueFrameworkComparison2022.png similarity index 100% rename from docs/arc42/GraphicVueFrameworkComparison2022.png rename to docs/arc42/media/GraphicVueFrameworkComparison2022.png diff --git a/docs/arc42/GraphicWhiteboxOverallSys.png b/docs/arc42/media/GraphicWhiteboxOverallSys.png similarity index 100% rename from docs/arc42/GraphicWhiteboxOverallSys.png rename to docs/arc42/media/GraphicWhiteboxOverallSys.png diff --git a/docs/arc42/GrphicCrossCuttingCc.png b/docs/arc42/media/GrphicCrossCuttingCc.png similarity index 100% rename from docs/arc42/GrphicCrossCuttingCc.png rename to docs/arc42/media/GrphicCrossCuttingCc.png diff --git a/docs/arc42/arc24logo.png b/docs/arc42/media/arc42logo.png similarity index 100% rename from docs/arc42/arc24logo.png rename to docs/arc42/media/arc42logo.png diff --git a/docs/arc42/media/auth/authenticationFlow.jpg b/docs/arc42/media/auth/authenticationFlow.jpg new file mode 100644 index 000000000..3dccef548 Binary files /dev/null and b/docs/arc42/media/auth/authenticationFlow.jpg differ diff --git a/docs/arc42/media/dataRetrieval/agreeApiFlow.jpg b/docs/arc42/media/dataRetrieval/agreeApiFlow.jpg new file mode 100644 index 000000000..f2167780c Binary files /dev/null and b/docs/arc42/media/dataRetrieval/agreeApiFlow.jpg differ diff --git a/docs/arc42/media/dataRetrieval/agreeApiSequence.jpg b/docs/arc42/media/dataRetrieval/agreeApiSequence.jpg new file mode 100644 index 000000000..5ab577592 Binary files /dev/null and b/docs/arc42/media/dataRetrieval/agreeApiSequence.jpg differ diff --git a/docs/arc42/media/dataRetrieval/cancelApiFlow.jpg b/docs/arc42/media/dataRetrieval/cancelApiFlow.jpg new file mode 100644 index 000000000..d393e86b8 Binary files /dev/null and b/docs/arc42/media/dataRetrieval/cancelApiFlow.jpg differ diff --git a/docs/arc42/media/dataRetrieval/cancelFlowApi.jpg b/docs/arc42/media/dataRetrieval/cancelFlowApi.jpg new file mode 100644 index 000000000..d393e86b8 Binary files /dev/null and b/docs/arc42/media/dataRetrieval/cancelFlowApi.jpg differ diff --git a/docs/arc42/media/dataRetrieval/createApiFlow.jpg b/docs/arc42/media/dataRetrieval/createApiFlow.jpg new file mode 100644 index 000000000..ee6ef5e6a Binary files /dev/null and b/docs/arc42/media/dataRetrieval/createApiFlow.jpg differ diff --git a/docs/arc42/media/dataRetrieval/createApiSequence.jpg b/docs/arc42/media/dataRetrieval/createApiSequence.jpg new file mode 100644 index 000000000..75351b3c6 Binary files /dev/null and b/docs/arc42/media/dataRetrieval/createApiSequence.jpg differ diff --git a/docs/arc42/media/dataRetrieval/dataApiFlow.jpg b/docs/arc42/media/dataRetrieval/dataApiFlow.jpg new file mode 100644 index 000000000..ee9f76462 Binary files /dev/null and b/docs/arc42/media/dataRetrieval/dataApiFlow.jpg differ diff --git a/docs/arc42/media/dataRetrieval/dataRetrievalResume.jpg b/docs/arc42/media/dataRetrieval/dataRetrievalResume.jpg new file mode 100644 index 000000000..9164ee80d Binary files /dev/null and b/docs/arc42/media/dataRetrieval/dataRetrievalResume.jpg differ diff --git a/docs/arc42/media/dataRetrieval/declineApiFlow.jpg b/docs/arc42/media/dataRetrieval/declineApiFlow.jpg new file mode 100644 index 000000000..987d03b4d Binary files /dev/null and b/docs/arc42/media/dataRetrieval/declineApiFlow.jpg differ diff --git a/docs/arc42/media/dataRetrieval/digitalProductPassContext.jpg b/docs/arc42/media/dataRetrieval/digitalProductPassContext.jpg new file mode 100644 index 000000000..f75dfd3af Binary files /dev/null and b/docs/arc42/media/dataRetrieval/digitalProductPassContext.jpg differ diff --git a/docs/arc42/media/dataRetrieval/searchApiFlow.jpg b/docs/arc42/media/dataRetrieval/searchApiFlow.jpg new file mode 100644 index 000000000..4a6dc2755 Binary files /dev/null and b/docs/arc42/media/dataRetrieval/searchApiFlow.jpg differ diff --git a/docs/arc42/media/dataRetrieval/searchApiSequence.jpg b/docs/arc42/media/dataRetrieval/searchApiSequence.jpg new file mode 100644 index 000000000..67cf1e98d Binary files /dev/null and b/docs/arc42/media/dataRetrieval/searchApiSequence.jpg differ diff --git a/docs/arc42/media/dataRetrieval/statusApiFlow.jpg b/docs/arc42/media/dataRetrieval/statusApiFlow.jpg new file mode 100644 index 000000000..127889034 Binary files /dev/null and b/docs/arc42/media/dataRetrieval/statusApiFlow.jpg differ diff --git a/docs/arc42/media/dataRetrieval/userFlow.jpg b/docs/arc42/media/dataRetrieval/userFlow.jpg new file mode 100644 index 000000000..a3a3ccd4e Binary files /dev/null and b/docs/arc42/media/dataRetrieval/userFlow.jpg differ diff --git a/docs/arc42/media/diagrams/agreeApiFlow.drawio.xml b/docs/arc42/media/diagrams/agreeApiFlow.drawio.xml new file mode 100644 index 000000000..60d5a9849 --- /dev/null +++ b/docs/arc42/media/diagrams/agreeApiFlow.drawio.xml @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/agreeApiSequence.drawio.xml b/docs/arc42/media/diagrams/agreeApiSequence.drawio.xml new file mode 100644 index 000000000..edceb9635 --- /dev/null +++ b/docs/arc42/media/diagrams/agreeApiSequence.drawio.xml @@ -0,0 +1,634 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/authenticationFlow.drawio.xml b/docs/arc42/media/diagrams/authenticationFlow.drawio.xml new file mode 100644 index 000000000..9b21f9d7e --- /dev/null +++ b/docs/arc42/media/diagrams/authenticationFlow.drawio.xml @@ -0,0 +1,659 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/cancelApiFlow.drawio.xml b/docs/arc42/media/diagrams/cancelApiFlow.drawio.xml new file mode 100644 index 000000000..01cd52ebd --- /dev/null +++ b/docs/arc42/media/diagrams/cancelApiFlow.drawio.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/cancelFlowApi.drawio.xml b/docs/arc42/media/diagrams/cancelFlowApi.drawio.xml new file mode 100644 index 000000000..4c1848c89 --- /dev/null +++ b/docs/arc42/media/diagrams/cancelFlowApi.drawio.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/createApiFlow.drawio.xml b/docs/arc42/media/diagrams/createApiFlow.drawio.xml new file mode 100644 index 000000000..21623cf01 --- /dev/null +++ b/docs/arc42/media/diagrams/createApiFlow.drawio.xml @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/createApiSequence.drawio.xml b/docs/arc42/media/diagrams/createApiSequence.drawio.xml new file mode 100644 index 000000000..087484fab --- /dev/null +++ b/docs/arc42/media/diagrams/createApiSequence.drawio.xml @@ -0,0 +1,600 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/dataApiFlow.drawio.xml b/docs/arc42/media/diagrams/dataApiFlow.drawio.xml new file mode 100644 index 000000000..0e8af4705 --- /dev/null +++ b/docs/arc42/media/diagrams/dataApiFlow.drawio.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/dataRetrievalResume.drawio.xml b/docs/arc42/media/diagrams/dataRetrievalResume.drawio.xml new file mode 100644 index 000000000..06583275e --- /dev/null +++ b/docs/arc42/media/diagrams/dataRetrievalResume.drawio.xml @@ -0,0 +1,419 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/declineApiFlow.drawio.xml b/docs/arc42/media/diagrams/declineApiFlow.drawio.xml new file mode 100644 index 000000000..d9cb966f6 --- /dev/null +++ b/docs/arc42/media/diagrams/declineApiFlow.drawio.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/digitalProductPassContext.drawio.xml b/docs/arc42/media/diagrams/digitalProductPassContext.drawio.xml new file mode 100644 index 000000000..ba60d0245 --- /dev/null +++ b/docs/arc42/media/diagrams/digitalProductPassContext.drawio.xml @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/searchApiFlow.drawio.xml b/docs/arc42/media/diagrams/searchApiFlow.drawio.xml new file mode 100644 index 000000000..1c1afbb07 --- /dev/null +++ b/docs/arc42/media/diagrams/searchApiFlow.drawio.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/searchApiSequence.drawio.xml b/docs/arc42/media/diagrams/searchApiSequence.drawio.xml new file mode 100644 index 000000000..b9152bfec --- /dev/null +++ b/docs/arc42/media/diagrams/searchApiSequence.drawio.xml @@ -0,0 +1,481 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/statusApiFlow.drawio.xml b/docs/arc42/media/diagrams/statusApiFlow.drawio.xml new file mode 100644 index 000000000..7ccca4f2e --- /dev/null +++ b/docs/arc42/media/diagrams/statusApiFlow.drawio.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/diagrams/userFlow.drawio.xml b/docs/arc42/media/diagrams/userFlow.drawio.xml new file mode 100644 index 000000000..3f22a0211 --- /dev/null +++ b/docs/arc42/media/diagrams/userFlow.drawio.xml @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/irs/ChildNotFound.jpg b/docs/arc42/media/irs/ChildNotFound.jpg new file mode 100644 index 000000000..460b412f9 Binary files /dev/null and b/docs/arc42/media/irs/ChildNotFound.jpg differ diff --git a/docs/arc42/media/irs/ErrorOccured.jpg b/docs/arc42/media/irs/ErrorOccured.jpg new file mode 100644 index 000000000..3fb513698 Binary files /dev/null and b/docs/arc42/media/irs/ErrorOccured.jpg differ diff --git a/docs/arc42/media/irs/IRSDataSearch.jpg b/docs/arc42/media/irs/IRSDataSearch.jpg new file mode 100644 index 000000000..5cc3a99c5 Binary files /dev/null and b/docs/arc42/media/irs/IRSDataSearch.jpg differ diff --git a/docs/arc42/media/irs/Loading.jpg b/docs/arc42/media/irs/Loading.jpg new file mode 100644 index 000000000..1a491a1f5 Binary files /dev/null and b/docs/arc42/media/irs/Loading.jpg differ diff --git a/docs/arc42/media/irs/SearchAPIwithIRS.jpg b/docs/arc42/media/irs/SearchAPIwithIRS.jpg new file mode 100644 index 000000000..c6e137511 Binary files /dev/null and b/docs/arc42/media/irs/SearchAPIwithIRS.jpg differ diff --git a/docs/arc42/media/irs/TreeOfComponents.jpg b/docs/arc42/media/irs/TreeOfComponents.jpg new file mode 100644 index 000000000..6de69bbcf Binary files /dev/null and b/docs/arc42/media/irs/TreeOfComponents.jpg differ diff --git a/docs/arc42/media/irs/componentSearch.xml b/docs/arc42/media/irs/componentSearch.xml new file mode 100644 index 000000000..e74690d05 --- /dev/null +++ b/docs/arc42/media/irs/componentSearch.xml @@ -0,0 +1,772 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/irs/irsDataApisFlow.jpg b/docs/arc42/media/irs/irsDataApisFlow.jpg new file mode 100644 index 000000000..b241a8925 Binary files /dev/null and b/docs/arc42/media/irs/irsDataApisFlow.jpg differ diff --git a/docs/arc42/media/irs/irsFlow.drawio.xml b/docs/arc42/media/irs/irsFlow.drawio.xml new file mode 100644 index 000000000..eb5fbb247 --- /dev/null +++ b/docs/arc42/media/irs/irsFlow.drawio.xml @@ -0,0 +1,401 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/irs/irsSearchFlow.drawio.xml b/docs/arc42/media/irs/irsSearchFlow.drawio.xml new file mode 100644 index 000000000..598b7e0bb --- /dev/null +++ b/docs/arc42/media/irs/irsSearchFlow.drawio.xml @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/irs/irsSearchFlow.jpg b/docs/arc42/media/irs/irsSearchFlow.jpg new file mode 100644 index 000000000..837daa52a Binary files /dev/null and b/docs/arc42/media/irs/irsSearchFlow.jpg differ diff --git a/docs/arc42/media/irs/searchWithIrs.drawio.xml b/docs/arc42/media/irs/searchWithIrs.drawio.xml new file mode 100644 index 000000000..38a80ae91 --- /dev/null +++ b/docs/arc42/media/irs/searchWithIrs.drawio.xml @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/arc42/media/irs/searchWithItRS.drawio.xml b/docs/arc42/media/irs/searchWithItRS.drawio.xml new file mode 100644 index 000000000..ceec038d0 --- /dev/null +++ b/docs/arc42/media/irs/searchWithItRS.drawio.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/DataRetrievalGuide.md b/docs/data retrieval guide/DataRetrievalGuide.md new file mode 100644 index 000000000..ace2b1c73 --- /dev/null +++ b/docs/data retrieval guide/DataRetrievalGuide.md @@ -0,0 +1,428 @@ + + +# ![C-X Logo](../catena-x-logo.svg) Catena-X Data Retrieval Guide + +| Version | v1.0 | +| ------- | ---- | + +Created: *25 August 2023* + +## Table of Contents +- [ Catena-X Data Retrieval Guide](#-catena-x-data-retrieval-guide) + - [Table of Contents](#table-of-contents) + - [Introduction](#introduction) + - [Starting Point](#starting-point) + - [Available Central Services](#available-central-services) + - [Problems Generated](#problems-generated) + - [Data Retrieval Flow](#data-retrieval-flow) + - [1. Discovery Phase](#1-discovery-phase) + - [2. Digital Twin Registry Search Phase](#2-digital-twin-registry-search-phase) + - [3. Digital Twin Search Phase](#3-digital-twin-search-phase) + - [4. Data Negotiation and Transfer Phase](#4-data-negotiation-and-transfer-phase) + - [1. Discovery Phase + 2. Digital Twin Registry Search Phase](#1-discovery-phase--2-digital-twin-registry-search-phase) + - [Prerequisites](#prerequisites) + - [Sequence Diagram](#sequence-diagram) + - [Flow Diagram](#flow-diagram) + - [3. Digital Twin Search Phase](#3-digital-twin-search-phase-1) + - [Prerequisites](#prerequisites-1) + - [Sequence Diagram](#sequence-diagram-1) + - [Flow Diagram](#flow-diagram-1) + - [4. Data Negotiation and Transfer Phase](#4-data-negotiation-and-transfer-phase-1) + - [Prerequisites](#prerequisites-2) + - [Sequence Diagram](#sequence-diagram-2) + - [Flow Diagram](#flow-diagram-2) + - [Negotiation and Transfer](#negotiation-and-transfer) + - [Data Retrieval](#data-retrieval) + - [Attachments](#attachments) + - [AAS 3.0 Digital Twin Example](#aas-30-digital-twin-example) + - [Contract Example](#contract-example) + - [Authors](#authors) + - [NOTICE](#notice) + +## Introduction +The Catena-X Network Data Retrieval process can be really complex and challenging to understand. The `Digital Product Pass` application as consumer application is designed to retrieve information from the Catena-X Network in its native way. We as team proposed a solution for retrieving information in this decentralized network in a very efficient way. This solution is implemented in the [`Digital Product Pass Backend`](../../consumer-backend/productpass/readme.md) and can retrieve information in approximated `8-20s` using the algorithm and procedures documented in the [Arc42](../arc42/Arc42.md) documentation. + +Therefore this guide is here to provide information about how to retrieve Data from the Catena-X Network like the `Digital Product Pass` application. Here we will describe the problem that many consumers application are facing then retrieving data in Catena-X and how we as the DPP Team propose our vision. + +## Starting Point + +Before we start with the diagrams is necessary to give some context and remark how things are happening and which services are available. + +After the Digital Twin Registry became an decentral component provided by several Catena-X Members as Providers, there was the need of providing central services to enable searching for this digital twin registries. + +Therefore some central services were created, allowing the authorized Catena-X Applications to find the EDC endpoints after calling the following services: + +### Available Central Services + + +| Service Name | Description | Reference Implementation | +|------------- | ----------- | ------------------------ | +| Discovery Service | Responsible to give the search endpoints for a type of id | [eclipse-tractusx/sldt-discovery-finder](https://github.com/eclipse-tractusx/sldt-discovery-finder) | +| BPN Discovery | Responsible for indicating the BPNs for the IDs registered by the providers | [eclipse-tractusx/sldt-bpn-discovery](https://github.com/eclipse-tractusx/sldt-bpn-discovery) | +| EDC Discovery | Responsible for giving the EDC endpoints of one or more BPNs | [eclipse-tractusx/portal-backend](https://github.com/eclipse-tractusx/portal-backend) - [Code Implementation](https://github.com/eclipse-tractusx/portal-backend/blob/aca855c857aed309cbca03f4f694283629197110/src/administration/Administration.Service/Controllers/ConnectorsController.cs#L178C1-L190C63) | + + +The main idea was that they will be called in a sequential way when needed to find the EDC endpoints. + +Here we can observe an example of how a normal exchange would work in a sequential way: + +![Simplified Discovery Services Exchange](./media/discoveryServices.jpg) + +## Problems Generated + +After the fist implementations have been released, it was analyzed that some problems were generated. + +The problems observed from the application side were:  + +- dDTR search guidelines are missing: + - After we receive the list of several EDCs, there is no guideline on the most optimized way of searching which EDC has the digital twin registry asset. +- Performance problem: + - There is a performance problem, because if you want to find the digital twin registries for each request + search in each digital twin registry for the assets (which involves contract negotiation with EDCs) takes time. +- Escalation and Maintenance problem: + - If we scale it in to the Catena-X Overarching project, we will observe that every product implemented their own solution. From a maintenance perspective the is big problem. + - Imagine a new update in the EDC is made or in any other central discovery service, this would mean that every single application would need to change their architecture and code because they are responsible of maintaining it. + +Therefore there needs to be a easier way of querying this services and searching in different dDTRs around the Catena-X Network. + +## Data Retrieval Flow + +Here is a diagram of the data retrial flow necessary to retrieve any data from the Catena-X Network without any optimizations: + +![Data Retrieval Flow](./media/dataRetrievalFlow.jpg) + + +### 1. Discovery Phase + +At the beginning we start calling the `Discovery Service` which is responsible for giving us the urls from the `BPN Discovery` and the `EDC Discovery` this two service give us first a `BPN or Business Partner Number` for a specific `id` and the `EDC Discovery` will give you a list of EDC registered by one company's `BPN`. + +### 2. Digital Twin Registry Search Phase + +Once we have a list of `EDCs` we need to find which of this EDCs contain the `Digital Twin Registry` component. We can filter which `EDCs` contain the `Digital Twin Registry` by simply calling for the catalog with the `type` condition of the contract that must have the `data.core.digitalTwinRegistry` standardized type. + +Once we have the list of DTRs we need to negotiate each contract retrieve in the catalog so that we can have the `Contract Agreement Id` which is given by the EDC once the contact is signed and agreed. This id will be used later to request the transfer for the `EDR` token for accessing the `Digital Twin Registry` through the `EDC Provider Data Plane Proxy`. + +### 3. Digital Twin Search Phase + +We need to search for the `Digital Twins` inside of the `Digital Twin Registries`, and once we found it we can start the negotiation for the `submodelDescriptor` we are searching for that can be for example a: `Digital Product Pass`, `Battery Pass`, `Single Level BOM as Built` or a `Transmission Pass`. + +### 4. Data Negotiation and Transfer Phase + +Once we have the submodel we are going to call the [`subprotocolBody`](#L233) url of the `endpoint interface` with name `SUBMODEL-3.0`. This will provide for us the asset id to negotiate with the EDC Provider. Once this asset is negotiated we will request for the `transfer` and `EDR` token will be sent to the backend by the EDC Provider, allowing us to query the dataplane url contained in the `href` field of the endpoint interface. And in this way we will retrieve the data using the `EDC Provider Data Plane Proxy`. + + +## 1. Discovery Phase + 2. Digital Twin Registry Search Phase + +After the discovery phase, the search for digital twin registries is one of the core components to be done when retrieving data in Catena-X. +Once the negotiation for the digital twin registries assets are done we would be able to retrieve a catalog for the user to search the serialized Id. + +### Prerequisites + +The following information is required to enable the decentralized search for digital twin registries: + +| Name | Example | Description | +| ---- | ------- | ----------- | +| Search Id Type | *manufacturerPartId* | The search id type is required first of all to know in which `BPN Discovery` services to search. It will be introduced in the `Discovery Service` and we will obtain a list of `BPN Discovery Endpoints`. After this same id will be introduce as the *`type`* attribute in each `BPN Discovery`. | +| Search Id Value | *HV-SPORT-123* | The search id value is required for searching in the `BPN Discovery` services. One example could be the `product type id` of a company, which is owned by an unique `BPN` reducing the complexity of the search. + +### Sequence Diagram +![Digital Twin Registries Search](./media/dtrSearchSequence.jpg) + +As we can visualize in the following example we will request the following services and retrieve the contract agreement from the Digital Twin Registries in parallel. + +### Flow Diagram +The flow diagram below allows us to see in more detail the steps required for retrieving the contract agreement id for each of the digital twin registries assets. + +![Flow Digital Twin Registry Search](./media/dtrSearchFlow.jpg) + + +## 3. Digital Twin Search Phase + +The digital twin searching phase involves searching in every digital twin registry for the desired digital twin asset. In this digital twin we will find the necessary information for requesting the contract information for the "digital twin submodels". + +### Prerequisites + +The following information is required for enabling the digital twin search, in order to start the data transfer phase: + +| Name | Example | Description | +| ---- | ------- | ----------- | +| Specific Asset Id Type | *partInstanceId* | The specific asset id type is used to search in the `digital twin registry` for an specific digital twin. It is basically the `name` of "specificAssetId" object located at the [`digital twin`](#aas-30-digital-twin-example) `specificAssetIds` property. The `*partInstanceId*` is used as an example most of the time, since the digital twin registry implemented a hotfix that allows companies say who can access to their `partInstanceId` fields. Now allowing the *"PUBLIC_READABLE"* property. | +| Specific Asset Id Type | *BAT-XYZ789* | The specific asset id value is added in the `digital twin lookup` when calling the `EDC Provider Proxy`. It basically points to the value of the *`Specific Asset Id Type`* property. + +### Sequence Diagram +![Data Search API](./media/dataSearchApi.jpg) + +### Flow Diagram +![Data Search Flow API](./media/searchApiFlow.jpg) + + +## 4. Data Negotiation and Transfer Phase + + +### Prerequisites + +The following information is required for enabling the digital twin search, in order to start the data transfer phase: + +| Name | Example | Description | +| ---- | ------- | ----------- | +| Contract with Policy | [Contract Example](#contract-example) | To start the contract negotiation we need to agree on a policy for the a specific contract. This needs to be selected by the one that is requesting the data. + + +### Sequence Diagram +![Data Retrieval](./media/dataRetrievalSequence.jpg) + +### Flow Diagram + +#### Negotiation and Transfer +![Data Retrieval Flow 1](./media/dataRetrievalFlow1.jpg) + +#### Data Retrieval + +![Data Retrieval Flow 1](./media/dataRetrievalFlow2.jpg) + + +## Attachments + +### AAS 3.0 Digital Twin Example + +```json +{ + "description": [ + { + "language": "en", + "text": "Battery Digital Twin" + } + ], + "displayName": [], + "globalAssetId": "urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d", + "idShort": "Battery_BAT-XYZ789", + "id": "urn:uuid:3d050cd8-cdc7-4d65-9f37-70a65d5f53f5", + "specificAssetIds": [ + { + "name": "manufacturerPartId", + "value": "XYZ78901", + "externalSubjectId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "BPNL000000000000" + }, + { + "type": "GlobalReference", + "value": "PUBLIC_READABLE" + } + ] + } + }, + { + "name": "partInstanceId", + "value": "BAT-XYZ789", + "externalSubjectId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": "BPNL000000000000" + } + ] + } + } + ], + "submodelDescriptors": [ + { + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": "https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:1ea64f49-8b2b-4cd2-818e-cf9d452c6fea", + "endpointProtocol": "HTTP", + "endpointProtocolVersion": [ + "1.1" + ], + "subprotocol": "DSP", + "subprotocolBody": "id=urn:uuid:3e4a5957-f226-478a-ab18-79ced49d6195;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000", + "subprotocolBodyEncoding": "plain", + "securityAttributes": [ + { + "type": "NONE", + "key": "NONE", + "value": "NONE" + } + ] + } + } + ], + "idShort": "SerialPart", + "id": "urn:uuid:1ea64f49-8b2b-4cd2-818e-cf9d452c6fea", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "Submodel", + "value": "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart" + } + ] + }, + "description": [], + "displayName": [] + }, + { + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": "https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:09d5d8a9-9073-47b6-93c6-80caff176dca", + "endpointProtocol": "HTTP", + "endpointProtocolVersion": [ + "1.1" + ], + "subprotocol": "DSP", + "subprotocolBody": "id=urn:uuid:3e4a5957-f226-478a-ab18-79ced49d6195;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000", + "subprotocolBodyEncoding": "plain", + "securityAttributes": [ + { + "type": "NONE", + "key": "NONE", + "value": "NONE" + } + ] + } + } + ], + "idShort": "singleLevelBomAsBuilt", + "id": "urn:uuid:09d5d8a9-9073-47b6-93c6-80caff176dca", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "Submodel", + "value": "urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt" + } + ] + }, + "description": [], + "displayName": [] + }, + { + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": "https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:777a3f0a-6d29-4fcd-81ea-1c27c1b870cc", + "endpointProtocol": "HTTP", + "endpointProtocolVersion": [ + "1.1" + ], + "subprotocol": "DSP", + "subprotocolBody": "id=urn:uuid:3e4a5957-f226-478a-ab18-79ced49d6195;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000", + "subprotocolBodyEncoding": "plain", + "securityAttributes": [ + { + "type": "NONE", + "key": "NONE", + "value": "NONE" + } + ] + } + } + ], + "idShort": "digitalProductPass", + "id": "urn:uuid:777a3f0a-6d29-4fcd-81ea-1c27c1b870cc", + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "Submodel", + "value": "urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport" + } + ] + }, + "description": [ + { + "language": "en", + "text": "Digital Product Passport Submodel" + } + ], + "displayName": [] + } + ] +} + +``` + +### Contract Example +```json +{ + "@id": "registry-asset", + "@type": "dcat:Dataset", + "odrl:hasPolicy": { + "@id": "ZGVmYXVsdC1jb250cmFjdC1kZWZpbml0aW9u:cmVnaXN0cnktYXNzZXQ=:MTIxMjYzMzgtYzhkMC00MGQ4LTkxYWMtZmY2ZTY0ZTQ5ZmM0", + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "registry-asset" + }, + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "HttpProxy" + }, + "dcat:accessService": "bc491229-1b41-49a9-9101-a430a4907e6e" + }, + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "AmazonS3" + }, + "dcat:accessService": "bc491229-1b41-49a9-9101-a430a4907e6e" + } + ], + "edc:type": "data.core.digitalTwinRegistry", + "edc:description": "Digital Twin Registry for DPP", + "edc:id": "registry-asset", + "edc:contenttype": "application/json" +} + +``` + +## Authors +Here are the main authors and reviewers of this documentation: + +| Name | GitHub | +| ---- | ------ | +| Mathias Brunkow Moser | [@matbmoser](https://github.com/matbmoser) | +| Muhammed Saud Khan | [@saudkhan116](https://github.com/saudkhan116) | + +> NOTE: Find all the repo authors in the [authors.md](../../AUTHORS.md) file! + +## NOTICE + +This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). + +- SPDX-License-Identifier: Apache-2.0 +- SPDX-FileCopyrightText: 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/digital-product-pass + diff --git a/docs/data retrieval guide/media/dataRetrievalFlow.jpg b/docs/data retrieval guide/media/dataRetrievalFlow.jpg new file mode 100644 index 000000000..98cd4f829 Binary files /dev/null and b/docs/data retrieval guide/media/dataRetrievalFlow.jpg differ diff --git a/docs/data retrieval guide/media/dataRetrievalFlow1.jpg b/docs/data retrieval guide/media/dataRetrievalFlow1.jpg new file mode 100644 index 000000000..2beba8bd8 Binary files /dev/null and b/docs/data retrieval guide/media/dataRetrievalFlow1.jpg differ diff --git a/docs/data retrieval guide/media/dataRetrievalFlow2.jpg b/docs/data retrieval guide/media/dataRetrievalFlow2.jpg new file mode 100644 index 000000000..24959ef7b Binary files /dev/null and b/docs/data retrieval guide/media/dataRetrievalFlow2.jpg differ diff --git a/docs/data retrieval guide/media/dataRetrievalSequence.jpg b/docs/data retrieval guide/media/dataRetrievalSequence.jpg new file mode 100644 index 000000000..3015abc5a Binary files /dev/null and b/docs/data retrieval guide/media/dataRetrievalSequence.jpg differ diff --git a/docs/data retrieval guide/media/dataSearchApi.jpg b/docs/data retrieval guide/media/dataSearchApi.jpg new file mode 100644 index 000000000..b1018e0f8 Binary files /dev/null and b/docs/data retrieval guide/media/dataSearchApi.jpg differ diff --git a/docs/data retrieval guide/media/diagrams/dataRetrievalFlow.drawio.xml b/docs/data retrieval guide/media/diagrams/dataRetrievalFlow.drawio.xml new file mode 100644 index 000000000..68c97c622 --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/dataRetrievalFlow.drawio.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/diagrams/dataRetrievalFlow1.drawio.xml b/docs/data retrieval guide/media/diagrams/dataRetrievalFlow1.drawio.xml new file mode 100644 index 000000000..07663e927 --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/dataRetrievalFlow1.drawio.xml @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/diagrams/dataRetrievalFlow2.drawio.xml b/docs/data retrieval guide/media/diagrams/dataRetrievalFlow2.drawio.xml new file mode 100644 index 000000000..4e97aff08 --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/dataRetrievalFlow2.drawio.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/diagrams/dataRetrievalSequence.drawio.xml b/docs/data retrieval guide/media/diagrams/dataRetrievalSequence.drawio.xml new file mode 100644 index 000000000..2792c045c --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/dataRetrievalSequence.drawio.xml @@ -0,0 +1,417 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/diagrams/dataSearchApi.drawio.xml b/docs/data retrieval guide/media/diagrams/dataSearchApi.drawio.xml new file mode 100644 index 000000000..1c13d0a64 --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/dataSearchApi.drawio.xml @@ -0,0 +1,481 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/diagrams/discoveryServices.drawio.xml b/docs/data retrieval guide/media/diagrams/discoveryServices.drawio.xml new file mode 100644 index 000000000..e01926ee3 --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/discoveryServices.drawio.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/diagrams/dtrSearchFlow.drawio.xml b/docs/data retrieval guide/media/diagrams/dtrSearchFlow.drawio.xml new file mode 100644 index 000000000..7ec3c726f --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/dtrSearchFlow.drawio.xml @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/diagrams/dtrSearchSequence.drawio.xml b/docs/data retrieval guide/media/diagrams/dtrSearchSequence.drawio.xml new file mode 100644 index 000000000..1c8de9bae --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/dtrSearchSequence.drawio.xml @@ -0,0 +1,572 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/diagrams/searchApiFlow.drawio.xml b/docs/data retrieval guide/media/diagrams/searchApiFlow.drawio.xml new file mode 100644 index 000000000..576277b23 --- /dev/null +++ b/docs/data retrieval guide/media/diagrams/searchApiFlow.drawio.xml @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/data retrieval guide/media/discoveryServices.jpg b/docs/data retrieval guide/media/discoveryServices.jpg new file mode 100644 index 000000000..604267c41 Binary files /dev/null and b/docs/data retrieval guide/media/discoveryServices.jpg differ diff --git a/docs/data retrieval guide/media/dtrSearchFlow.jpg b/docs/data retrieval guide/media/dtrSearchFlow.jpg new file mode 100644 index 000000000..13e41bdf6 Binary files /dev/null and b/docs/data retrieval guide/media/dtrSearchFlow.jpg differ diff --git a/docs/data retrieval guide/media/dtrSearchSequence.jpg b/docs/data retrieval guide/media/dtrSearchSequence.jpg new file mode 100644 index 000000000..f08e3d409 Binary files /dev/null and b/docs/data retrieval guide/media/dtrSearchSequence.jpg differ diff --git a/docs/data retrieval guide/media/searchApiFlow.jpg b/docs/data retrieval guide/media/searchApiFlow.jpg new file mode 100644 index 000000000..b7eb93da0 Binary files /dev/null and b/docs/data retrieval guide/media/searchApiFlow.jpg differ diff --git a/src/assets/MOCK/dpp.json b/src/assets/MOCK/dpp.json index ef125a0bd..9959faf8c 100644 --- a/src/assets/MOCK/dpp.json +++ b/src/assets/MOCK/dpp.json @@ -1,5 +1,160 @@ { - "metadata": {}, + "metadata": { + "contract": { + "@id": "5c4fbb7d-cf02-4401-a7a3-f0ec1c506f33", + "@type": "dcat:Dataset", + "odrl:hasPolicy": { + "@id": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:ac45d75a-2542-4d1a-a0fc-034c705418a9", + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23" + }, + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "HttpProxy" + }, + "dcat:accessService": "1795254a-e354-46c7-9d88-04608b05ca9f" + }, + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "AmazonS3" + }, + "dcat:accessService": "1795254a-e354-46c7-9d88-04608b05ca9f" + } + ], + "edc:description": "Battery Passport test data", + "edc:id": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23" + }, + "negotiation": { + "init": { + "request": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "NegotiationInitiateRequestDto", + "connectorAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "protocol": "dataspace-protocol-http", + "connectorId": "BPNL00000000CBA5", + "offer": { + "offerId": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:ac45d75a-2542-4d1a-a0fc-034c705418a9", + "assetId": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23", + "policy": { + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23" + } + } + }, + "response": { + "@id": "83892309-6b65-4597-b36a-f86bb7b42f2c", + "@type": "edc:IdResponseDto", + "edc:createdAt": 1688393668476, + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + }, + "get": { + "response": { + "@id": "83892309-6b65-4597-b36a-f86bb7b42f2c", + "@type": "edc:ContractNegotiationDto", + "edc:type": "CONSUMER", + "edc:protocol": "dataspace-protocol-http", + "edc:state": "FINALIZED", + "edc:counterPartyAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "edc:callbackAddresses": [], + "edc:contractAgreementId": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:b631f6a1-75b5-497b-ae3d-0413d6dd87fb", + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + } + }, + "transfer": { + "init": { + "request": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "assetId": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23", + "connectorAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "contractId": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:b631f6a1-75b5-497b-ae3d-0413d6dd87fb", + "dataDestination": { + "properties": { + "type": "HttpProxy" + } + }, + "managedResources": false, + "privateProperties": { + "receiverHttpEndpoint": "https://materialpass.dev.demo.catena-x.net/endpoint/d0bf9018-87ee-4b4a-b4a5-683b2701d90e" + }, + "protocol": "dataspace-protocol-http", + "transferType": { + "contentType": "application/octet-stream", + "isFinite": true + } + }, + "response": { + "@id": "ecdad987-afc4-4c49-aa88-9676b4599db0", + "@type": "edc:IdResponseDto", + "edc:createdAt": 1688393671434, + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + }, + "get": { + "response": { + "@id": "ecdad987-afc4-4c49-aa88-9676b4599db0", + "@type": "edc:TransferProcessDto", + "edc:state": "COMPLETED", + "edc:stateTimestamp": 1688393673622, + "edc:type": "CONSUMER", + "edc:callbackAddresses": [], + "edc:dataDestination": { + "edc:type": "HttpProxy" + }, + "edc:dataRequest": { + "@id": "ecdad987-afc4-4c49-aa88-9676b4599db0", + "@type": "edc:DataRequestDto", + "edc:assetId": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23", + "edc:contractId": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:b631f6a1-75b5-497b-ae3d-0413d6dd87fb" + }, + "edc:receiverHttpEndpoint": "https://materialpass.dev.demo.catena-x.net/endpoint/d0bf9018-87ee-4b4a-b4a5-683b2701d90e", + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + } + } + }, "semanticId": "general", "aspect": { "serialization": { diff --git a/src/assets/MOCK/transmission.json b/src/assets/MOCK/transmission.json new file mode 100644 index 000000000..45beb400c --- /dev/null +++ b/src/assets/MOCK/transmission.json @@ -0,0 +1,305 @@ +{ + "metadata": { + "contract": { + "@id": "5c4fbb7d-cf02-4401-a7a3-f0ec1c506f33", + "@type": "dcat:Dataset", + "odrl:hasPolicy": { + "@id": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:ac45d75a-2542-4d1a-a0fc-034c705418a9", + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23" + }, + "dcat:distribution": [ + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "HttpProxy" + }, + "dcat:accessService": "1795254a-e354-46c7-9d88-04608b05ca9f" + }, + { + "@type": "dcat:Distribution", + "dct:format": { + "@id": "AmazonS3" + }, + "dcat:accessService": "1795254a-e354-46c7-9d88-04608b05ca9f" + } + ], + "edc:description": "Battery Passport test data", + "edc:id": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23" + }, + "negotiation": { + "init": { + "request": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "NegotiationInitiateRequestDto", + "connectorAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "protocol": "dataspace-protocol-http", + "connectorId": "BPNL00000000CBA5", + "offer": { + "offerId": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:ac45d75a-2542-4d1a-a0fc-034c705418a9", + "assetId": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23", + "policy": { + "@type": "odrl:Set", + "odrl:permission": [], + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23" + } + } + }, + "response": { + "@id": "83892309-6b65-4597-b36a-f86bb7b42f2c", + "@type": "edc:IdResponseDto", + "edc:createdAt": 1688393668476, + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + }, + "get": { + "response": { + "@id": "83892309-6b65-4597-b36a-f86bb7b42f2c", + "@type": "edc:ContractNegotiationDto", + "edc:type": "CONSUMER", + "edc:protocol": "dataspace-protocol-http", + "edc:state": "FINALIZED", + "edc:counterPartyAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "edc:callbackAddresses": [], + "edc:contractAgreementId": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:b631f6a1-75b5-497b-ae3d-0413d6dd87fb", + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + } + }, + "transfer": { + "init": { + "request": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "assetId": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23", + "connectorAddress": "https://materialpass.dev.demo.catena-x.net/BPNL000000000000/api/v1/dsp", + "contractId": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:b631f6a1-75b5-497b-ae3d-0413d6dd87fb", + "dataDestination": { + "properties": { + "type": "HttpProxy" + } + }, + "managedResources": false, + "privateProperties": { + "receiverHttpEndpoint": "https://materialpass.dev.demo.catena-x.net/endpoint/d0bf9018-87ee-4b4a-b4a5-683b2701d90e" + }, + "protocol": "dataspace-protocol-http", + "transferType": { + "contentType": "application/octet-stream", + "isFinite": true + } + }, + "response": { + "@id": "ecdad987-afc4-4c49-aa88-9676b4599db0", + "@type": "edc:IdResponseDto", + "edc:createdAt": 1688393671434, + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + }, + "get": { + "response": { + "@id": "ecdad987-afc4-4c49-aa88-9676b4599db0", + "@type": "edc:TransferProcessDto", + "edc:state": "COMPLETED", + "edc:stateTimestamp": 1688393673622, + "edc:type": "CONSUMER", + "edc:callbackAddresses": [], + "edc:dataDestination": { + "edc:type": "HttpProxy" + }, + "edc:dataRequest": { + "@id": "ecdad987-afc4-4c49-aa88-9676b4599db0", + "@type": "edc:DataRequestDto", + "edc:assetId": "1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23", + "edc:contractId": "2:1f4a64f0-aba9-498a-917c-4936c24c50cd-49a06ad2-64b7-46c8-9f3b-a718c462ca23:b631f6a1-75b5-497b-ae3d-0413d6dd87fb" + }, + "edc:receiverHttpEndpoint": "https://materialpass.dev.demo.catena-x.net/endpoint/d0bf9018-87ee-4b4a-b4a5-683b2701d90e", + "@context": { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + } + } + } + }, + "semanticId": "urn:bamm:io.catenax.transmission.transmission_pass:1.0.0#TransmissionPass", + "aspect": { + "productSpecificParameters": { + "torqueConverter": [ + "RYtGKbgicZaHCBRQDSx" + ], + "driveType": "combustion engine", + "oilType": "ZF Lifeguard Hybrid 2", + "spreading": 6.79, + "torque": 500.0, + "power": 300.0, + "standardGearRatio": { + "gear": "1", + "ratio": 4.1567 + }, + "oilCapacity": 8.9, + "electricPerformance": [ + "VLhpfQGTMDYpsBZxvfBoeygjb" + ], + "speedResistance": { + "speed": 7800, + "gear": "1" + } + }, + "instructions": { + "packagingInstructions": [ + { + "documentTitle": "Title A", + "documentLink": "https://www.xxx.pdf" + }, + { + "documentTitle": "Title A", + "documentLink": "https://www.xxx.pdf" + } + ], + "transportationInstructions": [ + { + "documentTitle": "Title A", + "documentLink": "https://www.xxx.pdf" + } + ], + "dismantlingProcedure": [ + { + "documentTitle": "Title A", + "documentLink": "https://www.xxx.pdf" + } + ], + "safetyMeasures": [ + { + "documentTitle": "Title A", + "documentLink": "https://www.xxx.pdf" + } + ], + "vehicleDismantlingProcedure": [ + { + "documentTitle": "Title A", + "documentLink": "https://www.xxx.pdf" + } + ] + }, + "identification": { + "manufacturerId": "BPNL1234567890ZZ", + "localIdentifiers": [ + { + "value": "SN12345678", + "key": "PartInstanceID" + } + ], + "dataMatrixCode": "UMaAIKKIkknjWEXJUfPxxQHeWKEJ" + }, + "sparePartSupplier": [ + { + "supplierContact": { + "faxNumber": "+49 89 0987654321", + "website": "https://www.samsung.com", + "phoneNumber": "+49 89 1234567890", + "email": "test.mail@example.com" + }, + "supplierId": "BPNL1234567890ZZ", + "sparePartName": "torque converter" + } + ], + "stateOfHealth": { + "serviceHistory": [ + "2023-05-22T13:16:47.239+02:00" + ], + "expectedLifespan": 500000, + "remanufacturing": { + "remanufacturingDate": "2023-05-22T13:16:47.239+02:00", + "productStatusValue": "first life" + } + }, + "generalInformation": { + "additionalInformation": "JxkyvRnL", + "physicalDimensionsProperty": { + "width": 1000.0, + "length": 20000.1, + "weight": 100.7, + "diameter": 0.03, + "height": 0.1 + }, + "warrantyPeriod": 60.0, + "productDescription": "manual transmission", + "productType": "8HP60MH" + }, + "sustainability": { + "substancesOfConcern": [ + "yedUsFwdkelQbxeTeQOvaScfqIOOmaa", + "yedUsFwdkelQbxeTeQOvaScfqIOOmaa" + ], + "responsibleSourcingDocument": [ + { + "documentTitle": "Title A", + "documentLink": "https://www.xxx.pdf" + } + ], + "recyclateContent": { + "nickel": -1.7976931348623157E+308, + "lithium": -1.7976931348623157E+308, + "cobalt": -1.7976931348623157E+308, + "otherSubstance": [ + { + "substancePercentage": 8.0, + "substanceName": "Lead" + } + ] + }, + "criticalRawMaterials": [ + "eOMtThyhVNLWUZNRcBaQKxI" + ], + "carbonFootprint": { + "crossSectoralStandardsUsed": [ + { + "crossSectoralStandard": "GHG Protocol Product standard" + } + ], + "co2FootprintTotal": -1.7976931348623157E+308, + "productOrSectorSpecificRules": [ + { + "operator": "PEF", + "ruleNames": "ABC 2021", + "otherOperatorName": "NSF" + } + ] + } + } + } +} \ No newline at end of file diff --git a/src/assets/styles/components/general/footer.scss b/src/assets/styles/components/general/footer.scss index 36118eed5..c833ca7a6 100644 --- a/src/assets/styles/components/general/footer.scss +++ b/src/assets/styles/components/general/footer.scss @@ -20,7 +20,6 @@ * SPDX-License-Identifier: Apache-2.0 */ - .footer-content { position: absolute; bottom: 0; @@ -80,8 +79,10 @@ } } -@media (max-width: 893px) { +@media (max-width: 1020px) { .footer-content { + position: relative; + margin: 0; flex-direction: column; align-items: center; @@ -91,12 +92,12 @@ } } } -@media (max-width: 900px) { - .footer-content { - position: relative; - margin:0; - } -} +// @media (max-width: 900px) { +// .footer-content { +// position: relative; +// margin: 0; +// } +// } @media (max-width: 585px) { .footer-content { flex-direction: column; diff --git a/src/assets/styles/components/landing/searchView.scss b/src/assets/styles/components/landing/searchView.scss index 771f3bb55..76c52d4ed 100644 --- a/src/assets/styles/components/landing/searchView.scss +++ b/src/assets/styles/components/landing/searchView.scss @@ -167,7 +167,7 @@ .error { font-weight: bold; text-align: center; - padding: 0 0 70px 0; + padding: 0 0 18px 0; } .qr-container { @@ -441,6 +441,26 @@ .stream-container { margin-top: 15px; margin-bottom: 30px; + width: 300px; + height: 300px; + } + } +} + +@media (max-height: 650px) { + .home-page-container { + .stream-container { + width: 250px; + height: 250px; + } + } +} + +@media (max-height: 590px) { + .home-page-container { + .stream-container { + width: 200px; + height: 200px; } } } @@ -455,10 +475,8 @@ } .stream-container { - margin-top: 15px; + margin-top: 5px; margin-bottom: 30px; - width: 200px; - height: 200px; } .logotype-container { img { diff --git a/src/components/general/QrcodeStrem.vue b/src/components/general/QrcodeStrem.vue new file mode 100644 index 000000000..2fab7fec0 --- /dev/null +++ b/src/components/general/QrcodeStrem.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/components/general/TabsComponent.vue b/src/components/general/TabsComponent.vue index c75c4dd92..2190c2d63 100644 --- a/src/components/general/TabsComponent.vue +++ b/src/components/general/TabsComponent.vue @@ -66,6 +66,10 @@ import Handling from "../passport/sections/Handling.vue"; import AdditionalData from "../passport/sections/AdditionalData.vue"; import Sustainability from "../passport/sections/Sustainability.vue"; import Operation from "../passport/sections/Operation.vue"; +import ProductSpecificParameters from "../passport/sections/ProductSpecificParameters.vue"; +import Instructions from "../passport/sections/Instructions.vue"; +import SparePartSupplier from "../passport/sections/SparePartSupplier.vue"; +import StateOfHealth from "../passport/sections/StateOfHealth.vue"; export default { name: "TabsComponent", @@ -90,6 +94,10 @@ export default { AdditionalData, Sustainability, Operation, + ProductSpecificParameters, + Instructions, + SparePartSupplier, + StateOfHealth, }, data() { return { diff --git a/src/components/passport/Field.vue b/src/components/passport/Field.vue index bdb315ebf..6d8cb4d50 100644 --- a/src/components/passport/Field.vue +++ b/src/components/passport/Field.vue @@ -46,6 +46,9 @@ + {{ faxNumber ? faxNumber : "—" }} + {{ postal ? postal : "—" }} @@ -102,6 +105,7 @@ export default { postal: { type: [String, Number], default: "" }, country: { type: [String, Number], default: "" }, phone: { type: [String, Number], default: "" }, + faxNumber: { type: [String, Number], default: "" }, email: { type: [String, Number], default: "" }, website: { type: [String, Number], default: "" }, length: { type: [String, Number], default: "" }, diff --git a/src/components/passport/GeneralCards.vue b/src/components/passport/GeneralCards.vue index 0426f22ba..21567edfa 100644 --- a/src/components/passport/GeneralCards.vue +++ b/src/components/passport/GeneralCards.vue @@ -80,7 +80,7 @@ import DialogComponent from "../general/Dialog.vue"; export default { - name: "BatteryCards", + name: "GeneralCards", components: { DialogComponent, }, @@ -131,7 +131,7 @@ export default { value: this.$props.data.aspect.metadata.version, secondValue: this.$props.data.aspect.metadata.issueDate, description: { - title: "aspect version", + title: "Aspect version", value: "Description of the aspect version", }, }, diff --git a/src/components/passport/InstructionsField.vue b/src/components/passport/InstructionsField.vue new file mode 100644 index 000000000..aa489ead5 --- /dev/null +++ b/src/components/passport/InstructionsField.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/components/passport/TransmissionCards.vue b/src/components/passport/TransmissionCards.vue new file mode 100644 index 000000000..b5a8e77b5 --- /dev/null +++ b/src/components/passport/TransmissionCards.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/src/components/passport/sections/GeneralInformation.vue b/src/components/passport/sections/GeneralInformation.vue index 3e95f5402..428ebbb30 100644 --- a/src/components/passport/sections/GeneralInformation.vue +++ b/src/components/passport/sections/GeneralInformation.vue @@ -24,6 +24,73 @@ diff --git a/src/components/passport/sections/Identification.vue b/src/components/passport/sections/Identification.vue index 65e78a1c0..01053d4d3 100644 --- a/src/components/passport/sections/Identification.vue +++ b/src/components/passport/sections/Identification.vue @@ -25,6 +25,13 @@ + +