diff --git a/README.md b/README.md index c3f2df406..1f00af39d 100644 --- a/README.md +++ b/README.md @@ -61,14 +61,14 @@ To get started you can have a look into our documentation: | [Backend Documentation](./dpp-backend/digitalproductpass/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 | -| [Keycloak Overview](./docker/local/Keycloak/README.md) | This guide describes how to setup a keycloak instance in local docker container and import existing realm.json file. | +| [Keycloak Overview](./deployment/local/docker/Keycloak/README.md) | This guide describes how to setup a keycloak instance in local docker container and import existing realm.json file. | | [Short Introduction into the project](./docs/GETTING-STARTED.md) | Digital Product Pass App infrastructure, helm installation guide, technical usage guide | | [Code Scaning with Kics and Trivy](./docs/IaC.md) | Infrastructure As Code (IaC) with KICS intends to find security vulnerabilities by scanning the code and upload results to the security dashboard in github | | [Release Guidelines](./docs/RELEASE.md) | Digital Product Pass App Release Guide | | [Secret Management](./docs/SECRETS_MANAGEMENT.md) | Secrets management with CX HashiCorp Vault and ArgoCD Vault Plugin (AVP) - client credentials, database passwords, access tokens | | [Cypress Overview](./docs/cypress/CYPRESS.md) | Documentation for Battery Passport App E2E Cypress test | | [End User Manual](./docs/user%20manual/User%20Manual%20Product%20Viewer%20App.md) | End User Manual Product Viewer App | -| [Postman Overview](./postman/README.md) | Technical guide depicts the battery pass end-to-end API calls through the postman REST client | +| [Postman Overview](./deployment/local/postman//README.md) | Technical guide depicts the battery pass end-to-end API calls through the postman REST client | | [Changelog](./CHANGELOG.md) | Changelog | | [Helm Charts](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts/digital-product-pass) | Project's Helm Charts | diff --git a/deployment/README.md b/deployment/README.md index e278ce9e1..771c3c61e 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -29,9 +29,9 @@ This document describes the battery pass application deployment steps in hotel b - Link to the Integration environment: [ArgoCD Hotel Budapest INT - Product Material Passport](https://argo.int.demo.catena-x.net) -- [edc-consumer](./helm/edc-consumer) +- [edc-consumer](./infrastructure/edc-consumer) -- [edc-provider](./helm/edc-provider) +- [edc-provider](./infrastructure/edc-provider) - [digital-product-pass](../charts/digital-product-pass) - dpp-frontend @@ -86,7 +86,7 @@ If everything works fine then the application is deployed... The dpp frontend is a consumer user interface application for the digital product passports that interacts with the end-user and displays passports. The steps above will be followed to deploy the consumer frontend component. -In the end, the frontend should be accessible at https://materialpass.int.demo.catena-x.net. You would be redirected to the CatenaX central IDP and can see the login page after company selection. +In the end, the frontend should be accessible at https://dpp.int.demo.catena-x.net. You would be redirected to the CatenaX central IDP and can see the login page after company selection. ##### Login credentails: - **Company Selection:** CX-Test-Access @@ -111,7 +111,7 @@ In the end, the frontend should be accessible at https://materialpass.int.demo.c The consumer backend is a Java based spring boot application which implements the service modules and business layer to manage the passports in frontend component. -[Open API documentation in Swagger](https://materialpass.int.demo.catena-x.net/swagger-ui/index.html) +[Open API documentation in Swagger](https://dpp.int.demo.catena-x.net/swagger-ui/index.html) ![Swagger UI](./images/swagger.png) diff --git a/deployment/helm/irs/.helmignore b/deployment/helm/irs/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/deployment/helm/irs/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/deployment/helm/irs/Chart.yaml b/deployment/helm/irs/Chart.yaml deleted file mode 100644 index 5bb43c3b6..000000000 --- a/deployment/helm/irs/Chart.yaml +++ /dev/null @@ -1,41 +0,0 @@ -################################################################################# -# Catena-X - Product Passport Consumer Application -# -# Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the -# License for the specific language govern in permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -################################################################################# - -apiVersion: v2 -name: irs -description: A Helm chart for Kubernetes -type: application -version: 0.1.0 -appVersion: "3.5.0" -dependencies: - - name: irs-helm - repository: https://eclipse-tractusx.github.io/item-relationship-service - version: 6.7.0 - condition: irs-helm.enabled - - name: tractusx-connector - repository: https://eclipse-tractusx.github.io/charts/dev - version: 0.5.0 - - condition: postgresql.enabled - alias: edc-postgresql - name: postgresql - repository: https://charts.bitnami.com/bitnami - version: 12.1.6 diff --git a/deployment/helm/irs/values-int.yaml b/deployment/helm/irs/values-int.yaml deleted file mode 100644 index 51ef35121..000000000 --- a/deployment/helm/irs/values-int.yaml +++ /dev/null @@ -1,257 +0,0 @@ -################################################################################# -# Catena-X - Product Passport Consumer Application -# -# Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the -# License for the specific language govern in permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -################################################################################# - -### The fully configuration is available in https://github.com/eclipse-tractusx/item-relationship-service/tree/main/charts/irs-helm - ---- - -irs-helm: - enabled: true - bpn: - - nameOverride: "dpp-irs" - fullnameOverride: "dpp-irs" - - # namespace: product-material-pass - - irsUrl: "https://materialpass-irs.int.demo.catena-x.net" - - ingress: - enabled: true - annotations: - ingressClassName: nginx - nginx.ingress.kubernetes.io/backend-protocol: HTTP - nginx.ingress.kubernetes.io/force-ssl-redirect: 'true' - nginx.ingress.kubernetes.io/ssl-passthrough: 'false' - hosts: - - host: "materialpass-irs.int.demo.catena-x.net" - paths: - - path: / - pathType: Prefix - tls: - - hosts: - - "materialpass-irs.int.demo.catena-x.net" - secretName: tls-secret - - digitalTwinRegistry: - type: decentral - url: https://materialpass.int.demo.catena-x.net/semantics/registry/api/v3.0 - discoveryFinderUrl: https://semantics.int.demo.catena-x.net/discoveryfinder/api/administration/connectors/discovery/search - semanticshub: - url: https://semantics.int.demo.catena-x.net/hub/api/v1/models - bpdm: - url: https://partners-pool.int.demo.catena-x.net - bpnEndpoint: >- - {{- if .Values.bpdm.url }} - {{- tpl (.Values.bpdm.url | default "") . }}/api/catena/legal-entities/{partnerId}?idType={idType} - {{- end }} - - minioUser: - minioPassword: - minioUrl: "http://{{ .Release.Name }}-minio:9000" - - keycloak: - oauth2: - clientId: - clientSecret: - clientTokenUri: https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token - jwkSetUri: https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/certs - # portal: - # oauth2: - # clientId: # - # clientSecret: # - - edc: - controlplane: - endpoint: - data: https://materialpass-irs.int.demo.catena-x.net/consumer/management - apikey: - secret: - - minio: - nameOverride: "dpp-irs-minio" - fullnameOverride: "dpp-irs-minio" - serviceAccount: - create: false - rootUser: - rootPassword: - -tractusx-connector: - enabled: true - participant: - id: "" - - controlplane: - enabled: true - endpoints: - # -- default api for health checks, should not be added to any ingress - default: - # -- port for incoming api calls - port: 8080 - # -- path for incoming api calls - path: /consumer/api - # -- data management api, used by internal users, can be added to an ingress and must not be internet facing - management: - # -- port for incoming api calls - port: 8081 - # -- path for incoming api calls - path: /consumer/management - # -- authentication key, must be attached to each 'X-Api-Key' request header - authKey: - # -- control api, used for internal control calls. can be added to the internal ingress, but should probably not - control: - # -- port for incoming api calls - port: 8083 - # -- path for incoming api calls - path: /consumer/control - # -- ids api, used for inter connector communication and must be internet facing - protocol: - # -- port for incoming api calls - port: 8084 - # -- path for incoming api calls - path: /consumer/api/v1/dsp - # -- metrics api, used for application metrics, must not be internet facing - metrics: - # -- port for incoming api calls - port: 9090 - # -- path for incoming api calls - path: /consumer/metrics - # -- observability api with unsecured access, must not be internet facing - observability: - # -- port for incoming API calls - port: 8085 - # -- observability api, provides /health /readiness and /liveness endpoints - path: /consumer/observability - # -- allow or disallow insecure access, i.e. access without authentication - insecure: true - - ssi: - miw: - url: "" - authorityId: "" - oauth: - tokenurl: "https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token" - client: - id: "" - secretAlias: "int-client-secret" - endpoint: - audience: https://materialpass-irs.int.demo.catena-x.net/consumer - - ## Ingress declaration to expose the network service. - ingresses: - ## Public / Internet facing Ingress - - enabled: true - # -- The hostname to be used to precisely map incoming traffic onto the underlying network service - hostname: "materialpass-irs.int.demo.catena-x.net" - # -- Additional ingress annotations to add - annotations: {} - # -- EDC endpoints exposed by this ingress resource - endpoints: - - default - - management - - control - - protocol - - metrics - - observability - # -- Defines the [ingress class](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class) to use - className: "nginx" - # -- TLS [tls class](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) applied to the ingress resource - tls: - # -- Enables TLS on the ingress resource - enabled: true - # -- If present overwrites the default secret name - secretName: "tls-secret" - dataplane: - enabled: true - endpoints: - default: - port: 8080 - path: /consumer/api - public: - port: 8081 - path: /consumer/api/public - control: - port: 8083 - path: /consumer/api/dataplane/control - proxy: - port: 8186 - path: /consumer/proxy - observability: - # -- port for incoming API calls - port: 8085 - # -- observability api, provides /health /readiness and /liveness endpoints - path: /consumer/observability - # -- allow or disallow insecure access, i.e. access without authentication - insecure: true - metrics: - port: 9090 - path: /consumer/metrics - - ## Ingress declaration to expose the network service. - ingresses: - ## Public / Internet facing Ingress - - enabled: true - # -- The hostname to be used to precisely map incoming traffic onto the underlying network service - hostname: "materialpass-irs.int.demo.catena-x.net" - # -- Additional ingress annotations to add - annotations: {} - # -- EDC endpoints exposed by this ingress resource - endpoints: - - public - # -- Defines the [ingress class](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class) to use - className: "nginx" - # -- TLS [tls class](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) applied to the ingress resource - tls: - # -- Enables TLS on the ingress resource - enabled: true - # -- If present overwrites the default secret name - secretName: "tls-secret" - ## Adds [cert-manager](https://cert-manager.io/docs/) annotations to the ingress resource - certManager: - # -- If preset enables certificate generation via cert-manager namespace scoped issuer - issuer: "" - # -- If preset enables certificate generation via cert-manager cluster-wide issuer - clusterIssuer: "" - - postgresql: - username: - password: - - vault: - hashicorp: - url: - token: - paths: - secret: - health: /v1/sys/health - secretNames: - transferProxyTokenSignerPrivateKey: ids-daps_key - transferProxyTokenSignerPublicKey: ids-daps_crt - transferProxyTokenEncryptionAesKey: edc-encryption-key - - # backendService: - # httpProxyTokenReceiverUrl: "https://materialpass-irs.int.demo.catena-x.net/endpoint" - -postgresql: - auth: - username: - password: diff --git a/deployment/helm/irs/values.yaml b/deployment/helm/irs/values.yaml deleted file mode 100644 index 71ab07d07..000000000 --- a/deployment/helm/irs/values.yaml +++ /dev/null @@ -1,596 +0,0 @@ -################################################################################# -# Catena-X - Product Passport Consumer Application -# -# Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the -# License for the specific language govern in permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -################################################################################# - -### The fully configuration is available in https://github.com/eclipse-tractusx/item-relationship-service/tree/main/charts/irs-helm - ---- - -irs-helm: - enabled: true - -tractusx-connector: - enabled: true - install: - daps: false - postgresql: false - vault: false - fullnameOverride: "irs-edc-consumer" - nameOverride: "" - # -- Existing image pull secret to use to [obtain the container image from private registries](https://kubernetes.io/docs/concepts/containers/images/#using-a-private-registry) - imagePullSecrets: [] - customLabels: {} - - - participant: - id: "" - - controlplane: - enabled: true - image: - # -- Which derivate of the control plane to use. when left empty the deployment will select the correct image automatically - repository: "tractusx/edc-controlplane-postgresql-hashicorp-vault" - # -- [Kubernetes image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) to use - pullPolicy: IfNotPresent - # -- Overrides the image tag whose default is the chart appVersion - tag: "0.5.0" - initContainers: [] - debug: - enabled: false - port: 1044 - suspendOnStart: false - internationalDataSpaces: - id: TXDC - description: Tractus-X Eclipse IDS Data Space Connector - title: "" - maintainer: "" - curator: "" - catalogId: TXDC-Catalog - livenessProbe: - # -- Whether to enable kubernetes [liveness-probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) - enabled: true - # -- seconds to wait before performing the first liveness check - initialDelaySeconds: 30 - # -- this fields specifies that kubernetes should perform a liveness check every 10 seconds - periodSeconds: 10 - # -- number of seconds after which the probe times out - timeoutSeconds: 5 - # -- when a probe fails kubernetes will try 6 times before giving up - failureThreshold: 6 - # -- number of consecutive successes for the probe to be considered successful after having failed - successThreshold: 1 - readinessProbe: - # -- Whether to enable kubernetes [readiness-probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) - enabled: true - # -- seconds to wait before performing the first readiness check - initialDelaySeconds: 30 - # -- this fields specifies that kubernetes should perform a readiness check every 10 seconds - periodSeconds: 10 - # -- number of seconds after which the probe times out - timeoutSeconds: 5 - # -- when a probe fails kubernetes will try 6 times before giving up - failureThreshold: 6 - # -- number of consecutive successes for the probe to be considered successful after having failed - successThreshold: 1 - # -- endpoints of the control plane - endpoints: - # -- default api for health checks, should not be added to any ingress - default: - # -- port for incoming api calls - port: 8080 - # -- path for incoming api calls - path: /consumer/api - # -- data management api, used by internal users, can be added to an ingress and must not be internet facing - management: - # -- port for incoming api calls - port: 8081 - # -- path for incoming api calls - path: /consumer/management - # -- authentication key, must be attached to each 'X-Api-Key' request header - authKey: - # -- control api, used for internal control calls. can be added to the internal ingress, but should probably not - control: - # -- port for incoming api calls - port: 8083 - # -- path for incoming api calls - path: /consumer/control - # -- ids api, used for inter connector communication and must be internet facing - protocol: - # -- port for incoming api calls - port: 8084 - # -- path for incoming api calls - path: /consumer/api/v1/dsp - # -- metrics api, used for application metrics, must not be internet facing - metrics: - # -- port for incoming api calls - port: 9090 - # -- path for incoming api calls - path: /consumer/metrics - # -- observability api with unsecured access, must not be internet facing - observability: - # -- port for incoming API calls - port: 8085 - # -- observability api, provides /health /readiness and /liveness endpoints - path: /consumer/observability - # -- allow or disallow insecure access, i.e. access without authentication - insecure: true - businessPartnerValidation: - log: - agreementValidation: true - # SSI configuration - ssi: - miw: - url: "" - authorityId: "" - oauth: - tokenurl: "https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token" - client: - id: "" - secretAlias: "dev-client-secret" - endpoint: - audience: https://materialpass.dev.demo.catena-x.net/consumer - - service: - # -- [Service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to expose the running application on a set of Pods as a network service. - type: ClusterIP - annotations: {} - # -- additional labels for the pod - podLabels: {} - # -- additional annotations for the pod - podAnnotations: {} - # -- The [pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) defines privilege and access control settings for a Pod within the deployment - podSecurityContext: - seccompProfile: - # -- Restrict a Container's Syscalls with seccomp - type: RuntimeDefault - # -- Runs all processes within a pod with a special uid - runAsUser: 10001 - # -- Processes within a pod will belong to this guid - runAsGroup: 10001 - # -- The owner for volumes and any files created within volumes will belong to this guid - fsGroup: 10001 - # The [container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) defines privilege and access control settings for a Container within a pod - securityContext: - capabilities: - # -- Specifies which capabilities to drop to reduce syscall attack surface - drop: - - ALL - # -- Specifies which capabilities to add to issue specialized syscalls - add: [] - # -- Whether the root filesystem is mounted in read-only mode - readOnlyRootFilesystem: true - # -- Controls [Privilege Escalation](https://kubernetes.io/docs/concepts/security/pod-security-policy/#privilege-escalation) enabling setuid binaries changing the effective user ID - allowPrivilegeEscalation: false - # -- Requires the container to run without root privileges - runAsNonRoot: true - # -- The container's process will run with the specified uid - runAsUser: 10001 - # Extra environment variables that will be pass onto deployment pods - env: {} - # ENV_NAME: value - - # "valueFrom" environment variable references that will be added to deployment pods. Name is templated. - # ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvarsource-v1-core - envValueFrom: {} - # ENV_NAME: - # configMapKeyRef: - # name: configmap-name - # key: value_key - # secretKeyRef: - # name: secret-name - # key: value_key - - # [Kubernetes Secret Resource](https://kubernetes.io/docs/concepts/configuration/secret/) names to load environment variables from - envSecretNames: [] - # - first-secret - # - second-secret - - # [Kubernetes ConfigMap Resource](https://kubernetes.io/docs/concepts/configuration/configmap/) names to load environment variables from - envConfigMapNames: [] - # - first-config-map - # - second-config-map - - ## Ingress declaration to expose the network service. - ingresses: - ## Public / Internet facing Ingress - - enabled: true - # -- The hostname to be used to precisely map incoming traffic onto the underlying network service - hostname: "materialpass-irs.dev.demo.catena-x.net" - # -- Additional ingress annotations to add - annotations: {} - # -- EDC endpoints exposed by this ingress resource - endpoints: - - default - - management - - control - - protocol - - metrics - - observability - # -- Defines the [ingress class](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class) to use - className: "nginx" - # -- TLS [tls class](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) applied to the ingress resource - tls: - # -- Enables TLS on the ingress resource - enabled: true - # -- If present overwrites the default secret name - secretName: "tls-secret" - ## Adds [cert-manager](https://cert-manager.io/docs/) annotations to the ingress resource - certManager: - # -- If preset enables certificate generation via cert-manager namespace scoped issuer - issuer: "" - # -- If preset enables certificate generation via cert-manager cluster-wide issuer - clusterIssuer: "" - ## Private / Intranet facing Ingress - - enabled: false - # -- The hostname to be used to precisely map incoming traffic onto the underlying network service - hostname: "edc-control.intranet" - # -- Additional ingress annotations to add - annotations: {} - # -- EDC endpoints exposed by this ingress resource - endpoints: - - management - - control - # -- Defines the [ingress class](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class) to use - className: "nginx" - # -- TLS [tls class](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) applied to the ingress resource - tls: - # -- Enables TLS on the ingress resource - enabled: true - # -- If present overwrites the default secret name - secretName: "tls-secret" - ## Adds [cert-manager](https://cert-manager.io/docs/) annotations to the ingress resource - certManager: - # -- If preset enables certificate generation via cert-manager namespace scoped issuer - issuer: "" - # -- If preset enables certificate generation via cert-manager cluster-wide issuer - clusterIssuer: "" - # -- declare where to mount [volumes](https://kubernetes.io/docs/concepts/storage/volumes/) into the container - volumeMounts: [] - # -- [volume](https://kubernetes.io/docs/concepts/storage/volumes/) directories - volumes: [] - # -- [resource management](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for the container - resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - replicaCount: 1 - autoscaling: - # -- Enables [horizontal pod autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) - enabled: false - # -- Minimal replicas if resource consumption falls below resource threshholds - minReplicas: 1 - # -- Maximum replicas if resource consumption exceeds resource threshholds - maxReplicas: 100 - # -- targetAverageUtilization of cpu provided to a pod - targetCPUUtilizationPercentage: 80 - # -- targetAverageUtilization of memory provided to a pod - targetMemoryUtilizationPercentage: 80 - # -- configuration of the [Open Telemetry Agent](https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/) to collect and expose metrics - opentelemetry: |- - otel.javaagent.enabled=false - otel.javaagent.debug=false - # -- configuration of the [Java Util Logging Facade](https://docs.oracle.com/javase/7/docs/technotes/guides/logging/overview.html) - logging: |- - .level=INFO - org.eclipse.edc.level=ALL - handlers=java.util.logging.ConsoleHandler - java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter - java.util.logging.ConsoleHandler.level=ALL - java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS] [%4$-7s] %5$s%6$s%n - # [node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) to constrain pods to nodes - nodeSelector: {} - # [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) to configure preferred nodes - tolerations: [] - # [affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) to configure which nodes the pods can be scheduled on - affinity: {} - url: - # -- Explicitly declared url for reaching the ids api (e.g. if ingresses not used) - ids: "" - dataplane: - enabled: true - image: - # -- Which derivate of the data plane to use. when left empty the deployment will select the correct image automatically - repository: "tractusx/edc-dataplane-hashicorp-vault" - # -- [Kubernetes image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) to use - pullPolicy: IfNotPresent - # -- Overrides the image tag whose default is the chart appVersion - tag: "0.5.0" - initContainers: [] - debug: - enabled: false - port: 1044 - suspendOnStart: false - livenessProbe: - # -- Whether to enable kubernetes [liveness-probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) - enabled: true - # -- seconds to wait before performing the first liveness check - initialDelaySeconds: 30 - # -- this fields specifies that kubernetes should perform a liveness check every 10 seconds - periodSeconds: 10 - # -- number of seconds after which the probe times out - timeoutSeconds: 5 - # -- when a probe fails kubernetes will try 6 times before giving up - failureThreshold: 6 - # -- number of consecutive successes for the probe to be considered successful after having failed - successThreshold: 1 - readinessProbe: - # -- Whether to enable kubernetes [readiness-probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) - enabled: true - # -- seconds to wait before performing the first readiness check - initialDelaySeconds: 30 - # -- this fields specifies that kubernetes should perform a liveness check every 10 seconds - periodSeconds: 10 - # -- number of seconds after which the probe times out - timeoutSeconds: 5 - # -- when a probe fails kubernetes will try 6 times before giving up - failureThreshold: 6 - # -- number of consecutive successes for the probe to be considered successful after having failed - successThreshold: 1 - service: - # -- [Service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to expose the running application on a set of Pods as a network service. - type: ClusterIP - port: 80 - endpoints: - default: - port: 8080 - path: /consumer/api - public: - port: 8081 - path: /consumer/api/public - control: - port: 8083 - path: /consumer/api/dataplane/control - proxy: - port: 8186 - path: /consumer/proxy - observability: - # -- port for incoming API calls - port: 8085 - # -- observability api, provides /health /readiness and /liveness endpoints - path: /consumer/observability - # -- allow or disallow insecure access, i.e. access without authentication - insecure: true - metrics: - port: 9090 - path: /consumer/metrics - aws: - endpointOverride: "" - accessKeyId: "" - secretAccessKey: "" - # -- additional labels for the pod - podLabels: {} - # -- additional annotations for the pod - podAnnotations: {} - # -- The [pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) defines privilege and access control settings for a Pod within the deployment - podSecurityContext: - seccompProfile: - # -- Restrict a Container's Syscalls with seccomp - type: RuntimeDefault - # -- Runs all processes within a pod with a special uid - runAsUser: 10001 - # -- Processes within a pod will belong to this guid - runAsGroup: 10001 - # -- The owner for volumes and any files created within volumes will belong to this guid - fsGroup: 10001 - # The [container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) defines privilege and access control settings for a Container within a pod - securityContext: - capabilities: - # -- Specifies which capabilities to drop to reduce syscall attack surface - drop: - - ALL - # -- Specifies which capabilities to add to issue specialized syscalls - add: [] - # -- Whether the root filesystem is mounted in read-only mode - readOnlyRootFilesystem: true - # -- Controls [Privilege Escalation](https://kubernetes.io/docs/concepts/security/pod-security-policy/#privilege-escalation) enabling setuid binaries changing the effective user ID - allowPrivilegeEscalation: false - # -- Requires the container to run without root privileges - runAsNonRoot: true - # -- The container's process will run with the specified uid - runAsUser: 10001 - # Extra environment variables that will be pass onto deployment pods - env: {} - # ENV_NAME: value - - # "valueFrom" environment variable references that will be added to deployment pods. Name is templated. - # ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvarsource-v1-core - envValueFrom: {} - # ENV_NAME: - # configMapKeyRef: - # name: configmap-name - # key: value_key - # secretKeyRef: - # name: secret-name - # key: value_key - - # [Kubernetes Secret Resource](https://kubernetes.io/docs/concepts/configuration/secret/) names to load environment variables from - envSecretNames: [] - # - first-secret - # - second-secret - - # [Kubernetes ConfigMap Resource](https://kubernetes.io/docs/concepts/configuration/configmap/) names to load environment variables from - envConfigMapNames: [] - # - first-config-map - # - second-config-map - - ## Ingress declaration to expose the network service. - ingresses: - ## Public / Internet facing Ingress - - enabled: true - # -- The hostname to be used to precisely map incoming traffic onto the underlying network service - hostname: "materialpass-irs.dev.demo.catena-x.net" - # -- Additional ingress annotations to add - annotations: {} - # -- EDC endpoints exposed by this ingress resource - endpoints: - - public - # -- Defines the [ingress class](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class) to use - className: "nginx" - # -- TLS [tls class](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) applied to the ingress resource - tls: - # -- Enables TLS on the ingress resource - enabled: true - # -- If present overwrites the default secret name - secretName: "tls-secret" - ## Adds [cert-manager](https://cert-manager.io/docs/) annotations to the ingress resource - certManager: - # -- If preset enables certificate generation via cert-manager namespace scoped issuer - issuer: "" - # -- If preset enables certificate generation via cert-manager cluster-wide issuer - clusterIssuer: "" - # -- declare where to mount [volumes](https://kubernetes.io/docs/concepts/storage/volumes/) into the container - volumeMounts: [] - # -- [volume](https://kubernetes.io/docs/concepts/storage/volumes/) directories - volumes: [] - # -- [resource management](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for the container - resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - replicaCount: 1 - autoscaling: - # -- Enables [horizontal pod autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) - enabled: false - # -- Minimal replicas if resource consumption falls below resource threshholds - minReplicas: 1 - # -- Maximum replicas if resource consumption exceeds resource threshholds - maxReplicas: 100 - # -- targetAverageUtilization of cpu provided to a pod - targetCPUUtilizationPercentage: 80 - # -- targetAverageUtilization of memory provided to a pod - targetMemoryUtilizationPercentage: 80 - # -- configuration of the [Open Telemetry Agent](https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/) to collect and expose metrics - opentelemetry: |- - otel.javaagent.enabled=false - otel.javaagent.debug=false - # -- configuration of the [Java Util Logging Facade](https://docs.oracle.com/javase/7/docs/technotes/guides/logging/overview.html) - logging: |- - .level=INFO - org.eclipse.edc.level=ALL - handlers=java.util.logging.ConsoleHandler - java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter - java.util.logging.ConsoleHandler.level=ALL - java.util.logging.SimpleFormatter.format=[%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS] [%4$-7s] %5$s%6$s%n - # [node selector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) to constrain pods to nodes - nodeSelector: {} - # [tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) to configure preferred nodes - tolerations: [] - # [affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) to configure which nodes the pods can be scheduled on - affinity: {} - url: - # -- Explicitly declared url for reaching the public api (e.g. if ingresses not used) - public: "" - - postgresql: - jdbcUrl: "jdbc:postgresql://postgresql:5432/edc" - fullnameOverride: "postgresql" - username: - password: - auth: - database: "edc" - username: - password: - - vault: - fullnameOverride: "vault" - injector: - enabled: false - server: - dev: - enabled: true - devRootToken: "root" - # Must be the same certificate that is configured in section 'daps' - postStart: # must be set externally! - hashicorp: - url: - token: - timeout: 30 - healthCheck: - enabled: true - standbyOk: true - paths: - secret: - health: /v1/sys/health - secretNames: - transferProxyTokenSignerPrivateKey: daps-key-dev - transferProxyTokenSignerPublicKey: daps-crt-dev - transferProxyTokenEncryptionAesKey: edc-encryption-key - - backendService: - httpProxyTokenReceiverUrl: "https://materialpass.dev.demo.catena-x.net/endpoint" - - networkPolicy: - # -- If `true` network policy will be created to restrict access to control- and dataplane - enabled: false - # -- Configuration of the controlplane component - controlplane: - # -- Specify from rule network policy for cp (defaults to all namespaces) - from: - - namespaceSelector: {} - # -- Configuration of the dataplane component - dataplane: - # -- Specify from rule network policy for dp (defaults to all namespaces) - from: - - namespaceSelector: {} - - serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - # -- Existing image pull secret bound to the service account to use to [obtain the container image from private registries](https://kubernetes.io/docs/concepts/containers/images/#using-a-private-registry) - imagePullSecrets: [] - - # -- Configurations for Helm tests - tests: - # -- Configure the hook-delete-policy for Helm tests - hookDeletePolicy: before-hook-creation,hook-succeeded - -postgresql: - jdbcUrl: "jdbc:postgresql://postgresql:5432/edc" - fullnameOverride: "postgresql" - primary: - persistence: - enabled: true - readReplicas: - persistence: - enabled: true - auth: - database: "edc" - username: - password: diff --git a/deployment/helm/local/scripts/set_dev_values.sh b/deployment/helm/local/scripts/set_dev_values.sh deleted file mode 100644 index 16380b42c..000000000 --- a/deployment/helm/local/scripts/set_dev_values.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash -################################################################################# -# Catena-X - Product Passport Consumer Frontend -# -# Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the -# License for the specific language govern in permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -################################################################################## - - -set -o errexit -set -o errtrace -set -o pipefail -set -o nounset - -export GH_TOKEN="" -export VAULT_ADDR="" - -echo "Login into Hashicorp vault..." -vault login -method=github token=$GH_TOKEN -echo -echo "Retrieve secrets from Hashicorp vault..." -echo - -REGISTRY_CLIENT_ID=$(vault kv get -field=client.id material-pass/dev/aasregistry) -REGISTRY_CLIENT_SECRET=$(vault kv get -field=client.secret material-pass/dev/aasregistry) -EDC_API_AUTH_KEY=$(vault kv get -field=api.key material-pass/dev/edc/oauth) -POSTGRES_DB_USER=$(vault kv get -field=user material-pass/dev/edc/database) -POSTGRES_DB_PASSWORD=$(vault kv get -field=password material-pass/dev/edc/database) -PARTICIPANT_ID=$(vault kv get -field=api.key material-pass/dev/edc/participant) - -VAULT_HASHICORP_URL=$(vault kv get -field=vault.hashicorp.url material-pass/dev/edc/vault) -VAULT_HASHICORP_SECRET_PATH=$(vault kv get -field=vault.hashicorp.api.secret.path material-pass/dev/edc/vault) -VAULT_HASHICORP_TOKEN=$(vault kv get -field=vault.hashicorp.token material-pass/dev/edc/vault) - -EDC_OAUTH_CLIENT_ID=$(vault kv get -field=client.id material-pass/dev/edc/oauth) - -### DIGITAL PRODUCT PASS APP - -echo "Replace client credentials with actual values in consumer-ui values-dev file..." -echo -sed -i "s||${REGISTRY_CLIENT_ID}|g" ./../../../../charts/digital-product-pass/values-dev.yaml; -sed -i "s||${REGISTRY_CLIENT_SECRET}|g" ./../../../../charts/digital-product-pass/values-dev.yaml; -sed -i "s||${EDC_API_AUTH_KEY}|g" ./../../../../charts/digital-product-pass/values-dev.yaml; -sed -i "s||${PARTICIPANT_ID}|g" ./../../../../charts/digital-product-pass/values-dev.yaml; -# sed -i "s|tag: placeholder|tag: |g" ./../../../../charts/digital-product-pass/values-dev.yaml; - - -### CONSUMER CONNECTOR - -echo "Replace secrets with actual values in edc-consumer values-dev file..." -echo -# Postgres DB -sed -i "s||${POSTGRES_DB_USER}|g" ./../../edc-consumer/values-dev.yaml; -sed -i "s||${POSTGRES_DB_PASSWORD}|g" ./../../edc-consumer/values-dev.yaml; - -# Hashicorp vault -sed -i "s||${VAULT_HASHICORP_URL}|g" ./../../edc-consumer/values-dev.yaml; -sed -i "s||${VAULT_HASHICORP_SECRET_PATH}|g" ./../../edc-consumer/values-dev.yaml; -sed -i "s||${VAULT_HASHICORP_TOKEN}|g" ./../../edc-consumer/values-dev.yaml; - -# EDC Oauth -sed -i "s|EDC_API_AUTH_KEY: |EDC_API_AUTH_KEY: ${EDC_API_AUTH_KEY}|g" ./../../edc-consumer/values-dev.yaml; -sed -i "s||${EDC_OAUTH_CLIENT_ID}|g" ./../../edc-consumer/values-dev.yaml; - -# EDC IDS Endpoints -sed -i "s|https://materialpass.dev.demo.catena-x.net/consumer/api/v1/ids|http://materialpass-edc-controlplane:8282/consumer/api/v1/ids|g" ./../../edc-consumer/values-dev.yaml; -sed -i "s|ids.webhook.address=https://materialpass.dev.demo.catena-x.net|ids.webhook.address=http://materialpass-edc-controlplane:8282|g" ./../../edc-consumer/values-dev.yaml; - - -### PROVIDER CONNECTOR - -echo "Replace secrets with actual values in edc-provider values-dev file..." -echo -# Postgres DB -sed -i "s||${POSTGRES_DB_USER}|g" ./../../edc-provider/values-dev.yaml; -sed -i "s||${POSTGRES_DB_PASSWORD}|g" ./../../edc-provider/values-dev.yaml; - -# Hashicorp vault -sed -i "s||${VAULT_HASHICORP_URL}|g" ./../../edc-provider/values-dev.yaml; -sed -i "s||${VAULT_HASHICORP_SECRET_PATH}|g" ./../../edc-provider/values-dev.yaml; -sed -i "s||${VAULT_HASHICORP_TOKEN}|g" ./../../edc-provider/values-dev.yaml; - -# EDC Oauth -sed -i "s|EDC_API_AUTH_KEY: |EDC_API_AUTH_KEY: ${EDC_API_AUTH_KEY}|g" ./../../edc-provider/values-dev.yaml; -sed -i "s||${EDC_OAUTH_CLIENT_ID}|g" ./../../edc-provider/values-dev.yaml; - -# EDC IDS Endpoints -sed -i "s|https://materialpass.dev.demo.catena-x.net/provider/api/v1/ids|http://materialpass-edc-provider-controlplane:8282/provider/api/v1/ids|g" ./../../edc-provider/values-dev.yaml; -sed -i "s|ids.webhook.address=https://materialpass.dev.demo.catena-x.net|ids.webhook.address=http://materialpass-edc-provider-controlplane:8282|g" ./../../edc-provider/values-dev.yaml; - -echo "Done..." diff --git a/deployment/helm/local/scripts/unset_dev_values.sh b/deployment/helm/local/scripts/unset_dev_values.sh deleted file mode 100644 index 830b87cff..000000000 --- a/deployment/helm/local/scripts/unset_dev_values.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash -################################################################################# -# Catena-X - Product Passport Consumer Frontend -# -# Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the -# License for the specific language govern in permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -################################################################################## - - -set -o errexit -set -o errtrace -set -o pipefail -set -o nounset - -export GH_TOKEN="" -export VAULT_ADDR="" - -echo "Login into Hashicorp vault..." -vault login -method=github token=$GH_TOKEN -echo -echo "Retrieve secrets from Hashicorp vault..." -echo - -REGISTRY_CLIENT_ID=$(vault kv get -field=client.id material-pass/dev/aasregistry) -REGISTRY_CLIENT_SECRET=$(vault kv get -field=client.secret material-pass/dev/aasregistry) -EDC_API_AUTH_KEY=$(vault kv get -field=api.key material-pass/dev/edc/oauth) -POSTGRES_DB_USER=$(vault kv get -field=user material-pass/dev/edc/database) -POSTGRES_DB_PASSWORD=$(vault kv get -field=password material-pass/dev/edc/database) -PARTICIPANT_ID=$(vault kv get -field=api.key material-pass/dev/edc/participant) - -VAULT_HASHICORP_URL=$(vault kv get -field=vault.hashicorp.url material-pass/dev/edc/vault) -VAULT_HASHICORP_SECRET_PATH=$(vault kv get -field=vault.hashicorp.api.secret.path material-pass/dev/edc/vault) -VAULT_HASHICORP_TOKEN=$(vault kv get -field=vault.hashicorp.token material-pass/dev/edc/vault) - -EDC_OAUTH_CLIENT_ID=$(vault kv get -field=client.id material-pass/dev/edc/oauth) - -### CONSUMER FRONTEND APP - -echo "Replace actual values with placholders in consumer-ui values-dev file..." -echo -sed -i "s|${REGISTRY_CLIENT_ID}||g" ./../../../../charts/digital-product-pass/values-dev.yaml; -sed -i "s|${REGISTRY_CLIENT_SECRET}||g" ./../../../../charts/digital-product-pass/values-dev.yaml; -sed -i "s|${EDC_API_AUTH_KEY}||g" ./../../../../charts/digital-product-pass/values-dev.yaml; -sed -i "s|${PARTICIPANT_ID}||g" ./../../../../charts/digital-product-pass/values-dev.yaml; -# sed -i "s|tag: |tag: placeholder|g" ./../../../../charts/digital-product-pass/values-dev.yaml; - -### CONSUMER CONNECTOR - -echo "Replace actual values with placholders in edc-consumer values-dev file..." -echo -# Postgres DB -sed -i "s|${POSTGRES_DB_USER}||g" ./../../edc-consumer/values-dev.yaml; -sed -i "s|password: ${POSTGRES_DB_PASSWORD}|password: |g" ./../../edc-consumer/values-dev.yaml; - -# Hashicorp vault -sed -i "s|${VAULT_HASHICORP_URL}||g" ./../../edc-consumer/values-dev.yaml; -sed -i "s|${VAULT_HASHICORP_SECRET_PATH}||g" ./../../edc-consumer/values-dev.yaml; -sed -i "s|${VAULT_HASHICORP_TOKEN}||g" ./../../edc-consumer/values-dev.yaml; - -# EDC Oauth -sed -i "s|EDC_API_AUTH_KEY: ${EDC_API_AUTH_KEY}|EDC_API_AUTH_KEY: |g" ./../../edc-consumer/values-dev.yaml; -sed -i "s|${EDC_OAUTH_CLIENT_ID}||g" ./../../edc-consumer/values-dev.yaml; - -# EDC IDS Endpoints -sed -i "s|http://materialpass-edc-controlplane:8282/consumer/api/v1/ids|https://materialpass.dev.demo.catena-x.net/consumer/api/v1/ids|g" ./../../edc-consumer/values-dev.yaml; -sed -i "s|ids.webhook.address=http://materialpass-edc-controlplane:8282|ids.webhook.address=https://materialpass.dev.demo.catena-x.net|g" ./../../edc-consumer/values-dev.yaml; - - -### PROVIDER CONNECTOR - -echo "Replace actual values with placholders in edc-provider values-dev file..." -echo -# Postgres DB -sed -i "s|${POSTGRES_DB_USER}||g" ./../../edc-provider/values-dev.yaml; -sed -i "s|password: ${POSTGRES_DB_PASSWORD}|password: |g" ./../../edc-provider/values-dev.yaml; - -# Hashicorp vault -sed -i "s|${VAULT_HASHICORP_URL}||g" ./../../edc-provider/values-dev.yaml; -sed -i "s|${VAULT_HASHICORP_SECRET_PATH}||g" ./../../edc-provider/values-dev.yaml; -sed -i "s|${VAULT_HASHICORP_TOKEN}||g" ./../../edc-provider/values-dev.yaml; - -# EDC Oauth -sed -i "s|EDC_API_AUTH_KEY: ${EDC_API_AUTH_KEY}|EDC_API_AUTH_KEY: |g" ./../../edc-provider/values-dev.yaml; -sed -i "s|${EDC_OAUTH_CLIENT_ID}||g" ./../../edc-provider/values-dev.yaml; - -# EDC IDS Endpoints -sed -i "s|http://materialpass-edc-provider-controlplane:8282/provider/api/v1/ids|https://materialpass.dev.demo.catena-x.net/provider/api/v1/ids|g" ./../../edc-provider/values-dev.yaml; -sed -i "s|ids.webhook.address=http://materialpass-edc-provider-controlplane:8282|ids.webhook.address=https://materialpass.dev.demo.catena-x.net|g" ./../../edc-provider/values-dev.yaml; - - -echo "Done..." - - - - diff --git a/deployment/helm/local/storage/pv-data.yaml b/deployment/helm/local/storage/pv-data.yaml deleted file mode 100644 index d7a4e2a6c..000000000 --- a/deployment/helm/local/storage/pv-data.yaml +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################# -# Catena-X - Product Passport Consumer Application -# -# Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the -# License for the specific language govern in permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -################################################################################# - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: pv-data - namespace: {{ .Values.namespace }} -spec: - capacity: - storage: 5Gi - accessModes: - - ReadWriteOnce - storageClassName: standard - claimRef: - name: pvc-data - namespace: {{ .Values.namespace }} - hostPath: - path: "/mnt" - diff --git a/deployment/helm/local/storage/pvc-data.yaml b/deployment/helm/local/storage/pvc-data.yaml deleted file mode 100644 index 32cd20643..000000000 --- a/deployment/helm/local/storage/pvc-data.yaml +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################# -# Catena-X - Product Passport Consumer Application -# -# Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the -# License for the specific language govern in permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -################################################################################# - -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: pvc-data - labels: - {{- include "chart.labels" . | nindent 4 }} - namespace: {{ .Values.namespace }} -spec: - storageClassName: standard - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi diff --git a/deployment/helm/edc-consumer/Chart.yaml b/deployment/infrastructure/edc-consumer/Chart.yaml similarity index 100% rename from deployment/helm/edc-consumer/Chart.yaml rename to deployment/infrastructure/edc-consumer/Chart.yaml diff --git a/deployment/helm/edc-consumer/README.md b/deployment/infrastructure/edc-consumer/README.md similarity index 100% rename from deployment/helm/edc-consumer/README.md rename to deployment/infrastructure/edc-consumer/README.md diff --git a/deployment/helm/edc-consumer/values-beta.yaml b/deployment/infrastructure/edc-consumer/values-beta.yaml similarity index 100% rename from deployment/helm/edc-consumer/values-beta.yaml rename to deployment/infrastructure/edc-consumer/values-beta.yaml diff --git a/deployment/helm/edc-consumer/values-int.yaml b/deployment/infrastructure/edc-consumer/values-int.yaml similarity index 100% rename from deployment/helm/edc-consumer/values-int.yaml rename to deployment/infrastructure/edc-consumer/values-int.yaml diff --git a/deployment/helm/edc-consumer/values.yaml b/deployment/infrastructure/edc-consumer/values.yaml similarity index 100% rename from deployment/helm/edc-consumer/values.yaml rename to deployment/infrastructure/edc-consumer/values.yaml diff --git a/deployment/helm/edc-provider/Chart.yaml b/deployment/infrastructure/edc-provider/Chart.yaml similarity index 100% rename from deployment/helm/edc-provider/Chart.yaml rename to deployment/infrastructure/edc-provider/Chart.yaml diff --git a/deployment/helm/edc-provider/README.md b/deployment/infrastructure/edc-provider/README.md similarity index 100% rename from deployment/helm/edc-provider/README.md rename to deployment/infrastructure/edc-provider/README.md diff --git a/deployment/helm/edc-provider/data-service/.helmignore b/deployment/infrastructure/edc-provider/data-service/.helmignore similarity index 100% rename from deployment/helm/edc-provider/data-service/.helmignore rename to deployment/infrastructure/edc-provider/data-service/.helmignore diff --git a/deployment/helm/edc-provider/data-service/Chart.yaml b/deployment/infrastructure/edc-provider/data-service/Chart.yaml similarity index 100% rename from deployment/helm/edc-provider/data-service/Chart.yaml rename to deployment/infrastructure/edc-provider/data-service/Chart.yaml diff --git a/deployment/helm/edc-provider/data-service/README.md b/deployment/infrastructure/edc-provider/data-service/README.md similarity index 100% rename from deployment/helm/edc-provider/data-service/README.md rename to deployment/infrastructure/edc-provider/data-service/README.md diff --git a/deployment/helm/edc-provider/data-service/templates/_helpers.tpl b/deployment/infrastructure/edc-provider/data-service/templates/_helpers.tpl similarity index 100% rename from deployment/helm/edc-provider/data-service/templates/_helpers.tpl rename to deployment/infrastructure/edc-provider/data-service/templates/_helpers.tpl diff --git a/deployment/helm/edc-provider/data-service/templates/deployment.yaml b/deployment/infrastructure/edc-provider/data-service/templates/deployment.yaml similarity index 100% rename from deployment/helm/edc-provider/data-service/templates/deployment.yaml rename to deployment/infrastructure/edc-provider/data-service/templates/deployment.yaml diff --git a/deployment/helm/edc-provider/data-service/templates/ingress.yaml b/deployment/infrastructure/edc-provider/data-service/templates/ingress.yaml similarity index 100% rename from deployment/helm/edc-provider/data-service/templates/ingress.yaml rename to deployment/infrastructure/edc-provider/data-service/templates/ingress.yaml diff --git a/deployment/helm/edc-provider/data-service/templates/service.yaml b/deployment/infrastructure/edc-provider/data-service/templates/service.yaml similarity index 100% rename from deployment/helm/edc-provider/data-service/templates/service.yaml rename to deployment/infrastructure/edc-provider/data-service/templates/service.yaml diff --git a/deployment/helm/edc-provider/data-service/values-beta.yaml b/deployment/infrastructure/edc-provider/data-service/values-beta.yaml similarity index 100% rename from deployment/helm/edc-provider/data-service/values-beta.yaml rename to deployment/infrastructure/edc-provider/data-service/values-beta.yaml diff --git a/deployment/helm/edc-provider/data-service/values-dev.yaml b/deployment/infrastructure/edc-provider/data-service/values-dev.yaml similarity index 100% rename from deployment/helm/edc-provider/data-service/values-dev.yaml rename to deployment/infrastructure/edc-provider/data-service/values-dev.yaml diff --git a/deployment/helm/edc-provider/data-service/values-int.yaml b/deployment/infrastructure/edc-provider/data-service/values-int.yaml similarity index 100% rename from deployment/helm/edc-provider/data-service/values-int.yaml rename to deployment/infrastructure/edc-provider/data-service/values-int.yaml diff --git a/deployment/helm/edc-provider/data-service/values.yaml b/deployment/infrastructure/edc-provider/data-service/values.yaml similarity index 100% rename from deployment/helm/edc-provider/data-service/values.yaml rename to deployment/infrastructure/edc-provider/data-service/values.yaml diff --git a/deployment/helm/edc-provider/values-beta.yaml b/deployment/infrastructure/edc-provider/values-beta.yaml similarity index 100% rename from deployment/helm/edc-provider/values-beta.yaml rename to deployment/infrastructure/edc-provider/values-beta.yaml diff --git a/deployment/helm/edc-provider/values-int.yaml b/deployment/infrastructure/edc-provider/values-int.yaml similarity index 100% rename from deployment/helm/edc-provider/values-int.yaml rename to deployment/infrastructure/edc-provider/values-int.yaml diff --git a/deployment/helm/edc-provider/values.yaml b/deployment/infrastructure/edc-provider/values.yaml similarity index 100% rename from deployment/helm/edc-provider/values.yaml rename to deployment/infrastructure/edc-provider/values.yaml diff --git a/deployment/helm/registry/Chart.yaml b/deployment/infrastructure/registry/Chart.yaml similarity index 100% rename from deployment/helm/registry/Chart.yaml rename to deployment/infrastructure/registry/Chart.yaml diff --git a/deployment/helm/registry/values.yaml b/deployment/infrastructure/registry/values.yaml similarity index 100% rename from deployment/helm/registry/values.yaml rename to deployment/infrastructure/registry/values.yaml diff --git a/deployment/infrastructure/testing/testdata/dpp/BAT-XYZ789.json b/deployment/infrastructure/testing/testdata/dpp/BAT-XYZ789.json deleted file mode 100644 index bbf0e729a..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/BAT-XYZ789.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "serialization": { - "manufacturingInformation": { - "date": "2023-08-30T10:30:00", - "country": "USA" - }, - "registration": { - "customerPartId": "PRT-67890", - "manufacturerPartId": "HV-SPORT-123" - }, - "quantity": { - "value": 1.0, - "unit": "unit:piece" - } - }, - "typology": { - "name": "High Voltage Battery for Sports Car", - "description": "High performance battery for electric sports cars", - "class": { - "definition": "High Voltage Battery", - "code": "33-06-01-01" - }, - "nameAtManufacturer": "Performance Battery Pack", - "nameAtCustomer": "High-Performance Energy Source" - }, - "metadata": { - "issueDate": "2023-08-30", - "version": "2.0.0", - "validityDate": "2023-08-30", - "economicOperator": { - "eori": "US987654321000", - "id": "BPNL000000000000" - }, - "status": "Approved" - }, - "characteristics": { - "physicalDimensionsProperty": { - "width": 800.0, - "length": 1200.0, - "weight": 300.5, - "height": 150.0 - }, - "energyCapacity": { - "value": 85.0, - "unit": "unit:kWh" - }, - "voltage": { - "value": 400.0, - "unit": "unit:V" - } - }, - "commercial": { - "placedOnMarket": "2023-09-01", - "warranty": 72 - }, - "identification": { - "localIdentifiers": [ - { - "value": "BAT-XYZ789", - "key": "PartInstanceID" - } - ], - "gtin": "12345678901234", - "additionalCode": [ - { - "name": "TARIC", - "value": "8507 80 00 00" - } - ] - }, - "sources": { - "mandatory": { - "safetyInformation": { - "header": "Safety Datasheet for High Voltage Battery", - "category": "Safety", - "type": "link", - "content": "www.example.com/safety_datasheet.pdf" - }, - "environmentalImpact": { - "header": "Environmental Impact Assessment", - "category": "Environment", - "type": "link", - "content": "www.example.com/environmental_impact.pdf" - } - }, - "optional": [ - { - "name": "userManual", - "document": { - "header": "User Manual for High Voltage Battery", - "category": "User Manual", - "type": "link", - "content": "www.example.com/user_manual.pdf" - } - } - ] - }, - "sustainability": { - "state": "first life", - "material": [ - { - "name": "Lithium-Ion", - "recycled": false, - "renewable": false, - "percentage": 80.0 - } - ], - "critical": [ - "Lithium", - "Cobalt" - ], - "carbonFootprint": { - "carbonContentTotal": 10.2, - "crossSectoralStandard": "ISO 14040", - "productOrSectorSpecificRules": [ - { - "ruleName": "ISO 14067" - } - ] - } - }, - "operation": { - "importer": "BPNL000000000000", - "manufacturer": { - "manufacturerId": "BPNL000000000000", - "facilityId": "BPNL000000000123" - } - } -} diff --git a/deployment/infrastructure/testing/testdata/dpp/CTA-13123.json b/deployment/infrastructure/testing/testdata/dpp/CTA-13123.json deleted file mode 100644 index 5e0a8a1fb..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/CTA-13123.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "serialization": { - "manufacturingInformation": { - "date": "2023-08-30T11:45:00", - "country": "JPN" - }, - "registration": { - "customerPartId": "CELL-45678", - "manufacturerPartId": "BC-JPN-12345" - }, - "quantity": { - "value": 1000.0, - "unit": "unit:piece" - } - }, - "typology": { - "name": "Lithium-Ion Battery Cell", - "description": "High-capacity lithium-ion battery cell", - "class": { - "definition": "Battery Cell", - "code": "33-06-01-02" - }, - "nameAtManufacturer": "Li-Ion Cell 12345", - "nameAtCustomer": "High-Capacity Battery Cell" - }, - "metadata": { - "issueDate": "2023-08-30", - "version": "1.1.0", - "validityDate": "2023-08-30", - "economicOperator": { - "eori": "JP123456789000", - "id": "BPN1234567890ZZ" - }, - "status": "Approved" - }, - "characteristics": { - "physicalDimensionsProperty": { - "width": 30.0, - "length": 60.0, - "weight": 50.2, - "height": 10.0 - }, - "energyCapacity": { - "value": 2.5, - "unit": "unit:Ah" - }, - "voltage": { - "value": 3.7, - "unit": "unit:V" - } - }, - "identification": { - "localIdentifiers": [ - { - "value": "CTA-13123", - "key": "PartInstanceID" - } - ], - "gtin": "12345678901234", - "additionalCode": [ - { - "name": "TARIC", - "value": "8507 60 00 00" - } - ] - }, - "sources": { - "mandatory": { - "safetyInformation": { - "header": "Safety Datasheet for Lithium-Ion Battery Cell", - "category": "Safety", - "type": "link", - "content": "www.example.com/cell_safety_datasheet.pdf" - } - }, - "optional": [ - { - "name": "userManual", - "document": { - "header": "User Manual for Battery Cell", - "category": "User Manual", - "type": "link", - "content": "www.example.com/cell_user_manual.pdf" - } - } - ] - }, - "sustainability": { - "state": "first life", - "material": [ - { - "name": "Lithium-Cobalt Oxide", - "recycled": false, - "renewable": false, - "percentage": 40.0 - } - ], - "critical": ["Lithium", "Cobalt"], - "carbonFootprint": { - "carbonContentTotal": 0.8, - "crossSectoralStandard": "ISO 14044", - "productOrSectorSpecificRules": [ - { - "ruleName": "ISO 14067" - } - ] - } - }, - "operation": { - "importer": "BPN1234567890ZZ", - "manufacturer": { - "manufacturerId": "BPN1234567890ZZ", - "facilityId": "BPN1234567890ZZ" - } - } -} diff --git a/deployment/infrastructure/testing/testdata/dpp/EVMODULE-TRJ712.json b/deployment/infrastructure/testing/testdata/dpp/EVMODULE-TRJ712.json deleted file mode 100644 index adb801737..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/EVMODULE-TRJ712.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "serialization": { - "manufacturingInformation": { - "date": "2023-08-30T14:30:00", - "country": "GER" - }, - "registration": { - "customerPartId": "MODULE-78901", - "manufacturerPartId": "BP-GER-45678" - }, - "quantity": { - "value": 100.0, - "unit": "unit:piece" - } - }, - "typology": { - "name": "High-Capacity Battery Module", - "description": "Large Battery Module for electric vehicles", - "class": { - "definition": "Battery Module", - "code": "33-06-01-03" - }, - "nameAtManufacturer": "EVModule 45678", - "nameAtCustomer": "High-Capacity Power Source" - }, - "metadata": { - "issueDate": "2023-08-30", - "version": "1.0.0", - "validityDate": "2023-08-30", - "economicOperator": { - "eori": "DE987654321000", - "id": "BPNL000000000000" - }, - "status": "Approved" - }, - "characteristics": { - "physicalDimensionsProperty": { - "width": 800.0, - "length": 1000.0, - "weight": 700.5, - "height": 200.0 - }, - "energyCapacity": { - "value": 300.0, - "unit": "unit:kWh" - }, - "voltage": { - "value": 800.0, - "unit": "unit:V" - } - }, - "identification": { - "localIdentifiers": [ - { - "value": "EVMODULE-TRJ712", - "key": "PartInstanceID" - } - ], - "gtin": "12345678901234", - "additionalCode": [ - { - "name": "TARIC", - "value": "8507 80 00 00" - } - ] - }, - "sources": { - "mandatory": { - "safetyInformation": { - "header": "Safety Datasheet for Battery Module", - "category": "Safety", - "type": "link", - "content": "www.example.com/module_safety_datasheet.pdf" - } - }, - "optional": [ - { - "name": "userManual", - "document": { - "header": "User Manual for Battery Module", - "category": "User Manual", - "type": "link", - "content": "www.example.com/module_user_manual.pdf" - } - } - ] - }, - "sustainability": { - "state": "first life", - "material": [ - { - "name": "Lithium-Nickel-Cobalt-Manganese-Oxide", - "recycled": false, - "renewable": false, - "percentage": 35.0 - } - ], - "critical": [ - "Lithium", - "Cobalt" - ], - "carbonFootprint": { - "carbonContentTotal": 1.2, - "crossSectoralStandard": "ISO 14040", - "productOrSectorSpecificRules": [ - { - "ruleName": "ISO 14067" - } - ] - } - }, - "operation": { - "importer": "BPN1234567890ZZ", - "manufacturer": { - "manufacturerId": "BPN1234567890ZZ", - "facilityId": "BPN1234567890ZZ" - } - } -} diff --git a/deployment/infrastructure/testing/testdata/dpp/IMR18650V1.json b/deployment/infrastructure/testing/testdata/dpp/IMR18650V1.json deleted file mode 100644 index 3310386e8..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/IMR18650V1.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "electrochemicalProperties" : { - "ratedCapacity" : 94, - "batteryEnergy" : { - "energyRoundtripEfficiencyChange" : 48.2, - "maximumAllowedBatteryEnergy" : 85000, - "energyRoundtripEfficiency" : 25 - }, - "ratioMaximumAllowedBatteryPowerAndMaximumAllowedBatteryEnergy" : 0.588, - "batteryVoltage" : { - "nominalVoltage" : 3.7, - "maxVoltage" : 4.2, - "minVoltage" : 2.5 - }, - "internalResistance" : { - "cellinternalResistance" : 0.36, - "packinternalResistanceIncrease" : 1, - "packinternalResistance" : 100 - }, - "capacityThresholdExhaustion" : 23, - "batteryPower" : { - "powerFade" : 23, - "originalPowerCapability" : -1.7976931348623157E308, - "originalPowerCapabilityLimits" : -1.7976931348623157E308, - "maximumAllowedBatteryPower" : -1.7976931348623157E308, - "powerCapabilityAt20Charge" : -1.7976931348623157E308, - "powerCapabilityAt80Charge" : -1.7976931348623157E308 - }, - "capacityFade" : 1.55 - }, - "document" : { - "responsibleSourcing" : [ { - "title" : "2021 Responsible Sourcing document", - "fileLocation" : null - } ], - "packagingInstructions" : [ { - "title" : "Packing Instruction v.2.0", - "fileLocation" : null - } ], - "transportationInstructions" : [ { - "title" : "Transport manual", - "fileLocation" : null - } ], - "vehicleDismantlingProcedure" : [ { - "title" : "Car dismantling manual", - "fileLocation" : "http://www.ietf.org/rfc/rfc2396.txt" - } ], - "testReportsResults" : [ { - "title" : "Battery Test Reports", - "fileLocation" : "http://www.Batterytestreports.de" - } ], - "batteryDismantlingProcedure" : [ { - "title" : "Dismantling Manual", - "fileLocation" : "http://www.dissmantlingmanual.org" - } ], - "safetyMeasures" : [ { - "title" : "Safety Instruction", - "fileLocation" : "http://www.safetyinstructions.txt" - } ], - "declarationOfConformity" : [ { - "title" : "Declaration of Conformity No. 3", - "fileLocation" : null - } ] - }, - "datePlacedOnMarket" : "27.04.2022", - "cellChemistry" : { - "electrolyteComposition" : [ { - "materialPercentageMassFraction" : null, - "materialWeight" : null, - "materialName" : "dimethyl carbonate (DCM)" - } ], - "anodeCompositionOther" : [ { - "materialPercentageMassFraction" : null, - "materialWeight" : null, - "materialName" : "Carboxymethyl cellulose" - } ], - "recyclateContentActiveMaterials" : [ { - "materialPercentageMassFraction" : 6, - "materialWeight" : null, - "materialName" : "Ni/2021/PlantE" - }, { - "materialPercentageMassFraction" : 4, - "materialWeight" : null, - "materialName" : "Li/2021/PlantE" - }, { - "materialPercentageMassFraction" : 0, - "materialWeight" : null, - "materialName" : "Pb(battery model does not contain Pb)" - }, { - "materialPercentageMassFraction" : 0, - "materialWeight" : null, - "materialName" : "Co(battery model does not contain Pb)" - } ], - "anodeActiveMaterials" : [ { - "materialPercentageMassFraction" : null, - "materialWeight" : null, - "materialName" : "Graphite" - } ], - "cathodeActiveMaterials" : [ { - "materialPercentageMassFraction" : null, - "materialWeight" : null, - "materialName" : "LiMn2O4 Lithium Manganese Oxide" - } ], - "cathodeCompositionOther" : [ { - "materialPercentageMassFraction" : null, - "materialWeight" : null, - "materialName" : "binder:PVDF" - } ] - }, - "physicalDimensions" : { - "length" : 2000, - "width" : 1000, - "weight" : 3500, - "diameter" : null, - "height" : 200 - }, - "temperatureRangeIdleState" : { - "temperatureRangeIdleStateUpperLimit" : 50, - "temperatureRangeIdleStateLowerLimit" : -20 - }, - "batteryCycleLife" : { - "cycleLifeTestCRate" : 2, - "cycleLifeTestDepthOfDischarge" : 1.8, - "expectedLifetime" : 2500 - }, - "manufacturer" : { - "name" : "CompanyE", - "contact" : { - "faxNumber" : "+49 89 0987654324", - "website" : "https://www.CompanyE.com", - "phoneNumber" : "+49 89 1234567893", - "email" : "companyE@company.com" - }, - "address" : { - "locality" : { - "value" : "CityE", - "technicalKey" : "BLOCK" - }, - "country" : { - "shortName" : "Germany" - }, - "postCode" : { - "value" : "65-250E", - "technicalKey" : "CEDEX" - }, - "thoroughfare" : { - "value" : "StreetE", - "number" : "1", - "technicalKey" : "STREET" - }, - "premise" : { - "value" : null, - "technicalKey" : "BUILDING" - }, - "postalDeliveryPoint" : { - "value" : null, - "technicalKey" : "intERURBAN_DELIVERY_POint" - } - } - }, - "warrantyPeriod" : "96", - "composition" : { - "compositionOfBattery" : [ { - "materialPercentageMassFraction" : null, - "materialWeight" : null, - "materialName" : "Separator: PE" - } ], - "criticalRawMaterials" : "Lithium, Natural graphite", - "components" : { - "componentsPartNumber" : "Voltage cables", - "componentsSupplier" : [ { - "componentsSupplierName" : "AB Corporation", - "address" : { - "locality" : { - "value" : "CityF", - "technicalKey" : "BLOCK" - }, - "country" : { - "shortName" : "Germany" - }, - "postCode" : { - "value" : "65-250F", - "technicalKey" : "CEDEX" - }, - "thoroughfare" : { - "value" : "StreetF", - "number" : "1", - "technicalKey" : "STREET" - }, - "premise" : { - "value" : "PlantF", - "technicalKey" : "BUILDING" - }, - "postalDeliveryPoint" : { - "value" : null, - "technicalKey" : "INTERURBAN_DELIVERY_POINT" - } - }, - "contact" : { - "faxNumber" : "+49 89 0987654324", - "website" : "https://www.companyF.com", - "phoneNumber" : "+49 89 1234567893", - "email" : "companyF@companyF.com" - } - } ] - } - }, - "manufacturing" : { - "dateOfManufacturing" : "2022-01-24", - "address" : { - "locality" : { - "value" : "CityE", - "technicalKey" : "BLOCK" - }, - "country" : { - "shortName" : "Germany" - }, - "postCode" : { - "value" : "65-250E", - "technicalKey" : "CEDEX" - }, - "thoroughfare" : { - "value" : "StreetE", - "number" : "1", - "technicalKey" : "STREET" - }, - "premise" : { - "value" : "PlantE", - "technicalKey" : "BUILDING" - }, - "postalDeliveryPoint" : { - "value" : "GateE", - "technicalKey" : "INTERURBAN_DELIVERY_POINT" - } - } - }, - "batteryIdentification" : { - "batteryType" : "Lithium-Manganese-Oxide (LMO)", - "batteryIDDMCCode" : "IMR18650V1", - "batteryModel" : "Pi4 Orionis" - }, - "stateOfBattery" : { - "stateOfHealth" : 20, - "statusBattery" : "first life", - "stateOfCharge" : 50 - }, - "cO2FootprintTotal" : 210 - } diff --git a/deployment/infrastructure/testing/testdata/dpp/NCR186850B.json b/deployment/infrastructure/testing/testdata/dpp/NCR186850B.json deleted file mode 100644 index f83fdd423..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/NCR186850B.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "electrochemicalProperties": { - "ratedCapacity": 56, - "batteryEnergy": { - "energyRoundtripEfficiencyChange": 45, - "maximumAllowedBatteryEnergy": 75000.0, - "energyRoundtripEfficiency": 80 - }, - "ratioMaximumAllowedBatteryPowerAndMaximumAllowedBatteryEnergy": 0.666, - "batteryVoltage": { - "nominalVoltage": 3.6, - "maxVoltage": 4.2, - "minVoltage": 2.5 - }, - "internalResistance": { - "cellinternalResistance": 3.0, - "packinternalResistanceIncrease": 2, - "packinternalResistance": 80 - }, - "capacityThresholdExhaustion": 23, - "batteryPower": { - "powerFade": 23, - "originalPowerCapability": -1.7976931348623157E308, - "originalPowerCapabilityLimits": -1.7976931348623157E308, - "maximumAllowedBatteryPower": -1.7976931348623157E308, - "powerCapabilityAt20Charge": -1.7976931348623157E308, - "powerCapabilityAt80Charge": -1.7976931348623157E308 - }, - "capacityFade": 2.0 - }, - "document": { - "responsibleSourcing": [ - { - "title": "Sustainability Report 2021", - "fileLocation": "telnet://192.0.2.16:80/" - } - ], - "packagingInstructions": [ - { - "title": "Packaging and transport Instruction", - "fileLocation": "telnet://192.0.2.16:80/" - } - ], - "transportationInstructions": [ - { - "title": "Packaging and transport Instruction", - "fileLocation": "ftp://ftp.is.co.za/rfc/rfc1808.txt" - } - ], - "vehicleDismantlingProcedure": [ - { - "title": "Packaging and transport Instruction", - "fileLocation": "http://www.ietf.org/rfc/rfc2396.txt" - } - ], - "testReportsResults": [ - { - "title": "Certificates of Testing battery", - "fileLocation": "" - } - ], - "batteryDismantlingProcedure": [ - { - "title": "Certificates of Testing battery", - "fileLocation": "http://www.wikipedia.org" - } - ], - "safetyMeasures": [ - { - "title": "Battery user safety precautions", - "fileLocation": "ftp://ftp.is.co.za/rfc/rfc1808.txt" - } - ], - "declarationOfConformity": [ - { - "title": "Declaration of Conformity No. 2", - "fileLocation": "" - } - ] - }, - "datePlacedOnMarket": "27.03.2022", - "cellChemistry": { - "electrolyteComposition": [ - { - "materialPercentageMassFraction": null, - "materialWeight": null, - "materialName": "LiPF6" - } - ], - "anodeCompositionOther": [ - { - "materialPercentageMassFraction": null, - "materialWeight": null, - "materialName": "Styren butadien" - } - ], - "recyclateContentActiveMaterials": [ - { - "materialPercentageMassFraction": 4, - "materialWeight": null, - "materialName": "Ni/2022/PlantC" - }, - { - "materialPercentageMassFraction": 5, - "materialWeight": null, - "materialName": "Li/2021/PlantC" - }, - { - "materialPercentageMassFraction": 0, - "materialWeight": null, - "materialName": "Pb(battery model does not contain Pb)" - }, - { - "materialPercentageMassFraction": 15, - "materialWeight": null, - "materialName": "Co/2021/PlantC" - } - ], - "anodeActiveMaterials": [ - { - "materialPercentageMassFraction": null, - "materialWeight": null, - "materialName": "SiO2-C" - } - ], - "cathodeActiveMaterials": [ - { - "materialPercentageMassFraction": null, - "materialWeight": null, - "materialName": "NCA (Lithium nickel cobalt aluminum oxide)" - } - ], - "cathodeCompositionOther": [ - { - "materialPercentageMassFraction": null, - "materialWeight": null, - "materialName": "carbon black" - } - ] - }, - "physicalDimensions": { - "length": 1800, - "width": 1000, - "weight": 2000, - "diameter": null, - "height": 150 - }, - "temperatureRangeIdleState": { - "temperatureRangeIdleStateUpperLimit": 40, - "temperatureRangeIdleStateLowerLimit": -20 - }, - "batteryCycleLife": { - "cycleLifeTestCRate": 2, - "cycleLifeTestDepthOfDischarge": 1.5, - "expectedLifetime": 3000 - }, - "manufacturer": { - "name": "Company C", - "contact": { - "faxNumber": "+49 89 0987654323", - "website": "http://www.CompanyC.com", - "phoneNumber": "+49 89 1234567892", - "email": "companyC@company.com" - }, - "address": { - "locality": { - "value": "CityC", - "technicalKey": "BLOCK" - }, - "country": { - "shortName": "Germany" - }, - "postCode": { - "value": "65-250A", - "technicalKey": "CEDEX" - }, - "thoroughfare": { - "value": "StreetA", - "number": "1", - "technicalKey": "STREET" - }, - "premise": { - "value": "", - "technicalKey": "CEDEX" - }, - "postalDeliveryPoint": { - "value": "Tor 1", - "technicalKey": "intERURBAN_DELIVERY_POint" - } - } - }, - "warrantyPeriod": "120", - "composition": { - "compositionOfBattery": [ - { - "materialPercentageMassFraction": null, - "materialWeight": null, - "materialName": "Co -hazardous, Current collector: Aluminum, LiPF6 - ( conducting lithium salt - toxic, in combination with moisture nad elevated temp. Decompose to HF) . Casing: iron, aluminum laminated plastic" - } - ], - "criticalRawMaterials": "Lithium, Cobalt, Natural graphite", - "components": { - "componentsPartNumber": "Casing Tray: Model C", - "componentsSupplier": [ - { - "componentsSupplierName": "XY Corporation", - "address": { - "locality": { - "value": "CityD", - "technicalKey": "BLOCK" - }, - "country": { - "shortName": "Germany" - }, - "postCode": { - "value": "65-250B", - "technicalKey": "CEDEX" - }, - "thoroughfare": { - "value": "StreetD", - "number": "1", - "technicalKey": "STREET" - }, - "premise": { - "value": "PlantD", - "technicalKey": "BUILDING" - }, - "postalDeliveryPoint": { - "value": "GateD", - "technicalKey": "INTERURBAN_DELIVERY_POINT" - } - }, - "contact": { - "faxNumber": "+49 89 0987654322", - "website": "https://www.companyD.com", - "phoneNumber": "+49 89 1234567890", - "email": "companyD@company.com" - } - } - ] - } - }, - "manufacturing": { - "dateOfManufacturing": "2022-01-24", - "address": { - "locality": { - "value": "CityC", - "technicalKey": "BLOCK" - }, - "country": { - "shortName": "Germany" - }, - "postCode": { - "value": "65-250A", - "technicalKey": "CEDEX" - }, - "thoroughfare": { - "value": "StreetC", - "number": "1", - "technicalKey": "STREET" - }, - "premise": { - "value": "PlantC", - "technicalKey": "BUILDING" - }, - "postalDeliveryPoint": { - "value": "GateC", - "technicalKey": "INTERURBAN_DELIVERY_POINT" - } - } - }, - "batteryIdentification": { - "batteryType": "NCA", - "batteryIDDMCCode": "NCR186850B", - "batteryModel": "Li-ion S-model" - }, - "stateOfBattery": { - "stateOfHealth": 50, - "statusBattery": "first life/ waste/ repaired/ repurposed/ recycled", - "stateOfCharge": 33 - }, - "cO2FootprintTotal": 124.0 -} diff --git a/deployment/infrastructure/testing/testdata/dpp/SNJ-4654-76_payload.json b/deployment/infrastructure/testing/testdata/dpp/SNJ-4654-76_payload.json deleted file mode 100644 index c08b80734..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/SNJ-4654-76_payload.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "productSpecificParameters": { - "torqueConverter": [ - "ABC1234567890", - "XYZ9876543210" - ], - "driveType": "Combustion Engine", - "oilType": "ZF Lifeguard Hybrid 2", - "spreading": 6.79, - "torque": 500, - "power": 300, - "standardGearRatio": { - "gear": "1", - "ratio": 4.1567 - }, - "oilCapacity": 8.9, - "electricPerformance": [ - "Electric Performance Specification A", - "Electric Performance Specification B" - ], - "speedResistance": { - "speed": 7800, - "gear": "1" - } - }, - "instructions": { - "packagingInstructions": [ - { - "documentTitle": "Packaging Instructions", - "documentLink": "https://www.example.com/packaging-instructions.pdf" - } - ], - "transportationInstructions": [ - { - "documentTitle": "Transportation Instructions", - "documentLink": "https://www.example.com/transportation-instructions.pdf" - } - ], - "dismantlingProcedure": [ - { - "documentTitle": "Dismantling Procedure", - "documentLink": "https://www.example.com/dismantling-procedure.pdf" - } - ], - "safetyMeasures": [ - { - "documentTitle": "Safety Measures", - "documentLink": "https://www.example.com/safety-measures.pdf" - } - ], - "vehicleDismantlingProcedure": [ - { - "documentTitle": "Vehicle Dismantling Procedure", - "documentLink": "https://www.example.com/vehicle-dismantling-procedure.pdf" - } - ] - }, - "identification": { - "manufacturerId": "XYZ78901", - "localIdentifiers": [ - { - "value": "SNJ-4654-76", - "key": "partInstanceId" - } - ], - "dataMatrixCode": "ABCDEF1234567890" - }, - "sparePartSupplier": [ - { - "supplierContact": { - "faxNumber": "+49 89 0987654321", - "website": "https://www.example-supplier.com", - "phoneNumber": "+49 89 1234567890", - "email": "supplier@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": "This is a test product with realistic data.", - "physicalDimensionsProperty": { - "width": 1000, - "length": 20000.1, - "weight": 100.7, - "diameter": 0.03, - "height": 0.1 - }, - "warrantyPeriod": 60, - "productDescription": "Manual Transmission", - "productType": "8HP60MH" - }, - "sustainability": { - "substancesOfConcern": [ - "Substance A", - "Substance B" - ], - "responsibleSourcingDocument": [ - { - "documentTitle": "Responsible Sourcing Document", - "documentLink": "https://www.example.com/responsible-sourcing.pdf" - } - ], - "recyclateContent": { - "nickel": 0.05, - "lithium": 0.01, - "cobalt": 0.02, - "otherSubstance": [ - { - "substancePercentage": 0.1, - "substanceName": "Lead" - } - ] - }, - "criticalRawMaterials": [ - "Material X", - "Material Y" - ], - "carbonFootprint": { - "crossSectoralStandardsUsed": [ - { - "crossSectoralStandard": "GHG Protocol Product Standard" - } - ], - "co2FootprintTotal": 200, - "productOrSectorSpecificRules": [ - { - "operator": "PEF", - "ruleNames": "ABC 2021", - "otherOperatorName": "NSF" - } - ] - } - } -} diff --git a/deployment/infrastructure/testing/testdata/dpp/X123456789012X12345678901234566.json b/deployment/infrastructure/testing/testdata/dpp/X123456789012X12345678901234566.json deleted file mode 100644 index e8129e4c1..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/X123456789012X12345678901234566.json +++ /dev/null @@ -1,344 +0,0 @@ -{ - "electrochemicalProperties": { - "ratedCapacity": 120, - "batteryEnergy": { - "energyRoundtripEfficiencyChange": 67, - "maximumAllowedBatteryEnergy": 90000, - "energyRoundtripEfficiency": 56 - }, - "ratioMaximumAllowedBatteryPowerAndMaximumAllowedBatteryEnergy": 0.611, - "batteryVoltage": { - "nominalVoltage": 4.3, - "maxVoltage": 6, - "minVoltage": 2.04 - }, - "internalResistance": { - "cellinternalResistance": 45, - "packinternalResistanceIncrease": 23, - "packinternalResistance": 67 - }, - "capacityThresholdExhaustion": 23, - "batteryPower": { - "powerFade": 23, - "originalPowerCapability": 305, - "originalPowerCapabilityLimits": 12, - "maximumAllowedBatteryPower": 308, - "powerCapabilityAt20Charge": -308, - "powerCapabilityAt80Charge": 8 - }, - "capacityFade": 34 - }, - "document": { - "responsibleSourcing": [ - { - "title": "LlN", - "fileLocation": "telnet://192.0.2.16:80/" - }, - { - "title": "LlN 2222", - "fileLocation": "telnet://192.0.2.16:80/" - }, - { - "title": "LlN 2222", - "fileLocation": "telnet://192.0.2.16:80/" - }, - { - "title": "LlN 2222", - "fileLocation": "telnet://192.0.2.16:80/" - }, - { - "title": "LlN 2222", - "fileLocation": "telnet://192.0.2.16:80/" - }, - { - "title": "LlN 2222", - "fileLocation": "telnet://192.0.2.16:80/" - }, - { - "title": "LlN 2222", - "fileLocation": "telnet://192.0.2.16:80/" - } - ], - "packagingInstructions": [ - { - "title": "eOMtThyhVNLWUZNRcBaQKxI", - "fileLocation": "telnet://192.0.2.16:80/" - } - ], - "transportationInstructions": [ - { - "title": "yedUsFwdkelQbxeTeQOvaScfqIOOmaa", - "fileLocation": "ftp://ftp.is.co.za/rfc/rfc1808.txt" - } - ], - "vehicleDismantlingProcedure": [ - { - "title": "JxkyvRnL", - "fileLocation": "http://www.ietf.org/rfc/rfc2396.txt" - } - ], - "testReportsResults": [ - { - "title": "UMaAIKKIkknjWEXJUfPxxQHeWKEJ", - "fileLocation": "telnet://192.0.2.16:80/" - } - ], - "batteryDismantlingProcedure": [ - { - "title": "RYtGKbgicZaHCBRQDSx", - "fileLocation": "http://www.wikipedia.org" - } - ], - "safetyMeasures": [ - { - "title": "VLhpfQGTMDYpsBZxvfBoeygjb", - "fileLocation": "ftp://ftp.is.co.za/rfc/rfc1808.txt" - } - ], - "declarationOfConformity": [ - { - "title": "dpHYZGhtgdntugzvvKAXLhM", - "fileLocation": "http://www.wikipedia.org" - } - ] - }, - "datePlacedOnMarket": "2023-03-08", - "cellChemistry": { - "electrolyteComposition": [ - { - "materialPercentageMassFraction": 4, - "materialName": "Ni", - "materialWeight": 2.5 - } - ], - "anodeCompositionOther": [ - { - "materialPercentageMassFraction": 15, - "materialName": "Co", - "materialWeight": 2.5 - } - ], - "recyclateContentActiveMaterials": [ - { - "materialPercentageMassFraction": 5, - "materialName": "Li", - "materialWeight": 2.5 - } - ], - "anodeActiveMaterials": [ - { - "materialPercentageMassFraction": 5, - "materialName": "Graphite", - "materialWeight": 2.5 - } - ], - "cathodeActiveMaterials": [ - { - "materialPercentageMassFraction": 14, - "materialName": "Ni", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 9, - "materialName": "Co", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 19, - "materialName": "Li", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 0, - "materialName": "Pb", - "materialWeight": 2.5 - } - ], - "cathodeCompositionOther": [ - { - "materialPercentageMassFraction": 19, - "materialName": "Pb", - "materialWeight": 2.5 - } - ] - }, - "physicalDimensions": { - "length": 20000, - "width": 1000, - "weight": 1007, - "diameter": 3, - "height": 1 - }, - "temperatureRangeIdleState": { - "temperatureRangeIdleStateUpperLimit": 67, - "temperatureRangeIdleStateLowerLimit": -22 - }, - "batteryCycleLife": { - "cycleLifeTestCRate": 45, - "cycleLifeTestDepthOfDischarge": 2, - "expectedLifetime": 1200 - }, - "manufacturer": { - "name": "Company A", - "contact": { - "faxNumber": "+49 89 0987654321", - "website": "https://www.samsung.com", - "phoneNumber": "+49 89 1234567890", - "email": "test.mail@example.com" - }, - "address": { - "locality": { - "value": "Mannheim", - "technicalKey": "BLOCK" - }, - "country": { - "shortName": "TG-Y" - }, - "postCode": { - "value": "68161\\12", - "technicalKey": "CEDEX" - }, - "thoroughfare": { - "value": "Bernstraße", - "number": "45", - "technicalKey": "STREET" - }, - "premise": { - "value": "Werk 1", - "technicalKey": "BUILDING" - }, - "postalDeliveryPoint": { - "value": "Tor 1", - "technicalKey": "intERURBAN_DELIVERY_POint" - } - } - }, - "warrantyPeriod": 60, - "composition": { - "compositionOfBattery": [ - { - "materialPercentageMassFraction": 19, - "materialName": "Graphite", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 19, - "materialName": "Graphite", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 19, - "materialName": "Graphite", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 19, - "materialName": "Graphite", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 19, - "materialName": "Graphite", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 19, - "materialName": "Graphite", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 19, - "materialName": "Graphite", - "materialWeight": 2.5 - }, - { - "materialPercentageMassFraction": 19, - "materialName": "Graphite", - "materialWeight": 2.5 - } - ], - "criticalRawMaterials": "Lithium, Cobalt, Natural graphite", - "components": { - "componentsPartNumber": [ - "Case xxxxxxx/xx; Controller xxxxxxx/xx" - ], - "componentsSupplier": [ - { - "componentsSupplierName": "XY Corporation", - "address": { - "locality": { - "value": "Mannheim", - "technicalKey": "BLOCK" - }, - "country": { - "shortName": "" - }, - "postCode": { - "value": "68161\\12", - "technicalKey": "CEDEX" - }, - "thoroughfare": { - "value": "Bernstraße", - "number": "45", - "technicalKey": "STREET" - }, - "premise": { - "value": "Werk 1", - "technicalKey": "BUILDING" - }, - "postalDeliveryPoint": { - "value": "Tor 1", - "technicalKey": "INTERURBAN_DELIVERY_POINT" - } - }, - "contact": { - "faxNumber": "+49 89 0987654321", - "website": "https://www.samsung.com", - "phoneNumber": "+49 89 1234567890", - "email": "test.mail@example.com" - } - } - ] - } - }, - "manufacturing": { - "dateOfManufacturing": "2023-03-07", - "address": { - "locality": { - "value": "Mannheim", - "technicalKey": "BLOCK" - }, - "country": { - "shortName": "" - }, - "postCode": { - "value": "68161\\12", - "technicalKey": "CEDEX" - }, - "thoroughfare": { - "value": "Bernstraße", - "number": "45", - "technicalKey": "STREET" - }, - "premise": { - "value": "Werk 1", - "technicalKey": "BUILDING" - }, - "postalDeliveryPoint": { - "value": "Tor 1", - "technicalKey": "INTERURBAN_DELIVERY_POINT" - } - } - }, - "batteryIdentification": { - "batteryType": "Li-Ion", - "batteryIDDMCCode": "X123456789012X12345678901234566", - "batteryModel": "SB 28" - }, - "stateOfBattery": { - "stateOfHealth": 12, - "statusBattery": "first life", - "stateOfCharge": 23 - }, - "cO2FootprintTotal": "110" - } diff --git a/deployment/infrastructure/testing/testdata/dpp/Y792927456954B81677903848654570.json b/deployment/infrastructure/testing/testdata/dpp/Y792927456954B81677903848654570.json deleted file mode 100644 index caab69619..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/Y792927456954B81677903848654570.json +++ /dev/null @@ -1,390 +0,0 @@ -{ - "electrochemicalProperties": { - "ratedCapacity": "103", - "batteryEnergy": { - "energyRoundtripEfficiencyChange": "0.2", - "maximumAllowedBatteryEnergy": "105", - "energyRoundtripEfficiency": "86" - }, - "ratioMaximumAllowedBatteryPowerAndMaximumAllowedBatteryEnergy": "5", - "batteryVoltage": { - "nominalVoltage": "376.4", - "maxVoltage": "438.6", - "minVoltage": "285.6" - }, - "internalResistance": { - "cellinternalResistance": "45", - "packinternalResistanceIncrease": "1.3", - "packinternalResistance": "3" - }, - "capacityThresholdExhaustion": "3", - "batteryPower": { - "powerFade": "0.3", - "originalPowerCapability": "395", - "originalPowerCapabilityLimits": "320", - "maximumAllowedBatteryPower": "420", - "powerCapabilityAt20Charge": "78", - "powerCapabilityAt80Charge": "97" - }, - "capacityFade": "1.43" - }, - "document": { - "responsibleSourcing": [ - { - "title": "Responsible sourcing report 2023", - "fileLocation": "telnet://192.0.2.16:84/" - } - ], - "packagingInstructions": [ - { - "title": "Packaging instruction for HVB B", - "fileLocation": "telnet://192.0.2.16:11/" - } - ], - "transportationInstructions": [ - { - "title": "Shipping guidelines", - "fileLocation": "ftp://ftp.is.co.za/rfc/rfc1808.txt" - } - ], - "vehicleDismantlingProcedure": [ - { - "title": "Dismantling procedure of HVB B from vehicle", - "fileLocation": "http://www.ietf.org/rfc/rfc2396.txt" - } - ], - "testReportsResults": [ - { - "title": "Laboratory test results HVB B", - "fileLocation": "telnet://192.0.2.16:81/" - } - ], - "batteryDismantlingProcedure": [ - { - "title": "Dismantling procedure of HVB B", - "fileLocation": "http://www.ietf.org/rfc/rfc2390.txt" - } - ], - "safetyMeasures": [ - { - "title": "HVB B safety document", - "fileLocation": "ftp://ftp.is.co.za/rfc/rfc1819.txt " - } - ], - "declarationOfConformity": [ - { - "title": "Declaration of conformity 3", - "fileLocation": "telnet://192.0.2.16:94/" - } - ] - }, - "cellChemistry": { - "electrolyteComposition": [ - { - "materialName": "electrolyte", - "materialWeight": 138.7, - "materialPercentageMassFraction": 23.3 - }, - { - "materialName": "others", - "materialWeight": 450.46, - "materialPercentageMassFraction": 56.2 - }, - { - "materialName": "methylpropiophenon", - "materialWeight": 444.03, - "materialPercentageMassFraction": 20.5 - } - ], - "anodeCompositionOther": [ - { - "materialName": "glass fibers", - "materialWeight": 122.98, - "materialPercentageMassFraction": 43.2 - }, - { - "materialName": "ferrum", - "materialWeight": 490.74, - "materialPercentageMassFraction": 19.7 - }, - { - "materialName": "aluminium", - "materialWeight": 261.17, - "materialPercentageMassFraction": 28.9 - }, - { - "materialName": "isolation material", - "materialWeight": 141.68, - "materialPercentageMassFraction": 8.2 - } - ], - "recyclateContentActiveMaterials": [ - { - "materialName": "lithium cobalt oxide", - "materialWeight": 145.49, - "materialPercentageMassFraction": 75.5 - }, - { - "materialName": "manganese", - "materialWeight": 111.98, - "materialPercentageMassFraction": 24.5 - } - ], - "anodeActiveMaterials": [ - { - "materialName": "graphite", - "materialWeight": 239.55, - "materialPercentageMassFraction": 0.6 - }, - { - "materialName": "copper foil", - "materialWeight": 492.93, - "materialPercentageMassFraction": 99.4 - } - ], - "cathodeActiveMaterials": [ - { - "materialName": "lithium cobalt oxide", - "materialWeight": 101.12, - "materialPercentageMassFraction": 15.9 - }, - { - "materialName": "lithium nickel manganese cobalt oxide", - "materialWeight": 337.73, - "materialPercentageMassFraction": 12.3 - }, - { - "materialName": "lithium nickel cobalt aluminium oxide", - "materialWeight": 437.02, - "materialPercentageMassFraction": 71.9 - } - ], - "cathodeCompositionOther": [ - { - "materialName": "aluminium", - "materialWeight": 326.06, - "materialPercentageMassFraction": 13 - }, - { - "materialName": "beryllium", - "materialWeight": 441.63, - "materialPercentageMassFraction": 5.5 - }, - { - "materialName": "styrene butadiene copolymer", - "materialWeight": 207.5, - "materialPercentageMassFraction": 47.8 - }, - { - "materialName": "cobalt nickel manganese", - "materialWeight": 471.56, - "materialPercentageMassFraction": 33.7 - } - ] - }, - "physicalDimensions": { - "length": "2573", - "width": "1740", - "weight": "684.2", - "diameter": "50", - "height": "280" - }, - "temperatureRangeIdleState": { - "temperatureRangeIdleStateUpperLimit": "45", - "temperatureRangeIdleStateLowerLimit": "-22" - }, - "batteryCycleLife": { - "cycleLifeTestCRate": "2", - "cycleLifeTestDepthOfDischarge": "43", - "expectedLifetime": "600" - }, - "manufacturer": { - "name": "BMW Group", - "contact": { - "faxNumber": "N/A", - "website": "https://www.bmwgroup.com/", - "phoneNumber": "+49893820", - "email": "werke@bmwgroup.com" - }, - "address": { - "locality": { - "value": "Munich", - "technicalKey": "CITY" - }, - "country": { - "shortName": "GER" - }, - "postCode": { - "value": "80809", - "technicalKey": "REGULAR" - }, - "thoroughfare": { - "value": "Am Olympiapark", - "number": "2", - "technicalKey": "STREET" - }, - "premise": { - "value": "PLANT 1", - "technicalKey": "OTHER" - }, - "postalDeliveryPoint": { - "value": "Gate 1", - "technicalKey": "INTERURBAN_DELIVERY_POINT" - } - } - }, - "warrantyPeriod": "60", - "composition": { - "compositionOfBattery": [ - { - "materialName": "steel", - "materialWeight": 69883, - "materialPercentageMassFraction": 11 - }, - { - "materialName": "aluminium", - "materialWeight": 101648, - "materialPercentageMassFraction": 16 - }, - { - "materialName": "lithium", - "materialWeight": 6353, - "materialPercentageMassFraction": 1 - }, - { - "materialName": "cobalt", - "materialWeight": 19059, - "materialPercentageMassFraction": 3 - }, - { - "materialName": "nickel", - "materialWeight": 19059, - "materialPercentageMassFraction": 3 - }, - { - "materialName": "manganese", - "materialWeight": 19059, - "materialPercentageMassFraction": 3 - }, - { - "materialName": "sealant", - "materialWeight": 3176.5, - "materialPercentageMassFraction": 0.5 - }, - { - "materialName": "graphite", - "materialWeight": 50824, - "materialPercentageMassFraction": 8 - }, - { - "materialName": "insulator", - "materialWeight": 12706, - "materialPercentageMassFraction": 2 - }, - { - "materialName": "uv varnish", - "materialWeight": 1270.6, - "materialPercentageMassFraction": 0.2 - }, - { - "materialName": "copper", - "materialWeight": 76236, - "materialPercentageMassFraction": 12 - }, - { - "materialName": "polyamid", - "materialWeight": 69883, - "materialPercentageMassFraction": 11 - }, - { - "materialName": "others", - "materialWeight": 186142.9, - "materialPercentageMassFraction": 29.3 - } - ], - "criticalRawMaterials": "lithium, nickel, cobalt, graphite, manganese, copper, aluminium", - "components": { - "componentsPartNumber": [ - "5819826-01", - "2389175-01" - ], - "componentsSupplier": [ - { - "componentsSupplierName": "Dräxlmaier", - "address": { - "locality": { - "value": "Vilsbiburg", - "technicalKey": "CITY" - }, - "country": { - "shortName": "GER" - }, - "postCode": { - "value": "84137", - "technicalKey": "REGULAR" - }, - "thoroughfare": { - "value": "Landshuter Straße", - "number": "100", - "technicalKey": "STREET" - }, - "premise": { - "value": "Headquarters", - "technicalKey": "OTHER" - }, - "postalDeliveryPoint": { - "value": "GATE 2", - "technicalKey": "INTERURBAN_DELIVERY_POINT" - } - }, - "contact": { - "faxNumber": "+498741471940", - "website": "https://www.draexlmaier.com/", - "phoneNumber": "+498741470", - "email": "info@draexlmaier.com" - } - } - ] - } - }, - "manufacturing": { - "dateOfManufacturing": "2022-11-22", - "address": { - "locality": { - "value": "Munich", - "technicalKey": "CITY" - }, - "country": { - "shortName": "GER" - }, - "postCode": { - "value": "80809", - "technicalKey": "REGULAR" - }, - "thoroughfare": { - "value": "Am Olympiapark", - "number": "2", - "technicalKey": "STREET" - }, - "premise": { - "value": "PLANT 1", - "technicalKey": "OTHER" - }, - "postalDeliveryPoint": { - "value": "Gate 1", - "technicalKey": "intERURBAN_DELIVERY_POint" - } - } - }, - "batteryIdentification": { - "batteryType": "Lithium-ion", - "batteryIDDMCCode": "Y792927456954B81677903848654570", - "batteryModel": "SE30H" - }, - "stateOfBattery": { - "stateOfHealth": "99", - "statusBattery": "first life", - "stateOfCharge": "54" - }, - "cO2FootprintTotal": "110" -} \ No newline at end of file diff --git a/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-BAT-XYZ789.json b/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-BAT-XYZ789.json deleted file mode 100644 index 8dfead1de..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-BAT-XYZ789.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "catenaXId": "urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d", - "childItems": [ - { - "catenaXId": "urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552", - "quantity": { - "quantityNumber": 5.0, - "measurementUnit": "piece" - }, - "businessPartner": "BPNL00000000CBA5", - "createdOn": "2023-01-09T17:26:54.709Z", - "lastModifiedOn": "2023-01-09T17:26:54.709Z" - } - ] -} diff --git a/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-CTA-13123.json b/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-CTA-13123.json deleted file mode 100644 index bac4e90db..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-CTA-13123.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "catenaXId": "urn:uuid:63b95496-86ed-4762-b248-491d5c1242e1", - "childItems": [] -} diff --git a/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-EVMODULE-TRJ712.json b/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-EVMODULE-TRJ712.json deleted file mode 100644 index 61c283619..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/singleLevelBomAsBuilt-EVMODULE-TRJ712.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "catenaXId": "urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552", - "childItems": [ - { - "catenaXId": "urn:uuid:63b95496-86ed-4762-b248-491d5c1242e1", - "quantity": { - "quantityNumber": 100.0, - "measurementUnit": "piece" - }, - "businessPartner": "BPNL00000000CBA5", - "createdOn": "2023-01-09T17:26:54.709Z", - "lastModifiedOn": "2023-01-09T17:26:54.709Z" - } - ] -} diff --git a/deployment/infrastructure/testing/testdata/dpp/singleLevelUsageAsBuilt-CTA-13123.json b/deployment/infrastructure/testing/testdata/dpp/singleLevelUsageAsBuilt-CTA-13123.json deleted file mode 100644 index 2ddb26e8d..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/singleLevelUsageAsBuilt-CTA-13123.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parentParts": [ - { - "parentCatenaXId": "urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552", - "quantity": { - "quantityNumber": 10.0, - "measurementUnit": "piece" - }, - "createdOn": "2023-01-09T17:26:54.709Z", - "lastModifiedOn": "2023-01-09T17:26:54.709Z" - } - ], - "catenaXId": "urn:uuid:63b95496-86ed-4762-b248-491d5c1242e1" -} diff --git a/deployment/infrastructure/testing/testdata/dpp/singleLevelUsageAsBuilt-EVMODULE-TRJ712.json b/deployment/infrastructure/testing/testdata/dpp/singleLevelUsageAsBuilt-EVMODULE-TRJ712.json deleted file mode 100644 index 9f1e9064c..000000000 --- a/deployment/infrastructure/testing/testdata/dpp/singleLevelUsageAsBuilt-EVMODULE-TRJ712.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parentParts": [ - { - "parentCatenaXId": "urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d", - "quantity": { - "quantityNumber": 100.0, - "measurementUnit": "piece" - }, - "createdOn": "2023-01-09T17:26:54.709Z", - "lastModifiedOn": "2023-01-09T17:26:54.709Z" - } - ], - "catenaXId": "urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552" -} diff --git a/deployment/infrastructure/testing/testdata/smc/smc_asset.json b/deployment/infrastructure/testing/testdata/smc/smc_asset.json deleted file mode 100644 index 9db139820..000000000 --- a/deployment/infrastructure/testing/testdata/smc/smc_asset.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "@context": {}, - "asset": { - "@type": "Asset", - "@id": "urn:uuid:d0724e94-6fa5-4551-9e07-abba7a1ecd8b", - "properties": { - "description": "SMC EDC Test Asset" - } - }, - "dataAddress": { - "@type": "DataAddress", - "type": "HttpData", - "baseUrl": "https://materialpass.int.demo.catena-x.net/provider_backend", - "proxyPath": "true", - "proxyBody": "false", - "proxyMethod": "false", - "proxyQueryParams": "false" - } -} diff --git a/deployment/infrastructure/testing/testdata/smc/smc_contract-definition.json b/deployment/infrastructure/testing/testdata/smc/smc_contract-definition.json deleted file mode 100644 index d35c14bd5..000000000 --- a/deployment/infrastructure/testing/testdata/smc/smc_contract-definition.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@context": {}, - "@id": "urn:uuid:b7cf9f3e-0f94-49fd-8ecb-30a6e72118c3", - "@type": "ContractDefinition", - "accessPolicyId": "urn:uuid:577766e7-c54e-485f-9371-b31f0f6d68cf", - "contractPolicyId": "urn:uuid:577766e7-c54e-485f-9371-b31f0f6d68cf", - "assetsSelector" : { - "@type" : "CriterionDto", - "operandLeft": "https://w3id.org/edc/v0.0.1/ns/id", - "operator": "=", - "operandRight": "urn:uuid:d0724e94-6fa5-4551-9e07-abba7a1ecd8b" - } -} diff --git a/deployment/infrastructure/testing/testdata/smc/smc_digital-twin.json b/deployment/infrastructure/testing/testdata/smc/smc_digital-twin.json deleted file mode 100644 index 0a02cbb5a..000000000 --- a/deployment/infrastructure/testing/testdata/smc/smc_digital-twin.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "description": [ - { - "language": "en", - "text": "Secondary Material Content" - } - ], - "displayName": [], - "globalAssetId": "urn:uuid:54850364-0837-41df-b839-0a06f48595de", - "idShort": "SMC_KLZ-90-8564-96", - "id": "urn:uuid:479ceed8-0eef-4c28-a74f-4eac9e01335b", - "specificAssetIds": [ - { - "name": "manufacturerPartId", - "value": "XYZ78901", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "BPNL00000000CBA5" - }, - { - "type": "GlobalReference", - "value": "BPNL00000003AYRE" - }, - { - "type": "GlobalReference", - "value": "PUBLIC_READABLE" - } - ] - } - }, - { - "name": "orderNumber", - "value": "KLZ-90-8564-96", - "externalSubjectId": { - "type": "ExternalReference", - "keys": [ - { - "type": "GlobalReference", - "value": "BPNL00000000CBA5" - }, - { - "type": "GlobalReference", - "value": "BPNL00000003AYRE" - } - ] - } - } - ], - "submodelDescriptors": [ - { - "endpoints": [ - { - "interface": "SUBMODEL-3.0", - "protocolInformation": { - "href": "https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:d1707d00-d714-40a6-8229-11b14086029f", - "endpointProtocol": "HTTP", - "endpointProtocolVersion": [ - "1.1" - ], - "subprotocol": "DSP", - "subprotocolBody": "id=urn:uuid:d0724e94-6fa5-4551-9e07-abba7a1ecd8b;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000", - "subprotocolBodyEncoding": "plain", - "securityAttributes": [ - { - "type": "NONE", - "key": "NONE", - "value": "NONE" - } - ] - } - } - ], - "idShort": "SerialPart", - "id": "urn:uuid:d1707d00-d714-40a6-8229-11b14086029f", - "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:88d6d37e-4bac-4770-8583-f9a50a8b4a87", - "endpointProtocol": "HTTP", - "endpointProtocolVersion": [ - "1.1" - ], - "subprotocol": "DSP", - "subprotocolBody": "id=urn:uuid:d0724e94-6fa5-4551-9e07-abba7a1ecd8b;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000", - "subprotocolBodyEncoding": "plain", - "securityAttributes": [ - { - "type": "NONE", - "key": "NONE", - "value": "NONE" - } - ] - } - } - ], - "idShort": "secondaryMaterialContent", - "id": "urn:uuid:88d6d37e-4bac-4770-8583-f9a50a8b4a87", - "semanticId": { - "type": "ExternalReference", - "keys": [ - { - "type": "Submodel", - "value": "urn:samm:io.catenax.secondary_material_content:1.0.0#SecondaryMaterialContent" - } - ] - }, - "description": [], - "displayName": [] - } - ] -} diff --git a/deployment/infrastructure/testing/testdata/smc/smc_manual_payload.json b/deployment/infrastructure/testing/testdata/smc/smc_manual_payload.json deleted file mode 100644 index c9937486b..000000000 --- a/deployment/infrastructure/testing/testdata/smc/smc_manual_payload.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "orderNumber": "KLZ-90-8564-96", - "secondaryMaterialContent": [ - { - "materialNameStandardized": { - "referencedStandard": "AISI", - "referencedStandardID": "1043", - "materialNameStandardizedValue": "Lithium" - }, - "materialClass": "5.1", - "unitOfMeasure": { - "unitOfMeasureKey": "unit:kilogram", - "unitOfMeasureValue": 7.2 - }, - "certificate": [ - { - "certificateName": "Test-Zertifikat", - "certificateLink": "telnet://192.0.2.16:80/" - } - ], - "bioBased": { - "secondaryBioBased": { - "percentageOfMaterialWeight": 0, - "isMassBalanced": false - }, - "primaryBioBased": { - "percentageOfMaterialWeight": 0 - }, - "bioBasedClass": "gen1" - }, - "inorganic": { - "secondaryInorganic": { - "preConsumer": { - "mechanicalRecycling": { - "percentageOfMaterialWeight": 10 - } - }, - "postConsumer": { - "chemicalRecycling": { - "percentageOfMaterialWeight": 0, - "isMassBalanced": false - }, - "mechanicalRecycling": { - "percentageOfMaterialWeight": 4.7 - }, - "isPreviousIndustryAutomotive": true - } - }, - "primaryInorganic": { - "percentageOfMaterialWeight": 85.3 - } - } - }, - { - "materialNameStandardized": { - "referencedStandard": "AISI", - "referencedStandardID": "1043", - "materialNameStandardizedValue": "Nickel" - }, - "materialClass": "5.1", - "unitOfMeasure": { - "unitOfMeasureKey": "unit:kilogram", - "unitOfMeasureValue": 20.2 - }, - "additionalInformation": "Reutilization: 5.0", - "bioBased": { - "secondaryBioBased": { - "percentageOfMaterialWeight": 0, - "isMassBalanced": false - }, - "primaryBioBased": { - "percentageOfMaterialWeight": 0 - }, - "bioBasedClass": "gen1" - }, - "inorganic": { - "secondaryInorganic": { - "preConsumer": { - "mechanicalRecycling": { - "percentageOfMaterialWeight": 2 - } - }, - "postConsumer": { - "chemicalRecycling": { - "percentageOfMaterialWeight": 3, - "isMassBalanced": true - }, - "mechanicalRecycling": { - "percentageOfMaterialWeight": 0 - }, - "isPreviousIndustryAutomotive": false - } - }, - "primaryInorganic": { - "percentageOfMaterialWeight": 90 - } - } - }, - { - "materialNameStandardized": { - "referencedStandard": "AISI", - "referencedStandardID": "1043", - "materialNameStandardizedValue": "Mangan" - }, - "materialClass": "5.1", - "unitOfMeasure": { - "unitOfMeasureKey": "unit:kilogram", - "unitOfMeasureValue": 18.9 - }, - "bioBased": { - "secondaryBioBased": { - "percentageOfMaterialWeight": 0, - "isMassBalanced": false - }, - "primaryBioBased": { - "percentageOfMaterialWeight": 0 - }, - "bioBasedClass": "gen1" - }, - "inorganic": { - "secondaryInorganic": { - "preConsumer": { - "mechanicalRecycling": { - "percentageOfMaterialWeight": 7.8 - } - }, - "postConsumer": { - "chemicalRecycling": { - "percentageOfMaterialWeight": 0, - "isMassBalanced": false - }, - "mechanicalRecycling": { - "percentageOfMaterialWeight": 2.1 - }, - "isPreviousIndustryAutomotive": true - } - }, - "primaryInorganic": { - "percentageOfMaterialWeight": 90.1 - } - } - }, - { - "materialNameStandardized": { - "referencedStandard": "AISI", - "referencedStandardID": "1043", - "materialNameStandardizedValue": "Kobalt" - }, - "materialClass": "5.1", - "unitOfMeasure": { - "unitOfMeasureKey": "unit:kilogram", - "unitOfMeasureValue": 20.3 - }, - "additionalInformation": "Reutilization: 20.4", - "bioBased": { - "secondaryBioBased": { - "percentageOfMaterialWeight": 0, - "isMassBalanced": false - }, - "primaryBioBased": { - "percentageOfMaterialWeight": 0 - }, - "bioBasedClass": "gen1" - }, - "inorganic": { - "secondaryInorganic": { - "preConsumer": { - "mechanicalRecycling": { - "percentageOfMaterialWeight": 1.6 - } - }, - "postConsumer": { - "chemicalRecycling": { - "percentageOfMaterialWeight": 3.7, - "isMassBalanced": true - }, - "mechanicalRecycling": { - "percentageOfMaterialWeight": 4.3 - }, - "isPreviousIndustryAutomotive": false - } - }, - "primaryInorganic": { - "percentageOfMaterialWeight": 70 - } - } - } - ] -} diff --git a/deployment/infrastructure/testing/testdata/smc/smc_payload_partAsPlanned.json b/deployment/infrastructure/testing/testdata/smc/smc_payload_partAsPlanned.json deleted file mode 100644 index dc65e5080..000000000 --- a/deployment/infrastructure/testing/testdata/smc/smc_payload_partAsPlanned.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "partTypeInformation": { - "classification": "product", - "manufacturerPartId": "677-4.456-3434-K", - "nameAtManufacturer": "NMC111 Cathode" - }, - "validityPeriod": { - "validFrom": "2023-10-06T14:50:23.230+01:00", - "validTo": "2024-08-06T14:50:23.230+01:00" - }, - "catenaXId": "urn:uuid:d1707d00-d714-40a6-8229-11b14086029f" -} diff --git a/deployment/infrastructure/testing/testdata/smc/smc_policiy.json b/deployment/infrastructure/testing/testdata/smc/smc_policiy.json deleted file mode 100644 index 0126992fe..000000000 --- a/deployment/infrastructure/testing/testdata/smc/smc_policiy.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "@context": { - "odrl": "http://www.w3.org/ns/odrl/2/" - }, - "@type": "PolicyDefinitionRequestDto", - "@id": "urn:uuid:577766e7-c54e-485f-9371-b31f0f6d68cf", - "policy": { - "@type": "Policy", - "odrl:permission": [ - { - "odrl:action": "USE", - "odrl:constraint": { - "@type": "AtomicConstraint", - "odrl:or": [ - { - "@type": "Constraint", - "odrl:leftOperand": "PURPOSE", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "ID 3.0 Trace" - } - ] - } - } - ] - } -} diff --git a/docker/local/Keycloak/README.md b/deployment/local/docker/Keycloak/README.md similarity index 100% rename from docker/local/Keycloak/README.md rename to deployment/local/docker/Keycloak/README.md diff --git a/docker/local/Keycloak/realm.json b/deployment/local/docker/Keycloak/realm.json similarity index 100% rename from docker/local/Keycloak/realm.json rename to deployment/local/docker/Keycloak/realm.json diff --git a/docker/README.md b/deployment/local/docker/README.md similarity index 100% rename from docker/README.md rename to deployment/local/docker/README.md diff --git a/deployment/local/postman/Digital-Product-Pass-collection.json b/deployment/local/postman/Digital-Product-Pass-collection.json new file mode 100644 index 000000000..a796280fb --- /dev/null +++ b/deployment/local/postman/Digital-Product-Pass-collection.json @@ -0,0 +1,3448 @@ +{ + "info": { + "_postman_id": "16c86cf7-471d-4b51-8f40-6c6c8a2ca18a", + "name": "Digital Product Pass", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Provider", + "item": [ + { + "name": "Submodel Server", + "item": [ + { + "name": "Upload Data", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"electrochemicalProperties\": {\r\n \"ratedCapacity\": 94,\r\n \"batteryEnergy\": {\r\n \"energyRoundtripEfficiencyChange\": 48.2,\r\n \"maximumAllowedBatteryEnergy\": 85000,\r\n \"energyRoundtripEfficiency\": 25\r\n },\r\n \"ratioMaximumAllowedBatteryPowerAndMaximumAllowedBatteryEnergy\": 0.588,\r\n \"batteryVoltage\": {\r\n \"nominalVoltage\": 3.7,\r\n \"maxVoltage\": 4.2,\r\n \"minVoltage\": 2.5\r\n },\r\n \"internalResistance\": {\r\n \"cellinternalResistance\": 0.36,\r\n \"packinternalResistanceIncrease\": 1,\r\n \"packinternalResistance\": 100\r\n },\r\n \"capacityThresholdExhaustion\": 23,\r\n \"batteryPower\": {\r\n \"powerFade\": 23,\r\n \"originalPowerCapability\": -1.7976931348623157e+308,\r\n \"originalPowerCapabilityLimits\": -1.7976931348623157e+308,\r\n \"maximumAllowedBatteryPower\": -1.7976931348623157e+308,\r\n \"powerCapabilityAt20Charge\": -1.7976931348623157e+308,\r\n \"powerCapabilityAt80Charge\": -1.7976931348623157e+308\r\n },\r\n \"capacityFade\": 1.55\r\n },\r\n \"document\": {\r\n \"responsibleSourcing\": [\r\n {\r\n \"title\": \"2021 Responsible Sourcing document\",\r\n \"fileLocation\": null\r\n }\r\n ],\r\n \"packagingInstructions\": [\r\n {\r\n \"title\": \"Packing Instruction v.2.0\",\r\n \"fileLocation\": null\r\n }\r\n ],\r\n \"transportationInstructions\": [\r\n {\r\n \"title\": \"Transport manual\",\r\n \"fileLocation\": null\r\n }\r\n ],\r\n \"vehicleDismantlingProcedure\": [\r\n {\r\n \"title\": \"Car dismantling manual\",\r\n \"fileLocation\": \"http://www.ietf.org/rfc/rfc2396.txt\"\r\n }\r\n ],\r\n \"testReportsResults\": [\r\n {\r\n \"title\": \"Battery Test Reports\",\r\n \"fileLocation\": \"http://www.Batterytestreports.de\"\r\n }\r\n ],\r\n \"batteryDismantlingProcedure\": [\r\n {\r\n \"title\": \"Dismantling Manual\",\r\n \"fileLocation\": \"http://www.dissmantlingmanual.org\"\r\n }\r\n ],\r\n \"safetyMeasures\": [\r\n {\r\n \"title\": \"Safety Instruction\",\r\n \"fileLocation\": \"http://www.safetyinstructions.txt\"\r\n }\r\n ],\r\n \"declarationOfConformity\": [\r\n {\r\n \"title\": \"Declaration of Conformity No. 3\",\r\n \"fileLocation\": null\r\n }\r\n ]\r\n },\r\n \"datePlacedOnMarket\": \"27.04.2022\",\r\n \"cellChemistry\": {\r\n \"electrolyteComposition\": [\r\n {\r\n \"materialPercentageMassFraction\": null,\r\n \"materialWeight\": null,\r\n \"materialName\": \"dimethyl carbonate (DCM)\"\r\n }\r\n ],\r\n \"anodeCompositionOther\": [\r\n {\r\n \"materialPercentageMassFraction\": null,\r\n \"materialWeight\": null,\r\n \"materialName\": \"Carboxymethyl cellulose\"\r\n }\r\n ],\r\n \"recyclateContentActiveMaterials\": [\r\n {\r\n \"materialPercentageMassFraction\": 6,\r\n \"materialWeight\": null,\r\n \"materialName\": \"Ni/2021/PlantE\"\r\n },\r\n {\r\n \"materialPercentageMassFraction\": 4,\r\n \"materialWeight\": null,\r\n \"materialName\": \"Li/2021/PlantE\"\r\n },\r\n {\r\n \"materialPercentageMassFraction\": 0,\r\n \"materialWeight\": null,\r\n \"materialName\": \"Pb(battery model does not contain Pb)\"\r\n },\r\n {\r\n \"materialPercentageMassFraction\": 0,\r\n \"materialWeight\": null,\r\n \"materialName\": \"Co(battery model does not contain Pb)\"\r\n }\r\n ],\r\n \"anodeActiveMaterials\": [\r\n {\r\n \"materialPercentageMassFraction\": null,\r\n \"materialWeight\": null,\r\n \"materialName\": \"Graphite\"\r\n }\r\n ],\r\n \"cathodeActiveMaterials\": [\r\n {\r\n \"materialPercentageMassFraction\": null,\r\n \"materialWeight\": null,\r\n \"materialName\": \"LiMn2O4 Lithium Manganese Oxide\"\r\n }\r\n ],\r\n \"cathodeCompositionOther\": [\r\n {\r\n \"materialPercentageMassFraction\": null,\r\n \"materialWeight\": null,\r\n \"materialName\": \"binder:PVDF\"\r\n }\r\n ]\r\n },\r\n \"physicalDimensions\": {\r\n \"length\": 2000,\r\n \"width\": 1000,\r\n \"weight\": 3500,\r\n \"diameter\": null,\r\n \"height\": 200\r\n },\r\n \"temperatureRangeIdleState\": {\r\n \"temperatureRangeIdleStateUpperLimit\": 50,\r\n \"temperatureRangeIdleStateLowerLimit\": -20\r\n },\r\n \"batteryCycleLife\": {\r\n \"cycleLifeTestCRate\": 2,\r\n \"cycleLifeTestDepthOfDischarge\": 1.8,\r\n \"expectedLifetime\": 2500\r\n },\r\n \"manufacturer\": {\r\n \"name\": \"CompanyE\",\r\n \"contact\": {\r\n \"faxNumber\": \"+49 89 0987654324\",\r\n \"website\": \"https://www.CompanyE.com\",\r\n \"phoneNumber\": \"+49 89 1234567893\",\r\n \"email\": \"companyE@company.com\"\r\n },\r\n \"address\": {\r\n \"locality\": {\r\n \"value\": \"CityE\",\r\n \"technicalKey\": \"BLOCK\"\r\n },\r\n \"country\": {\r\n \"shortName\": \"Germany\"\r\n },\r\n \"postCode\": {\r\n \"value\": \"65-250E\",\r\n \"technicalKey\": \"CEDEX\"\r\n },\r\n \"thoroughfare\": {\r\n \"value\": \"StreetE\",\r\n \"number\": \"1\",\r\n \"technicalKey\": \"STREET\"\r\n },\r\n \"premise\": {\r\n \"value\": null,\r\n \"technicalKey\": \"BUILDING\"\r\n },\r\n \"postalDeliveryPoint\": {\r\n \"value\": null,\r\n \"technicalKey\": \"intERURBAN_DELIVERY_POint\"\r\n }\r\n }\r\n },\r\n \"warrantyPeriod\": \"96\",\r\n \"composition\": {\r\n \"compositionOfBattery\": [\r\n {\r\n \"materialPercentageMassFraction\": null,\r\n \"materialWeight\": null,\r\n \"materialName\": \"Separator: PE\"\r\n }\r\n ],\r\n \"criticalRawMaterials\": \"Lithium, Natural graphite\",\r\n \"components\": {\r\n \"componentsPartNumber\": \"Voltage cables\",\r\n \"componentsSupplier\": [\r\n {\r\n \"componentsSupplierName\": \"AB Corporation\",\r\n \"address\": {\r\n \"locality\": {\r\n \"value\": \"CityF\",\r\n \"technicalKey\": \"BLOCK\"\r\n },\r\n \"country\": {\r\n \"shortName\": \"Germany\"\r\n },\r\n \"postCode\": {\r\n \"value\": \"65-250F\",\r\n \"technicalKey\": \"CEDEX\"\r\n },\r\n \"thoroughfare\": {\r\n \"value\": \"StreetF\",\r\n \"number\": \"1\",\r\n \"technicalKey\": \"STREET\"\r\n },\r\n \"premise\": {\r\n \"value\": \"PlantF\",\r\n \"technicalKey\": \"BUILDING\"\r\n },\r\n \"postalDeliveryPoint\": {\r\n \"value\": null,\r\n \"technicalKey\": \"INTERURBAN_DELIVERY_POINT\"\r\n }\r\n },\r\n \"contact\": {\r\n \"faxNumber\": \"+49 89 0987654324\",\r\n \"website\": \"https://www.companyF.com\",\r\n \"phoneNumber\": \"+49 89 1234567893\",\r\n \"email\": \"companyF@companyF.com\"\r\n }\r\n }\r\n ]\r\n }\r\n },\r\n \"manufacturing\": {\r\n \"dateOfManufacturing\": \"2022-01-24\",\r\n \"address\": {\r\n \"locality\": {\r\n \"value\": \"CityE\",\r\n \"technicalKey\": \"BLOCK\"\r\n },\r\n \"country\": {\r\n \"shortName\": \"Germany\"\r\n },\r\n \"postCode\": {\r\n \"value\": \"65-250E\",\r\n \"technicalKey\": \"CEDEX\"\r\n },\r\n \"thoroughfare\": {\r\n \"value\": \"StreetE\",\r\n \"number\": \"1\",\r\n \"technicalKey\": \"STREET\"\r\n },\r\n \"premise\": {\r\n \"value\": \"PlantE\",\r\n \"technicalKey\": \"BUILDING\"\r\n },\r\n \"postalDeliveryPoint\": {\r\n \"value\": \"GateE\",\r\n \"technicalKey\": \"INTERURBAN_DELIVERY_POINT\"\r\n }\r\n }\r\n },\r\n \"batteryIdentification\": {\r\n \"batteryType\": \"Lithium-Manganese-Oxide (LMO)\",\r\n \"batteryIDDMCCode\": \"IMR18650V1\",\r\n \"batteryModel\": \"Pi4 Orionis\"\r\n },\r\n \"stateOfBattery\": {\r\n \"stateOfHealth\": 20,\r\n \"statusBattery\": \"first life\",\r\n \"stateOfCharge\": 50\r\n },\r\n \"cO2FootprintTotal\": 210\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{submodelServer}}/data/{{digitalTwinSubmodelId}}", + "host": ["{{submodelServer}}"], + "path": ["data", "{{digitalTwinSubmodelId}}"] + } + }, + "response": [] + }, + { + "name": "Get Data", + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "auth": { + "type": "noauth" + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + }, + { + "key": "Accept", + "value": "application/octet-stream", + "type": "default" + } + ], + "url": { + "raw": "{{submodelServer}}/data/{{digitalTwinSubmodelId}}", + "host": ["{{submodelServer}}"], + "path": ["data", "{{digitalTwinSubmodelId}}"] + } + }, + "response": [] + } + ] + }, + { + "name": "EDC", + "item": [ + { + "name": "1. Register DTR", + "item": [ + { + "name": "1.1. Create DTR Asset", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {},\r\n \"asset\": {\r\n \"@type\": \"data.core.digitalTwinRegistry\",\r\n \"@id\": \"{{registryAssetId}}\",\r\n \"properties\": {\r\n \"type\": \"data.core.digitalTwinRegistry\",\r\n \"description\": \"Digital Twin Registry Endpoint of DPP-EDC\"\r\n }\r\n },\r\n \"dataAddress\": {\r\n \"@type\": \"DataAddress\",\r\n \"type\": \"HttpData\",\r\n \"baseUrl\": \"{{registryUrl}}\",\r\n \"proxyPath\": \"true\",\r\n \"proxyBody\": \"true\",\r\n \"proxyMethod\": \"true\",\r\n \"proxyQueryParams\": \"true\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/assets", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets"] + } + }, + "response": [] + }, + { + "name": "Get DTR", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/assets/{{registryAssetId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets", "{{registryAssetId}}"] + } + }, + "response": [] + }, + { + "name": "Get DTR Asset Data Address", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {},\r\n \"asset\": {\r\n \"@type\": \"Asset\",\r\n \"@id\": \"digital-twin-registry-2\",\r\n \"properties\": {\r\n \"type\": \"data.core.digitalTwinRegistry\",\r\n \"description\": \"Digital Twin Registry Endpoint of DPP-IRS\"\r\n }\r\n },\r\n \"dataAddress\": {\r\n \"@type\": \"DataAddress\",\r\n \"type\": \"HttpData\",\r\n \"baseUrl\": \"{{registryUrl}}\",\r\n \"proxyPath\": \"true\",\r\n \"proxyBody\": \"true\",\r\n \"proxyMethod\": \"true\",\r\n \"proxyQueryParams\": \"true\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/assets/{{registryAssetId}}/dataaddress", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets", "{{registryAssetId}}", "dataaddress"] + } + }, + "response": [] + }, + { + "name": "Delete DTR Asset", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/assets/{{registryAssetId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets", "{{registryAssetId}}"] + } + }, + "response": [] + }, + { + "name": "1.2. Create DTR Policy", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\r\n },\r\n \"@type\": \"PolicyDefinitionRequestDto\",\r\n \"@id\": \"{{registryPolicyId}}\",\r\n \"policy\": {\r\n \"@type\": \"Policy\",\r\n \"odrl:permission\": [\r\n {\r\n \"odrl:action\": \"USE\",\r\n \"odrl:constraint\": {\r\n \"@type\": \"LogicalConstraint\",\r\n \"odrl:or\": [\r\n {\r\n \"@type\": \"Constraint\",\r\n \"odrl:leftOperand\": \"BusinessPartnerNumber\",\r\n \"odrl:operator\": {\r\n \"@id\": \"odrl:eq\"\r\n },\r\n \"odrl:rightOperand\": \"{{bpnNumber}}\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/policydefinitions", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "policydefinitions"] + } + }, + "response": [] + }, + { + "name": "Get DTR Policy", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/policydefinitions/{{registryPolicyId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "policydefinitions", "{{registryPolicyId}}"] + } + }, + "response": [] + }, + { + "name": "Delete DTR Policy", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/policydefinitions/{{registryPolicyId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "policydefinitions", "{{registryPolicyId}}"] + } + }, + "response": [] + }, + { + "name": "1.3. DTR Contract Definition", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {},\r\n \"@id\": \"{{registryContractDefinitionId}}\",\r\n \"@type\": \"ContractDefinition\",\r\n \"accessPolicyId\": \"{{registryPolicyId}}\",\r\n \"contractPolicyId\": \"{{registryPolicyId}}\",\r\n \"assetsSelector\" : {\r\n \"@type\" : \"CriterionDto\",\r\n \"operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"{{registryAssetId}}\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/contractdefinitions", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "contractdefinitions"] + } + }, + "response": [] + }, + { + "name": "Get DTR Contract Definition", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/contractdefinitions/{{registryContractDefinitionId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "contractdefinitions", "{{registryContractDefinitionId}}"] + } + }, + "response": [] + }, + { + "name": "Delete DTR Contract Definition", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/contractdefinitions/{{registryContractDefinitionId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "contractdefinitions", "{{registryContractDefinitionId}}"] + } + }, + "response": [] + } + ] + }, + { + "name": "2. Assets", + "item": [ + { + "name": "Create Asset", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {},\r\n \"asset\": {\r\n \"@type\": \"Asset\",\r\n \"@id\": \"{{assetId}}\", \r\n \"properties\": {\r\n \"description\": \"EDC test asset\"\r\n }\r\n },\r\n \"dataAddress\": {\r\n \"@type\": \"DataAddress\",\r\n \"type\": \"HttpData\",\r\n \"proxyPath\": \"true\",\r\n \"proxyBody\": \"true\",\r\n \"proxyMethod\": \"true\",\r\n \"proxyQueryParams\": \"true\",\r\n \"baseUrl\": \"{{submodelServer}}\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/assets", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets"] + } + }, + "response": [] + }, + { + "name": "Get Asset By ID", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/assets/{{assetId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets", "{{assetId}}"] + } + }, + "response": [] + }, + { + "name": "Get All Assets", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/assets/request", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets", "request"] + } + }, + "response": [] + }, + { + "name": "Get Asset Data Address", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/assets/{{assetId}}/dataaddress", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets", "{{assetId}}", "dataaddress"] + } + }, + "response": [] + }, + { + "name": "Delete Asset", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/assets/{{assetId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "assets", "{{assetId}}"] + } + }, + "response": [] + } + ] + }, + { + "name": "3. Policies", + "item": [ + { + "name": "Create Policy", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\r\n },\r\n \"@type\": \"PolicyDefinitionRequestDto\",\r\n \"@id\": \"{{policyId}}\",\r\n \"policy\": {\r\n \"@type\": \"Policy\",\r\n \"odrl:permission\": [\r\n {\r\n \"odrl:action\": \"USE\",\r\n \"odrl:constraint\": {\r\n \"@type\": \"AtomicConstraint\",\r\n \"odrl:or\": [\r\n {\r\n \"@type\": \"Constraint\",\r\n \"odrl:leftOperand\": \"Membership\",\r\n \"odrl:operator\": {\r\n \"@id\": \"odrl:eq\"\r\n },\r\n \"odrl:rightOperand\": \"active\"\r\n },\r\n {\r\n \"@type\": \"Constraint\",\r\n \"odrl:leftOperand\": \"FrameworkAgreement.sustainability\",\r\n \"odrl:operator\": {\r\n \"@id\": \"odrl:eq\"\r\n },\r\n \"odrl:rightOperand\": \"active\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/policydefinitions", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "policydefinitions"] + } + }, + "response": [] + }, + { + "name": "Get Policy By ID", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/policydefinitions/{{policyId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "policydefinitions", "{{policyId}}"] + } + }, + "response": [] + }, + { + "name": "Get All Policies", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/policydefinitions/request", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "policydefinitions", "request"] + } + }, + "response": [] + }, + { + "name": "3.2 Delete policy", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "url": { + "raw": "{{providerUrl}}/management/v2/policydefinitions/{{policyId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "policydefinitions", "{{policyId}}"] + } + }, + "response": [] + } + ] + }, + { + "name": "4. Contract Definitions", + "item": [ + { + "name": "Create Contract Definition", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {},\r\n \"@id\": \"{{contractDefinitionId}}\",\r\n \"@type\": \"ContractDefinition\",\r\n \"accessPolicyId\": \"{{policyId}}\",\r\n \"contractPolicyId\": \"{{policyId}}\",\r\n \"assetsSelector\": {\r\n \"@type\": \"CriterionDto\",\r\n \"operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"{{assetId}}\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/contractdefinitions", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "contractdefinitions"] + } + }, + "response": [] + }, + { + "name": "Get Contract definition By ID", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/contractdefinitions/{{contractDefinitionId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "contractdefinitions", "{{contractDefinitionId}}"] + } + }, + "response": [] + }, + { + "name": "Get All Contract definitions", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/contractdefinitions/request", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "contractdefinitions", "request"] + } + }, + "response": [] + }, + { + "name": "Delete Contract Definition", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{providerUrl}}/management/v2/contractdefinitions/{{contractDefinitionId}}", + "host": ["{{providerUrl}}"], + "path": ["management", "v2", "contractdefinitions", "{{contractDefinitionId}}"] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Registry", + "item": [ + { + "name": "Create AAS Shell", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "// encode digital twin Id into base 64\r", + "pm.collectionVariables.set(\"base64ShellId\", btoa(pm.collectionVariables.get(\"digitalTwinId\")));" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"description\": [\r\n {\r\n \"language\": \"en\",\r\n \"text\": \"Battery Passport shell descriptor\"\r\n }\r\n ],\r\n \"displayName\": [],\r\n \"globalAssetId\": \"urn:uuid:541ec5a5-9215-12f4-0803-94f456c947df\",\r\n \"idShort\": \"Battery_IMR18650V1\",\r\n \"id\": \"{{digitalTwinId}}\",\r\n \"specificAssetIds\": [\r\n {\r\n \"name\": \"manufacturerPartId\",\r\n \"value\": \"XYZ78901\",\r\n \"externalSubjectId\": {\r\n \"type\": \"ExternalReference\",\r\n \"keys\": [\r\n {\r\n \"type\": \"GlobalReference\",\r\n \"value\": \"PUBLIC_READABLE\"\r\n },\r\n {\r\n \"type\": \"GlobalReference\",\r\n \"value\": \"BPNL00000000CBA5\"\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"partInstanceId\",\r\n \"value\": \"IMR18650V1\",\r\n \"externalSubjectId\": {\r\n \"type\": \"ExternalReference\",\r\n \"keys\": [\r\n {\r\n \"type\": \"GlobalReference\",\r\n \"value\": \"BPNL00000000CBA5\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"submodelDescriptors\": [\r\n {\r\n \"endpoints\": [\r\n {\r\n \"interface\": \"SUBMODEL-3.0\",\r\n \"protocolInformation\": {\r\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/{{digitalTwinSubmodelId}}\",\r\n \"endpointProtocol\": \"HTTP\",\r\n \"endpointProtocolVersion\": [\r\n \"1.1\"\r\n ],\r\n \"subprotocol\": \"DSP\",\r\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\r\n \"subprotocolBodyEncoding\": \"plain\",\r\n \"securityAttributes\": [\r\n {\r\n \"type\": \"NONE\",\r\n \"key\": \"NONE\",\r\n \"value\": \"NONE\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"idShort\": \"batteryPass\",\r\n \"id\": \"{{digitalTwinSubmodelId}}\",\r\n \"semanticId\": {\r\n \"type\": \"ExternalReference\",\r\n \"keys\": [\r\n {\r\n \"type\": \"Submodel\",\r\n \"value\": \"urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass\"\r\n }\r\n ]\r\n },\r\n \"description\": [\r\n {\r\n \"language\": \"en\",\r\n \"text\": \"Battery Passport Submodel\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{registryUrl}}/shell-descriptors", + "host": ["{{registryUrl}}"], + "path": ["shell-descriptors"] + } + }, + "response": [] + }, + { + "name": "Get Shell By ID", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + }, + { + "key": "Edc-Bpn", + "value": "BPNL00000003CRHL", + "type": "default" + } + ], + "url": { + "raw": "{{registryUrl}}/shell-descriptors/{{base64ShellId}}", + "host": ["{{registryUrl}}"], + "path": ["shell-descriptors", "{{base64ShellId}}"] + } + }, + "response": [] + }, + { + "name": "Get Shell Descriptors By Shell ID", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + }, + { + "key": "Edc-Bpn", + "value": "BPNL00000003CRHL", + "type": "default" + } + ], + "url": { + "raw": "{{registryUrl}}/shell-descriptors/{{base64ShellId}}/submodel-descriptors", + "host": ["{{registryUrl}}"], + "path": ["shell-descriptors", "{{base64ShellId}}", "submodel-descriptors"] + } + }, + "response": [] + }, + { + "name": "Get All Shells", + "request": { + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + }, + { + "key": "Edc-Bpn", + "value": "{{bpnNumber}}", + "type": "default" + } + ], + "url": { + "raw": "{{registryUrl}}/shell-descriptors", + "host": ["{{registryUrl}}"], + "path": ["shell-descriptors"] + } + }, + "response": [] + }, + { + "name": "Update AAS Shell", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "// encode digital twin Id into base 64\r", + "pm.collectionVariables.set(\"base64ShellId\", btoa(pm.collectionVariables.get(\"digitalTwinId\")));" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "PUT", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"description\": [\r\n {\r\n \"language\": \"en\",\r\n \"text\": \"Battery Passport shell descriptor\"\r\n }\r\n ],\r\n \"displayName\": [],\r\n \"globalAssetId\": \"urn:uuid:541ec5a5-9215-12f4-0803-94f456c947df\",\r\n \"idShort\": \"Battery_IMR18650V1\",\r\n \"id\": \"{{digitalTwinId}}\",\r\n \"specificAssetIds\": [\r\n {\r\n \"name\": \"manufacturerPartId\",\r\n \"value\": \"XYZ78901\",\r\n \"externalSubjectId\": {\r\n \"type\": \"ExternalReference\",\r\n \"keys\": [\r\n {\r\n \"type\": \"GlobalReference\",\r\n \"value\": \"PUBLIC_READABLE\"\r\n },\r\n {\r\n \"type\": \"GlobalReference\",\r\n \"value\": \"BPNL00000000CBA5\"\r\n }\r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"partInstanceId\",\r\n \"value\": \"IMR18650V1\",\r\n \"externalSubjectId\": {\r\n \"type\": \"ExternalReference\",\r\n \"keys\": [\r\n {\r\n \"type\": \"GlobalReference\",\r\n \"value\": \"BPNL00000000CBA5\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"submodelDescriptors\": [\r\n {\r\n \"endpoints\": [\r\n {\r\n \"interface\": \"SUBMODEL-3.0\",\r\n \"protocolInformation\": {\r\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/{{digitalTwinSubmodelId}}\",\r\n \"endpointProtocol\": \"HTTP\",\r\n \"endpointProtocolVersion\": [\r\n \"1.1\"\r\n ],\r\n \"subprotocol\": \"DSP\",\r\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\r\n \"subprotocolBodyEncoding\": \"plain\",\r\n \"securityAttributes\": [\r\n {\r\n \"type\": \"NONE\",\r\n \"key\": \"NONE\",\r\n \"value\": \"NONE\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \"idShort\": \"batteryPass\",\r\n \"id\": \"{{digitalTwinSubmodelId}}\",\r\n \"semanticId\": {\r\n \"type\": \"ExternalReference\",\r\n \"keys\": [\r\n {\r\n \"type\": \"Submodel\",\r\n \"value\": \"urn:bamm:io.catenax.battery.battery_pass:3.0.1#BatteryPass\"\r\n }\r\n ]\r\n },\r\n \"description\": [\r\n {\r\n \"language\": \"en\",\r\n \"text\": \"Battery Passport Submodel\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{registryUrl}}/shell-descriptors/{{base64ShellId}}", + "host": ["{{registryUrl}}"], + "path": ["shell-descriptors", "{{base64ShellId}}"] + } + }, + "response": [] + }, + { + "name": "Delete AAS Shell", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + }, + { + "key": "Edc-Bpn", + "value": "BPNL00000000CBA5", + "type": "default" + } + ], + "url": { + "raw": "{{registryUrl}}/shell-descriptors/{{base64ShellId}}", + "host": ["{{registryUrl}}"], + "path": ["shell-descriptors", "{{base64ShellId}}"] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "1. Discovery Finder", + "item": [ + { + "name": "1.1. Define Endpoint", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"type\": \"bpn\",\r\n \"description\": \"Service to discover connector endpoints based on bpns\",\r\n \"endpointAddress\": \"https://portal-backend.int.demo.catena-x.net/api/administration/Connectors/discovery\",\r\n \"documentation\": \"https://portal-backend.int.demo.catena-x.net/api/administration/swagger/index.html\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{semanticUrl}}/discoveryfinder/api/administration/connectors/discovery/search", + "host": ["{{semanticUrl}}"], + "path": ["discoveryfinder", "api", "administration", "connectors", "discovery", "search"] + } + }, + "response": [] + }, + { + "name": "1.2. Find Endpoints", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"types\": [\r\n \"bpn\",\r\n \"manufacturerPartId\"\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "https://semantics.int.demo.catena-x.net/discoveryfinder/api/v1.0/administration/connectors/discovery/search", + "protocol": "https", + "host": ["semantics", "int", "demo", "catena-x", "net"], + "path": ["discoveryfinder", "api", "v1.0", "administration", "connectors", "discovery", "search"] + } + }, + "response": [] + }, + { + "name": "1.3. Delete Endpoint", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{semanticUrl}}/discoveryfinder/api/administration/connectors/discovery/{{resourceId}}", + "host": ["{{semanticUrl}}"], + "path": ["discoveryfinder", "api", "administration", "connectors", "discovery", "{{resourceId}}"], + "query": [ + { + "key": "", + "value": null, + "disabled": true + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "2. BPN Discovery", + "item": [ + { + "name": "2.1. Set ID to Single BPN", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"type\": \"manufacturerPartId\",\r\n \"key\": \"XYZ78901\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{semanticUrl}}/bpndiscovery/api/administration/connectors/bpnDiscovery", + "host": ["{{semanticUrl}}"], + "path": ["bpndiscovery", "api", "administration", "connectors", "bpnDiscovery"] + } + }, + "response": [] + }, + { + "name": "2.2. Set IDs to Multiple BPNs", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "[\r\n {\r\n \"type\": \"oenId\",\r\n \"key\": \"oenId-123\"\r\n },\r\n {\r\n \"type\": \"oen\",\r\n \"key\": \"oen-4444\"\r\n },\r\n {\r\n \"type\": \"bpid\",\r\n \"key\": \"bpid-123\"\r\n }\r\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{semanticUrl}}/bpndiscovery/api/administration/connectors/bpnDiscovery/batch", + "host": ["{{semanticUrl}}"], + "path": ["bpndiscovery", "api", "administration", "connectors", "bpnDiscovery", "batch"] + } + }, + "response": [] + }, + { + "name": "2.3. Search BPNs by IDs", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"searchFilter\": [\r\n {\r\n \"type\": \"manufacturerPartId\",\r\n \"keys\": [\r\n \"{{manufacturerPartId}}\"\r\n ]\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{semanticUrl}}/bpndiscovery/api/v1.0/administration/connectors/bpnDiscovery/search", + "host": ["{{semanticUrl}}"], + "path": ["bpndiscovery", "api", "v1.0", "administration", "connectors", "bpnDiscovery", "search"] + } + }, + "response": [] + }, + { + "name": "2.4. Delete BPN", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{semanticUrl}}/bpndiscovery/api/v1.0/administration/connectors/bpnDiscovery/{{resourceId}}", + "host": ["{{semanticUrl}}"], + "path": ["bpndiscovery", "api", "v1.0", "administration", "connectors", "bpnDiscovery", "{{resourceId}}"] + } + }, + "response": [] + } + ] + }, + { + "name": "3. EDC Discovery", + "item": [ + { + "name": "3.1. Find EDC by BPN", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "[\r\n \"{{bpnNumber}}\"\r\n]", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{portalUrl}}/api/administration/connectors/discovery", + "host": ["{{portalUrl}}"], + "path": ["api", "administration", "connectors", "discovery"] + } + }, + "response": [] + } + ] + }, + { + "name": "Consumer EDC APIs", + "item": [ + { + "name": "Registry Asset", + "item": [ + { + "name": "Query Catalog", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"offerId\", jsonResponse[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"@id\"]);\r", + "\r", + "// extract permissions, probihitions and obligations\r", + "pm.collectionVariables.set(\"contractPermissions\", JSON.stringify(jsonResponse[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"odrl:permission\"]));\r", + "pm.collectionVariables.set(\"contractProhibitions\", JSON.stringify(jsonResponse[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"odrl:prohibition\"]));\r", + "pm.collectionVariables.set(\"contractObligations\", JSON.stringify(jsonResponse[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"odrl:obligation\"]));\r", + "\r", + "var permissions = pm.collectionVariables.get(\"contractPermissions\");\r", + "var prohibitions = pm.collectionVariables.get(\"contractProhibitions\");\r", + "var obligations = pm.collectionVariables.get(\"contractObligations\");\r", + "\r", + "if (permissions.length == 0)\r", + " pm.collectionVariables.set(\"contractPermissions\", \"[]\");\r", + "\r", + "if (prohibitions.length == 0)\r", + " pm.collectionVariables.set(\"contractProhibitions\", \"[]\");\r", + "\r", + "if (obligations.length == 0)\r", + " pm.collectionVariables.set(\"contractObligations\", \"[]\");" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"providerUrl\": \"{{providerUrl}}/api/v1/dsp\",\r\n \"querySpec\": {\r\n \"filterExpression\": [\r\n {\r\n \"operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/type\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"data.core.digitalTwinRegistry\"\r\n }\r\n ]\r\n }\r\n}" + }, + "url": { + "raw": "{{consumerUrl}}/management/v2/catalog/request", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "catalog", "request"] + } + }, + "response": [] + }, + { + "name": "Negotiate Contract", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"negotiationId\", jsonResponse[\"@id\"]);" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n\t\"@context\": {\r\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\r\n\t},\r\n\t\"@type\": \"NegotiationInitiateRequestDto\",\r\n\t\"connectorAddress\": \"{{providerUrl}}/api/v1/dsp\",\r\n\t\"protocol\": \"dataspace-protocol-http\",\r\n\t\"connectorId\": \"{{bpnNumber}}\",\r\n\t\"offer\": {\r\n\t\t\"offerId\": \"{{offerId}}\",\r\n\t\t\"assetId\": \"{{registryAssetId}}\",\r\n\t\t\"policy\": {\r\n\t\t\t\"@type\": \"odrl:Set\",\r\n\t\t\t\"odrl:permission\": {{contractPermissions}},\r\n \"odrl:prohibition\": {{contractProhibitions}},\r\n \"odrl:obligation\": {{contractObligations}},\r\n \"odrl:target\": \"{{registryAssetId}}\"\r\n\t\t}\r\n\t}\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/v2/contractnegotiations", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "contractnegotiations"] + } + }, + "response": [] + }, + { + "name": "Get Negotiation Status", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"contractAgreementId\", jsonResponse[\"edc:contractAgreementId\"]);" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/v2/contractnegotiations/{{negotiationId}}", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "contractnegotiations", "{{negotiationId}}"] + } + }, + "response": [] + }, + { + "name": "Initiate Transfer", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"transferId\", jsonResponse[\"@id\"]);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\r\n },\r\n \"assetId\": \"{{registryAssetId}}\",\r\n \"connectorAddress\": \"{{providerUrl}}/api/v1/dsp\",\r\n \"contractId\": \"{{contractAgreementId}}\",\r\n \"connectorId\": \"{{bpnNumber}}\",\r\n \"dataDestination\": {\r\n \"type\": \"HttpProxy\"\r\n },\r\n \"managedResources\": false,\r\n \"privateProperties\": {\r\n \"receiverHttpEndpoint\": \"{{providerUrl}}/endpoint/ebc08cdc-fc22-41e8-9394-81142de0b35a/{{registryAssetId}}\"\r\n },\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"transferType\": {\r\n \"contentType\": \"application/octet-stream\",\r\n \"isFinite\": true\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/v2/transferprocesses", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "transferprocesses"] + } + }, + "response": [] + }, + { + "name": "Get Transfer Status", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{consumerUrl}}/management/v2/transferprocesses/{{transferId}}", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "transferprocesses", "{{transferId}}"] + } + }, + "response": [] + }, + { + "name": "Initiate EDR Negotation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Body matches string\", function () {", + " var jsonData = pm.response.json();", + " pm.collectionVariables.set(\"edrNegotiationId\", jsonData[\"@id\"]);", + "", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n\t\"@context\": {\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t},\n\t\"@type\": \"NegotiationInitiateRequestDto\",\n\t\"connectorAddress\": \"{{providerUrl}}/api/v1/dsp\",\n\t\"protocol\": \"dataspace-protocol-http\",\n\t\"connectorId\": \"{{bpnNumber}}\",\n\t\"providerId\": \"{{bpnNumber}}\",\n\t\"offer\": {\n\t\t\"offerId\": \"{{offerId}}\",\n\t\t\"assetId\": \"{{registryAssetId}}\",\n\t\t\"policy\": {\n\t\t\t\"@type\": \"odrl:Set\",\n\t\t\t\"odrl:permission\": {{contractPermissions}},\n \"odrl:prohibition\": {{contractProhibitions}},\n \"odrl:obligation\": {{contractObligations}},\n \"odrl:target\": \"{{registryAssetId}}\"\n\t\t}\n\t}\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/edrs", + "host": ["{{consumerUrl}}"], + "path": ["management", "edrs"] + } + }, + "response": [] + }, + { + "name": "Query EDRs Cached", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var jsonData = pm.response.json();", + "pm.collectionVariables.set(\"transferProcessId\", jsonData.at(-1)[\"edc:transferProcessId\"]);", + "" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/edrs?assetId={{registryAssetId}}", + "host": ["{{consumerUrl}}"], + "path": ["management", "edrs"], + "query": [ + { + "key": "assetId", + "value": "{{registryAssetId}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Get Auth Code", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var jsonData = pm.response.json();", + "pm.collectionVariables.set(\"authCode\", jsonData[\"edc:authCode\"]);", + "pm.collectionVariables.set(\"dataplanePublicEndpoint\", jsonData[\"edc:endpoint\"]);", + "" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/edrs/{{transferProcessId}}", + "host": ["{{consumerUrl}}"], + "path": ["management", "edrs", "{{transferProcessId}}"] + } + }, + "response": [] + }, + { + "name": "Get All Shells", + "request": { + "auth": { + "type": "noauth" + }, + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "{{authCode}}", + "type": "default" + } + ], + "url": { + "raw": "{{dataplanePublicEndpoint}}/shell-descriptors", + "host": ["{{dataplanePublicEndpoint}}"], + "path": ["shell-descriptors"] + } + }, + "response": [] + }, + { + "name": "Lookup Shells - DEPRECATED", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default", + "disabled": true + }, + { + "key": "Authorization", + "value": "{{authCode}}", + "type": "default" + }, + { + "key": "Edc-Bpn", + "value": "BPNL00000000CBA5", + "type": "default", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"query\": {\r\n \"assetIds\": [\r\n {\r\n \"name\": \"partInstanceId\",\r\n \"value\": \"BAT-XYZ789\"\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{dataplanePublicEndpoint}}/lookup/shells/query", + "host": ["{{dataplanePublicEndpoint}}"], + "path": ["lookup", "shells", "query"] + } + }, + "response": [] + }, + { + "name": "Lookup Shells", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "auth": { + "type": "noauth" + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default", + "disabled": true + }, + { + "key": "Authorization", + "value": "{{authCode}}", + "type": "default" + }, + { + "key": "Edc-Bpn", + "value": "BPNL00000000CBA5", + "type": "default", + "disabled": true + } + ], + "url": { + "raw": "{{dataplanePublicEndpoint}}/lookup/shells?assetIds=[{\"name\":\"partInstanceId\",\"value\":\"BAT-XYZ789\"}]", + "host": ["{{dataplanePublicEndpoint}}"], + "path": ["lookup", "shells"], + "query": [ + { + "key": "assetIds", + "value": "[{\"name\":\"partInstanceId\",\"value\":\"BAT-XYZ789\"}]" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Data Asset", + "item": [ + { + "name": "Query Catalog", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"offerId\", jsonResponse[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"@id\"]);\r", + "\r", + "// extract permissions, probihitions and obligations\r", + "pm.collectionVariables.set(\"contractPermissions\", JSON.stringify(jsonResponse[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"odrl:permission\"]));\r", + "pm.collectionVariables.set(\"contractProhibitions\", JSON.stringify(jsonResponse[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"odrl:prohibition\"]));\r", + "pm.collectionVariables.set(\"contractObligations\", JSON.stringify(jsonResponse[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"odrl:obligation\"]));\r", + "\r", + "var permissions = pm.collectionVariables.get(\"contractPermissions\");\r", + "var prohibitions = pm.collectionVariables.get(\"contractProhibitions\");\r", + "var obligations = pm.collectionVariables.get(\"contractObligations\");\r", + "\r", + "if (permissions.length == 0)\r", + " pm.collectionVariables.set(\"contractPermissions\", \"[]\");\r", + "\r", + "if (prohibitions.length == 0)\r", + " pm.collectionVariables.set(\"contractProhibitions\", \"[]\");\r", + "\r", + "if (obligations.length == 0)\r", + " pm.collectionVariables.set(\"contractObligations\", \"[]\");" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"providerUrl\": \"{{providerUrl}}/api/v1/dsp\",\r\n \"querySpec\": {\r\n \"filterExpression\": [\r\n {\r\n \"operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"{{assetId}}\"\r\n }\r\n ]\r\n }\r\n}" + }, + "url": { + "raw": "{{consumerUrl}}/management/v2/catalog/request", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "catalog", "request"] + } + }, + "response": [] + }, + { + "name": "Negotiate Contract", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"negotiationId\", jsonResponse[\"@id\"]);" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\r\n },\r\n \"@type\": \"NegotiationInitiateRequestDto\",\r\n \"connectorAddress\": \"{{providerUrl}}/api/v1/dsp\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"connectorId\": \"{{bpnNumber}}\",\r\n \"offer\": {\r\n \"offerId\": \"{{offerId}}\",\r\n \"assetId\": \"{{assetId}}\",\r\n \"policy\": {\r\n \"@type\": \"odrl:Set\",\r\n \"odrl:permission\": {{contractPermissions}},\r\n \"odrl:prohibition\": {{contractProhibitions}},\r\n \"odrl:obligation\": {{contractObligations}},\r\n \"odrl:target\": \"{{assetId}}\"\r\n }\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/v2/contractnegotiations", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "contractnegotiations"] + } + }, + "response": [] + }, + { + "name": "Get Negotiation Status", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"contractAgreementId\", jsonResponse[\"edc:contractAgreementId\"]);" + ], + "type": "text/javascript" + } + }, + { + "listen": "prerequest", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/v2/contractnegotiations/{{negotiationId}}", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "contractnegotiations", "{{negotiationId}}"] + } + }, + "response": [] + }, + { + "name": "Initiate Transfer", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"transferId\", jsonResponse[\"@id\"]);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\r\n },\r\n \"assetId\": \"{{assetId}}\",\r\n \"connectorAddress\": \"{{providerUrl}}/api/v1/dsp\",\r\n \"contractId\": \"{{contractAgreementId}}\",\r\n \"connectorId\": \"{{bpnNumber}}\",\r\n \"dataDestination\": {\r\n \"type\": \"HttpProxy\"\r\n },\r\n \"managedResources\": false,\r\n \"privateProperties\": {\r\n \"receiverHttpEndpoint\": \"{{providerUrl}}/endpoint/ebc08cdc-fc22-41e8-9394-81142de0b35a/{{assetId}}\"\r\n },\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"transferType\": {\r\n \"contentType\": \"application/octet-stream\",\r\n \"isFinite\": true\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/v2/transferprocesses", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "transferprocesses"] + } + }, + "response": [] + }, + { + "name": "Get Transfer Status", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{consumerUrl}}/management/v2/transferprocesses/{{transferId}}", + "host": ["{{consumerUrl}}"], + "path": ["management", "v2", "transferprocesses", "{{transferId}}"] + } + }, + "response": [] + }, + { + "name": "Initiate EDR Negotation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Body matches string\", function () {", + " var jsonData = pm.response.json();", + " pm.collectionVariables.set(\"edrNegotiationId\", jsonData[\"@id\"]);", + "", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"NegotiationInitiateRequestDto\",\n \"connectorAddress\": \"{{providerUrl}}/api/v1/dsp\",\n \"protocol\": \"dataspace-protocol-http\",\n \"connectorId\": \"{{bpnNumber}}\",\n \"providerId\": \"{{bpnNumber}}\",\n \"offer\": {\n \"offerId\": \"{{offerId}}\",\n \"assetId\": \"{{assetId}}\",\n \"policy\": {\n \"@type\": \"odrl:Set\",\n \"odrl:permission\": {{contractPermissions}},\n \"odrl:prohibition\": {{contractProhibitions}},\n \"odrl:obligation\": {{contractObligations}},\n \"odrl:target\": \"{{registryAssetId}}\"\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/edrs", + "host": ["{{consumerUrl}}"], + "path": ["management", "edrs"] + } + }, + "response": [] + }, + { + "name": "Query EDRs Cached", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var jsonData = pm.response.json();", + "pm.collectionVariables.set(\"transferProcessId\", jsonData.at(-1)[\"edc:transferProcessId\"]);", + "" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{consumerUrl}}/management/edrs?assetId={{assetId}}", + "host": ["{{consumerUrl}}"], + "path": ["management", "edrs"], + "query": [ + { + "key": "assetId", + "value": "{{assetId}}" + } + ] + } + }, + "response": [] + }, + { + "name": "Get Auth Code", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var jsonData = pm.response.json();", + "pm.collectionVariables.set(\"authCode\", jsonData[\"edc:authCode\"]);", + "pm.collectionVariables.set(\"dataplanePublicEndpoint\", jsonData[\"edc:endpoint\"]);", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{APIKey}}", + "type": "string" + }, + { + "key": "key", + "value": "X-Api-Key", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{consumerUrl}}/management/edrs/{{transferProcessId}}", + "host": ["{{consumerUrl}}"], + "path": ["management", "edrs", "{{transferProcessId}}"] + } + }, + "response": [] + }, + { + "name": "Get data", + "request": { + "auth": { + "type": "noauth" + }, + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "{{authCode}}", + "type": "default" + } + ], + "url": { + "raw": "{{dataplanePublicEndpoint}}/data/{{digitalTwinSubmodelId}}", + "host": ["{{dataplanePublicEndpoint}}"], + "path": ["data", "{{digitalTwinSubmodelId}}"] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "DPP Backend", + "item": [ + { + "name": "Data Retrieval", + "item": [ + { + "name": "1. Create Process", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"processId\", jsonResponse.data.processId);" + ], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "", + "type": "default", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n\r\n \"id\": \"{{manufacturerPartId}}\"\r\n\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{serverUrl}}/api/contract/create", + "host": ["{{serverUrl}}"], + "path": ["api", "contract", "create"] + } + }, + "response": [] + }, + { + "name": "2. Search Contract", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"token\", jsonResponse.data.token);\r", + "pm.collectionVariables.set(\"processId\", jsonResponse.data.id);\r", + "pm.collectionVariables.set(\"contractId\", jsonResponse.data.contract['@id']);\r", + "pm.collectionVariables.set(\"selectedpolicyId\", jsonResponse.data.contract['odrl:hasPolicy']['@id']);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"id\": \"BAT-XYZ789\",\r\n \"processId\": \"{{processId}}\",\r\n \"idType\": \"partInstanceId\",\r\n \"semanticId\": \"urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport\",\r\n \"children\": true\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{serverUrl}}/api/contract/search", + "host": ["{{serverUrl}}"], + "path": ["api", "contract", "search"] + } + }, + "response": [] + }, + { + "name": "3.1. Agree Contract", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"processId\": \"{{processId}}\",\r\n \"contractId\": \"{{contractId}}\",\r\n \"token\": \"{{token}}\",\r\n \"policyId\": {{selectedpolicyId}}\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{serverUrl}}/api/contract/agree", + "host": ["{{serverUrl}}"], + "path": ["api", "contract", "agree"] + } + }, + "response": [] + }, + { + "name": "3.1. Sign Contract - DEPRECATED", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"processId\": \"{{processId}}\",\r\n \"contractId\": \"{{contractId}}\",\r\n \"token\": \"{{token}}\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{serverUrl}}/api/contract/sign", + "host": ["{{serverUrl}}"], + "path": ["api", "contract", "sign"] + } + }, + "response": [] + }, + { + "name": "3.2 Decline Contract", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"processId\": \"{{processId}}\",\r\n \"contractId\": \"{{contractId}}\",\r\n \"token\": \"{{token}}\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{serverUrl}}/api/contract/decline", + "host": ["{{serverUrl}}"], + "path": ["api", "contract", "decline"] + } + }, + "response": [] + }, + { + "name": "3.3 Cancel Contract", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"processId\": \"{{processId}}\",\r\n \"contractId\": \"{{contractId}}\",\r\n \"token\": \"{{token}}\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{serverUrl}}/api/contract/cancel", + "host": ["{{serverUrl}}"], + "path": ["api", "contract", "cancel"] + } + }, + "response": [] + }, + { + "name": "4. Get Contract Status", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{serverUrl}}/api/contract/status/{{processId}}", + "host": ["{{serverUrl}}"], + "path": ["api", "contract", "status", "{{processId}}"] + } + }, + "response": [] + }, + { + "name": "5. Retrieve Passport", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"processId\": \"{{processId}}\",\r\n \"contractId\": \"{{contractId}}\",\r\n \"token\": \"{{token}}\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{serverUrl}}/api/data", + "host": ["{{serverUrl}}"], + "path": ["api", "data"] + } + }, + "response": [] + } + ] + }, + { + "name": "IRS", + "item": [ + { + "name": "Get Tree", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "", + "type": "default", + "disabled": true + } + ], + "url": { + "raw": "{{serverUrl}}/api/irs/{{processId}}/tree", + "host": ["{{serverUrl}}"], + "path": ["api", "irs", "{{processId}}", "tree"] + } + }, + "response": [ + { + "name": "Get Complete Tree", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "", + "type": "default", + "disabled": true + } + ], + "url": { + "raw": "{{serverUrl}}/api/irs/48226cd1-bf65-4752-9382-53fa0819097a/tree", + "host": ["{{serverUrl}}"], + "path": ["api", "irs", "48226cd1-bf65-4752-9382-53fa0819097a", "tree"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Tue, 02 Jan 2024 16:35:08 GMT" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Vary", + "value": "Origin" + }, + { + "key": "Vary", + "value": "Access-Control-Request-Method" + }, + { + "key": "Vary", + "value": "Access-Control-Request-Headers" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET, POST, OPTIONS" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15724800; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"status\": 200,\n \"data\": {\n \"urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d\": {\n \"id\": \"urn:uuid:ecb4baf7-fd41-e8ec-eb3f-e8c843fc6dde\",\n \"globalAssetId\": \"urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d\",\n \"idShort\": \"Battery_BAT-XYZ789\",\n \"searchId\": \"CX:XYZ78901:BAT-XYZ789\",\n \"path\": \"/urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d\",\n \"digitalTwin\": {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"Battery Digital Twin\"\n }\n ],\n \"idShort\": \"Battery_BAT-XYZ789\",\n \"globalAssetId\": \"urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d\",\n \"displayName\": [],\n \"id\": \"urn:uuid:ecb4baf7-fd41-e8ec-eb3f-e8c843fc6dde\",\n \"specificAssetIds\": [\n {\n \"supplementalSemanticIds\": [],\n \"name\": \"manufacturerPartId\",\n \"value\": \"XYZ78901\",\n \"externalSubjectId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"GlobalReference\",\n \"value\": \"BPNL00000000CBA5\"\n },\n {\n \"type\": \"GlobalReference\",\n \"value\": \"PUBLIC_READABLE\"\n }\n ]\n }\n },\n {\n \"supplementalSemanticIds\": [],\n \"name\": \"partInstanceId\",\n \"value\": \"BAT-XYZ789\",\n \"externalSubjectId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"GlobalReference\",\n \"value\": \"BPNL00000000CBA5\"\n }\n ]\n }\n }\n ],\n \"submodelDescriptors\": [\n {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"single level Bom As Built Submodel\"\n }\n ],\n \"idShort\": \"singleLevelBomAsBuilt\",\n \"supplementalSemanticId\": [],\n \"id\": \"urn:uuid:f282f022-e887-1e47-cb56-52780b19ab1b\",\n \"semanticId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"Submodel\",\n \"value\": \"urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt\"\n }\n ]\n },\n \"endpoints\": [\n {\n \"interface\": \"SUBMODEL-3.0\",\n \"protocolInformation\": {\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:f282f022-e887-1e47-cb56-52780b19ab1b\",\n \"endpointProtocol\": \"HTTP\",\n \"subprotocol\": \"DSP\",\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\n \"subprotocolBodyEncoding\": \"plain\",\n \"securityAttributes\": [\n {\n \"type\": \"NONE\",\n \"key\": \"NONE\",\n \"value\": \"NONE\"\n }\n ],\n \"endpointProtocolVersion\": [\n \"1.1\"\n ]\n }\n }\n ]\n },\n {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"Digital Product Pass Submodel\"\n }\n ],\n \"idShort\": \"digitalProductPass\",\n \"supplementalSemanticId\": [],\n \"id\": \"urn:uuid:00bcb16f-7e04-e906-183f-0391b444719f\",\n \"semanticId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"Submodel\",\n \"value\": \"urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport\"\n }\n ]\n },\n \"endpoints\": [\n {\n \"interface\": \"SUBMODEL-3.0\",\n \"protocolInformation\": {\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:00bcb16f-7e04-e906-183f-0391b444719f\",\n \"endpointProtocol\": \"HTTP\",\n \"subprotocol\": \"DSP\",\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\n \"subprotocolBodyEncoding\": \"plain\",\n \"securityAttributes\": [\n {\n \"type\": \"NONE\",\n \"key\": \"NONE\",\n \"value\": \"NONE\"\n }\n ],\n \"endpointProtocolVersion\": [\n \"1.1\"\n ]\n }\n }\n ]\n },\n {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"Battery SerialPart Submodel\"\n }\n ],\n \"idShort\": \"SerialPart\",\n \"supplementalSemanticId\": [],\n \"id\": \"urn:uuid:094d0958-71e5-15a2-6a75-859dbed6ae03\",\n \"semanticId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"Submodel\",\n \"value\": \"urn:bamm:io.catenax.serial_part:1.0.1#SerialPart\"\n }\n ]\n },\n \"endpoints\": [\n {\n \"interface\": \"SUBMODEL-3.0\",\n \"protocolInformation\": {\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:094d0958-71e5-15a2-6a75-859dbed6ae03\",\n \"endpointProtocol\": \"HTTP\",\n \"subprotocol\": \"DSP\",\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\n \"subprotocolBodyEncoding\": \"plain\",\n \"securityAttributes\": [\n {\n \"type\": \"NONE\",\n \"key\": \"NONE\",\n \"value\": \"NONE\"\n }\n ],\n \"endpointProtocolVersion\": [\n \"1.1\"\n ]\n }\n }\n ]\n }\n ]\n },\n \"children\": {\n \"urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552\": {\n \"id\": \"urn:uuid:71ca1b9a-377f-adc2-78f0-c425e22d5ef4\",\n \"globalAssetId\": \"urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552\",\n \"idShort\": \"BatteryModule_EVMODULE-TRJ712\",\n \"searchId\": \"CX:XYZ78901:EVMODULE-TRJ712\",\n \"path\": \"/urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d/urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552\",\n \"digitalTwin\": {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"Battery Module Digital Twin\"\n }\n ],\n \"idShort\": \"BatteryModule_EVMODULE-TRJ712\",\n \"globalAssetId\": \"urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552\",\n \"id\": \"urn:uuid:71ca1b9a-377f-adc2-78f0-c425e22d5ef4\",\n \"specificAssetIds\": [\n {\n \"name\": \"manufacturerPartId\",\n \"value\": \"XYZ78901\"\n },\n {\n \"name\": \"partInstanceId\",\n \"value\": \"EVMODULE-TRJ712\"\n }\n ],\n \"submodelDescriptors\": [\n {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"Digital Product Pass Submodel\"\n }\n ],\n \"idShort\": \"digitalProductPass\",\n \"id\": \"urn:uuid:56dfd4d2-bdd4-07ae-4f72-6b2ba0d1e5fc\",\n \"semanticId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"Submodel\",\n \"value\": \"urn:bamm:io.catenax.generic.digital_product_passport:1.0.0#DigitalProductPassport\"\n }\n ]\n },\n \"endpoints\": [\n {\n \"interface\": \"SUBMODEL-3.0\",\n \"protocolInformation\": {\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:56dfd4d2-bdd4-07ae-4f72-6b2ba0d1e5fc\",\n \"endpointProtocol\": \"HTTP\",\n \"subprotocol\": \"DSP\",\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\n \"subprotocolBodyEncoding\": \"plain\",\n \"endpointProtocolVersion\": [\n \"1.1\"\n ]\n }\n }\n ]\n },\n {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"Single level Bom As Built Submodel\"\n }\n ],\n \"idShort\": \"singleLevelBomAsBuilt\",\n \"id\": \"urn:uuid:0c994360-1f99-e7f9-8a72-10665d00b100\",\n \"semanticId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"Submodel\",\n \"value\": \"urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt\"\n }\n ]\n },\n \"endpoints\": [\n {\n \"interface\": \"SUBMODEL-3.0\",\n \"protocolInformation\": {\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:0c994360-1f99-e7f9-8a72-10665d00b100\",\n \"endpointProtocol\": \"HTTP\",\n \"subprotocol\": \"DSP\",\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\n \"subprotocolBodyEncoding\": \"plain\",\n \"endpointProtocolVersion\": [\n \"1.1\"\n ]\n }\n }\n ]\n },\n {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"Single level usage As Built Submodel\"\n }\n ],\n \"idShort\": \"SingleLevelUsageAsBuilt\",\n \"id\": \"urn:uuid:920629df-44b5-ba30-f264-fa52835e6e55\",\n \"semanticId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"Submodel\",\n \"value\": \"urn:bamm:io.catenax.single_level_usage_as_built:1.0.1#SingleLevelUsageAsBuilt\"\n }\n ]\n },\n \"endpoints\": [\n {\n \"interface\": \"SUBMODEL-3.0\",\n \"protocolInformation\": {\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:920629df-44b5-ba30-f264-fa52835e6e55\",\n \"endpointProtocol\": \"HTTP\",\n \"subprotocol\": \"DSP\",\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\n \"subprotocolBodyEncoding\": \"plain\",\n \"endpointProtocolVersion\": [\n \"1.1\"\n ]\n }\n }\n ]\n },\n {\n \"description\": [\n {\n \"language\": \"en\",\n \"text\": \"Battery Module SerialPart Submodel\"\n }\n ],\n \"idShort\": \"SerialPart\",\n \"id\": \"urn:uuid:066532a1-a7c8-2177-3892-8e72d85fe832\",\n \"semanticId\": {\n \"type\": \"ExternalReference\",\n \"keys\": [\n {\n \"type\": \"Submodel\",\n \"value\": \"urn:bamm:io.catenax.serial_part:1.0.1#SerialPart\"\n }\n ]\n },\n \"endpoints\": [\n {\n \"interface\": \"SUBMODEL-3.0\",\n \"protocolInformation\": {\n \"href\": \"https://materialpass.int.demo.catena-x.net/BPNL000000000000/api/public/data/urn:uuid:066532a1-a7c8-2177-3892-8e72d85fe832\",\n \"endpointProtocol\": \"HTTP\",\n \"subprotocol\": \"DSP\",\n \"subprotocolBody\": \"id=urn:uuid:748cf682-6747-33cb-630b-c35a29970f27;dspEndpoint=https://materialpass.int.demo.catena-x.net/BPNL000000000000\",\n \"subprotocolBodyEncoding\": \"plain\",\n \"endpointProtocolVersion\": [\n \"1.1\"\n ]\n }\n }\n ]\n }\n ]\n },\n \"children\": {}\n }\n }\n }\n }\n}" + } + ] + }, + { + "name": "Get State", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "", + "type": "default", + "disabled": true + } + ], + "url": { + "raw": "{{serverUrl}}/api/irs/{{processId}}/state", + "host": ["{{serverUrl}}"], + "path": ["api", "irs", "{{processId}}", "state"] + } + }, + "response": [ + { + "name": "Get Completed State", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "", + "type": "default", + "disabled": true + } + ], + "url": { + "raw": "{{serverUrl}}/api/irs/48226cd1-bf65-4752-9382-53fa0819097a/state", + "host": ["{{serverUrl}}"], + "path": ["api", "irs", "48226cd1-bf65-4752-9382-53fa0819097a", "state"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Tue, 02 Jan 2024 16:34:43 GMT" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Vary", + "value": "Origin" + }, + { + "key": "Vary", + "value": "Access-Control-Request-Method" + }, + { + "key": "Vary", + "value": "Access-Control-Request-Headers" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET, POST, OPTIONS" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15724800; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"message\": \"[1] children found\",\n \"status\": 200,\n \"data\": {\n \"jobId\": \"1f9c7b72-4194-4824-b6ca-2e0c9ee529dd\",\n \"searchId\": \"42a0c3c1ecbea7b6401fa151aca5db9d\",\n \"globalAssetId\": \"urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d\",\n \"path\": \"/urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d\",\n \"created\": 1704211514104,\n \"updated\": 1704212088613,\n \"children\": 1\n }\n}" + } + ] + }, + { + "name": "Get Components", + "event": [ + { + "listen": "test", + "script": { + "exec": [""], + "type": "text/javascript" + } + } + ], + "protocolProfileBehavior": { + "disabledSystemHeaders": {} + }, + "request": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "", + "type": "default", + "disabled": true + } + ], + "url": { + "raw": "{{serverUrl}}/api/irs/{{processId}}/components", + "host": ["{{serverUrl}}"], + "path": ["api", "irs", "{{processId}}", "components"] + } + }, + "response": [ + { + "name": "Get All Components", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "", + "type": "default", + "disabled": true + } + ], + "url": { + "raw": "{{serverUrl}}/api/irs/48226cd1-bf65-4752-9382-53fa0819097a/components", + "host": ["{{serverUrl}}"], + "path": ["api", "irs", "48226cd1-bf65-4752-9382-53fa0819097a", "components"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Date", + "value": "Tue, 02 Jan 2024 16:34:55 GMT" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Vary", + "value": "Origin" + }, + { + "key": "Vary", + "value": "Access-Control-Request-Method" + }, + { + "key": "Vary", + "value": "Access-Control-Request-Headers" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Access-Control-Allow-Methods", + "value": "GET, POST, OPTIONS" + }, + { + "key": "Strict-Transport-Security", + "value": "max-age=15724800; includeSubDomains" + } + ], + "cookie": [], + "body": "{\n \"status\": 200,\n \"data\": [\n {\n \"id\": \"urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d\",\n \"name\": \"Battery_BAT-XYZ789\",\n \"searchId\": \"CX:XYZ78901:BAT-XYZ789\",\n \"path\": \"/urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d\",\n \"children\": [\n {\n \"id\": \"urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552\",\n \"name\": \"BatteryModule_EVMODULE-TRJ712\",\n \"searchId\": \"CX:XYZ78901:EVMODULE-TRJ712\",\n \"path\": \"/urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d/urn:uuid:d8ec6acc-1ad7-47b4-bc7e-612122d9d552\",\n \"children\": []\n }\n ]\n }\n ]\n}" + } + ] + } + ] + } + ], + "auth": { + "type": "oauth2", + "oauth2": [ + { + "key": "accessTokenUrl", + "value": "https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token", + "type": "string" + }, + { + "key": "redirect_uri", + "value": "https://materialpass.int.demo.catena-x.net", + "type": "string" + }, + { + "key": "authUrl", + "value": "https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/auth", + "type": "string" + }, + { + "key": "grant_type", + "value": "authorization_code", + "type": "string" + }, + { + "key": "scope", + "value": "openid", + "type": "string" + }, + { + "key": "clientId", + "value": "Cl13-CX-Battery", + "type": "string" + }, + { + "key": "useBrowser", + "value": false, + "type": "boolean" + }, + { + "key": "clientSecret", + "value": "", + "type": "string" + }, + { + "key": "password", + "value": "", + "type": "string" + }, + { + "key": "username", + "value": "", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [""] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [""] + } + } + ] + } + ], + "auth": { + "type": "oauth2", + "oauth2": [ + { + "key": "grant_type", + "value": "client_credentials", + "type": "string" + }, + { + "key": "scope", + "value": "", + "type": "string" + }, + { + "key": "clientSecret", + "value": "{{clientSecret}}", + "type": "string" + }, + { + "key": "clientId", + "value": "{{clientId}}", + "type": "string" + }, + { + "key": "useBrowser", + "value": false, + "type": "boolean" + }, + { + "key": "accessTokenUrl", + "value": "https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token", + "type": "string" + }, + { + "key": "redirect_uri", + "value": "http://localhost:8080", + "type": "string" + }, + { + "key": "challengeAlgorithm", + "value": "S256", + "type": "string" + }, + { + "key": "authUrl", + "value": "https://centralidp.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/auth", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + }, + { + "key": "client_authentication", + "value": "header", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [""] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [""] + } + } + ], + "variable": [ + { + "key": "digitalTwinId", + "value": "urn:uuid:df0d2452-b6a0-52c4-713c-00c157e0d3d7", + "type": "default" + }, + { + "key": "digitalTwinSubmodelId", + "value": "urn:uuid:79f4649a-ce85-bda6-fcb4-a172df0beba8", + "type": "default" + }, + { + "key": "clientId", + "value": "", + "type": "default" + }, + { + "key": "clientSecret", + "value": "", + "type": "default" + }, + { + "key": "APIKey", + "value": "", + "type": "default" + }, + { + "key": "assetId", + "value": "urn:uuid:748cf682-6747-33cb-630b-c35a29970f27", + "type": "default" + }, + { + "key": "policyId", + "value": "dpp-policy-id", + "type": "default" + }, + { + "key": "contractDefinitionId", + "value": "d8cbbca9-88a6-ce89-96d8-f00db467c4f3", + "type": "default" + }, + { + "key": "registryAssetId", + "value": "registry-asset", + "type": "default" + }, + { + "key": "registryUrl", + "value": "https://materialpass.int.demo.catena-x.net/semantics/registry/api/v3.0", + "type": "default" + }, + { + "key": "registryPolicyId", + "value": "default-policy", + "type": "default" + }, + { + "key": "registryContractDefinitionId", + "value": "default-contract-definition", + "type": "default" + }, + { + "key": "serverUrl", + "value": "https://dpp.int.demo.catena-x.net" + }, + { + "key": "submodelServer", + "value": "https://materialpass.int.demo.catena-x.net/provider_backend", + "type": "default" + }, + { + "key": "providerUrl", + "value": "https://materialpass.int.demo.catena-x.net/BPNL000000000000", + "type": "default" + }, + { + "key": "consumerUrl", + "value": "https://materialpass.int.demo.catena-x.net/consumer", + "type": "default" + }, + { + "key": "semanticUrl", + "value": "https://semantics.int.demo.catena-x.net", + "type": "default" + }, + { + "key": "portalUrl", + "value": "https://portal-backend.int.demo.catena-x.net", + "type": "default" + }, + { + "key": "bpnNumber", + "value": "", + "type": "string" + }, + { + "key": "manufacturerPartId", + "value": "XYZ78901", + "type": "default" + }, + { + "key": "negotiationId", + "value": "", + "type": "default" + }, + { + "key": "transferId", + "value": "", + "type": "default" + }, + { + "key": "contractAgreementId", + "value": "", + "type": "default" + }, + { + "key": "transferProcessId", + "value": "", + "type": "default" + }, + { + "key": "token", + "value": "" + }, + { + "key": "processId", + "value": "" + }, + { + "key": "contractId", + "value": "" + }, + { + "key": "resourceId", + "value": "", + "type": "default" + }, + { + "key": "bpnResourceId", + "value": "", + "type": "default" + }, + { + "key": "offerId", + "value": "", + "type": "default" + }, + { + "key": "edrNegotiationId", + "value": "", + "type": "default" + }, + { + "key": "authCode", + "value": "", + "type": "default" + }, + { + "key": "dataplanePublicEndpoint", + "value": "", + "type": "default" + }, + { + "key": "base64ShellId", + "value": "", + "type": "default" + }, + { + "key": "contractPermissions", + "value": "", + "type": "default" + }, + { + "key": "contractProhibitions", + "value": "", + "type": "default" + }, + { + "key": "contractObligations", + "value": "", + "type": "default" + }, + { + "key": "selectedpolicyId", + "value": "", + "type": "default" + } + ] +} diff --git a/deployment/local/postman/IRS/DPP-IRS.postman_collection.json b/deployment/local/postman/IRS/DPP-IRS.postman_collection.json new file mode 100644 index 000000000..8307b4f92 --- /dev/null +++ b/deployment/local/postman/IRS/DPP-IRS.postman_collection.json @@ -0,0 +1,283 @@ +{ + "info": { + "_postman_id": "9ba53021-dc0b-49f3-a93c-afd0261bff35", + "name": "DPP-IRS", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Policy Store", + "item": [ + { + "name": "Get all Policies", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{IrsServer}}/irs/policies", + "host": ["{{IrsServer}}"], + "path": ["irs", "policies"] + } + }, + "response": [] + }, + { + "name": "Register Policy", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"policyId\": \"dpp-irs-policy\",\r\n \"validUntil\": \"2026-08-01T00:00:00Z\",\r\n \"permissions\": [\r\n {\r\n \"action\": \"USE\",\r\n \"constraints\": [\r\n {\r\n \"and\": [\r\n {\r\n \"leftOperand\": \"FrameworkAgreement.sustainability\",\r\n \"operator\": \"eq\",\r\n \"rightOperand\": [\r\n \"active\"\r\n ]\r\n },\r\n {\r\n \"leftOperand\": \"Membership\",\r\n \"operator\": \"eq\",\r\n \"rightOperand\": [\r\n \"active\"\r\n ]\r\n },\r\n {\r\n \"leftOperand\": \"BusinessPartnerNumber\",\r\n \"operator\": \"eq\",\r\n \"rightOperand\": [\r\n \"BPNL00000000CBA5\"\r\n ]\r\n }\r\n ],\r\n \"or\": [\r\n {\r\n \"leftOperand\": \"FrameworkAgreement.sustainability\",\r\n \"operator\": \"eq\",\r\n \"rightOperand\": [\r\n \"active\"\r\n ]\r\n },\r\n {\r\n \"leftOperand\": \"Membership\",\r\n \"operator\": \"eq\",\r\n \"rightOperand\": [\r\n \"active\"\r\n ]\r\n },\r\n {\r\n \"leftOperand\": \"BusinessPartnerNumber\",\r\n \"operator\": \"eq\",\r\n \"rightOperand\": [\r\n \"BPNL00000000CBA5\"\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{IrsServer}}/irs/policies", + "host": ["{{IrsServer}}"], + "path": ["irs", "policies"] + } + }, + "response": [] + }, + { + "name": "Delete Policy", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{IrsServer}}/irs/policies/{{policyId}}", + "host": ["{{IrsServer}}"], + "path": ["irs", "policies", "{{policyId}}"] + } + }, + "response": [] + } + ] + }, + { + "name": "IRS", + "item": [ + { + "name": "1. Register Job", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "const jsonResponse = pm.response.json();\r", + "pm.collectionVariables.set(\"jobId\", jsonResponse.id);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n\t\"aspects\": [],\r\n\t\"bomLifecycle\": \"asBuilt\",\r\n\t\"lookupBPNs\": false,\r\n\t\"collectAspects\": false,\r\n\t\"direction\": \"downward\",\r\n\t\"depth\": 1,\r\n\t\"integrityCheck\": false,\r\n\t\"callbackUrl\": \"{{backendServer}}/api/irs/endpoint?id={{globalAssetId}}&state=COMPLETED\",\r\n\t\"key\": {\r\n\t\t\"globalAssetId\": \"{{globalAssetId}}\",\r\n\t\t\"bpn\": \"{{bpn}}\"\r\n\t}\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{irsServer}}/irs/jobs", + "host": ["{{irsServer}}"], + "path": ["irs", "jobs"] + } + }, + "response": [] + }, + { + "name": "2. Get specific Job", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{irsServer}}/irs/jobs/{{jobId}}", + "host": ["{{irsServer}}"], + "path": ["irs", "jobs", "{{jobId}}"] + } + }, + "response": [] + }, + { + "name": "3. Get Jobs", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{irsServer}}/irs/jobs?page=0&size=20", + "host": ["{{irsServer}}"], + "path": ["irs", "jobs"], + "query": [ + { + "key": "page", + "value": "0" + }, + { + "key": "size", + "value": "20" + } + ] + } + }, + "response": [] + }, + { + "name": "Get all available Aspect models", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{irsServer}}/irs/aspectmodels", + "host": ["{{irsServer}}"], + "path": ["irs", "aspectmodels"] + } + }, + "response": [] + } + ] + } + ], + "auth": { + "type": "oauth2", + "oauth2": [ + { + "key": "grant_type", + "value": "client_credentials", + "type": "string" + }, + { + "key": "accessTokenUrl", + "value": "https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token", + "type": "string" + }, + { + "key": "authUrl", + "value": "https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/auth", + "type": "string" + }, + { + "key": "redirect_uri", + "value": "https://materialpass.dev.demo.catena-x.net", + "type": "string" + }, + { + "key": "scope", + "value": "openid profile email", + "type": "string" + }, + { + "key": "clientSecret", + "value": "{{clientSecret}}", + "type": "string" + }, + { + "key": "clientId", + "value": "{{clientId}}", + "type": "string" + }, + { + "key": "challengeAlgorithm", + "value": "S256", + "type": "string" + }, + { + "key": "username", + "value": "", + "type": "string" + }, + { + "key": "password", + "value": "", + "type": "string" + }, + { + "key": "addTokenTo", + "value": "header", + "type": "string" + }, + { + "key": "client_authentication", + "value": "header", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [""] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [""] + } + } + ], + "variable": [ + { + "key": "clientId", + "value": "", + "type": "default" + }, + { + "key": "clientSecret", + "value": "", + "type": "default" + }, + { + "key": "irsServer", + "value": "", + "type": "default" + }, + { + "key": "jobId", + "value": "", + "type": "default" + }, + { + "key": "registryUrl", + "value": "", + "type": "default" + }, + { + "key": "IrsServer", + "value": "https://materialpass-irs.int.demo.catena-x.net", + "type": "default" + }, + { + "key": "policyId", + "value": "", + "type": "default" + }, + { + "key": "globalAssetId", + "value": "urn:uuid:efcb5f8d-f31c-4b1f-b090-9c878054554d", + "type": "default" + }, + { + "key": "bpn", + "value": "", + "type": "default" + }, + { + "key": "backendServer", + "value": "https://dpp.int.demo.catena-x.net", + "type": "default" + } + ] +} diff --git a/postman/README.md b/deployment/local/postman/README.md similarity index 86% rename from postman/README.md rename to deployment/local/postman/README.md index ac76933ed..c1880301c 100644 --- a/postman/README.md +++ b/deployment/local/postman/README.md @@ -26,21 +26,24 @@ This technical guide depicts the digital product pass end-to-end API calls throu ### Components in Digital Product Pass: - Provider + - Submodel Server + - EDC - Registry - Discovery Finder - BPN Discovery - EDC Discovery -- Consumer - - Data transfer -- Backend +- Consumer EDC APIs + - Registry Asset + - Data Asset +- DPP Backend ### Steps to Proceed - Setup up [Postman client](https://www.postman.com/downloads) -- Import the [Digital Product Pass](./v3.0.1/Digital-Product-Pass-collection.json) +- Import the [Digital Product Pass collection](./Digital-Product-Pass-collection.json) -- Configure the following environment variables from the variables tab inside root directory. +- Configure the following environment variables from the variables tab inside the root directory. - ***APIKey*** - ***clientId*** diff --git a/deployment/local/scripts/init-values.sh b/deployment/local/scripts/init-values.sh new file mode 100644 index 000000000..ea66d911e --- /dev/null +++ b/deployment/local/scripts/init-values.sh @@ -0,0 +1,259 @@ +#!/bin/bash +################################################################################# +# Catena-X - Digital Product Pass Application +# +# Copyright (c) 2022, 2024 BASF SE, BMW AG, Henkel AG & Co. KGaA +# Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +# either express or implied. See the +# License for the specific language govern in permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################## + + +set -o errexit +set -o errtrace +set -o pipefail +set -o nounset + +SET_VALUES=$1 +GITHUB_TOKEN=$2 +VAULT_ADDRESS=$3 +DPP_VALUES_FILE="./../../../charts/digital-product-pass/values-dev.yaml" +EDC_CONSUMER_VALUES_FILE="./../../infrastructure/edc-consumer/values.yaml" +EDC_PROVIDER_VALUES_FILE="./../../infrastructure/edc-provider/values.yaml" +REGISTRY_VALUES_FILE="./../../infrastructure/registry/values.yaml" + +export GH_TOKEN=${GITHUB_TOKEN} +export VAULT_ADDR=${VAULT_ADDRESS} + +VALUE="" + +get_value() { + + field_name=$1 + path=$2 + + VALUE=$(vault kv get -field="${field_name}" "${path}") + +} + +echo "Login into Hashicorp vault..." +vault login -method=github token=$GH_TOKEN +echo +echo "Retrieve secrets from Hashicorp vault..." +echo + +get_value "api.key" "material-pass/dev/edc/oauth"; EDC_API_AUTH_KEY=$VALUE +get_value "client.id" "material-pass/dev/edc/oauth"; EDC_OAUTH_CLIENT_ID=$VALUE +get_value "realm" "material-pass/dev/oauth"; REALM=$VALUE +get_value "appId" "material-pass/dev/oauth"; APP_ID=$VALUE +get_value "clientId" "material-pass/dev/backend"; DPP_CLIENT_ID=$VALUE +get_value "clientSecret" "material-pass/dev/backend"; DPP_CLIENT_SECRET=$VALUE +get_value "miwUrl" "material-pass/dev/edc/ssi"; MIW_URL=$VALUE +get_value "authorityId" "material-pass/dev/edc/ssi"; AUTHORITY_ID=$VALUE +get_value "clientId" "material-pass/dev/edc/ssi"; SSI_CLIENT_ID=$VALUE +get_value "user" "material-pass/dev/edc/database"; POSTGRES_DB_USER=$VALUE +get_value "password" "material-pass/dev/edc/database"; POSTGRES_DB_PASSWORD=$VALUE +get_value "bpnNumber" "material-pass/dev/edc/participant"; PARTICIPANT_ID=$VALUE +get_value "vault.hashicorp.url" "material-pass/dev/edc/vault"; VAULT_HASHICORP_URL=$VALUE +get_value "vault.hashicorp.api.secret.path" "material-pass/dev/edc/vault"; VAULT_HASHICORP_SECRET_PATH=$VALUE +get_value "vault.hashicorp.token" "material-pass/dev/edc/vault"; VAULT_HASHICORP_TOKEN=$VALUE +get_value "user" "material-pass/dev/irs/minio"; IRS_MINIO_USER=$VALUE +get_value "password" "material-pass/dev/irs/minio"; IRS_MINIO_PASSWORD=$VALUE +get_value "clientId" "material-pass/dev/irs/keycloak/oauth2"; IRS_KEYCLOAK_CLIENT_ID=$VALUE +get_value "clientSecret" "material-pass/dev/irs/keycloak/oauth2"; IRS_KEYCLOAK_CLIENT_SECRET=$VALUE +get_value "database.user" "material-pass/dev/aasregistry"; REGISTRY_USER=$VALUE +get_value "database.password" "material-pass/dev/aasregistry"; REGISTRY_PASSWORD=$VALUE + + +set_values () { + + ### DIGITAL PRODUCT PASS APP + + echo "Replace client credentials with actual values in digital-product-pass values file..." + echo + sed -i "s||${EDC_API_AUTH_KEY}|g" ${DPP_VALUES_FILE}; + sed -i "s||${PARTICIPANT_ID}|g" ${DPP_VALUES_FILE}; + sed -i "s||${REALM}|g" ${DPP_VALUES_FILE}; + sed -i "s||${APP_ID}|g" ${DPP_VALUES_FILE}; + sed -i "s||${DPP_CLIENT_ID}|g" ${DPP_VALUES_FILE}; + sed -i "s||${DPP_CLIENT_SECRET}|g" ${DPP_VALUES_FILE}; + + ### CONSUMER EDC CONNECTOR + + echo "Replace secrets with actual values in edc-consumer values file..." + echo + + sed -i "s||${PARTICIPANT_ID}|g" ${EDC_CONSUMER_VALUES_FILE}; + + # Postgres DB + sed -i "s||${POSTGRES_DB_USER}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s||${POSTGRES_DB_PASSWORD}|g" ${EDC_CONSUMER_VALUES_FILE}; + + # Hashicorp vault + sed -i "s||${VAULT_HASHICORP_URL}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s||${VAULT_HASHICORP_SECRET_PATH}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s||${VAULT_HASHICORP_TOKEN}|g" ${EDC_CONSUMER_VALUES_FILE}; + + # EDC Oauth + sed -i "s|authKey: |authKey: ${EDC_API_AUTH_KEY}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|secret: |secret: ${EDC_API_AUTH_KEY}|g" ${EDC_CONSUMER_VALUES_FILE}; + + # ssi + sed -i "s||${MIW_URL}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s||${AUTHORITY_ID}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s||${SSI_CLIENT_ID}|g" ${EDC_CONSUMER_VALUES_FILE}; + + # irs + sed -i "s||${IRS_MINIO_USER}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s||${IRS_MINIO_PASSWORD}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s||${IRS_KEYCLOAK_CLIENT_ID}|g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s||${IRS_KEYCLOAK_CLIENT_SECRET}|g" ${EDC_CONSUMER_VALUES_FILE}; + + + ### PROVIDER EDC CONNECTOR + + echo "Replace secrets with actual values in edc-provider values file..." + echo + + sed -i "s||${PARTICIPANT_ID}|g" ${EDC_PROVIDER_VALUES_FILE}; + + # Postgres DB + sed -i "s||${POSTGRES_DB_USER}|g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s||${POSTGRES_DB_PASSWORD}|g" ${EDC_PROVIDER_VALUES_FILE}; + + # Hashicorp vault + sed -i "s||${VAULT_HASHICORP_URL}|g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s||${VAULT_HASHICORP_SECRET_PATH}|g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s||${VAULT_HASHICORP_TOKEN}|g" ${EDC_PROVIDER_VALUES_FILE}; + + # EDC Oauth + sed -i "s|authKey: |authKey: ${EDC_API_AUTH_KEY}|g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s|secret: |secret: ${EDC_API_AUTH_KEY}|g" ${EDC_PROVIDER_VALUES_FILE}; + + + # ssi + sed -i "s||${MIW_URL}|g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s||${AUTHORITY_ID}|g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s||${SSI_CLIENT_ID}|g" ${EDC_PROVIDER_VALUES_FILE}; + + ### PROVIDER REGISTRY + + echo "Replace secrets with actual values in registry values file..." + echo + + # Postgres DB + sed -i "s||${REGISTRY_USER}|g" ${REGISTRY_VALUES_FILE}; + sed -i "s||${REGISTRY_PASSWORD}|g" ${REGISTRY_VALUES_FILE}; +} + +unset_values() { + + ### DIGITAL PRODUCT PASS APP + + echo "Replace actual values with placholders in digital-product-pass values file..." + echo + sed -i "s|${EDC_API_AUTH_KEY}||g" ${DPP_VALUES_FILE}; + sed -i "s|${PARTICIPANT_ID}||g" ${DPP_VALUES_FILE}; + sed -i "s|${REALM}||g" ${DPP_VALUES_FILE}; + sed -i "s|${APP_ID}||g" ${DPP_VALUES_FILE}; + sed -i "s|${DPP_CLIENT_ID}||g" ${DPP_VALUES_FILE}; + sed -i "s|${DPP_CLIENT_SECRET}||g" ${DPP_VALUES_FILE}; + + + ### CONSUMER EDC CONNECTOR + + echo "Replace actual values with placholders in edc-consumer values file..." + echo + + sed -i "s|${PARTICIPANT_ID}||g" ${EDC_CONSUMER_VALUES_FILE}; + + # Postgres DB + sed -i "s|${POSTGRES_DB_USER}||g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|password: ${POSTGRES_DB_PASSWORD}|password: |g" ${EDC_CONSUMER_VALUES_FILE}; + + # Hashicorp vault + sed -i "s|${VAULT_HASHICORP_URL}||g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|${VAULT_HASHICORP_SECRET_PATH}||g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|${VAULT_HASHICORP_TOKEN}||g" ${EDC_CONSUMER_VALUES_FILE}; + + # EDC Oauth + sed -i "s|authKey: ${EDC_API_AUTH_KEY}|authKey: |g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|secret: ${EDC_API_AUTH_KEY}|secret: |g" ${EDC_CONSUMER_VALUES_FILE}; + + # irs + sed -i "s|${IRS_MINIO_USER}||g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|${IRS_MINIO_PASSWORD}||g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|clientId: ${IRS_KEYCLOAK_CLIENT_ID}|clientId: |g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|clientSecret: ${IRS_KEYCLOAK_CLIENT_SECRET}|clientSecret: |g" ${EDC_CONSUMER_VALUES_FILE}; + + # ssi + sed -i "s|${MIW_URL}||g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|${AUTHORITY_ID}||g" ${EDC_CONSUMER_VALUES_FILE}; + sed -i "s|${SSI_CLIENT_ID}||g" ${EDC_CONSUMER_VALUES_FILE}; + + + ### PROVIDER EDC CONNECTOR + + echo "Replace actual values with placholders in edc-provider values file..." + echo + + sed -i "s|${PARTICIPANT_ID}||g" ${EDC_PROVIDER_VALUES_FILE}; + + + # Postgres DB + sed -i "s|${POSTGRES_DB_USER}||g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s|password: ${POSTGRES_DB_PASSWORD}|password: |g" ${EDC_PROVIDER_VALUES_FILE}; + + # Hashicorp vault + sed -i "s|${VAULT_HASHICORP_URL}||g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s|${VAULT_HASHICORP_SECRET_PATH}||g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s|${VAULT_HASHICORP_TOKEN}||g" ${EDC_PROVIDER_VALUES_FILE}; + + # EDC Oauth + sed -i "s|authKey: ${EDC_API_AUTH_KEY}|authKey: |g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s|secret: ${EDC_API_AUTH_KEY}|secret: |g" ${EDC_PROVIDER_VALUES_FILE}; + + # ssi + sed -i "s|${MIW_URL}||g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s|${AUTHORITY_ID}||g" ${EDC_PROVIDER_VALUES_FILE}; + sed -i "s|${SSI_CLIENT_ID}||g" ${EDC_PROVIDER_VALUES_FILE}; + + + ### PROVIDER REGISTRY + + echo "Replace secrets with actual values in registry values file..." + echo + + # Postgres DB + sed -i "s|${REGISTRY_USER}||g" ${REGISTRY_VALUES_FILE}; + sed -i "s|password: ${REGISTRY_PASSWORD}|password: |g" ${REGISTRY_VALUES_FILE}; + + +} + + + if [[ "$1" -eq 1 ]] ; then + echo "Setting values in the following helm values (DPP, edc-consumer, edc-provider, registry)" + set_values + elif [[ "$1" -eq 0 ]] ; then + echo "Un Setting values in the following helm values (DPP, edc-consumer, edc-provider, registry)" + unset_values + else + echo "invalid value provided, please provide a value 0 or 1" + fi + +echo "Done..." diff --git a/deployment/infrastructure/README.md b/deployment/local/testing/README.md similarity index 87% rename from deployment/infrastructure/README.md rename to deployment/local/testing/README.md index 6864c69e1..606369e81 100644 --- a/deployment/infrastructure/README.md +++ b/deployment/local/testing/README.md @@ -49,3 +49,5 @@ Use the following script to remove all test data from the provider edc and regis ``` +> **_NOTE:_** +*It might be the case that some of the assets could not be deleted through the deletion script, because they were already used in the past contract negotiations and may still exist in contract agreement references. In that case, the persistent storage of the provider EDC must to be killed and EDC deployment must be restarted.* diff --git a/deployment/infrastructure/testing/delete-testdata.sh b/deployment/local/testing/delete-testdata.sh similarity index 100% rename from deployment/infrastructure/testing/delete-testdata.sh rename to deployment/local/testing/delete-testdata.sh diff --git a/deployment/infrastructure/testing/functions.sh b/deployment/local/testing/functions.sh similarity index 100% rename from deployment/infrastructure/testing/functions.sh rename to deployment/local/testing/functions.sh diff --git a/deployment/infrastructure/testing/testdata/testdata-payload.json b/deployment/local/testing/testdata/testdata-payload.json similarity index 100% rename from deployment/infrastructure/testing/testdata/testdata-payload.json rename to deployment/local/testing/testdata/testdata-payload.json diff --git a/deployment/infrastructure/testing/transform-and-upload.sh b/deployment/local/testing/transform-and-upload.sh similarity index 100% rename from deployment/infrastructure/testing/transform-and-upload.sh rename to deployment/local/testing/transform-and-upload.sh diff --git a/deployment/infrastructure/testing/upload-testdata.sh b/deployment/local/testing/upload-testdata.sh similarity index 100% rename from deployment/infrastructure/testing/upload-testdata.sh rename to deployment/local/testing/upload-testdata.sh diff --git a/docs/GETTING-STARTED.md b/docs/GETTING-STARTED.md index e2a1e0dfc..a04c5a8ea 100644 --- a/docs/GETTING-STARTED.md +++ b/docs/GETTING-STARTED.md @@ -1,7 +1,8 @@ log: logout success ", success); + }) + .catch((error) => { + console.log("--> log: logout error ", error); + }); } - return clientRoles.length == 1 ? clientRoles[0] : clientRoles; - } - logout() { - let logoutOptions = { redirectUri: REDIRECT_URI }; - this.keycloak.logout(logoutOptions).then((success) => { - console.log("--> log: logout success ", success); - }).catch((error) => { - console.log("--> log: logout error ", error); - }); - } } diff --git a/src/services/BackendService.js b/src/services/BackendService.js index 4eb2ed229..71df2ae40 100644 --- a/src/services/BackendService.js +++ b/src/services/BackendService.js @@ -1,7 +1,8 @@ /** * Catena-X - Product Passport Consumer Frontend * - * Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA + * Copyright (c) 2022, 2024 BASF SE, BMW AG, Henkel AG & Co. KGaA + * Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -23,35 +24,41 @@ import { BACKEND_URL, API_MAX_RETRIES, API_DELAY } from "@/services/service.cons import axios from "axios"; import jsonUtil from "@/utils/jsonUtil.js"; import threadUtil from "../utils/threadUtil"; -import store from "../store/index" +import store from "../store/index"; export default class BackendService { - splitIds(id, sep = ":") { let ids = id.split(sep); // Check if id is not empty if (ids == null || ids.length == 0) { - throw new Error('The Id must not be empty!'); + throw new Error("The Id must not be empty!"); } // Check if the syntax is correct and it contains tree parts if (ids.length != 3) { - throw new Error('The Id must have 3 elements!'); + throw new Error("The Id must have 3 elements!"); } // Check if the first part contains the catena-x prefix if (ids[0].toUpperCase() !== "CX") { - throw new Error('Invalid Id prefix!'); + throw new Error("Invalid Id prefix!"); } - if (ids[1] == undefined || ids[1] == null || ids[1] === "" || ids[2] == undefined || ids[2] == null || ids[2] === "") { - throw new Error('One of the Ids is empty!'); + if ( + ids[1] == undefined || + ids[1] == null || + ids[1] === "" || + ids[2] == undefined || + ids[2] == null || + ids[2] === "" + ) { + throw new Error("One of the Ids is empty!"); } // Build and separate the different ids return { - "prefix": ids[0], - "discoveryId": ids[1], - "serializedId": ids[2] - } + prefix: ids[0], + discoveryId: ids[1], + serializedId: ids[2], + }; } async getPassport(id, authentication) { @@ -61,18 +68,10 @@ export default class BackendService { try { ids = this.splitIds(id); } catch (e) { - return this.getErrorMessage( - e.message, - 500, - "Internal Server Error" - ) + return this.getErrorMessage(e.message, 500, "Internal Server Error"); } if (ids == null) { - return this.getErrorMessage( - "Failed to parse the search id!", - 500, - "Internal Server Error" - ) + return this.getErrorMessage("Failed to parse the search id!", 500, "Internal Server Error"); } try { processResponse = await this.createProcess(ids["discoveryId"], authentication); @@ -81,14 +80,17 @@ export default class BackendService { } // Check if the process is successful or if the data is not retrieved - if (!processResponse || (jsonUtil.exists("status", processResponse) && processResponse["status"] != 200) || !jsonUtil.exists("data", processResponse)) { + if ( + !processResponse || + (jsonUtil.exists("status", processResponse) && processResponse["status"] != 200) || + !jsonUtil.exists("data", processResponse) + ) { return processResponse; } let processId = jsonUtil.get("data.processId", processResponse, ".", null); - store.commit('setProcessId', processId); - + store.commit("setProcessId", processId); // Check if the process id is not empty if (processId == null || processId === "") { @@ -96,13 +98,11 @@ export default class BackendService { "The contract request was not valid, no process id exists", 500, "Internal Server Error" - ) - + ); } let negotiationResponse = null; - // Try to get the negotiation contract try { negotiationResponse = await this.searchContract(ids["serializedId"], processId, authentication); @@ -110,9 +110,12 @@ export default class BackendService { return negotiationResponse; } - // Check if the negotiation status is successful or if the data is not retrieved - if (!negotiationResponse || (jsonUtil.exists("status", negotiationResponse) && negotiationResponse["status"] != 200) || !jsonUtil.exists("data", negotiationResponse)) { + if ( + !negotiationResponse || + (jsonUtil.exists("status", negotiationResponse) && negotiationResponse["status"] != 200) || + !jsonUtil.exists("data", negotiationResponse) + ) { return negotiationResponse; } @@ -124,16 +127,11 @@ export default class BackendService { let token = jsonUtil.get("token", negotiation, ".", null); let contractId = jsonUtil.get("contract.@id", negotiation, ".", null); - store.commit('setSearchContractId', contractId); + store.commit("setSearchContractId", contractId); // If is not existing we return an error imitating the response if (!token || !contractId) { - return this.getErrorMessage( - "The contract request was not valid", - 500, - "Internal Server Error" - ) - + return this.getErrorMessage("The contract request was not valid", 500, "Internal Server Error"); } // Sign the contract request @@ -143,28 +141,27 @@ export default class BackendService { return processStatus; } // Check if the process status is successful or if the data is not retrieved - if (!processStatus || (jsonUtil.exists("status", processStatus) && processStatus["status"] != 200) || !jsonUtil.exists("data", processStatus)) { + if ( + !processStatus || + (jsonUtil.exists("status", processStatus) && processStatus["status"] != 200) || + !jsonUtil.exists("data", processStatus) + ) { return processStatus; } - let status = jsonUtil.get("data.status", processStatus, ".", null); if (status == "FAILED") { - return this.getErrorMessage( - "The negotiation process has failed", - 500, - "Internal Server Error" - ) + return this.getErrorMessage("The negotiation process has failed", 500, "Internal Server Error"); } - let loopBreakStatus = ["COMPLETED", "FAILED", "DECLINED", "RECEIVED"] + let loopBreakStatus = ["COMPLETED", "FAILED", "DECLINED", "RECEIVED"]; let maxRetries = API_MAX_RETRIES; let waitingTime = API_DELAY; let retries = 0; let statusResponse = null; while (retries < maxRetries) { - statusResponse = await this.getStatus(processId, authentication) + statusResponse = await this.getStatus(processId, authentication); status = jsonUtil.get("data.status", statusResponse); if (loopBreakStatus.includes(status) || status == null) { break; @@ -173,86 +170,84 @@ export default class BackendService { retries++; } let history = jsonUtil.get("data.history", statusResponse); - if(jsonUtil.exists("transfer-completed", history) && jsonUtil.exists("data-received", history)){ + if (jsonUtil.exists("transfer-completed", history) && jsonUtil.exists("data-received", history)) { return await this.retrievePassport(negotiation, authentication); } // Get status again - statusResponse = await this.getStatus(processId, authentication) + statusResponse = await this.getStatus(processId, authentication); status = jsonUtil.get("data.status", statusResponse); history = jsonUtil.get("data.history", statusResponse); - if(jsonUtil.exists("transfer-completed", history) && jsonUtil.exists("data-received", history)){ + if (jsonUtil.exists("transfer-completed", history) && jsonUtil.exists("data-received", history)) { return await this.retrievePassport(negotiation, authentication); } retries = 0; // Until the transfer is completed or the status is failed - while(retries < maxRetries){ + while (retries < maxRetries) { // Wait await threadUtil.sleep(waitingTime); // Refresh the values statusResponse = await this.getStatus(processId, authentication); status = jsonUtil.get("data.status", statusResponse); history = jsonUtil.get("data.history", statusResponse); - if((jsonUtil.exists("transfer-completed", history) && jsonUtil.exists("data-received", history)) || status === "FAILED"){ + if ( + (jsonUtil.exists("transfer-completed", history) && jsonUtil.exists("data-received", history)) || + status === "FAILED" + ) { break; } retries++; } - + // If the status is failed... if (status === "FAILED") { - return this.getErrorMessage( - "Failed to retrieve passport!", - 500, - "Internal Server Error" - ) + return this.getErrorMessage("Failed to retrieve passport!", 500, "Internal Server Error"); } // If is not failed return the passport return await this.retrievePassport(negotiation, authentication); } - + getErrorMessage(message, status, statusText) { return { - "message": message, - "status": status, - "statusText": statusText - } + message: message, + status: status, + statusText: statusText, + }; } getHeadersCredentials(authentication) { let params = this.getHeaders(authentication); params["withCredentials"] = true; return params; - } getHeaders(authentication) { return { headers: { - 'Accept': 'application/json', - 'Authorization': "Bearer " + authentication.getAccessToken() - } - } - + Accept: "application/json", + Authorization: "Bearer " + authentication.getAccessToken(), + }, + }; } getRequestBody(negotiation) { return { - "processId": negotiation["id"], - "contractId": negotiation["contract"]["@id"], - "token": negotiation["token"] - } + processId: negotiation["id"], + contractId: negotiation["contract"]["@id"], + token: negotiation["token"], + }; } getSearchBody(id, processId) { return { - "id": id, - "processId": processId - } + id: id, + processId: processId, + }; } async getStatus(processId, authentication) { - return new Promise(resolve => { - axios.get(`${BACKEND_URL}/api/contract/status/` + processId, this.getHeadersCredentials(authentication)) + return new Promise((resolve) => { + axios + .get(`${BACKEND_URL}/api/contract/status/` + processId, this.getHeadersCredentials(authentication)) .then((response) => { // Setting the status to the Store state - store.commit('setStatusData', response.data); + store.commit("setStatusData", response.data); resolve(response.data); }) .catch((e) => { @@ -261,16 +256,16 @@ export default class BackendService { } else if (e.request) { resolve(e.request); } else { - resolve(e.message) + resolve(e.message); } - }); }); } async getIrsState(processId, authentication) { - return new Promise(resolve => { - axios.get(`${BACKEND_URL}/api/irs/` + processId + `/state`, this.getHeadersCredentials(authentication)) + return new Promise((resolve) => { + axios + .get(`${BACKEND_URL}/api/irs/` + processId + `/state`, this.getHeadersCredentials(authentication)) .then((response) => { resolve(response); }) @@ -280,14 +275,15 @@ export default class BackendService { } else if (e.request) { resolve(e.request); } else { - resolve(e.message) + resolve(e.message); } }); }); } async getIrsData(processId, authentication) { - return new Promise(resolve => { - axios.get(`${BACKEND_URL}/api/irs/` + processId + `/components`, this.getHeadersCredentials(authentication)) + return new Promise((resolve) => { + axios + .get(`${BACKEND_URL}/api/irs/` + processId + `/components`, this.getHeadersCredentials(authentication)) .then((response) => { resolve(response.data); }) @@ -297,15 +293,16 @@ export default class BackendService { } else if (e.request) { resolve(e.request); } else { - resolve(e.message) + resolve(e.message); } }); }); } async retrievePassport(negotiation, authentication) { - return new Promise(resolve => { + return new Promise((resolve) => { let body = this.getRequestBody(negotiation); - axios.post(`${BACKEND_URL}/api/data`, body, this.getHeadersCredentials(authentication)) + axios + .post(`${BACKEND_URL}/api/data`, body, this.getHeadersCredentials(authentication)) .then((response) => { resolve(response.data); }) @@ -315,16 +312,16 @@ export default class BackendService { } else if (e.request) { resolve(e.request); } else { - resolve(e.message) + resolve(e.message); } - }); }); } async signContract(negotiation, authentication) { - return new Promise(resolve => { + return new Promise((resolve) => { let body = this.getRequestBody(negotiation); - axios.post(`${BACKEND_URL}/api/contract/sign`, body, this.getHeadersCredentials(authentication)) + axios + .post(`${BACKEND_URL}/api/contract/sign`, body, this.getHeadersCredentials(authentication)) .then((response) => { resolve(response.data); }) @@ -334,16 +331,16 @@ export default class BackendService { } else if (e.request) { resolve(e.request); } else { - resolve(e.message) + resolve(e.message); } - }); }); } async searchContract(id, processId, authentication) { - return new Promise(resolve => { + return new Promise((resolve) => { let body = this.getSearchBody(id, processId); - axios.post(`${BACKEND_URL}/api/contract/search`, body, this.getHeaders(authentication)) + axios + .post(`${BACKEND_URL}/api/contract/search`, body, this.getHeaders(authentication)) .then((response) => { resolve(response.data); }) @@ -353,19 +350,19 @@ export default class BackendService { } else if (e.request) { resolve(e.request); } else { - resolve(e.message) + resolve(e.message); } - }); }); } async createProcess(discoveryId, authentication, type = "manufacturerPartId") { - return new Promise(resolve => { + return new Promise((resolve) => { let body = { - "id": discoveryId, - "type": type - } - axios.post(`${BACKEND_URL}/api/contract/create`, body, this.getHeaders(authentication)) + id: discoveryId, + type: type, + }; + axios + .post(`${BACKEND_URL}/api/contract/create`, body, this.getHeaders(authentication)) .then((response) => { resolve(response.data); }) @@ -375,9 +372,8 @@ export default class BackendService { } else if (e.request) { resolve(e.request); } else { - resolve(e.message) + resolve(e.message); } - }); }); } diff --git a/src/services/service.const.js b/src/services/service.const.js index 6c6ddde46..4fdf6f49a 100644 --- a/src/services/service.const.js +++ b/src/services/service.const.js @@ -1,7 +1,8 @@ /** * Catena-X - Product Passport Consumer Frontend * - * Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA + * Copyright (c) 2022, 2024 BASF SE, BMW AG, Henkel AG & Co. KGaA + * Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. @@ -20,7 +21,6 @@ * SPDX-License-Identifier: Apache-2.0 */ - import numberUtil from "@/utils/numberUtil"; // Independentant Constants (If not defined will not crash the system) @@ -32,11 +32,11 @@ const IDP_URL = "IDENTITY_PROVIDER_URL"; // Get urls that can be empty let serverUrl = "HOST_URL"; let backendUrl = "DATA_URL"; -let retries = 'APP_API_MAX_RETRIES'; -let timeout = 'APP_API_TIMEOUT'; -let irsDelay = 'APP_IRS_DELAY'; -let irsMaxWaitingTime = 'APP_IRS_WAITING_TIME'; -let delay = 'APP_API_DELAY'; +let retries = "APP_API_MAX_RETRIES"; +let timeout = "APP_API_TIMEOUT"; +let irsDelay = "APP_IRS_DELAY"; +let irsMaxWaitingTime = "APP_IRS_WAITING_TIME"; +let delay = "APP_API_DELAY"; let clientId = "KEYCLOAK_CLIENTID"; let realm = "KEYCLOAK_REALM"; let onLoad = "KEYCLOAK_ONLOAD"; @@ -49,16 +49,15 @@ let portalUrl = "APP_PORTAL_URL"; let adminEmail = "APP_ADMIN_EMAIL"; // Default values if the value is not specified -serverUrl = (serverUrl != null && serverUrl !== "") ? serverUrl : "https://materialpass.int.demo.catena-x.net" -backendUrl = (backendUrl != null && backendUrl !== "") ? backendUrl : serverUrl -clientId = (clientId != null && clientId !== "") ? clientId : "Cl13-CX-Battery" -realm = (realm != null && realm !== "") ? realm : "CX-Central" -onLoad = (onLoad != null && onLoad !== "") ? onLoad : "login-required" -adminEmail = (adminEmail != null && adminEmail !== "") ? adminEmail : "admin@example.com" -portalUrl = (portalUrl != null && portalUrl !== "") ? portalUrl : "https://portal.int.demo.catena-x.net" -bpnCheck = (bpnCheck === "true") -roleCheck = (roleCheck === "true") - +serverUrl = serverUrl != null && serverUrl !== "" ? serverUrl : "https://dpp.int.demo.catena-x.net"; +backendUrl = backendUrl != null && backendUrl !== "" ? backendUrl : serverUrl; +clientId = clientId != null && clientId !== "" ? clientId : "Cl13-CX-Battery"; +realm = realm != null && realm !== "" ? realm : "CX-Central"; +onLoad = onLoad != null && onLoad !== "" ? onLoad : "login-required"; +adminEmail = adminEmail != null && adminEmail !== "" ? adminEmail : "admin@example.com"; +portalUrl = portalUrl != null && portalUrl !== "" ? portalUrl : "https://portal.int.demo.catena-x.net"; +bpnCheck = bpnCheck === "true"; +roleCheck = roleCheck === "true"; // Default Variables if value is not specified or is not a integer timeout = numberUtil.parseInt(timeout, 60000); @@ -88,23 +87,43 @@ const ADMIN_EMAIL = adminEmail; // Initialize configuration objects let INIT_OPTIONS = { - url: null, - clientId: CLIENT_ID, // Catena-X ClientId for Battery Pass - realm: REALM, // Catena-X Realm - onLoad: ONLOAD + url: null, + clientId: CLIENT_ID, // Catena-X ClientId for Battery Pass + realm: REALM, // Catena-X Realm + onLoad: ONLOAD, }; let REDIRECT_URI = ""; -if (window.location.href.includes("localhost")) { //Modify credentials for local runs - INIT_OPTIONS["url"] = (IDP_URL != null) ? IDP_URL : "http://localhost:8088/auth/", //Point to IDP service if specified or localhost - REDIRECT_URI = "http://localhost:8080/"; +if (window.location.href.includes("localhost")) { + //Modify credentials for local runs + (INIT_OPTIONS["url"] = IDP_URL != null ? IDP_URL : "http://localhost:8088/auth/"), //Point to IDP service if specified or localhost + (REDIRECT_URI = "http://localhost:8080/"); } else { - if(!IDP_URL.includes("/auth/")){ - INIT_OPTIONS["url"] = IDP_URL + "/auth/"; - }else{ - INIT_OPTIONS["url"] = IDP_URL; - } - REDIRECT_URI = SERVER_URL; + if (!IDP_URL.includes("/auth/")) { + INIT_OPTIONS["url"] = IDP_URL + "/auth/"; + } else { + INIT_OPTIONS["url"] = IDP_URL; + } + REDIRECT_URI = SERVER_URL; } // Export all the CONSTANTS and VARIABLES -export { INIT_OPTIONS, REDIRECT_URI, SERVER_URL, IDP_URL, BACKEND_URL, VERSION, API_TIMEOUT, API_DELAY, API_MAX_RETRIES, COMMIT_ID, REPO_ENDPOINT,IRS_DELAY, IRS_MAX_WAITING_TIME, BPN_CHECK, BPN, PORTAL_URL, ADMIN_EMAIL, ROLE_CHECK}; +export { + INIT_OPTIONS, + REDIRECT_URI, + SERVER_URL, + IDP_URL, + BACKEND_URL, + VERSION, + API_TIMEOUT, + API_DELAY, + API_MAX_RETRIES, + COMMIT_ID, + REPO_ENDPOINT, + IRS_DELAY, + IRS_MAX_WAITING_TIME, + BPN_CHECK, + BPN, + PORTAL_URL, + ADMIN_EMAIL, + ROLE_CHECK, +};