From c74218f9f6d565df8d843a530a7b461e47e5ab06 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 11:35:35 +0200 Subject: [PATCH 01/24] chore: add iatp mock and helm chart --- charts/iatpmock/.helmignore | 23 ++ charts/iatpmock/Chart.yaml | 24 ++ charts/iatpmock/templates/NOTES.txt | 22 ++ charts/iatpmock/templates/_helpers.tpl | 62 ++++ charts/iatpmock/templates/deployment.yaml | 53 ++++ charts/iatpmock/templates/ingress.yaml | 61 ++++ charts/iatpmock/templates/service.yaml | 15 + charts/iatpmock/templates/serviceaccount.yaml | 13 + .../templates/tests/test-connection.yaml | 15 + charts/iatpmock/values.yaml | 77 +++++ iam-mock/DEPENDENCIES | 36 +++ iam-mock/Dockerfile | 30 ++ iam-mock/README.md | 44 +++ iam-mock/constants.py | 197 +++++++++++++ iam-mock/credential_service.py | 111 ++++++++ iam-mock/docs/README_SERVICE_OVERVIEW.md | 76 +++++ iam-mock/docs/credential_requests.puml | 108 +++++++ iam-mock/jwtUtils.py | 96 +++++++ iam-mock/keys/edc.key | 28 ++ iam-mock/keys/private_key.pem | 8 + iam-mock/keys/public_key.pem | 4 + iam-mock/mock_util.py | 269 ++++++++++++++++++ iam-mock/requirements.txt | 36 +++ 23 files changed, 1408 insertions(+) create mode 100644 charts/iatpmock/.helmignore create mode 100644 charts/iatpmock/Chart.yaml create mode 100644 charts/iatpmock/templates/NOTES.txt create mode 100644 charts/iatpmock/templates/_helpers.tpl create mode 100644 charts/iatpmock/templates/deployment.yaml create mode 100644 charts/iatpmock/templates/ingress.yaml create mode 100644 charts/iatpmock/templates/service.yaml create mode 100644 charts/iatpmock/templates/serviceaccount.yaml create mode 100644 charts/iatpmock/templates/tests/test-connection.yaml create mode 100644 charts/iatpmock/values.yaml create mode 100644 iam-mock/DEPENDENCIES create mode 100644 iam-mock/Dockerfile create mode 100644 iam-mock/README.md create mode 100644 iam-mock/constants.py create mode 100644 iam-mock/credential_service.py create mode 100644 iam-mock/docs/README_SERVICE_OVERVIEW.md create mode 100644 iam-mock/docs/credential_requests.puml create mode 100644 iam-mock/jwtUtils.py create mode 100644 iam-mock/keys/edc.key create mode 100644 iam-mock/keys/private_key.pem create mode 100644 iam-mock/keys/public_key.pem create mode 100644 iam-mock/mock_util.py create mode 100644 iam-mock/requirements.txt diff --git a/charts/iatpmock/.helmignore b/charts/iatpmock/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/iatpmock/.helmignore @@ -0,0 +1,23 @@ +# 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/charts/iatpmock/Chart.yaml b/charts/iatpmock/Chart.yaml new file mode 100644 index 00000000..41594d82 --- /dev/null +++ b/charts/iatpmock/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: iatpmock +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.0.1" diff --git a/charts/iatpmock/templates/NOTES.txt b/charts/iatpmock/templates/NOTES.txt new file mode 100644 index 00000000..909b8e5d --- /dev/null +++ b/charts/iatpmock/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "iatpmock.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "iatpmock.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "iatpmock.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "iatpmock.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/iatpmock/templates/_helpers.tpl b/charts/iatpmock/templates/_helpers.tpl new file mode 100644 index 00000000..99f88cba --- /dev/null +++ b/charts/iatpmock/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "iatpmock.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "iatpmock.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "iatpmock.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "iatpmock.labels" -}} +helm.sh/chart: {{ include "iatpmock.chart" . }} +{{ include "iatpmock.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "iatpmock.selectorLabels" -}} +app.kubernetes.io/name: {{ include "iatpmock.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "iatpmock.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "iatpmock.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/iatpmock/templates/deployment.yaml b/charts/iatpmock/templates/deployment.yaml new file mode 100644 index 00000000..31c9c038 --- /dev/null +++ b/charts/iatpmock/templates/deployment.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "iatpmock.fullname" . }} + labels: + {{- include "iatpmock.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + {{- include "iatpmock.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "iatpmock.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "iatpmock.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/iatpmock/templates/ingress.yaml b/charts/iatpmock/templates/ingress.yaml new file mode 100644 index 00000000..6023765d --- /dev/null +++ b/charts/iatpmock/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "iatpmock.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "iatpmock.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/iatpmock/templates/service.yaml b/charts/iatpmock/templates/service.yaml new file mode 100644 index 00000000..385075bc --- /dev/null +++ b/charts/iatpmock/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "iatpmock.fullname" . }} + labels: + {{- include "iatpmock.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "iatpmock.selectorLabels" . | nindent 4 }} diff --git a/charts/iatpmock/templates/serviceaccount.yaml b/charts/iatpmock/templates/serviceaccount.yaml new file mode 100644 index 00000000..f298fe25 --- /dev/null +++ b/charts/iatpmock/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "iatpmock.serviceAccountName" . }} + labels: + {{- include "iatpmock.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/charts/iatpmock/templates/tests/test-connection.yaml b/charts/iatpmock/templates/tests/test-connection.yaml new file mode 100644 index 00000000..7a95f0d2 --- /dev/null +++ b/charts/iatpmock/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "iatpmock.fullname" . }}-test-connection" + labels: + {{- include "iatpmock.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "iatpmock.fullname" . }}:{{ .Values.service.port }}/health'] + restartPolicy: Never diff --git a/charts/iatpmock/values.yaml b/charts/iatpmock/values.yaml new file mode 100644 index 00000000..f438fa71 --- /dev/null +++ b/charts/iatpmock/values.yaml @@ -0,0 +1,77 @@ +# Default values for iatpmock. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: tractusx/iam-mock + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "testing" + +imagePullSecrets: [ ] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: 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: "" + +podAnnotations: { } +podLabels: { } + +podSecurityContext: + fsGroup: 2000 + +securityContext: + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + className: "nginx" + annotations: { } + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [ ] + +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 + +livenessProbe: + httpGet: + path: /health + port: http +readinessProbe: + httpGet: + path: /health + port: http + diff --git a/iam-mock/DEPENDENCIES b/iam-mock/DEPENDENCIES new file mode 100644 index 00000000..c6779554 --- /dev/null +++ b/iam-mock/DEPENDENCIES @@ -0,0 +1,36 @@ +pypi/pypi/-/Jinja2/3.1.4, BSD-3-Clause, approved, #7978 +pypi/pypi/-/MarkupSafe/2.1.4, BSD-3-Clause, approved, #4753 +pypi/pypi/-/PyJWT/2.8.0, MIT, approved, clearlydefined +pypi/pypi/-/PyYAML/6.0.1, MIT, approved, clearlydefined +pypi/pypi/-/annotated-types/0.6.0, MIT, approved, clearlydefined +pypi/pypi/-/anyio/4.2.0, MIT, approved, clearlydefined +pypi/pypi/-/certifi/2023.11.17, MPL-2.0, approved, clearlydefined +pypi/pypi/-/cffi/1.16.0, MIT, approved, #13062 +pypi/pypi/-/click/8.1.7, BSD-2-Clause AND BSD-3-Clause, approved, clearlydefined +pypi/pypi/-/cryptography/42.0.5, Apache-2.0 AND BSD-3-Clause AND Apache-2.0 AND BSD-3-Clause, approved, #13076 +pypi/pypi/-/dnspython/2.6.1, ISC, approved, #14862 +pypi/pypi/-/email-validator/2.1.0.post1, CC0-1.0, approved, clearlydefined +pypi/pypi/-/exceptiongroup/1.2.0, MIT AND PSF-2.0, approved, #12076 +pypi/pypi/-/fastapi/0.111.0, MIT AND Apache-2.0, approved, #14863 +pypi/pypi/-/h11/0.14.0, MIT AND BSD-3-Clause, approved, #13077 +pypi/pypi/-/httpcore/1.0.2, BSD-2-Clause AND BSD-3-Clause, approved, clearlydefined +pypi/pypi/-/httptools/0.6.1, MIT, approved, #14635 +pypi/pypi/-/httpx/0.26.0, BSD-2-Clause AND BSD-3-Clause, approved, clearlydefined +pypi/pypi/-/idna/3.7, BSD-3-Clause AND Unicode-TOU, approved, #14864 +pypi/pypi/-/itsdangerous/2.1.2, BSD-2-Clause AND BSD-3-Clause, approved, clearlydefined +pypi/pypi/-/orjson/3.9.15, (Apache-2.0 OR MIT) AND Apache-2.0 AND MIT AND BSD-3-Clause AND (Apache-2.0 OR BSD-2-Clause OR MIT) AND CC0-1.0 AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 OR BSL-1.0) AND BSD-2-Clause AND LicenseRef-Unicode-DFS, approved, +pypi/pypi/-/pycparser/2.22, LGPL-2.0-or-later AND BSD-3-Clause, approved, #14636 +pypi/pypi/-/pydantic-extra-types/2.4.1, MIT, approved, clearlydefined +pypi/pypi/-/pydantic-settings/2.1.0, MIT, approved, clearlydefined +pypi/pypi/-/pydantic/2.5.3, MIT, approved, clearlydefined +pypi/pypi/-/pydantic_core/2.14.6, MIT, approved, clearlydefined +pypi/pypi/-/python-dotenv/1.0.1, BSD-2-Clause AND BSD-3-Clause, approved, clearlydefined +pypi/pypi/-/python-multipart/0.0.7, Apache-2.0, approved, clearlydefined +pypi/pypi/-/sniffio/1.3.0, (Apache-2.0 AND BSD-3-Clause) OR (Apache-2.0 AND MIT), approved, clearlydefined +pypi/pypi/-/starlette/0.37.2, BSD-2-Clause AND BSD-3-Clause, approved, clearlydefined +pypi/pypi/-/typing_extensions/4.9.0, Python-2.0, approved, #12088 +pypi/pypi/-/ujson/5.9.0, BSD-3-Clause AND TCL, approved, #14638 +pypi/pypi/-/uvicorn/0.27.0, BSD-2-Clause AND BSD-3-Clause, approved, clearlydefined +pypi/pypi/-/uvloop/0.19.0, , approved, #14633 +pypi/pypi/-/watchfiles/0.21.0, MIT, approved, clearlydefined +pypi/pypi/-/websockets/12.0, BSD-3-Clause AND (Apache-2.0 AND PSF-2.0), approved, #12086 diff --git a/iam-mock/Dockerfile b/iam-mock/Dockerfile new file mode 100644 index 00000000..c3167bc1 --- /dev/null +++ b/iam-mock/Dockerfile @@ -0,0 +1,30 @@ +# +# Copyright (c) 2024 Volkswagen AG +# Copyright (c) 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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# +FROM python:3.10 + +WORKDIR /code +COPY ./requirements.txt /code/requirements.txt +RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt +COPY ./ /code +COPY ./keys /code/keys +RUN useradd -u 1000 nonroot +USER nonroot + +CMD ["uvicorn", "mock_util:app", "--host", "0.0.0.0", "--port", "80"] diff --git a/iam-mock/README.md b/iam-mock/README.md new file mode 100644 index 00000000..b820b9bc --- /dev/null +++ b/iam-mock/README.md @@ -0,0 +1,44 @@ +This small project uses fast api to provide basic iam local deployment. + +`mock_util.py` -> provides cx util capabilities + +- /edr-log: log just the edr token for manual checks +- /sts: secure token service +- /presentations/query: credential service just returning VPs for the scopes in question +- /{did-name}: returns a valid DID pointing to the /sts endpoint for credential service + +The mock_util only is able to mock the MembershipCredential and the FrameworkAgreements in version 1.0 +NO DISMANTLER SUPPORT + +# Add to docker compose + +Pre-requisite: Create keys so that jwt tokens can be signed + +```sh +mkdir keys +cd keys +openssl ecparam -name prime256v1 -genkey -out private_key.pem +openssl ec -in private_key.pem -pubout -out public_key.pem +``` + +```shell +docker build -t mock-util-py . +``` + +Then start docker compose + +```shell +docker compose up +``` + +Following services are now reachable: + +| Service | address | reachable where | +|-------------------|-------------------------------------------------|--------------------------| +| mock-util-service | http://mock-util-service:80/edr-log | docker compose (miw net) | +| mock-util-service | http://mock-util-service:80/sts | docker compose (miw net) | +| mock-util-service | http://mock-util-service:80/presentations/query | docker compose (miw net) | +| mock-util-service | http://mock-util-service:80/{did-name} | docker compose (miw net) | +| mock-util-service | localhost:8888/* | host machine | + +Use the service to either simulate the central IAM or just to got some logging api diff --git a/iam-mock/constants.py b/iam-mock/constants.py new file mode 100644 index 00000000..75b13969 --- /dev/null +++ b/iam-mock/constants.py @@ -0,0 +1,197 @@ +# +# Copyright (c) 2024 Volkswagen AG +# Copyright (c) 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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from pathlib import Path + +""" +Read key information +""" +def read_file(path: Path): + with path.open() as file: + file_content = file.read() + return file_content + + +# openssl ecparam -name prime256v1 -genkey -out private_key.pem +# openssl ec -in private_key.pem -pubout -out public_key.pem +ES256_PRIVATE_KEY = read_file(Path("keys/private_key.pem")) +ES256_PUBLIC_KEY = read_file(Path("keys/public_key.pem")) + +# must be same as used in edc for edc.transfer.proxy.signer.privatekey.alias +EDC_PRIVATE_KEY = read_file(Path("keys/edc.key")) + +DID_TRUSTED_ISSUER = "did:web:mock-util-service/trusted-issuer" +DID_CUSTOMER = "did:web:mock-util-service/customer" +DID_SUPPLIER = "did:web:mock-util-service/supplier" +# DID_BPNL00000003AYRE = "did:web:mock-util-service/BPNL00000003AYRE" +# DID_BPNL00000003AZQP = "did:web:mock-util-service/BPNL00000003AZQP" +# DID_BPNL00000003AVTH = "did:web:mock-util-service/BPNL00000003AVTH" +# DID_BPNL00000003AWSS = "did:web:mock-util-service/BPNL00000003AWSS" +# DID_BPNL00000003B0Q0 = "did:web:mock-util-service/BPNL00000003B0Q0" +# DID_BPNS0000000008ZZ = "did:web:mock-util-service/BPNS0000000008ZZ" +# DID_BPNL00000003CNKC = "did:web:mock-util-service/BPNL00000003CNKC" +# DID_BPNL00000003B6LU = "did:web:mock-util-service/BPNL00000003B6LU" +# DID_BPNL00000003CML1 = "did:web:mock-util-service/BPNL00000003CML1" +# DID_BPNS00000008BDFH = "did:web:mock-util-service/BPNS00000008BDFH" +# DID_BPNL00000003B2OM = "did:web:mock-util-service/BPNL00000003B2OM" +# DID_BPNL00000003CSGV = "did:web:mock-util-service/BPNL00000003CSGV" +# DID_BPNL00000003B5MJ = "did:web:mock-util-service/BPNL00000003B5MJ" +# DID_BPNL00000003AXS3 = "did:web:mock-util-service/BPNL00000003AXS3" +# DID_BPNL00000003B3NX = "did:web:mock-util-service/BPNL00000003B3NX" +# DID_BPNL00000000BJTL = "did:web:mock-util-service/BPNL00000000BJTL" + +# note: kid_vault = alias used for public key, set in edc.transfer.proxy.token.verifier.publickey.alias +DID_DICT = { + DID_TRUSTED_ISSUER: { + "bpnl": "NONE", + "did_resolve_name": "trusted-issuer", + }, + DID_SUPPLIER: { + "bpnl": "BPNL00000003AYRE", + "did_resolve_name": "supplier", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_CUSTOMER: { + "bpnl": "BPNL00000003AZQP", + "did_resolve_name": "customer", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + } +} + # , + # DID_BPNL00000003AYRE: { + # "bpnl": "BPNL00000003AYRE", + # "did_resolve_name": "BPNL00000003AYRE", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003AZQP: { + # "bpnl": "BPNL00000003AZQP", + # "did_resolve_name": "BPNL00000003AZQP", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003AVTH: { + # "bpnl": "BPNL00000003AVTH", + # "did_resolve_name": "BPNL00000003AVTH", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # } + # , + # DID_BPNL00000003AWSS: { + # "bpnl": "BPNL00000003AWSS", + # "did_resolve_name": "BPNL00000003AWSS", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003B0Q0: { + # "bpnl": "BPNL00000003B0Q0", + # "did_resolve_name": "BPNL00000003B0Q0", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNS0000000008ZZ: { + # "bpnl": "BPNS0000000008ZZ", + # "did_resolve_name": "BPNS0000000008ZZ", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003CNKC: { + # "bpnl": "BPNL00000003CNKC", + # "did_resolve_name": "BPNL00000003CNKC", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003B6LU: { + # "bpnl": "BPNL00000003B6LU", + # "did_resolve_name": "BPNL00000003B6LU", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003CML1: { + # "bpnl": "BPNL00000003CML1", + # "did_resolve_name": "BPNL00000003CML1", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNS00000008BDFH: { + # "bpnl": "BPNS00000008BDFH", + # "did_resolve_name": "BPNS00000008BDFH", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003B2OM: { + # "bpnl": "BPNL00000003B2OM", + # "did_resolve_name": "BPNL00000003B2OM", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003CSGV: { + # "bpnl": "BPNL00000003CSGV", + # "did_resolve_name": "BPNL00000003CSGV", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003B5MJ: { + # "bpnl": "BPNL00000003B5MJ", + # "did_resolve_name": "BPNL00000003B5MJ", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003AXS3: { + # "bpnl": "BPNL00000003AXS3", + # "did_resolve_name": "BPNL00000003AXS3", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # }, + # DID_BPNL00000003B3NX: { + # "bpnl": "BPNL00000003B3NX", + # "did_resolve_name": "BPNL00000003B3NX", + # "kid_vault": "tokenSignerPublicKey", + # "private_key": EDC_PRIVATE_KEY, + # } + +""" +lookup did by did_resolve_name +""" +def get_did_for_resolve_name(did_resolve_name: str): + for key, value in DID_DICT.items(): + if value["did_resolve_name"] == did_resolve_name: + return key + return None + + +""" +lookup did by bpnl +""" +def get_did_for_bpnl(bpnl: str): + for key, value in DID_DICT.items(): + if value["bpnl"] == bpnl: + return key + return None + + +""" +lookup bpnl by did +""" +def get_bpnl_for_did(did: str): + entry = DID_DICT.get(did, None) + return entry["bpnl"] if entry else None diff --git a/iam-mock/credential_service.py b/iam-mock/credential_service.py new file mode 100644 index 00000000..25fd9ce0 --- /dev/null +++ b/iam-mock/credential_service.py @@ -0,0 +1,111 @@ +# +# Copyright (c) 2024 Volkswagen AG +# Copyright (c) 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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from jwtUtils import create_token_from_payload, decode_token, create_jwt_from_claims +from constants import DID_TRUSTED_ISSUER, get_did_for_bpnl, DID_DICT + + +""" +embeds a VC in a JWT for the given information (mainly scope = vc) + +Differentiates self-IATP and vc for external partner +""" +def create_jwt_vc(did_issuer: str, did_subject: str, did_audience: str, bpnl_subject: str, scope: str): + + self_iatp_flag = did_subject == did_audience + payload = { + "iss": did_issuer, + "sub": did_issuer, # TODO: why no subject? + "aud": did_audience, #TODO: audience needed? Seems like not as this credential is pulled on behalf of the subject / RP + "nbf": 1541493724, + "iat": 1541493724, + "exp": 32481718133, + "vc": create_verifiable_credential(did_issuer=did_issuer, did_subject=did_subject, bpnl_subject=bpnl_subject, scope=scope), + } + + return create_token_from_payload(payload, did_issuer) + + +""" +creates a plain VC (no jwt) for a given scope +""" +def create_verifiable_credential(did_issuer: str, did_subject: str, bpnl_subject: str, scope: str): + + needs_version = False if scope.startswith("Membership") else True + + print(f"Create VC for scope {scope}") + vc = { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://w3id.org/catenax/credentials", + "https://w3id.org/vc/status-list/2021/v1" + ], + "id": "some-identifier", + "issuer": did_issuer, + "issuanceDate": "2021-06-16T18:56:59Z", + # "expirationDate": "2199-12-31T23:59:59Z", #seems to be only set if checked + "type": [ + "VerifiableCredential", + scope + ], + "credentialSubject": { + "id": did_subject, + "holderIdentifier": bpnl_subject + }, + } + + if needs_version: + vc["credentialSubject"]["contractVersion"] = "1.0" + return vc + + +""" +creates a vp with n vcs where n = amount of scopes + +Note: only MembershipCredential and FrameworkAgreements in version 1.0 are supported +""" +def create_verifiable_presentation(did_subject: str, did_issuer: str, did_audience: str, scopes: [str] = ["MembershipCredential"]): + + bpnl = DID_DICT[did_subject]["bpnl"] + # Create a VC per scope + vcs = [create_jwt_vc(DID_TRUSTED_ISSUER, did_subject, did_audience, bpnl, scope) for scope in scopes] + + claims = { + "iss": did_issuer, + "sub": did_subject, + "aud": did_audience, # todo check + "nbf": 1541493724, + "iat": 1541493724, + "exp": 32481718133, + "vp": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1" + ], + "type": [ + "VerifiablePresentation", + "CredentialManagerPresentation" + ], + "verifiableCredential": vcs + } + } + + return create_token_from_payload(claims, did_issuer) diff --git a/iam-mock/docs/README_SERVICE_OVERVIEW.md b/iam-mock/docs/README_SERVICE_OVERVIEW.md new file mode 100644 index 00000000..0e3703f2 --- /dev/null +++ b/iam-mock/docs/README_SERVICE_OVERVIEW.md @@ -0,0 +1,76 @@ +Basically, there are two types of IATP flows used by the connector in Catena-X Data Spaces: + +- Self IATP (e.g. get MembershipCredential for BDRS) +- IATP (e.g. used for catalog request, see simplified in `./credential_requests.puml`) + +See [README.md](../README.md) for the different capabilities + +This document mainly gives some learnings regarding +the [Tractus-X Verifiable Presentation flow](https://github.com/eclipse-tractusx/identity-trust/blob/main/specifications/verifiable.presentation.protocol.md) + +# Resolving DIDs + +Triggered via `bdrs` client of a party when `catalog` call is invoked to + +- identify DID for Partner in Access Policy +- identify DID for Partner for Contract Policies (e.g. Membership) + +Additionally, DIDs may be resolved + +- verify identities during data space protocol communication. +- to determine the Credential Service Endpoint who is responsible for a partner + +# Self-issued token + +A participant may create a self-issued token that can be used to request VPs at the credential service. +The token follows this spec https://datatracker.ietf.org/doc/html/rfc9068 + +The relying party verifies the token https://openid.net/specs/openid-connect-self-issued-v2-1_0.html#section-11.1 +The relying party may query additional information from the cs using token + +- get did via `sub` claim +- resolve did +- extract `CredentialService` from `service` from did +- query for presentation + +Note: If a `bearer_access_scope` is given, this is added as a `token` claim so that a relying party can authenticate on +behalf of the holder at the credential service to get the VP for scopes in question. + +See more details for STS flow in https://openid.net/specs/openid-connect-self-issued-v2-1_0.html#section-1.1 + +## Special case for EDR token refresh + +docs: https://github.com/eclipse-tractusx/tractusx-profiles/blob/main/tx/refresh/refresh.token.grant.profile.md + +EDR use the local keys provided via edc config. When mocking the edr refresh, these private keys need to be used to sign +the jwt. Also, the kid in the jwt header needs to be the alias in vault. Both is hard coded in constants and +`generate-keys.sh`. + +EDR information are stored in the vault + +- `edr-{transfer-proccess-id}` = information returned from `edr/{transfer-process-id}/dataadress` +- `jti` = the internal id of the EDR token. It's also stored in the respective db (see data plane plugins) -> you can + still use one vault for several edc in testing + +Relevant for EDR content: + +- `iat` = now +- `exp` = now + seconds configured for refresh in provider data plane +- `jti` = see above +- `iss` = `aud` = consumer +- `sub` = provider + +# Credential Service calls + +This is the real wallet allowing to store issued credentials and create verifiable presentations to proof the ownership +of a verifiable credential + +## Issue credential / Store credential + +Ignored in Mock. We always do a pass all. Normally some trusted issuer would hand over the credentials into a wallet. + +## Query for presentation + +In Tractus-X Data Spaces with DIM (what this service mocks) the query is done on behalf of the holder. + +One needs an access token for that an the relying party may get a vp as previously granted via the STS. diff --git a/iam-mock/docs/credential_requests.puml b/iam-mock/docs/credential_requests.puml new file mode 100644 index 00000000..b10a8efd --- /dev/null +++ b/iam-mock/docs/credential_requests.puml @@ -0,0 +1,108 @@ +@startuml +autonumber +skinparam sequenceMessageAlign center + +box "Data Consumer" +participant "Connector" as con_cons +end box + +box "De-/Central Services" +participant "BDRS" as bdrs +participant "Secure Token Service" as sts +participant "Credential Service" as cs +end box + +box "Data Provider" +participant "Connector" as con_prov +end box + +note over con_cons, cs +Issue credentials using "CredentialMessage" via POST /credentials +in a CredentialContainer +{ + "@context": [ + "https://w3id.org/tractusx-trust/v0.8" + ], + "@type": "CredentialMessage", + "credentials": [ + { + "@type": "CredentialContainer", + "payload": "" + } + ] +} +end note +-> cs: issue credentials for consumer and provider +-> con_cons: query catalog of supplier +note right +Catalog of provider has offer with restriction: +- access policy BPNL +- access policy Membership + +Note: I think it's only provider +end note + +con_cons -> bdrs: resolve DID for provider BPNL +activate bdrs +return DID + +con_cons -> sts: grant access to self-signed VP +activate sts +return self-signed token with access token (for cs) +note over con_cons, sts +self-issued token contains: +- iss, sub = consumer DID (bearer owner) +- aud = provider DID (relying party) +- token_id = id to map the sign_token request later +- token = bearer token providing access to + the VP via the credential service +end note + +con_cons -> con_prov: hand over SI token and request +activate con_prov + +con_prov -> sts: SIGN TOKEN REQUEST +activate sts +return jwt (no real content) +note over con_prov, sts +self-issued token contains: +- iss = trusted issuer +- sub = consumer DID (bearer owner) +- aud = provider DID (relying party) +end note + +note left: likely here the DID is resolved \nand the did's credential service is used + +con_prov -> cs: Query VP with access token +activate cs +note over con_prov, cs +Query a VP for a scope containing VCs via POST /presentation/query +{ + "@context": [ + "https://w3id.org/tractusx-trust/v0.8", + "https://identity.foundation/presentation-exchange/submission/v1" + ], + "@type": "PresentationQueryMessage", + "scope": [] +} +end note +return VP with requested scopes +note over con_prov, cs +Returns a "PresentationResponseMessage" containing a VP +including the requested VCs +{ + "@context": [ + "https://w3id.org/tractusx-trust/v0.8" + ], + "@type": "PresentationResponseMessage", + "presentation": ["dsJdh...UMetV"] +} +the presentation may contain multiple VC +end note + +con_prov -> con_prov: evaluate presentation (includes resolving \nissuer did resolving to check signature) + +con_prov --> con_cons: return catalog +deactivate con_prov + +@enduml diff --git a/iam-mock/jwtUtils.py b/iam-mock/jwtUtils.py new file mode 100644 index 00000000..099f2402 --- /dev/null +++ b/iam-mock/jwtUtils.py @@ -0,0 +1,96 @@ +# +# Copyright (c) 2024 Volkswagen AG +# Copyright (c) 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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +import jwt +from constants import ES256_PRIVATE_KEY, DID_DICT + + +""" +creates a jwt adding time information (nbf, iat, exp) to jwt + +claims: expects participant information (iss, aud, sub) to be present +issuer: to sign the jwt +scope: scope needed that will be added to the claims as "scope" and embeds the payload as jwt in "token" +embed_token: put a representation of this token as "token" claim into the token +""" +def create_jwt_from_claims(claims: dict, issuer: str, scope: str = None, embed_token: bool = False) -> dict: + + base_claims = { + "iat": 1541493724, + "exp": 32481718133, + } + claims.update(base_claims) + + # TODO check for update + if scope: # GRANT ACCESS request includes scope and token representation + claims["scope"] = scope + claims["token"] = create_token_from_payload(claims, issuer) + elif embed_token: # refresh token needs access token representation + claims["token"] = create_token_from_payload_with_vault_key(claims, issuer, DID_DICT[issuer]["kid_vault"], DID_DICT[issuer]["private_key"]) + else: + print("No scope given for self-issued token. No token claim created for it.") + + print(f"Created jwt for payload {claims} signed by {issuer}") + + return create_token_from_payload(claims, issuer) + + +""" +create a jwt for the payload, signed by did_signer using information from the vault (preconfigured information) + +Creates a header with a kid for a key, that can be understood by LocalPublicKeyServiceImpl +https://github.com/eclipse-edc/Connector/blob/main/core/common/lib/keys-lib/src/main/java/org/eclipse/edc/keys/LocalPublicKeyServiceImpl.java#L44 +""" +def create_token_from_payload_with_vault_key(payload: str, did_signer: str, kid: str, private_key: str): + + header = { + "alg": "RS256", + "kid": kid + } + + jwt_token = jwt.encode(payload, private_key, algorithm='RS256', headers=header) + + return jwt_token + + +""" +create a jwt for the payload, signed by did_signer + +Creates a header with a kid that can be handeled by the did exposed by mock_util.py +""" +def create_token_from_payload(payload: str, did_signer: str): + + header = { + "alg": "ES256", + "typ": "JWT", + "kid": did_signer+"#key1" + } + + jwt_token = jwt.encode(payload, ES256_PRIVATE_KEY, algorithm='ES256', headers=header) + + return jwt_token + + +""" +decode token without signature check (NON-PRODUCTION, MOCK!) +""" +def decode_token(jwt_token: str): + # don't check signature + return jwt.decode(jwt_token, options={"verify_signature": False}) diff --git a/iam-mock/keys/edc.key b/iam-mock/keys/edc.key new file mode 100644 index 00000000..b2a8cc49 --- /dev/null +++ b/iam-mock/keys/edc.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCw/VaXnS+IrNWr +DwcYVY+Kz4zwibh1pMUyd53lCvbP3QU2CSPURWGKnSY50PqQODdtbhHHIvrPeNaL +X0koEdnrxROBk109uGE80sQZxCm7y7CAVxYovg/8g7KQR4TxF6wY5WD8fM0TseRO +CIF2vYIxMRcvfNOZ2vS9sUYxs5M/I68oyjL/YVolokA9ejemgap9G+voa7q2inaS +1F3/Pw2EGm7PH1DKkiwTraigs0+mrON7N+/Mltze2Sj9xc07Iahla4QoxN8rBird +mOxNkqRuNU2B2gQVJal3pOqTvoHUJujG/UIPzHDRxDXj15bQi4uQCTd4Xl5lHiJD +lgA5moBRAgMBAAECggEAKD8XjYb8G+WHeexDJgSwzTUonLsIg9H52KHMORz+5mIh +UPoPmHHFfj6BhoSvsZNjAUKWDtU0uPCGwu8iRNcYWa15I841lfcjP3BDEQPjJJXr +Nyf2fUHJA1gURwxIXgWOyCOC5C9h9/BMFPWIsQ5jeFmsJsuJF5OrcyZIar1lxqWu +Q+HC7f/7JNkpR26uIyGjs1OXwfp+mHqze2Qf8hLWIXcN9tBCQZ75Cg7rarNVimMC +59QD80JZCHTaCX1ZtE1T8HM+53Ob78lnFCuBfiBT/S3O/NXVsEN9q6rMWKhETVWR +UX56EqZ7XGSMOzuZyK7kj1QsHzEMrrHjwDSNSjAqFQKBgQC6hEeAWPCEM+WVoF9n +mhvwZVZv/PPyLAarykBTGoeHR2hqNyih9JmcXL+XQHMlhy1Ka8NtJHvfyB1xhXgF +/d91i/Yq02+nZoJPNnVWo8zoXIAIq+xg9CBiu0agBxv45PjJkEkQmmEG4Iej1+Kf +5/+dI7sFjE2T4q/lLK0Aw3x+zQKBgQDy7Ho7eRi5CV1Ks+r5lpGGdM15hbE5tviE +fmJvaEUh3oWuwdkyFjD/QEPITG1bFuvhATdEEWxTbuswNEbELLhKCPcixcI0sLUO +6BeNi1YD6ouuqsWBLvmE4hvoDR7RlkpUduxWpZ2tNIDJYYTwCERhcYK9OtHU15kc +lS0pEjF/lQKBgEh+28/OQgYQqd7ji9GX+94PdW5n0mXBqQIixafHewAgyDvonpl8 +mixFfI6MlXTzuq3ffwEwGhncDV2vc/xYNf/ZW+A/eHmHhYTGdQss9ZsnQPid4m24 +1dGqWwQeX0f5r52gwFV8u9PRd8c+RS7EHP12At5gL1MY3CdmmwPd98jNAoGASvPV +/xWtICKYi10aCip/+kl9wJoUhadD5LWOL6uvcPTUsIgVONQKCCfPAjU6pJlc7E7Q +u4rYrqGRpYzrrMnTjtxXTH5SHqnLI69O3Rh50LmEob8FM4fH601MqPurX6WMh6Ut +5Moy7Wc+uWQCfYE/gAVi/nnwlkhzcJNCnOKFLUUCgYA4nbhLrdEeCBJas2+Z9aGw +/SurtHF2z2meAPO3VaYslf0D0xKzUIv5hkkzaNgs0pFGt0BcKfTWkYy/Hh4QXZhm +//ZrqbkVsqzDOcqGwQcDmUEN/T+vprUJVKqpNHXT6fz3OTydxLQ7K7SXzwXWYfRW +cpjdr0c1tVVLMyNG+Wahrg== +-----END PRIVATE KEY----- diff --git a/iam-mock/keys/private_key.pem b/iam-mock/keys/private_key.pem new file mode 100644 index 00000000..45b95560 --- /dev/null +++ b/iam-mock/keys/private_key.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIBBXsuwhriDNfFGgTrvotaWySrSW4Qdk5t7h2VpYU+UNoAoGCCqGSM49 +AwEHoUQDQgAEHif4b5mtiss522TgiV5C2V5ObJ3yKXxHSUMnKmozAOzFimz3gajr +GZKQSdF0W4XCNGvrEWvrUUHw5yXxs1ZgZQ== +-----END EC PRIVATE KEY----- diff --git a/iam-mock/keys/public_key.pem b/iam-mock/keys/public_key.pem new file mode 100644 index 00000000..98c4b3d5 --- /dev/null +++ b/iam-mock/keys/public_key.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHif4b5mtiss522TgiV5C2V5ObJ3y +KXxHSUMnKmozAOzFimz3gajrGZKQSdF0W4XCNGvrEWvrUUHw5yXxs1ZgZQ== +-----END PUBLIC KEY----- diff --git a/iam-mock/mock_util.py b/iam-mock/mock_util.py new file mode 100644 index 00000000..ff4bcbec --- /dev/null +++ b/iam-mock/mock_util.py @@ -0,0 +1,269 @@ +# +# Copyright (c) 2024 Volkswagen AG +# Copyright (c) 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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +import socket +from cryptography.hazmat.backends import default_backend +from fastapi import FastAPI, Request +import logging +import base64 +from cryptography.hazmat.primitives import serialization +from jwtUtils import decode_token, create_jwt_from_claims +from constants import ES256_PUBLIC_KEY, DID_TRUSTED_ISSUER, get_did_for_resolve_name, get_did_for_bpnl +from credential_service import create_verifiable_presentation +import uuid +from pathlib import Path + + +cwd = Path(".") +print(cwd.cwd()) +print([path.name for path in cwd.iterdir()]) + +app = FastAPI() + +logger = logging.getLogger("fastapi") + +""" +store STS GRANT ACCESS Request JWT token for uuid. + +Uuid is inserted into token as 'token_id' to use the token in SIGN TOKEN Request (remember request granted) +""" +id_token_map = {} + + +@app.get("/health") +async def health(): + return {"status": "UP"} + + +@app.post("/edr-log") +async def log(request: Request): + hostname = socket.gethostbyaddr(request.client.host)[0] + print("CALLED /edr-log from ", hostname) + body = await request.json() + + # Log the data + print(body) + + return {"message": "Data logged successfully"} + + +""" +Returns self-issued credential token following the dim adjustments + +Follows more or less the DIM Dispatcher mock +see https://github.com/eclipse-tractusx/tractusx-edc/blob/d7d3586ffc4ef03c858e38fde6bfa8687efa50c9/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/dispatchers/DimDispatcher.java +""" +@app.post("/sts") +async def secure_token_service(request: Request): + + print("") + body = await request.json() + sign_token_flag = True if body.get("grantAccess", None) is None else False + hostname = socket.gethostbyaddr(request.client.host)[0] + print("CALLED sts /sts for ", "SIGN TOKEN REQUEST" if sign_token_flag else "GRANT ACCESS REQUEST", " from ", hostname) + + print("POST with body ", body) + print("bearer of requestor is set as auth header" if request.headers["authorization"] else "bearer of requestor is NOT set as auth header") + print(f"bearer: {request.headers['authorization']}") + print(f"Request params received: {request.query_params}") + + # handle body similar to https://github.com/eclipse-tractusx/tractusx-edc/blob/d7d3586ffc4ef03c858e38fde6bfa8687efa50c9/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/dispatchers/DimDispatcher.java + grant_access = body.get("grantAccess", None) + if sign_token_flag: + sign_token = body["signToken"] + + decoded_token = decode_token(sign_token["token"]) + + # try to lookup existing token, if found use it + # else we're in token refresh + token_id = decoded_token.get('token_id', None) + if token_id: + token = id_token_map[token_id] + decoded_token = decode_token(token) + print(f"Identified matching token (decoded) {decoded_token}") + id_token_map.pop(token_id) + + # common request: issued by trusted issuer + claims = { + "iss": decoded_token["iss"], + "sub": decoded_token["sub"], + "aud": decoded_token["aud"] + } + + print(f"Request contains issuer {claims['iss']}, subject {claims['sub']}, audience {claims['aud']}, token {token}") + token = create_jwt_from_claims(claims, sign_token["issuer"], None) + print(f"Created jwt token: {token}") + vp = token + + else: + # refresh token request: iss, sub = client did + claims = { + "iss": get_did_for_bpnl(decoded_token["aud"]), + "sub": get_did_for_bpnl(decoded_token["aud"]), + "aud": get_did_for_bpnl(decoded_token["sub"]), + "jti": decoded_token["jti"], + "iat": decoded_token["iat"], + "exp": decoded_token["exp"], + } + + print(f"Request contains issuer {claims['iss']}, subject {claims['sub']}, audience {claims['aud']}, token {decoded_token}") + token = create_jwt_from_claims(claims, claims["iss"], None, True) + print(f"Created jwt token: {token}") + vp = token + + else: + token_id = str(uuid.uuid4()) + + claims = { + "iss": grant_access["consumerDid"], + "sub": grant_access["consumerDid"], + "aud": grant_access["providerDid"], + "token_id": token_id + } + + print(f"Request issuer {claims['iss']}, subject {claims['sub']}, audience {claims['aud']}") + print(f"Message contains bearer from {claims['iss']} oAuth Service") + scope = " ".join(grant_access["credentialTypes"]) if grant_access["credentialTypes"] is not None else None + + token = create_jwt_from_claims(claims, grant_access["consumerDid"], scope) + id_token_map[token_id] = token + vp = token + + return {"jwt": vp} + + +""" +provides the VP as soon as the connector asks for it. + +Creates a PresentationResponseMessage with a VP following this structure: +JWT enapsulating VP + vp: + { + ... + verifiableCredential: [ + vc jwt for scope 1, + vc jwt for scope 2 + ] + } +} +""" +@app.post("/presentations/query") +async def query_presentation(request: Request): + + print("") + hostname = socket.gethostbyaddr(request.client.host)[0] + print("CALLED /presentations/query from ", hostname) + + # consider subject to be holder & audience + jwt_requestor = extract_jwt_from_headers(request.headers) + + body = await request.json() + print("POST with body ", body) + print("JWT for query_presentation ", jwt_requestor) + print(f"Query for issuer {jwt_requestor['iss']}, sub {jwt_requestor['sub']}, audience {jwt_requestor['aud']} with scope {jwt_requestor.get('scope', '*no value set for scope*')}") + print("Request contains header for the issuer's oauth2 system") + + cx_scopes = [scope[1] for scope in extract_scopes(body["scope"])] + print(f"Will try to Mock CX Credential Scopes {cx_scopes}") + + response = { + "@context": [ + "https://w3id.org/tractusx-trust/v0.8" + ], + "@type": "PresentationResponseMessage", + "presentation": [create_verifiable_presentation(jwt_requestor['sub'], jwt_requestor['iss'], jwt_requestor['aud'], cx_scopes)], + } + + print("Response: ", response) + + return response + + +def get_bearer_from_headers(headers: [str]): + return headers["authorization"][len("Bearer "):] + + +def extract_jwt_from_headers(headers: [str]): + return decode_token(get_bearer_from_headers(headers)) + + +""" +Returns a DID document for the specified partner + +Mock: +- all DIDs use the same key pair for signing +- Credential Service is needed as fallback +""" +@app.get("/{partner_did}/{did_path:path}") +def return_did(request: Request, partner_did: str, did_path: str): + + print("") + hostname = socket.gethostbyaddr(request.client.host)[0] + print(f"CALLED /{partner_did}/{did_path} from ", hostname) + + # get DID constant for path used + did_id = get_did_for_resolve_name(partner_did) + + # put elyptic curves accordingly + public_key = serialization.load_pem_public_key(ES256_PUBLIC_KEY.encode(), backend=default_backend()) + public_key_numbers = public_key.public_numbers() + + x = base64.urlsafe_b64encode(public_key_numbers.x.to_bytes(32, 'big')).rstrip(b'=').decode() + y = base64.urlsafe_b64encode(public_key_numbers.y.to_bytes(32, 'big')).rstrip(b'=').decode() + + did_to_return = { + "service": [ + { + "id": did_id, + "type": "CredentialService", + "serviceEndpoint": "http://mock-util-service:80" + } + ], + "verificationMethod": [ + { + "id": did_id + "#key1", # like "did:web:nginx:bdrs-client#key-1" + "type": "JsonWebKey2020", + "controller": did_id, + "publicKeyJwk": { + "kty": "EC", + "crv": "P-256", + "kid": did_id + "#key1", # like "did:web:nginx:bdrs-client#key-1" + "x": x, + "y": y + } + } + ], + "authentication": [], + "id": "http://tx-test.com/7bffc00d-3142-4cf2-a858-57c7493577f1", + "@context": [ + "https://w3id.org/did-resolution/v1" + ] + } + + print("RETURN DID: ", did_to_return) + + return did_to_return + + +""" +returns list of tuples in format (namespace: str, credential: str, access: str) +""" +def extract_scopes(scopes: [str]): + return [tuple(scope.split(":")) for scope in scopes] diff --git a/iam-mock/requirements.txt b/iam-mock/requirements.txt new file mode 100644 index 00000000..f1f3df97 --- /dev/null +++ b/iam-mock/requirements.txt @@ -0,0 +1,36 @@ +annotated-types==0.6.0 +anyio==4.2.0 +certifi==2023.11.17 +cffi==1.16.0 +click==8.1.7 +cryptography==42.0.5 +dnspython==2.6.1 +email-validator==2.1.0.post1 +exceptiongroup==1.2.0 +fastapi==0.111.0 +h11==0.14.0 +httpcore==1.0.2 +httptools==0.6.1 +httpx==0.26.0 +idna==3.7 +itsdangerous==2.1.2 +Jinja2==3.1.4 +MarkupSafe==2.1.4 +orjson==3.9.15 +pycparser==2.22 +pydantic==2.5.3 +pydantic-extra-types==2.4.1 +pydantic-settings==2.1.0 +pydantic_core==2.14.6 +PyJWT==2.8.0 +python-dotenv==1.0.1 +python-multipart==0.0.7 +PyYAML==6.0.1 +sniffio==1.3.0 +starlette==0.37.2 +typing_extensions==4.9.0 +ujson==5.9.0 +uvicorn==0.27.0 +uvloop==0.19.0 +watchfiles==0.21.0 +websockets==12.0 From f647d17f975790e5f8ed0f8d4a3074a6d73345d1 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 11:38:08 +0200 Subject: [PATCH 02/24] chore: update edc to 0.7.1 and data seeding --- charts/tx-data-provider/Chart.yaml | 4 +- .../Testdata_AsBuilt-combustion.json | 5755 ++++++++--------- .../resources/transform-and-upload.py | 69 +- .../tx-data-provider/resources/upload-data.sh | 4 +- .../templates/vault-edc-configmap.yaml | 5 +- charts/tx-data-provider/values.yaml | 29 +- 6 files changed, 2708 insertions(+), 3158 deletions(-) diff --git a/charts/tx-data-provider/Chart.yaml b/charts/tx-data-provider/Chart.yaml index d481f2a5..e1928e4c 100644 --- a/charts/tx-data-provider/Chart.yaml +++ b/charts/tx-data-provider/Chart.yaml @@ -23,7 +23,7 @@ name: tx-data-provider description: A Helm chart for Kubernetes type: application -version: 0.0.5 +version: 0.1.0 appVersion: 0.0.1 dependencies: @@ -37,7 +37,7 @@ dependencies: condition: simple-data-backend.enabled - name: tractusx-connector repository: https://eclipse-tractusx.github.io/charts/dev - version: 0.5.3 + version: 0.7.1 condition: tractusx-connector.enabled - name: vault version: 0.20.0 diff --git a/charts/tx-data-provider/resources/Testdata_AsBuilt-combustion.json b/charts/tx-data-provider/resources/Testdata_AsBuilt-combustion.json index 2a2c3ee6..f997afa7 100644 --- a/charts/tx-data-provider/resources/Testdata_AsBuilt-combustion.json +++ b/charts/tx-data-provider/resources/Testdata_AsBuilt-combustion.json @@ -2,25 +2,26 @@ "policies": { "Test-Policy": { "@context": { - "odrl": "http://www.w3.org/ns/odrl/2/" + "odrl": "http://www.w3.org/ns/odrl/2/", + "cx-policy": "https://w3id.org/catenax/policy/" }, "@type": "PolicyDefinitionRequestDto", "@id": "test", "policy": { - "@type": "Policy", + "@type": "odrl:Set", "odrl:permission": [ { - "odrl:action": "USE", + "odrl:action": "use", "odrl:constraint": { "@type": "AtomicConstraint", "odrl:or": [ { "@type": "Constraint", - "odrl:leftOperand": "PURPOSE", + "odrl:leftOperand": "cx-policy:UsagePurpose", "odrl:operator": { "@id": "odrl:eq" }, - "odrl:rightOperand": "TEST" + "odrl:rightOperand": "cx.core.industrycore:1" } ] } @@ -66,3828 +67,3352 @@ ] }, { - "urn:bamm:io.catenax.vehicle.product_description:1.0.0#ProductDescription": [ + "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "bodyVariant": "Limousine", - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "engine": { - "size": 2998, - "power": 143 - }, - "emptyWeight": 1.73, - "fuel": "Benzin", - "vehicleModel": "Vehicle Combustion", - "productionDateGMT": "2010-01-01", - "equipmentVariants": [ - { - "code": "S763C", - "description": "sport package", - "group": "special equipment" - }, - { - "code": "S378B", - "description": "integrated child seats", - "group": "special equipment" - }, - { - "code": "A458D", - "description": "parking assistance ", - "group": "special equipment" - }, - { - "code": "C247R", - "description": "trailer hitch", - "group": "special equipment" - } - ], - "anonymisedIdentifier": "sOMtThyhVNDWUZNRcBaQXXI", - "mileage": [ - { - "mileagePhase": "as maintained by workshop", - "mileageTimestamp": "2015-01-11", - "mileageDistance": 120000 - } - ] - } - ], - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ - { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "JJ-55", - "key": "manufacturerPartId" - }, - { - "value": "OMCVKQBVDJLYRWLAX", - "key": "partInstanceId" - }, - { - "value": "OMCVKQBVDJLYRWLAX", - "key": "van" - } - ], - "manufacturingInformation": { - "date": "2018-12-16T18:41:02.000Z", - "country": "DEU" - }, - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "partTypeInformation": { - "manufacturerPartId": "JJ-55", - "classification": "product", - "nameAtManufacturer": "Vehicle Combustion" - } - } - ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ - { - "component": [ - { - "materialName": "Iron", - "recycledContent": 80, - "materialClass": "1.1", - "quantity": { - "unit": "unit:kilogram", - "value": 327.6 - }, - "aggregateState": "solid", - "materialAbbreviation": "IR334" - }, - { - "materialName": "Polyethylen", - "recycledContent": 24, - "materialClass": "5.5.1", - "quantity": { - "unit": "unit:kilogram", - "value": 163.8 - }, - "aggregateState": "solid", - "materialAbbreviation": "PE221" - }, - { - "materialName": "Polyamid6", - "recycledContent": 0, - "materialClass": "5.5.1", - "quantity": { - "unit": "unit:kilogram", - "value": 40.95 - }, - "aggregateState": "solid", - "materialAbbreviation": "POL6" - }, + "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "childItems": [ { - "materialName": "Aluminium", - "recycledContent": 1, - "materialClass": "2.1", - "quantity": { - "unit": "unit:kilogram", - "value": 286.65 + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" }, - "aggregateState": "solid", - "materialAbbreviation": "ALU331" - }, - { - "materialName": "Kerosene waxes and hydrocarbon waxes, oxidized, lithium salts", - "recycledContent": 25, - "materialClass": "0.7", + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", "quantity": { - "unit": "unit:kilogram", - "value": 109.2 + "unit": "unit:piece", + "value": 1 }, - "aggregateState": "solid", - "materialAbbreviation": "W123" + "businessPartner": "BPNL00000003AYRE", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "materialName": "Glue", - "recycledContent": 0, - "materialClass": "6.2", - "quantity": { - "unit": "unit:kilogram", - "value": 54.6 + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" }, - "aggregateState": "solid", - "materialAbbreviation": "GL338" - }, - { - "materialName": "Carbon Steel", - "recycledContent": 4, - "materialClass": "1.1.2", + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", "quantity": { - "unit": "unit:kilogram", - "value": 382.2 + "unit": "unit:piece", + "value": 1 }, - "aggregateState": "solid", - "materialAbbreviation": "CS2" - }, - { - "materialName": "Cooper", - "recycledContent": 6, - "materialClass": "3.1", - "quantity": { - "unit": "unit:kilogram", - "value": 250.2 - }, - "aggregateState": "solid", - "materialAbbreviation": "CO7" + "businessPartner": "BPNL00000003B2OM", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "materialName": "Rubber", - "recycledContent": 0, - "materialClass": "5.3", - "quantity": { - "unit": "unit:kilogram", - "value": 7.8 + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" }, - "aggregateState": "solid", - "materialAbbreviation": "R22" - }, - { - "materialName": "Textiles", - "recycledContent": 22, - "materialClass": "5.5.2", + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", "quantity": { - "unit": "unit:kilogram", - "value": 5.12 + "unit": "unit:piece", + "value": 1 }, - "aggregateState": "solid", - "materialAbbreviation": "TEX1" + "businessPartner": "BPNL00000003B5MJ", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.certificate_of_destruction:1.0.1#CertificateOfDestruction": [ + "bpnl": "BPNL00000003AYRE", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "dismantlerProperties": { - "expiryDate": "2023-03-14", - "governmentAddress": { - "zip": "68161/12", - "country": "UR", - "street": "Bernstraße", - "houseNumber": "45", - "name": "VLhpfQGTMDYpsBZxvfBoeygjb", - "location": "Mannheim" - }, - "dismantlerAuditorContact": { - "phone": "+908 0984", - "fax": "2118145186333995599 4455362573 92903453" - }, - "receiverAuditorAddress": { - "zip": "68161/12", - "country": "AR", - "street": "Bernstraße", - "houseNumber": "45", - "name": "UMaAIKKIkknjWEXJUfPxxQHeWKEJ", - "location": "Mannheim" - }, - "dismantlerContact": { - "phone": " 0437170 59659481408170668550001606181190496817797071900 16680 7 6926221384 05844893247741871 583", - "fax": "29 013 2258035667 5403" - }, - "dismantlerAuditorAddress": { - "zip": "68161/12", - "country": "GI", - "street": "Bernstraße", - "houseNumber": "45", - "name": "dpHYZGhtgdntugzvvKAXLhM", - "location": "Mannheim" - }, - "dismantlerAddress": { - "zip": "68161/12", - "country": "KQ", - "street": "Bernstraße", - "houseNumber": "45", - "name": "RYtGKbgicZaHCBRQDSx", - "location": "Mannheim" - }, - "issueDate": "2023-03-14", - "isVehicleWithdrawnFromService": false - }, - "serialNumber": "LRP1087432", - "companyNumber": "S30A00065", - "vehicleProperties": { - "licenseAbbreviation": "HAL", - "isVehicleInformationComplete": false, - "licensePlate": "HAL-UI123", - "identification": "WBAAY711X0KC28153", - "emptyWeight": -17, - "model": "318 I", - "brand": "BMW", - "class": "01", - "firstRegistration": "19.12.2014" - }, - "returnPointProperties": { - "expiryDate": "2023-03-14", - "receiverAddress": { - "zip": "68161/12", - "country": "RV", - "street": "Bernstraße", - "houseNumber": "45", - "name": "JxkyvRnL", - "location": "Mannheim" - }, - "receiverAuditorAddress": { - "zip": "68161/12", - "country": "ZE", - "street": "Bernstraße", - "houseNumber": "45", - "name": "yedUsFwdkelQbxeTeQOvaScfqIOOmaa", - "location": "Mannheim" - }, - "receiverAuditorContact": { - "phone": "331526303180940 34307479 92660 38225647 520855838909 01 8 72520515310573752386", - "fax": "60298704457507 9 8577 76" - }, - "receiverContact": { - "phone": "+5585 6 2026 20021538 2747306418525503392771787 089739266209007778 279967117", - "fax": "4270096015 4309445925080622016597027979396859783 08514571099764 9" - }, - "issueDate": "2023-03-14", - "isVehicleWithdrawnFromService": true - }, - "vehicleOwnerProperties": { - "isVehicleOwnerInformationComplete": true, - "vehicleOwnerAddress": { - "zip": "68161/12", - "country": "DI", - "street": "Bernstraße", - "houseNumber": "45", - "name": "eOMtThyhVNLWUZNRcBaQKxI", - "location": "Mannheim" - }, - "citizenship": "DE" + "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "partTypeInformation": { + "manufacturerPartId": "ZX-55", + "classification": "product", + "nameAtManufacturer": "Vehicle Model A" }, - "dismantlingDate": "2023-03-14" + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] } ], - "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "childItems": [ - { - "catenaXId": "urn:uuid:775cdc89-a51d-42da-baf9-b410b1719e04", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:43640ccc-cd15-40dd-8226-9215a676ff92", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:08cdcd57-42ca-4e16-a073-aa97ce2c7a22", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:7e1a30b9-6ccf-4cc6-a5f0-cef6843e8385", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003CSGV", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003CSGV", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:bbb951e6-a629-42af-9d79-c0950ae43254", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:065e9010-a183-4bf0-ba3a-e889d4636781", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:f39fc85f-f19b-4d9a-875d-85d02931b1c0", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, + "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "sites": [ { - "catenaXId": "urn:uuid:3edb0b4e-45d1-4dc3-af79-f573cf4a5ea9", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:a2b83f8f-609f-4742-a51d-e5a70416b7e4", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:b9e5457b-f8c3-4a81-a328-caa294c4199c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:3d1236b1-6b85-4627-a5c8-588bc5525000", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:47e3b7c1-8cdb-44ff-8235-0ea1f172d0c3", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:f8986f8f-74f0-4866-8b81-8a0c9ac41dec", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:34a4aea4-c7d6-4b23-82d8-bd1fcd95e12e", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:eb470e60-0134-4105-9e91-19c24eb80590", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:7f897caf-95e1-4b65-ba96-a758cfdac3b2", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:7dd8c8ea-8cd1-4286-a5fb-f078ec07107a", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:4c1862d5-838e-4883-9921-b627e7fede21", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:18b4c8c6-a698-4c9c-9450-7a4baf950123", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:9c6623be-3b07-467f-9b8f-58c3f62e372b", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:70bcae9c-14fd-42c3-8203-507bb26c59cb", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:f0635ee2-88a6-4885-bc77-97b4c0bb7d05", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:89419518-5938-45f3-8ad8-55bceae0da10", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:154de940-9ec4-43e2-8fb3-cbfdf7e0bc7a", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, + "functionValidUntil": "2032-08-09T02:11:44.000Z", + "catenaXsiteId": "BPNS000004711DMY", + "function": "production", + "functionValidFrom": "2014-05-02T12:21:56.000Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "childItems": [ { - "catenaXId": "urn:uuid:dc041c0a-394e-4946-892b-43e29d659f39", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:aab8b4bc-57b8-4d56-bfed-5c287678ca8d", + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" + "unit": "unit:piece", + "value": 6 }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", + "businessPartner": "BPNL00000003AYRE", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, + } + ] + } + ], + "bpnl": "BPNL00000003AYRE", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + { + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "partTypeInformation": { + "manufacturerPartId": "38049661-08", + "classification": "product", + "nameAtManufacturer": "OEM A High Voltage Battery" + }, + "partSitesInformationAsPlanned": [ { - "catenaXId": "urn:uuid:4350270d-2db4-4340-9783-c93faa00fa98", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ + { + "parentParts": [ { - "catenaXId": "urn:uuid:a1f3a254-5cf3-4936-9083-3f5adbb32fcc", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:70242019-68c8-4cfb-9203-33046918def5", + "parentCatenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", "quantity": { "quantityNumber": 2.5, "measurementUnit": "unit:litre" }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, + } + ], + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c" + } + ], + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "sites": [ { - "catenaXId": "urn:uuid:5d4ff886-b41b-42ef-a50b-6c750190437f", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" + "functionValidUntil": "2030-09-23T02:17:24.000Z", + "catenaXsiteId": "BPNS000004711DMY", + "function": "production", + "functionValidFrom": "2018-11-03T14:27:17.000Z" + } + ] + } + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ + { + "orderNumber": "964704", + "secondaryMaterialContent": [ + { + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 12 + }, + "bioBasedClass": "gen2", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 15 + } }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "3.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:decigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "AISI", + "referencedStandardID": "5936", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + } + } + } + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "childItems": [ { - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" + "unit": "unit:piece", + "value": 10 }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003B2OM", + "businessPartner": "BPNL00000003AYRE", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" + "unit": "unit:kilogram", + "value": 0.11 }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003B5MJ", + "businessPartner": "BPNL00000003AXS3", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } - ] - }, - { - "catenaXId": "urn:uuid:775cdc89-a51d-42da-baf9-b410b1719e04", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "bpnl": "BPNL00000003AYRE", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:775cdc89-a51d-42da-baf9-b410b1719e04", - "customers": [ + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "partTypeInformation": { + "manufacturerPartId": "8840838-04", + "classification": "product", + "nameAtManufacturer": "HV Modul" + }, + "partSitesInformationAsPlanned": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "10030939-59", - "key": "manufacturerPartId" - }, - { - "value": "NO-275684310225530314522056", - "key": "partInstanceId" - }, - { - "value": "Company 7", - "key": "company" - }, + "parentParts": [ { - "value": "Brand 7", - "key": "brand" + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:775cdc89-a51d-42da-baf9-b410b1719e04", - "partTypeInformation": { - "manufacturerPartId": "10030939-59", - "customerPartId": "10030939-59", - "classification": "component", - "nameAtManufacturer": "Engine", - "nameAtCustomer": "Engine" - } + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97" } ], - "urn:bamm:io.catenax.physical_dimension:1.0.0#PhysicalDimension": [ - { - "physicalDimensionsProperty": { - "diameter": 560, - "width": 762, - "length": 843, - "weight": 180, - "height": 711 - } - } - ] - }, - { - "catenaXId": "urn:uuid:43640ccc-cd15-40dd-8226-9215a676ff92", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "catenaXId": "urn:uuid:43640ccc-cd15-40dd-8226-9215a676ff92", - "customers": [ + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "sites": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2031-10-12T04:51:28.000Z", + "catenaXsiteId": "BPNS000004711DMY", + "function": "production", + "functionValidFrom": "2019-12-29T16:36:39.000Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "32494586-73", - "key": "manufacturerPartId" - }, - { - "value": "NO-515270742220251370796035", - "key": "partInstanceId" - }, - { - "value": "Company 8", - "key": "company" - }, + "orderNumber": "44058", + "secondaryMaterialContent": [ { - "value": "Brand 8", - "key": "brand" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 12 + }, + "bioBasedClass": "gen1", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "4.2", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:centigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Redcert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "AISI", + "referencedStandardID": "2920", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + } + } + } + } } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:43640ccc-cd15-40dd-8226-9215a676ff92", - "partTypeInformation": { - "manufacturerPartId": "32494586-73", - "customerPartId": "32494586-73", - "classification": "component", - "nameAtManufacturer": "Differential Gear", - "nameAtCustomer": "Differential Gear" - } + ] } ] }, { - "catenaXId": "urn:uuid:08cdcd57-42ca-4e16-a073-aa97ce2c7a22", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:08cdcd57-42ca-4e16-a073-aa97ce2c7a22", - "customers": [ + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "childItems": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B0Q0", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003AYRE", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "67034319-44", - "key": "manufacturerPartId" - }, - { - "value": "NO-448221504414610593223919", - "key": "partInstanceId" - }, - { - "value": "Company 9", - "key": "company" - }, + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "partTypeInformation": { + "manufacturerPartId": "8840374-09", + "classification": "product", + "nameAtManufacturer": "ZB ZELLE" + }, + "partSitesInformationAsPlanned": [ { - "value": "Brand 9", - "key": "brand" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:08cdcd57-42ca-4e16-a073-aa97ce2c7a22", - "partTypeInformation": { - "manufacturerPartId": "67034319-44", - "customerPartId": "67034319-44", - "classification": "component", - "nameAtManufacturer": "Turbocharger", - "nameAtCustomer": "Turbocharger" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:7e1a30b9-6ccf-4cc6-a5f0-cef6843e8385", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:7e1a30b9-6ccf-4cc6-a5f0-cef6843e8385", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "73849201-61", - "key": "manufacturerPartId" - }, - { - "value": "NO-116958314159454152228810", - "key": "partInstanceId" - }, - { - "value": "Company 10", - "key": "company" - }, + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "sites": [ { - "value": "Brand 10", - "key": "brand" + "functionValidUntil": "2031-03-17T07:19:55.000Z", + "catenaXsiteId": "BPNS000004711DMY", + "function": "production", + "functionValidFrom": "2016-03-08T11:56:01.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:7e1a30b9-6ccf-4cc6-a5f0-cef6843e8385", - "partTypeInformation": { - "manufacturerPartId": "73849201-61", - "customerPartId": "73849201-61", - "classification": "component", - "nameAtManufacturer": "Catalysator", - "nameAtCustomer": "Catalysator" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", - "bpnl": "BPNL00000003CSGV", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", - "customers": [ + "orderNumber": "358677", + "secondaryMaterialContent": [ { - "businessPartner": "BPNL00000003CSGV", - "parentItems": [ + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 14 + }, + "bioBasedClass": "gen2", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "2.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:gram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "certificateName": "Yellowcert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "materialNameStandardized": { + "referencedStandard": "JASO", + "referencedStandardID": "8149", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } ] } + ] + }, + { + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "childItems": [] + } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003B0Q0", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003CSGV", - "key": "manufacturerId" - }, - { - "value": "22782277-50", - "key": "manufacturerPartId" - }, - { - "value": "NO-206024867128775731562781", - "key": "partInstanceId" - }, - { - "value": "Company 3", - "key": "company" - }, + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "partTypeInformation": { + "manufacturerPartId": "7A047C7-01", + "classification": "product", + "nameAtManufacturer": "N Tier A CathodeMaterial" + }, + "partSitesInformationAsPlanned": [ { - "value": "Brand 3", - "key": "brand" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", - "partTypeInformation": { - "manufacturerPartId": "22782277-50", - "customerPartId": "22782277-50", - "classification": "component", - "nameAtManufacturer": "Door f-l", - "nameAtCustomer": "Door front-left" - } + ] } ], - "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", - "childItems": [ + "parentParts": [ { - "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", "quantity": { "quantityNumber": 2.5, "measurementUnit": "unit:litre" }, - "hasAlternatives": true, - "businessPartner": "BPNL00000000BJTL", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } + ], + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699" + } + ], + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "sites": [ + { + "functionValidUntil": "2028-09-25T14:38:07.000Z", + "catenaXsiteId": "BPNS00000003B0Q0", + "function": "production", + "functionValidFrom": "2013-01-13T21:53:56.000Z" + } + ] + } + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ + { + "orderNumber": "189071", + "secondaryMaterialContent": [ + { + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 14 + }, + "bioBasedClass": "gen1", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "2.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:centigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Yellowcert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "JIS", + "referencedStandardID": "9597", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 13 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + } + } + } + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "childItems": [] + } + ], + "bpnl": "BPNL00000003AXS3", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + { + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "partTypeInformation": { + "manufacturerPartId": "9A047C7-01", + "classification": "product", + "nameAtManufacturer": "Sub Tier B Sealant" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } ] } - ] - }, - { - "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", - "bpnl": "BPNL00000000BJTL", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000000BJTL", - "parentItems": [ - { - "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "sites": [ { - "value": "BPNL00000000BJTL", - "key": "manufacturerId" - }, - { - "value": "95657762-59", - "key": "manufacturerPartId" - }, - { - "value": "NO-446352534067160209016439", - "key": "partInstanceId" + "functionValidUntil": "2028-11-24T09:15:39.000Z", + "catenaXsiteId": "BPNS00000003AXS3", + "function": "production", + "functionValidFrom": "2020-02-27T23:48:03.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", - "partTypeInformation": { - "manufacturerPartId": "95657762-59", - "customerPartId": "95657762-59", - "classification": "component", - "nameAtManufacturer": "Door Key", - "nameAtCustomer": "Door Key" - } + ] } ], - "urn:bamm:io.catenax.just_in_sequence_part:1.0.0#JustInSequencePart": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "localIdentifiers": [ + "orderNumber": "256763", + "secondaryMaterialContent": [ { - "value": "17925839YFR", - "key": "jisNumber" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 12 + }, + "bioBasedClass": "gen3", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "1.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:gram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "JIS", + "referencedStandardID": "5169", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + } + } + } + } } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "HUR" - }, - "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", - "partTypeInformation": { - "manufacturerPartId": "123-0.740-3434-A", - "customerPartId": "PRT-12345", - "classification": "product", - "nameAtManufacturer": "Door Key", - "nameAtCustomer": "Door Key" - } + ] } ] }, { - "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", - "bpnl": "BPNL00000003CSGV", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", - "customers": [ + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "childItems": [ { - "businessPartner": "BPNL00000003CSGV", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B3NX", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B0Q0", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003B2OM", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003CSGV", - "key": "manufacturerId" - }, - { - "value": "95657362-64", - "key": "manufacturerPartId" - }, - { - "value": "NO-676290347398436286477412", - "key": "partInstanceId" - }, - { - "value": "Company 4", - "key": "company" - }, + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "partTypeInformation": { + "manufacturerPartId": "32494586-73", + "classification": "product", + "nameAtManufacturer": "Tier A Gearbox" + }, + "partSitesInformationAsPlanned": [ { - "value": "Brand 4", - "key": "brand" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", - "partTypeInformation": { - "manufacturerPartId": "33740332-54", - "customerPartId": "33740332-54", - "classification": "component", - "nameAtManufacturer": "Door f-r", - "nameAtCustomer": "Door front-right" - } + ] } ], - "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", - "childItems": [ + "parentParts": [ { - "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", "quantity": { "quantityNumber": 2.5, "measurementUnit": "unit:litre" }, - "hasAlternatives": true, - "businessPartner": "BPNL00000000BJTL", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ] - } - ] - }, - { - "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", - "bpnl": "BPNL00000000BJTL", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ - { - "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", - "customers": [ + }, { - "businessPartner": "BPNL00000000BJTL", - "parentItems": [ - { - "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000000BJTL", - "key": "manufacturerId" - }, + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "sites": [ { - "value": "95657762-59", - "key": "manufacturerPartId" - }, - { - "value": "NO-528984516096177057567388", - "key": "partInstanceId" + "functionValidUntil": "2024-11-10T09:37:04.000Z", + "catenaXsiteId": "BPNS00000003B2OM", + "function": "production", + "functionValidFrom": "2017-08-21T23:20:17.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", - "partTypeInformation": { - "manufacturerPartId": "95657762-59", - "customerPartId": "95657762-59", - "classification": "component", - "nameAtManufacturer": "Door Key", - "nameAtCustomer": "Door Key" - } + ] } ], - "urn:bamm:io.catenax.just_in_sequence_part:1.0.0#JustInSequencePart": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "localIdentifiers": [ + "orderNumber": "969986", + "secondaryMaterialContent": [ { - "value": "90650930JPZ", - "key": "jisNumber" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 13 + }, + "bioBasedClass": "gen3", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "5.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:gram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Greencert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "JIS", + "referencedStandardID": "3760", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + } + } + } } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "HUR" - }, - "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", - "partTypeInformation": { - "manufacturerPartId": "123-0.740-3434-A", - "customerPartId": "PRT-12345", - "classification": "product", - "nameAtManufacturer": "Door Key", - "nameAtCustomer": "Door Key" - } + ] } ] }, { - "catenaXId": "urn:uuid:bbb951e6-a629-42af-9d79-c0950ae43254", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:bbb951e6-a629-42af-9d79-c0950ae43254", - "customers": [ + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "childItems": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B0Q0", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003B3NX", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "15635759-16", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "partTypeInformation": { + "manufacturerPartId": "6740244-02", + "classification": "product", + "nameAtManufacturer": "Sub Tier A Sensor" + }, + "partSitesInformationAsPlanned": [ { - "value": "NO-242909721414993818510983", - "key": "partInstanceId" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:bbb951e6-a629-42af-9d79-c0950ae43254", - "partTypeInformation": { - "manufacturerPartId": "15635759-16", - "customerPartId": "15635759-16", - "classification": "component", - "nameAtManufacturer": "Door r-l", - "nameAtCustomer": "Door rear-left" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:065e9010-a183-4bf0-ba3a-e889d4636781", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:065e9010-a183-4bf0-ba3a-e889d4636781", - "customers": [ + "orderNumber": "472610", + "secondaryMaterialContent": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 13 + }, + "bioBasedClass": "gen2", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "2.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:centigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "materialNameStandardized": { + "referencedStandard": "GB", + "referencedStandardID": "9865", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 12 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } ] } - ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ - { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "28673126-98", - "key": "manufacturerPartId" - }, - { - "value": "NO-261677081035679006839137", - "key": "partInstanceId" - }, - { - "value": "Company 5", - "key": "company" - }, - { - "value": "Brand 5", - "key": "brand" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:065e9010-a183-4bf0-ba3a-e889d4636781", - "partTypeInformation": { - "manufacturerPartId": "28673126-98", - "customerPartId": "28673126-98", - "classification": "component", - "nameAtManufacturer": "Door r-r", - "nameAtCustomer": "Door rear-right" - } - } ] }, { - "catenaXId": "urn:uuid:f39fc85f-f19b-4d9a-875d-85d02931b1c0", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:f39fc85f-f19b-4d9a-875d-85d02931b1c0", - "customers": [ - { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ] + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "childItems": [] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003B0Q0", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "94421589-82", - "key": "manufacturerPartId" - }, - { - "value": "NO-795008552585468489429670", - "key": "partInstanceId" - }, - { - "value": "Company 6", - "key": "company" - }, + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "partTypeInformation": { + "manufacturerPartId": "7A047KK-01", + "classification": "product", + "nameAtManufacturer": "N Tier A NTier Product" + }, + "partSitesInformationAsPlanned": [ { - "value": "Brand 6", - "key": "brand" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:f39fc85f-f19b-4d9a-875d-85d02931b1c0", - "partTypeInformation": { - "manufacturerPartId": "94421589-82", - "customerPartId": "94421589-82", - "classification": "component", - "nameAtManufacturer": "Engine hood", - "nameAtCustomer": "Engine hood" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:3edb0b4e-45d1-4dc3-af79-f573cf4a5ea9", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:3edb0b4e-45d1-4dc3-af79-f573cf4a5ea9", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "85023955-75", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "sites": [ { - "value": "NO-165793486598711243587281", - "key": "partInstanceId" + "functionValidUntil": "2029-12-12T20:52:56.000Z", + "catenaXsiteId": "BPNS00000003B0Q0", + "function": "production", + "functionValidFrom": "2013-02-12T16:37:07.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:3edb0b4e-45d1-4dc3-af79-f573cf4a5ea9", - "partTypeInformation": { - "manufacturerPartId": "85023955-75", - "customerPartId": "85023955-75", - "classification": "component", - "nameAtManufacturer": "Tailgate", - "nameAtCustomer": "Tailgate" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:a2b83f8f-609f-4742-a51d-e5a70416b7e4", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:a2b83f8f-609f-4742-a51d-e5a70416b7e4", - "customers": [ + "orderNumber": "809218", + "secondaryMaterialContent": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 10 + }, + "bioBasedClass": "gen1", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 19 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "4.2", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:decagram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "materialNameStandardized": { + "referencedStandard": "JASO", + "referencedStandardID": "2931", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + } + } + } } ] } - ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ - { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "13769860-47", - "key": "manufacturerPartId" - }, - { - "value": "NO-982199117979996230327452", - "key": "partInstanceId" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:a2b83f8f-609f-4742-a51d-e5a70416b7e4", - "partTypeInformation": { - "manufacturerPartId": "13769860-47", - "customerPartId": "13769860-47", - "classification": "component", - "nameAtManufacturer": "Fender left", - "nameAtCustomer": "Fender right" - } - } ] }, { - "catenaXId": "urn:uuid:b9e5457b-f8c3-4a81-a328-caa294c4199c", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:b9e5457b-f8c3-4a81-a328-caa294c4199c", - "customers": [ + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "childItems": [] + } + ], + "bpnl": "BPNL00000003B0Q0", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + { + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "partTypeInformation": { + "manufacturerPartId": "7A987KK-04", + "classification": "product", + "nameAtManufacturer": "N Tier A Plastics" + }, + "partSitesInformationAsPlanned": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, + "parentParts": [ { - "value": "36643162-35", - "key": "manufacturerPartId" - }, - { - "value": "NO-606833663331752158305255", - "key": "partInstanceId" + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:b9e5457b-f8c3-4a81-a328-caa294c4199c", - "partTypeInformation": { - "manufacturerPartId": "36643162-35", - "customerPartId": "36643162-35", - "classification": "component", - "nameAtManufacturer": "Fender right", - "nameAtCustomer": "Fender right" - } + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d" } - ] - }, - { - "catenaXId": "urn:uuid:3d1236b1-6b85-4627-a5c8-588bc5525000", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "catenaXId": "urn:uuid:3d1236b1-6b85-4627-a5c8-588bc5525000", - "customers": [ + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "sites": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2031-04-17T22:24:22.000Z", + "catenaXsiteId": "BPNS00000003B0Q0", + "function": "production", + "functionValidFrom": "2019-03-30T08:41:08.000Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, + "orderNumber": "736994", + "secondaryMaterialContent": [ { - "value": "54165444-59", - "key": "manufacturerPartId" - }, - { - "value": "NO-787119127783260984229027", - "key": "partInstanceId" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 14 + }, + "bioBasedClass": "gen1", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 18 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "1.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:decigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "EN", + "referencedStandardID": "4785", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:3d1236b1-6b85-4627-a5c8-588bc5525000", - "partTypeInformation": { - "manufacturerPartId": "54165444-59", - "customerPartId": "54165444-59", - "classification": "component", - "nameAtManufacturer": "Bumper front", - "nameAtCustomer": "Bumper front" - } + ] } ] }, { - "catenaXId": "urn:uuid:47e3b7c1-8cdb-44ff-8235-0ea1f172d0c3", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:47e3b7c1-8cdb-44ff-8235-0ea1f172d0c3", - "customers": [ + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", + "childItems": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B3NX", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "quantity": { + "unit": "unit:kilogram", + "value": 0.3301 + }, + "businessPartner": "BPNL00000003AXS3", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003B5MJ", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "22768257-25", - "key": "manufacturerPartId" - }, - { - "value": "NO-219590668820517992402373", - "key": "partInstanceId" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:47e3b7c1-8cdb-44ff-8235-0ea1f172d0c3", + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", "partTypeInformation": { - "manufacturerPartId": "22768257-25", - "customerPartId": "22768257-25", - "classification": "component", - "nameAtManufacturer": "Bumper rear", - "nameAtCustomer": "Bumper rear" - } - } - ] - }, - { - "catenaXId": "urn:uuid:f8986f8f-74f0-4866-8b81-8a0c9ac41dec", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ - { - "catenaXId": "urn:uuid:f8986f8f-74f0-4866-8b81-8a0c9ac41dec", - "customers": [ + "manufacturerPartId": "ZX-55", + "classification": "product", + "nameAtManufacturer": "Tier B ECU1" + }, + "partSitesInformationAsPlanned": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "localIdentifiers": [ + "parentParts": [ { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "65529521-37", - "key": "manufacturerPartId" + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "value": "NO-080856994342155146459955", - "key": "partInstanceId" + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:f8986f8f-74f0-4866-8b81-8a0c9ac41dec", - "partTypeInformation": { - "manufacturerPartId": "65529521-37", - "customerPartId": "65529521-37", - "classification": "component", - "nameAtManufacturer": "Exterior mirror left", - "nameAtCustomer": "Exterior mirror left" - } + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b" } - ] - }, - { - "catenaXId": "urn:uuid:34a4aea4-c7d6-4b23-82d8-bd1fcd95e12e", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "catenaXId": "urn:uuid:34a4aea4-c7d6-4b23-82d8-bd1fcd95e12e", - "customers": [ + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", + "sites": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2031-07-14T14:36:49.000Z", + "catenaXsiteId": "BPNS00000003B5MJ", + "function": "production", + "functionValidFrom": "2018-02-07T04:54:43.000Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "58471477-24", - "key": "manufacturerPartId" - }, + "orderNumber": "906993", + "secondaryMaterialContent": [ { - "value": "NO-921583641616934362117013", - "key": "partInstanceId" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 10 + }, + "bioBasedClass": "gen3", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 24 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "4.2", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:decagram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Yellowcert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "EN", + "referencedStandardID": "1942", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 10 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:34a4aea4-c7d6-4b23-82d8-bd1fcd95e12e", - "partTypeInformation": { - "manufacturerPartId": "58471477-24", - "customerPartId": "58471477-24", - "classification": "component", - "nameAtManufacturer": "Exterior mirror right", - "nameAtCustomer": "Exterior mirror right" - } + ] } ] }, { - "catenaXId": "urn:uuid:eb470e60-0134-4105-9e91-19c24eb80590", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "childItems": [] + } + ], + "bpnl": "BPNL00000003AXS3", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:eb470e60-0134-4105-9e91-19c24eb80590", - "customers": [ + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "partTypeInformation": { + "manufacturerPartId": "6775244-06", + "classification": "product", + "nameAtManufacturer": "Sub Tier B Glue" + }, + "partSitesInformationAsPlanned": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, + "parentParts": [ { - "value": "09002013-68", - "key": "manufacturerPartId" + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "value": "NO-435589892033159670017872", - "key": "partInstanceId" + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:e3e2a4d8-58bc-4ae9-afa2-e8946fda1f77", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:eb470e60-0134-4105-9e91-19c24eb80590", - "partTypeInformation": { - "manufacturerPartId": "09002013-68", - "customerPartId": "09002013-68", - "classification": "component", - "nameAtManufacturer": "Trailer coupling", - "nameAtCustomer": "Tailer coupling" - } + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301" } - ] - }, - { - "catenaXId": "urn:uuid:7f897caf-95e1-4b65-ba96-a758cfdac3b2", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "catenaXId": "urn:uuid:7f897caf-95e1-4b65-ba96-a758cfdac3b2", - "customers": [ + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "sites": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2029-07-21T18:50:17.000Z", + "catenaXsiteId": "BPNS00000003AXS3", + "function": "production", + "functionValidFrom": "2016-05-20T12:11:20.000Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "43501996-98", - "key": "manufacturerPartId" - }, + "orderNumber": "748259", + "secondaryMaterialContent": [ { - "value": "NO-281781484624391664041885", - "key": "partInstanceId" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 13 + }, + "bioBasedClass": "gen3", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "3.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:gram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Yellowcert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "EN", + "referencedStandardID": "7650", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:7f897caf-95e1-4b65-ba96-a758cfdac3b2", - "partTypeInformation": { - "manufacturerPartId": "43501996-98", - "customerPartId": "43501996-98", - "classification": "component", - "nameAtManufacturer": "Dashboard", - "nameAtCustomer": "Dashboard" - } + ] } ] }, { - "catenaXId": "urn:uuid:7dd8c8ea-8cd1-4286-a5fb-f078ec07107a", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:7dd8c8ea-8cd1-4286-a5fb-f078ec07107a", - "customers": [ + "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "childItems": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003AYRE", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ] - } - ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ - { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" }, { - "value": "77795937-13", - "key": "manufacturerPartId" + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B2OM", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "value": "NO-790020640607494459054030", - "key": "partInstanceId" + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B5MJ", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:7dd8c8ea-8cd1-4286-a5fb-f078ec07107a", - "partTypeInformation": { - "manufacturerPartId": "77795937-13", - "customerPartId": "77795937-13", - "classification": "component", - "nameAtManufacturer": "Steering wheel", - "nameAtCustomer": "Steering wheel" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:4c1862d5-838e-4883-9921-b627e7fede21", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "bpnl": "BPNL00000003AYRE", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:4c1862d5-838e-4883-9921-b627e7fede21", - "customers": [ - { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "partTypeInformation": { + "manufacturerPartId": "ZX-55", + "classification": "product", + "nameAtManufacturer": "Vehicle Model A" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, + "catenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "sites": [ { - "value": "20125432-59", - "key": "manufacturerPartId" - }, - { - "value": "NO-612757303690674683293505", - "key": "partInstanceId" + "functionValidUntil": "2032-08-09T02:11:44.000Z", + "catenaXsiteId": "BPNS000004711DMY", + "function": "production", + "functionValidFrom": "2014-05-02T12:21:56.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:4c1862d5-838e-4883-9921-b627e7fede21", - "partTypeInformation": { - "manufacturerPartId": "20125432-59", - "customerPartId": "20125432-59", - "classification": "component", - "nameAtManufacturer": "Indicator left", - "nameAtCustomer": "Indicator left" - } + ] } ] }, { - "catenaXId": "urn:uuid:18b4c8c6-a698-4c9c-9450-7a4baf950123", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:18b4c8c6-a698-4c9c-9450-7a4baf950123", - "customers": [ + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "childItems": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "quantity": { + "unit": "unit:piece", + "value": 6 + }, + "businessPartner": "BPNL00000003AYRE", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003AYRE", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "19073706-76", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "partTypeInformation": { + "manufacturerPartId": "38049661-08", + "classification": "product", + "nameAtManufacturer": "OEM A High Voltage Battery" + }, + "partSitesInformationAsPlanned": [ { - "value": "NO-698844808749514107477154", - "key": "partInstanceId" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:18b4c8c6-a698-4c9c-9450-7a4baf950123", - "partTypeInformation": { - "manufacturerPartId": "19073706-76", - "customerPartId": "19073706-76", - "classification": "component", - "nameAtManufacturer": "Indicator right", - "nameAtCustomer": "Indicator right" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:9c6623be-3b07-467f-9b8f-58c3f62e372b", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:9c6623be-3b07-467f-9b8f-58c3f62e372b", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "45415162-57", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "sites": [ { - "value": "NO-807517859774734082276121", - "key": "partInstanceId" + "functionValidUntil": "2030-09-23T02:17:24.000Z", + "catenaXsiteId": "BPNS000004711DMY", + "function": "production", + "functionValidFrom": "2018-11-03T14:27:17.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:9c6623be-3b07-467f-9b8f-58c3f62e372b", - "partTypeInformation": { - "manufacturerPartId": "45415162-57", - "customerPartId": "45415162-57", - "classification": "component", - "nameAtManufacturer": "Led headlight", - "nameAtCustomer": "Led headlight" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:70bcae9c-14fd-42c3-8203-507bb26c59cb", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:70bcae9c-14fd-42c3-8203-507bb26c59cb", - "customers": [ + "orderNumber": "964704", + "secondaryMaterialContent": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 12 + }, + "bioBasedClass": "gen2", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 15 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "3.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:decigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "materialNameStandardized": { + "referencedStandard": "AISI", + "referencedStandardID": "5936", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + } + } + } } ] } - ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ - { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "78141846-87", - "key": "manufacturerPartId" - }, - { - "value": "NO-546190351306016257569238", - "key": "partInstanceId" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:70bcae9c-14fd-42c3-8203-507bb26c59cb", - "partTypeInformation": { - "manufacturerPartId": "78141846-87", - "customerPartId": "78141846-87", - "classification": "component", - "nameAtManufacturer": "Starter motor", - "nameAtCustomer": "Starter motor" - } - } ] }, { - "catenaXId": "urn:uuid:f0635ee2-88a6-4885-bc77-97b4c0bb7d05", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:f0635ee2-88a6-4885-bc77-97b4c0bb7d05", - "customers": [ + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "childItems": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "quantity": { + "unit": "unit:piece", + "value": 10 + }, + "businessPartner": "BPNL00000003AYRE", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "quantity": { + "unit": "unit:kilogram", + "value": 0.11 + }, + "businessPartner": "BPNL00000003AXS3", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003AYRE", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "81324139-23", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "partTypeInformation": { + "manufacturerPartId": "8840838-04", + "classification": "product", + "nameAtManufacturer": "HV Modul" + }, + "partSitesInformationAsPlanned": [ { - "value": "NO-610920127647230312791184", - "key": "partInstanceId" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:f0635ee2-88a6-4885-bc77-97b4c0bb7d05", - "partTypeInformation": { - "manufacturerPartId": "81324139-23", - "customerPartId": "81324139-23", - "classification": "component", - "nameAtManufacturer": "Alternator", - "nameAtCustomer": "Alternator" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:89419518-5938-45f3-8ad8-55bceae0da10", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:89419518-5938-45f3-8ad8-55bceae0da10", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:aad27ddb-43aa-4e42-98c2-01e529ef127c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "57929013-09", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "sites": [ { - "value": "NO-115336662399039736434130", - "key": "partInstanceId" + "functionValidUntil": "2031-10-12T04:51:28.000Z", + "catenaXsiteId": "BPNS000004711DMY", + "function": "production", + "functionValidFrom": "2019-12-29T16:36:39.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:89419518-5938-45f3-8ad8-55bceae0da10", - "partTypeInformation": { - "manufacturerPartId": "57929013-09", - "customerPartId": "57929013-09", - "classification": "component", - "nameAtManufacturer": "AC compressor", - "nameAtCustomer": "Air conditioning compressor" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:154de940-9ec4-43e2-8fb3-cbfdf7e0bc7a", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:154de940-9ec4-43e2-8fb3-cbfdf7e0bc7a", - "customers": [ + "orderNumber": "44058", + "secondaryMaterialContent": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 12 + }, + "bioBasedClass": "gen1", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "4.2", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:centigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "certificateName": "Redcert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "materialNameStandardized": { + "referencedStandard": "AISI", + "referencedStandardID": "2920", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + } + } + } + } } ] } - ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ - { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "61184040-23", - "key": "manufacturerPartId" - }, - { - "value": "NO-568588696862751854401234", - "key": "partInstanceId" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:154de940-9ec4-43e2-8fb3-cbfdf7e0bc7a", - "partTypeInformation": { - "manufacturerPartId": "61184040-23", - "customerPartId": "61184040-23", - "classification": "component", - "nameAtManufacturer": "Taillight rear", - "nameAtCustomer": "Taillight rear" - } - } ] }, { - "catenaXId": "urn:uuid:dc041c0a-394e-4946-892b-43e29d659f39", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:dc041c0a-394e-4946-892b-43e29d659f39", - "customers": [ + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "childItems": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B0Q0", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003AYRE", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "78744126-74", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "partTypeInformation": { + "manufacturerPartId": "8840374-09", + "classification": "product", + "nameAtManufacturer": "ZB ZELLE" + }, + "partSitesInformationAsPlanned": [ { - "value": "NO-726002968006933131248348", - "key": "partInstanceId" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:dc041c0a-394e-4946-892b-43e29d659f39", - "partTypeInformation": { - "manufacturerPartId": "78744126-74", - "customerPartId": "78744126-74", - "classification": "component", - "nameAtManufacturer": "Taillight front", - "nameAtCustomer": "Taillight front" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:aab8b4bc-57b8-4d56-bfed-5c287678ca8d", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:aab8b4bc-57b8-4d56-bfed-5c287678ca8d", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "12093297-03", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "sites": [ { - "value": "NO-135350386724457955812246", - "key": "partInstanceId" + "functionValidUntil": "2031-03-17T07:19:55.000Z", + "catenaXsiteId": "BPNS000004711DMY", + "function": "production", + "functionValidFrom": "2016-03-08T11:56:01.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:aab8b4bc-57b8-4d56-bfed-5c287678ca8d", - "partTypeInformation": { - "manufacturerPartId": "12093297-03", - "customerPartId": "12093297-03", - "classification": "component", - "nameAtManufacturer": "Axle part front", - "nameAtCustomer": "Axle part front" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:4350270d-2db4-4340-9783-c93faa00fa98", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:4350270d-2db4-4340-9783-c93faa00fa98", - "customers": [ + "orderNumber": "358677", + "secondaryMaterialContent": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 14 + }, + "bioBasedClass": "gen2", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "2.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:gram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "certificateName": "Yellowcert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "materialNameStandardized": { + "referencedStandard": "JASO", + "referencedStandardID": "8149", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } ] } - ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ - { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "88111709-49", - "key": "manufacturerPartId" - }, - { - "value": "NO-984494209791826774942811", - "key": "partInstanceId" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:4350270d-2db4-4340-9783-c93faa00fa98", - "partTypeInformation": { - "manufacturerPartId": "88111709-49", - "customerPartId": "88111709-49", - "classification": "component", - "nameAtManufacturer": "Axle part rear", - "nameAtCustomer": "Axle part rear" - } - } ] }, { - "catenaXId": "urn:uuid:a1f3a254-5cf3-4936-9083-3f5adbb32fcc", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:a1f3a254-5cf3-4936-9083-3f5adbb32fcc", - "customers": [ - { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ] + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "childItems": [] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003B0Q0", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "00871379-44", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "partTypeInformation": { + "manufacturerPartId": "7A047C7-01", + "classification": "product", + "nameAtManufacturer": "N Tier A CathodeMaterial" + }, + "partSitesInformationAsPlanned": [ { - "value": "NO-579353443505911048559341", - "key": "partInstanceId" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:a1f3a254-5cf3-4936-9083-3f5adbb32fcc", - "partTypeInformation": { - "manufacturerPartId": "00871379-44", - "customerPartId": "00871379-44", - "classification": "component", - "nameAtManufacturer": "Chassis", - "nameAtCustomer": "Chassis" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:70242019-68c8-4cfb-9203-33046918def5", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:70242019-68c8-4cfb-9203-33046918def5", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:c7a2b803-f8fe-4b79-b6fc-967ce847c9a9", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "08901347-87", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:4f7b1cf2-a598-4027-bc78-63f6d8e55699", + "sites": [ { - "value": "NO-373037462671625079929352", - "key": "partInstanceId" + "functionValidUntil": "2028-09-25T14:38:07.000Z", + "catenaXsiteId": "BPNS00000003B0Q0", + "function": "production", + "functionValidFrom": "2013-01-13T21:53:56.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:70242019-68c8-4cfb-9203-33046918def5", - "partTypeInformation": { - "manufacturerPartId": "08901347-87", - "customerPartId": "08901347-87", - "classification": "component", - "nameAtManufacturer": "Rims", - "nameAtCustomer": "Rims" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:5d4ff886-b41b-42ef-a50b-6c750190437f", - "bpnl": "BPNL00000003AZQP", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:5d4ff886-b41b-42ef-a50b-6c750190437f", - "customers": [ + "orderNumber": "189071", + "secondaryMaterialContent": [ { - "businessPartner": "BPNL00000003AZQP", - "parentItems": [ + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 14 + }, + "bioBasedClass": "gen1", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "2.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:centigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "certificateName": "Yellowcert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "materialNameStandardized": { + "referencedStandard": "JIS", + "referencedStandardID": "9597", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 13 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + } + } + } } ] } + ] + }, + { + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "childItems": [] + } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003AXS3", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AZQP", - "key": "manufacturerId" - }, - { - "value": "45863316-60", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "partTypeInformation": { + "manufacturerPartId": "9A047C7-01", + "classification": "product", + "nameAtManufacturer": "Sub Tier B Sealant" + }, + "partSitesInformationAsPlanned": [ { - "value": "NO-510364947223819435158870", - "key": "partInstanceId" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:5d4ff886-b41b-42ef-a50b-6c750190437f", - "partTypeInformation": { - "manufacturerPartId": "45863316-60", - "customerPartId": "45863316-60", - "classification": "component", - "nameAtManufacturer": "Tires", - "nameAtCustomer": "Tires" - } + ] } - ] - }, - { - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", - "bpnl": "BPNL00000003B2OM", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000003B2OM", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:e5c96ab5-896a-482c-8761-efd74777ca97", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ + "catenaXId": "urn:uuid:15d2fcc8-6439-4d1e-904b-e62b4d3bf323", + "sites": [ { - "value": "BPNL00000003B2OM", - "key": "manufacturerId" - }, - { - "value": "1O222E8-43", - "key": "manufacturerPartId" - }, - { - "value": "NO-494650065213380782911627", - "key": "partInstanceId" - }, - { - "value": "Company 2", - "key": "company" - }, - { - "value": "Brand 2", - "key": "brand" + "functionValidUntil": "2028-11-24T09:15:39.000Z", + "catenaXsiteId": "BPNS00000003AXS3", + "function": "production", + "functionValidFrom": "2020-02-27T23:48:03.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", - "partTypeInformation": { - "manufacturerPartId": "1O222E8-43", - "customerPartId": "1O222E8-43", - "classification": "component", - "nameAtManufacturer": "Transmission", - "nameAtCustomer": "Transmission" - } + ] } ], - "urn:bamm:io.catenax.transmission_pass:1.0.0#TransmissionPass": [ - { - "productSpecificParameters": { - "torqueConverter": [ - "RYtGKbgicZaHCBRQDSx" - ], - "driveType": "combustion engine", - "oilType": "Lifeguard Hybrid 2", - "spreading": 6.79, - "torque": 500, - "power": 300, - "standardGearRatio": { - "gear": "1", - "ratio": 4.1567 - }, - "oilCapacity": 8.9, - "electricPerformance": [ - "VLhpfQGTMDYpsBZxvfBoeygjb" - ], - "speedResistance": { - "speed": 7800, - "gear": "1" - } - }, - "instructions": { - "packagingInstructions": [ - { - "documentLink": "https://www.xxx.pdf", - "documentTitle": "Title A" - } - ], - "transportationInstructions": [ - { - "documentLink": "https://www.xxx.pdf", - "documentTitle": "Title A" - } - ], - "dismantlingProcedure": [ - { - "documentLink": "https://www.xxx.pdf", - "documentTitle": "Title A" - } - ], - "vehicleDismantlingProcedure": [ - { - "documentLink": "https://www.xxx.pdf", - "documentTitle": "Title A" - } - ], - "safetyMeasures": [ - { - "documentLink": "https://www.xxx.pdf", - "documentTitle": "Title A" - } - ] - }, - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", - "identification": { - "localIdentifiers": [ - { - "value": "NO-494650065213380782911627", - "key": "PartInstanceID" - } - ], - "dataMatrixCode": "UMaAIKKIkknjWEXJUfPxxQHeWKEJ", - "manufacturerId": "BPNL00000003B2OM" - }, - "sparePartSupplier": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ + { + "orderNumber": "256763", + "secondaryMaterialContent": [ { - "supplierId": "BPNL1234567890ZZ", - "supplierContact": { - "website": "https://www.samsung.com", - "phoneNumber": "+49 89 1234567890", - "faxNumber": "+49 89 0987654321", - "email": "test.mail@example.com" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 12 + }, + "bioBasedClass": "gen3", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } }, - "sparePartName": "torque converter" - } - ], - "stateOfHealth": { - "serviceHistory": [ - "2023-05-22T13:16:47.239+02:00" - ], - "remanufacturing": { - "productStatusValue": "first life", - "remanufacturingDate": "2023-05-22T13:16:47.239+02:00" - }, - "expectedLifespan": 500000 - }, - "generalInformation": { - "additionalInformation": "JxkyvRnL", - "physicalDimensionsProperty": { - "diameter": 0.03, - "width": 1000, - "length": 20000.1, - "weight": 100.7, - "height": 0.1 - }, - "warrantyPeriod": 60, - "productDescription": "manual transmission", - "productType": "8HP60MH" - }, - "sustainability": { - "carbonFootprint": { - "productOrSectorSpecificRules": [ + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "1.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:gram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "otherOperatorName": "NSF", - "ruleNames": [ - "ABC 2021" - ], - "operator": "PEF" + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "crossSectoralStandardsUsed": [ - { - "crossSectoralStandard": "GHG Protocol Product standard" + "materialNameStandardized": { + "referencedStandard": "JIS", + "referencedStandardID": "5169", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + } + } } - ], - "co2FootprintTotal": -1.7976931348623157E308 - }, - "substancesOfConcern": [ - "yedUsFwdkelQbxeTeQOvaScfqIOOmaa" - ], - "responsibleSourcingDocument": [ - { - "documentLink": "https://www.xxx.pdf", - "documentTitle": "Title A" } - ], - "recyclateContent": { - "nickel": -1.7976931348623157E308, - "lithium": -1.7976931348623157E308, - "cobalt": -1.7976931348623157E308, - "otherSubstance": [ - { - "substanceName": "Lead", - "substancePercentage": 8 - } - ] - }, - "criticalRawMaterials": [ - "eOMtThyhVNLWUZNRcBaQKxI" - ] - } - } - ], - "urn:bamm:io.catenax.physical_dimension:1.0.0#PhysicalDimension": [ - { - "physicalDimensionsProperty": { - "diameter": 380, - "width": 590, - "length": 810, - "weight": 85, - "height": 610 - } + } + ] } - ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + ] + }, + { + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "component": [ + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "childItems": [ { - "materialName": "Carbon Steel", - "recycledContent": 86, - "materialClass": "1.1.2", - "quantity": { - "unit": "unit:kilogram", - "value": 72.843 + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" }, - "aggregateState": "solid", - "materialAbbreviation": "CS2" - }, - { - "materialName": "Oil", - "recycledContent": 5, - "materialClass": "9.2", + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", "quantity": { - "unit": "unit:kilogram", - "value": 6.9 + "unit": "unit:piece", + "value": 1 }, - "aggregateState": "liquid", - "materialAbbreviation": "SAE40" + "businessPartner": "BPNL00000003B3NX", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "materialName": "Copper", - "recycledContent": 5, - "materialClass": "3.1", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", "quantity": { - "unit": "unit:kilogram", - "value": 1.2 + "unit": "unit:piece", + "value": 1 }, - "aggregateState": "solid", - "materialAbbreviation": "CO7" + "businessPartner": "BPNL00000003B0Q0", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + "bpnl": "BPNL00000003B2OM", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", - "childItems": [ + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "partTypeInformation": { + "manufacturerPartId": "32494586-73", + "classification": "product", + "nameAtManufacturer": "Tier A Gearbox" + }, + "partSitesInformationAsPlanned": [ { - "catenaXId": "urn:uuid:cc2d7229-fd38-49c2-a0ea-4e0537964dd0", - "quantity": { - "quantityNumber": 0.2014, - "measurementUnit": "unit:kilogram" - }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AYRE", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + ], + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ + { + "parentParts": [ { - "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", "quantity": { "quantityNumber": 2.5, "measurementUnit": "unit:litre" }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003B3NX", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", "quantity": { - "quantityNumber": 0.2341, - "measurementUnit": "unit:kilogram" + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AZQP", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] - } - ] - }, - { - "catenaXId": "urn:uuid:cc2d7229-fd38-49c2-a0ea-4e0537964dd0", - "urn:bamm:io.catenax.batch:2.0.0#Batch": [ - { - "localIdentifiers": [ - { - "value": "BPNL00000003B0Q0", - "key": "manufacturerId" - }, - { - "value": "BID12345678", - "key": "batchId" - } ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "HUR" - }, - "catenaXId": "urn:uuid:cc2d7229-fd38-49c2-a0ea-4e0537964dd0", - "partTypeInformation": { - "manufacturerPartId": "123-0.740-3434-A", - "classification": "product", - "nameAtManufacturer": "Engineering Plasticst" - } + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7" } ], - "bpnl": "BPNL00000003B0Q0", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "catenaXId": "urn:uuid:cc2d7229-fd38-49c2-a0ea-4e0537964dd0", - "customers": [ + "catenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "sites": [ { - "businessPartner": "BPNL00000003B0Q0", - "parentItems": [ - { - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2024-11-10T09:37:04.000Z", + "catenaXsiteId": "BPNS00000003B2OM", + "function": "production", + "functionValidFrom": "2017-08-21T23:20:17.000Z" } ] } ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "materialName": "Engineering Plastics", - "materialClass": "5.1", - "component": [ + "orderNumber": "969986", + "secondaryMaterialContent": [ { - "materialName": "PA66", - "recycledContent": 72, - "materialClass": "5.1", - "quantity": { - "unit": "unit:percent", - "value": 70 + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 13 + }, + "bioBasedClass": "gen3", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } }, - "aggregateState": "solid", - "materialAbbreviation": "PA66" - }, - { - "materialName": "GF-Faser", - "recycledContent": 43, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", "materialClass": "5.1", - "quantity": { - "unit": "unit:percent", - "value": 30 + "unitOfMeasure": { + "unitOfMeasureKey": "unit:gram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 }, - "aggregateState": "solid", - "materialAbbreviation": "GF30" + "certificate": [ + { + "certificateName": "Greencert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "JIS", + "referencedStandardID": "3760", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + } + } + } } ] } ] }, { - "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", - "bpnl": "BPNL00000003B3NX", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", - "customers": [ + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "childItems": [ { - "businessPartner": "BPNL00000003B3NX", - "parentItems": [ - { - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "quantity": { + "unit": "unit:piece", + "value": 1 + }, + "businessPartner": "BPNL00000003B0Q0", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "bpnl": "BPNL00000003B3NX", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003B3NX", - "key": "manufacturerId" - }, - { - "value": "60127V1-28", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", + "partTypeInformation": { + "manufacturerPartId": "6740244-02", + "classification": "product", + "nameAtManufacturer": "Sub Tier A Sensor" + }, + "partSitesInformationAsPlanned": [ { - "value": "NO-842145548662602762555246", - "key": "partInstanceId" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", - "partTypeInformation": { - "manufacturerPartId": "60127V1-28", - "customerPartId": "60127V1-28", - "classification": "component", - "nameAtManufacturer": "Sensor", - "nameAtCustomer": "Sensor" - } + ] } ], - "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", - "childItems": [ + "orderNumber": "472610", + "secondaryMaterialContent": [ { - "catenaXId": "urn:uuid:0afaff8e-28c7-4788-b7a4-071ef85dee19", - "quantity": { - "quantityNumber": 0.1908, - "measurementUnit": "unit:kilogram" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 13 + }, + "bioBasedClass": "gen2", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003B0Q0", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "2.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:centigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "GB", + "referencedStandardID": "9865", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 12 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } ] } ] }, { - "catenaXId": "urn:uuid:0afaff8e-28c7-4788-b7a4-071ef85dee19", - "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003B0Q0", - "key": "manufacturerId" - }, - { - "value": "BID12345678", - "key": "batchId" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "HUR" - }, - "catenaXId": "urn:uuid:0afaff8e-28c7-4788-b7a4-071ef85dee19", - "partTypeInformation": { - "manufacturerPartId": "123-0.740-3434-A", - "classification": "product", - "nameAtManufacturer": "NTIER Product" - } + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "childItems": [] } ], "bpnl": "BPNL00000003B0Q0", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:0afaff8e-28c7-4788-b7a4-071ef85dee19", - "customers": [ + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "partTypeInformation": { + "manufacturerPartId": "7A047KK-01", + "classification": "product", + "nameAtManufacturer": "N Tier A NTier Product" + }, + "partSitesInformationAsPlanned": [ { - "businessPartner": "BPNL00000003B0Q0", - "parentItems": [ - { - "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "materialName": "NTIER Product", - "materialClass": "5.5", - "component": [ + "parentParts": [ { - "materialName": "Aluminium oxide", - "recycledContent": 28, - "materialClass": "5.5.1", - "quantity": { - "unit": "unit:percent", - "value": 60 + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" }, - "aggregateState": "solid", - "materialAbbreviation": "" - }, - { - "materialName": "Other", - "recycledContent": 28, - "materialClass": "5.5.2", + "parentCatenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", "quantity": { - "unit": "unit:percent", - "value": 40 + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" }, - "aggregateState": "solid", - "materialAbbreviation": "" + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e" } - ] - }, - { - "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", - "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + ], + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AXS3", - "key": "manufacturerId" - }, + "catenaXId": "urn:uuid:86f69643-3b90-4e34-90bf-789edcf40e7e", + "sites": [ { - "value": "BID12345678", - "key": "batchId" + "functionValidUntil": "2029-12-12T20:52:56.000Z", + "catenaXsiteId": "BPNS00000003B0Q0", + "function": "production", + "functionValidFrom": "2013-02-12T16:37:07.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "HUR" - }, - "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", - "partTypeInformation": { - "manufacturerPartId": "123-0.740-3434-A", - "classification": "product", - "nameAtManufacturer": "Glue" - } + ] } ], - "bpnl": "BPNL00000003AXS3", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", - "customers": [ + "orderNumber": "809218", + "secondaryMaterialContent": [ { - "businessPartner": "BPNL00000003AXS3", - "parentItems": [ + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 10 + }, + "bioBasedClass": "gen1", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 19 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "4.2", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:decagram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ { - "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" } ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "materialNameStandardized": { + "referencedStandard": "JASO", + "referencedStandardID": "2931", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + } + } + } } ] } + ] + }, + { + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "childItems": [] + } ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + "bpnl": "BPNL00000003B0Q0", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "component": [ + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "partTypeInformation": { + "manufacturerPartId": "7A987KK-04", + "classification": "product", + "nameAtManufacturer": "N Tier A Plastics" + }, + "partSitesInformationAsPlanned": [ { - "materialName": "Glue", - "materialClass": "6.2", - "quantity": { - "unit": "unit:kilogram", - "value": 2.5 - }, - "weight": "0.2341", - "materialAbbreviation": "GL338" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ - { - "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", - "childItems": [] - } - ] - }, - { - "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", - "bpnl": "BPNL00000003B5MJ", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", - "customers": [ + "parentParts": [ { - "businessPartner": "BPNL00000003B5MJ", - "parentItems": [ - { - "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003B5MJ", - "key": "manufacturerId" - }, + "catenaXId": "urn:uuid:4518c080-14fb-4252-b8de-4362d615868d", + "sites": [ { - "value": "21382K0-70", - "key": "manufacturerPartId" - }, - { - "value": "NO-403391011317149599047195", - "key": "partInstanceId" + "functionValidUntil": "2031-04-17T22:24:22.000Z", + "catenaXsiteId": "BPNS00000003B0Q0", + "function": "production", + "functionValidFrom": "2019-03-30T08:41:08.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", - "partTypeInformation": { - "manufacturerPartId": "21382K0-70", - "customerPartId": "21382K0-70", - "classification": "component", - "nameAtManufacturer": "ECU", - "nameAtCustomer": "ECU" - } + ] } ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "component": [ + "orderNumber": "736994", + "secondaryMaterialContent": [ { - "materialName": "Glue", - "recycledContent": 60, - "materialClass": "6.2", - "quantity": { - "unit": "unit:kilogram", - "value": 0.3301 + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 14 + }, + "bioBasedClass": "gen1", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 18 + } + }, + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "1.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:decigram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 }, - "aggregateState": "solid", - "materialAbbreviation": "GL338" + "certificate": [ + { + "certificateName": "Bluecert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "EN", + "referencedStandardID": "4785", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } ] } - ], - "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + ] + }, + { + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", "childItems": [ { - "catenaXId": "urn:uuid:a635b2a8-df46-4ede-b690-3f02ea959652", - "quantity": { - "quantityNumber": 0.3301, - "measurementUnit": "unit:kilogram" + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003AXS3", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - }, - { - "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", + "catenaXId": "urn:uuid:bee5614f-9e46-4c98-9209-61a6f2b2a7fc", "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" + "unit": "unit:piece", + "value": 1 }, - "hasAlternatives": true, "businessPartner": "BPNL00000003B3NX", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "catenaXId": "urn:uuid:01d35109-49b7-41a5-b9c0-d69e4117314f", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", "quantity": { - "quantityNumber": 0.2001, - "measurementUnit": "unit:kilogram" + "unit": "unit:kilogram", + "value": 0.3301 }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003B0Q0", + "businessPartner": "BPNL00000003AXS3", "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } ] } - ] - }, - { - "catenaXId": "urn:uuid:a635b2a8-df46-4ede-b690-3f02ea959652", - "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + ], + "bpnl": "BPNL00000003B5MJ", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003AXS3", - "key": "manufacturerId" - }, - { - "value": "BID12345678", - "key": "batchId" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "HUR" - }, - "catenaXId": "urn:uuid:a635b2a8-df46-4ede-b690-3f02ea959652", + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", "partTypeInformation": { - "manufacturerPartId": "123-0.740-3434-A", + "manufacturerPartId": "ZX-55", "classification": "product", - "nameAtManufacturer": "Glue" - } - } - ], - "bpnl": "BPNL00000003AXS3", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ - { - "catenaXId": "urn:uuid:a635b2a8-df46-4ede-b690-3f02ea959652", - "customers": [ + "nameAtManufacturer": "Tier B ECU1" + }, + "partSitesInformationAsPlanned": [ { - "businessPartner": "BPNL00000003AXS3", - "parentItems": [ - { - "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "materialName": "Glue", - "materialClass": "5.5", - "component": [ + "parentParts": [ { - "materialName": "Aluminium oxide", - "recycledContent": 88, - "materialClass": "5.5.1", + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4c79e", "quantity": { - "unit": "unit:percent", - "value": 70 + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" }, - "aggregateState": "solid", - "materialAbbreviation": "AL7" + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "materialName": "Other", - "recycledContent": 8, - "materialClass": "5.5.2", + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b", "quantity": { - "unit": "unit:percent", - "value": 70 + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" }, - "aggregateState": "solid", - "materialAbbreviation": "" - } - ] - } - ] - }, - { - "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", - "bpnl": "BPNL00000003B3NX", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ - { - "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", - "customers": [ - { - "businessPartner": "BPNL00000003B3NX", - "parentItems": [ - { - "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003B3NX", - "key": "manufacturerId" - }, - { - "value": "73659L0-23", - "key": "manufacturerPartId" - }, + "catenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", + "sites": [ { - "value": "NO-381537621115986645948548", - "key": "partInstanceId" + "functionValidUntil": "2031-07-14T14:36:49.000Z", + "catenaXsiteId": "BPNS00000003B5MJ", + "function": "production", + "functionValidFrom": "2018-02-07T04:54:43.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", - "partTypeInformation": { - "manufacturerPartId": "73659L0-23", - "customerPartId": "73659L0-23", - "classification": "component", - "nameAtManufacturer": "Sensor", - "nameAtCustomer": "Sensor" - } + ] } ], - "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", - "childItems": [ + "orderNumber": "906993", + "secondaryMaterialContent": [ { - "catenaXId": "urn:uuid:d087f660-6595-467b-8138-ce040f1c49eb", - "quantity": { - "quantityNumber": 0.1908, - "measurementUnit": "unit:kilogram" + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 10 + }, + "bioBasedClass": "gen3", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 24 + } }, - "hasAlternatives": true, - "businessPartner": "BPNL00000003B0Q0", - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "4.2", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:decagram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 + }, + "certificate": [ + { + "certificateName": "Yellowcert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "EN", + "referencedStandardID": "1942", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": true, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 10 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 10 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } ] } ] }, { - "catenaXId": "urn:uuid:d087f660-6595-467b-8138-ce040f1c49eb", - "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "localIdentifiers": [ - { - "value": "BPNL00000003B0Q0", - "key": "manufacturerId" - }, - { - "value": "BID12345678", - "key": "batchId" - } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "HUR" - }, - "catenaXId": "urn:uuid:d087f660-6595-467b-8138-ce040f1c49eb", - "partTypeInformation": { - "manufacturerPartId": "123-0.740-3434-A", - "classification": "product", - "nameAtManufacturer": "Engineering Plasticst" - } + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "childItems": [] } ], - "bpnl": "BPNL00000003B0Q0", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + "bpnl": "BPNL00000003AXS3", + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:d087f660-6595-467b-8138-ce040f1c49eb", - "customers": [ + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "partTypeInformation": { + "manufacturerPartId": "6775244-06", + "classification": "product", + "nameAtManufacturer": "Sub Tier B Glue" + }, + "partSitesInformationAsPlanned": [ { - "businessPartner": "BPNL00000003B0Q0", - "parentItems": [ - { - "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" } ] } ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + "urn:samm:io.catenax.single_level_usage_as_planned:1.1.0#SingleLevelUsageAsPlanned": [ { - "materialName": "Engineering Plastics", - "materialClass": "5.1", - "component": [ + "parentParts": [ { - "materialName": "PA66", - "recycledContent": 41, - "materialClass": "5.1", + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:07cb071f-8716-45fe-89f1-f2f77a1ce93b", "quantity": { - "unit": "unit:percent", - "value": 70 + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" }, - "aggregateState": "solid", - "materialAbbreviation": "PA66" + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "materialName": "GF-Faser", - "recycledContent": 33, - "materialClass": "5.1", + "validityPeriod": { + "validFrom": "2023-03-21T08:47:14.438+01:00", + "validTo": "2024-08-02T09:00:00.000+01:00" + }, + "parentCatenaXId": "urn:uuid:e3e2a4d8-58bc-4ae9-afa2-e8946fda1f77", "quantity": { - "unit": "unit:percent", - "value": 30 + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" }, - "aggregateState": "solid", - "materialAbbreviation": "GF30" - } - ] - } - ] - }, - { - "catenaXId": "urn:uuid:01d35109-49b7-41a5-b9c0-d69e4117314f", - "bpnl": "BPNL00000003B0Q0", - "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ - { - "catenaXId": "urn:uuid:01d35109-49b7-41a5-b9c0-d69e4117314f", - "customers": [ - { - "businessPartner": "BPNL00000003B0Q0", - "parentItems": [ - { - "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", - "quantity": { - "quantityNumber": 2.5, - "measurementUnit": "unit:litre" - }, - "createdOn": "2022-02-03T14:48:54.709Z", - "lastModifiedOn": "2022-02-03T14:48:54.709Z" - } - ], "createdOn": "2022-02-03T14:48:54.709Z", "lastModifiedOn": "2022-02-03T14:48:54.709Z" } - ] + ], + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301" } ], - "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + "urn:samm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ { - "localIdentifiers": [ + "catenaXId": "urn:uuid:3cdd2826-5df0-4c7b-b540-9eeccecb2301", + "sites": [ { - "value": "BPNL00000003B0Q0", - "key": "manufacturerId" - }, - { - "value": "98178I1-06", - "key": "manufacturerPartId" - }, - { - "value": "NO-669886195043160397054338", - "key": "partInstanceId" + "functionValidUntil": "2029-07-21T18:50:17.000Z", + "catenaXsiteId": "BPNS00000003AXS3", + "function": "production", + "functionValidFrom": "2016-05-20T12:11:20.000Z" } - ], - "manufacturingInformation": { - "date": "2022-02-04T14:48:54", - "country": "DEU" - }, - "catenaXId": "urn:uuid:01d35109-49b7-41a5-b9c0-d69e4117314f", - "partTypeInformation": { - "manufacturerPartId": "98178I1-06", - "customerPartId": "98178I1-06", - "classification": "component", - "nameAtManufacturer": "Engineering Plastics", - "nameAtCustomer": "Engineering Plastics" - } + ] } ], - "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + "urn:samm:io.catenax.secondary_material_content_calculated:1.0.0#SecondaryMaterialContentCalculated": [ { - "materialName": "Engineering Plastics", - "materialClass": "5.1", - "component": [ + "orderNumber": "748259", + "secondaryMaterialContent": [ { - "materialName": "PA66", - "recycledContent": 6, - "materialClass": "5.1", - "quantity": { - "unit": "unit:percent", - "value": 70 + "bioBased": { + "primaryBioBased": { + "percentageOfMaterialWeight": 13 + }, + "bioBasedClass": "gen3", + "secondaryBioBased": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } }, - "aggregateState": "solid", - "materialAbbreviation": "PA66" - }, - { - "materialName": "GF-Faser", - "recycledContent": 11, - "materialClass": "5.1", - "quantity": { - "unit": "unit:percent", - "value": 30 + "additionalInformation": "eOMtThyhVNLWUZNRcBaQKxI", + "materialClass": "3.1", + "unitOfMeasure": { + "unitOfMeasureKey": "unit:gram", + "grossMaterialInputMass": 3500, + "materialNetMass": 3000 }, - "aggregateState": "solid", - "materialAbbreviation": "GF30" + "certificate": [ + { + "certificateName": "Yellowcert", + "certificateLink": "telnet://192.0.2.16:80/" + } + ], + "materialNameStandardized": { + "referencedStandard": "EN", + "referencedStandardID": "7650", + "materialNameStandardizedValue": "PP-TD10" + }, + "inorganic": { + "primaryInorganic": { + "percentageOfMaterialWeight": 12 + }, + "secondaryInorganic": { + "postConsumer": { + "isPreviousIndustryAutomotive": false, + "chemicalRecycling": { + "isMassBalanced": false, + "percentageOfMaterialWeight": 11 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 14 + } + }, + "postConsumerAutomotive": { + "chemicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 12 + }, + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 13 + } + }, + "preConsumer": { + "mechanicalRecycling": { + "isMassBalanced": true, + "percentageOfMaterialWeight": 11 + } + } + } + } } ] } ] } - ] + ] } \ No newline at end of file diff --git a/charts/tx-data-provider/resources/transform-and-upload.py b/charts/tx-data-provider/resources/transform-and-upload.py index c579a228..721b41e5 100644 --- a/charts/tx-data-provider/resources/transform-and-upload.py +++ b/charts/tx-data-provider/resources/transform-and-upload.py @@ -23,10 +23,11 @@ import argparse import json import math -import requests import time import uuid from copy import copy + +import requests from requests.adapters import HTTPAdapter, Retry @@ -59,6 +60,10 @@ def create_edc_registry_asset_payload(registry_url_, asset_prop_id_): "@context": edc_context(), "@id": f"{asset_prop_id_}", # DTR-EDC-instance-unique-ID "edc:properties": { + "dct:type": { + "@id": "https://w3id.org/catenax/taxonomy#DigitalTwinRegistry" + }, + "cx-common:version": "3.0", "edc:description": "Digital Twin Registry Endpoint", "edc:id": f"{asset_prop_id_}", # DTR-EDC-instance-unique-ID "edc:type": "data.core.digitalTwinRegistry" @@ -76,6 +81,18 @@ def create_edc_registry_asset_payload(registry_url_, asset_prop_id_): }) +def edc_context(): + return { + "dct": "http://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/", + "cx-common": "https://w3id.org/catenax/ontology/common#" + } + + def create_edc_contract_definition_payload(edc_policy_id_, asset_prop_id_): return json.dumps({ "@context": edc_context(), @@ -151,7 +168,8 @@ def print_response(response_): raise Exception("Failed to call service") -def check_url_args(submodel_server_upload_urls_, submodel_server_urls_, edc_upload_urls_, edc_urls_, dataplane_urls_): +def check_url_args(submodel_server_upload_urls_, submodel_server_urls_, edc_upload_urls_, edc_urls_, dataplane_urls_, + edc_bpns_): nr_of_submodel_server_upload_urls = len(submodel_server_upload_urls_) nr_of_submodel_server_urls = len(submodel_server_urls_) if nr_of_submodel_server_upload_urls != nr_of_submodel_server_urls: @@ -164,6 +182,11 @@ def check_url_args(submodel_server_upload_urls_, submodel_server_urls_, edc_uplo raise ArgumentException( f"Number and order of edc upload URLs '{edc_upload_urls_}' has to match number and order of edc URLs " f"'{edc_urls_}'") + nr_of_edc_bpns = len(edc_bpns_) + if nr_of_edc_urls != nr_of_edc_bpns: + raise ArgumentException( + f"Number and order of edc URLs '{nr_of_edc_urls}' has to match number and order of edc BPNs " + f"'{nr_of_edc_bpns}'") if nr_of_submodel_server_urls != nr_of_edc_urls: raise ArgumentException( f"Number and order of edc URLs '{edc_urls_}' has to match number and order of submodelserver URLS " @@ -200,11 +223,12 @@ def create_policy(policy_, edc_upload_url_, edc_policy_path_, headers_, session_ print(f"Successfully created policy {response_.json()['@id']}.") -def create_registry_asset(edc_upload_urls_, edc_asset_path_, edc_contract_definition_path_, catalog_path_, header_, +def create_registry_asset(edc_upload_urls_, edc_bpns_, edc_asset_path_, edc_contract_definition_path_, catalog_path_, header_, session_, edc_urls_, policy_, registry_asset_id_, aas_url_): for edc_upload_url_ in edc_upload_urls_: index = edc_upload_urls_.index(edc_upload_url_) edc_url_ = edc_urls_[index] + edc_bpn_ = edc_bpns_[index] print(edc_url_) print(edc_upload_url_) @@ -212,7 +236,8 @@ def create_registry_asset(edc_upload_urls_, edc_asset_path_, edc_contract_defini payload_ = { "@context": edc_context(), "edc:protocol": "dataspace-protocol-http", - "edc:providerUrl": f"{edc_url_}/api/v1/dsp", + "edc:counterPartyAddress": f"{edc_url_}/api/v1/dsp", + "edc:counterPartyId": f"{edc_bpn_}", "edc:querySpec": { "edc:filterExpression": { "@type": "edc:Criterion", @@ -224,14 +249,14 @@ def create_registry_asset(edc_upload_urls_, edc_asset_path_, edc_contract_defini } print(f"Query Catalog for registry asset {catalog_url_}") response_ = session_.request(method="POST", url=catalog_url_, headers=header_, data=json.dumps(payload_)) - + print_response(response_) asset_url_ = edc_upload_url_ + edc_asset_path_ print(response_.status_code) catalog_response_ = response_.json() if response_.status_code == 200 and len(catalog_response_['dcat:dataset']) >= 1: first_offer_ = catalog_response_['dcat:dataset'] print( - f"Offer with type {first_offer_['edc:type']} already exists. Skipping creation.") + f"Offer with type {first_offer_['type']} already exists. Skipping creation.") else: payload_ = create_edc_registry_asset_payload(aas_url_, registry_asset_id_) response_ = session_.request(method="POST", url=asset_url_, @@ -251,17 +276,6 @@ def create_registry_asset(edc_upload_urls_, edc_asset_path_, edc_contract_defini print_response(response_) -def edc_context(): - return { - "dct": "https://purl.org/dc/terms/", - "tx": "https://w3id.org/tractusx/v0.0.1/ns/", - "edc": "https://w3id.org/edc/v0.0.1/ns/", - "odrl": "http://www.w3.org/ns/odrl/2/", - "dcat": "https://www.w3.org/ns/dcat/", - "dspace": "https://w3id.org/dspace/v0.8/" - } - - def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, headers_, session_, asset_id_): catalog_url_ = edc_upload_url_ + edc_catalog_path_ payload_ = { @@ -293,6 +307,7 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he parser.add_argument("-au", "--aasupload", type=str, help="aas url", required=False) parser.add_argument("-edc", "--edc", type=str, nargs="*", help="EDC provider control plane display URLs", required=True) + parser.add_argument("--edcBPN", type=str, nargs="*", help="The BPN of the provider EDC", required=True) parser.add_argument("-eu", "--edcupload", type=str, nargs="*", help="EDC provider control plane upload URLs", required=False) parser.add_argument("-k", "--apikey", type=str, help="EDC provider api key", required=True) @@ -315,6 +330,7 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he aas_url = config.get("aas") aas_upload_url = config.get("aasupload") edc_urls = config.get("edc") + edc_bpns = config.get("edcBPN") edc_upload_urls = config.get("edcupload") edc_api_key = config.get("apikey") bpnl_fail = config.get("bpn") @@ -342,7 +358,8 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he registry_path = "/shell-descriptors" - check_url_args(submodel_server_upload_urls, submodel_server_urls, edc_upload_urls, edc_urls, dataplane_urls) + check_url_args(submodel_server_upload_urls, submodel_server_urls, edc_upload_urls, edc_urls, dataplane_urls, + edc_bpns) edc_asset_path = "/management/v3/assets" edc_policy_path = "/management/v2/policydefinitions" @@ -367,10 +384,9 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he "@context": { "odrl": "http://www.w3.org/ns/odrl/2/" }, - "@type": "PolicyDefinitionRequestDto", "@id": "default-policy", "policy": { - "@type": "Policy", + "@type": "odrl:Set", "odrl:permission": [] } } @@ -390,15 +406,15 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he retries = Retry(total=5, backoff_factor=0.1) session = requests.Session() - session.mount('https://', HTTPAdapter(max_retries=retries)) - session.verify = False + session.mount('http://', HTTPAdapter(max_retries=retries)) + # session.verify = False if policies: for policy in policies.keys(): for url in edc_upload_urls: create_policy(policies[policy], url, edc_policy_path, headers_with_api_key, session) - create_registry_asset(edc_upload_urls, edc_asset_path, edc_contract_definition_path, edc_catalog_path, + create_registry_asset(edc_upload_urls, edc_bpns, edc_asset_path, edc_contract_definition_path, edc_catalog_path, headers_with_api_key, session, edc_urls, default_policy, registry_asset_id, aas_url) edc_asset_ids = [] @@ -478,12 +494,12 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he dataplane_url = dataplane_urls[contract_number % len(dataplane_urls)] edc_asset_id = edc_asset_ids[contract_number % len(edc_asset_ids)] - submodel_name = tmp_key[tmp_key.index("#") + 1: len(tmp_key)] + id_short = uuid.uuid4().urn submodel_identification = uuid.uuid4().urn semantic_id = tmp_key endpoint_address = f"{dataplane_url}{dataplane_public_path}/{submodel_identification}" - descriptor = create_submodel_descriptor_3_0(submodel_name, submodel_identification, semantic_id, + descriptor = create_submodel_descriptor_3_0(id_short, submodel_identification, semantic_id, endpoint_address, edc_asset_id, edc_url) @@ -516,7 +532,8 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he if submodel_descriptors: print("Create aas shell") - payload = create_aas_shell_3_0(catenax_id, name_at_manufacturer, identification, specific_asset_ids, + id_short = uuid.uuid4().urn + payload = create_aas_shell_3_0(catenax_id, id_short, identification, specific_asset_ids, submodel_descriptors) response = session.request(method="POST", url=f"{aas_upload_url}{registry_path}", headers=headers, diff --git a/charts/tx-data-provider/resources/upload-data.sh b/charts/tx-data-provider/resources/upload-data.sh index e2e2d0db..6384ae51 100644 --- a/charts/tx-data-provider/resources/upload-data.sh +++ b/charts/tx-data-provider/resources/upload-data.sh @@ -38,8 +38,8 @@ echo "Allowed BPNs: $ALLOWEDBPNS" pip install -r /opt/scripts/requirements.txt if [ -z "$MANAGEMENTURL" ]; then - python /opt/scripts/upload.py -f /opt/scripts/testdata.json -s "$SUBMODELURL" -a "$REGISTRYURL" -edc "$CONTROLPLANEURL" -d "$DATAPLANEURL" -k "$EDCKEY" -p test --allowedBPNs "$ALLOWEDBPNS" + python /opt/scripts/upload.py -f /opt/scripts/testdata.json -s "$SUBMODELURL" -a "$REGISTRYURL" -edc "$CONTROLPLANEURL" --edcBPN "$ALLOWEDBPNS" -d "$DATAPLANEURL" -k "$EDCKEY" -p test --allowedBPNs "$ALLOWEDBPNS" else echo "Management: $MANAGEMENTURL" - python /opt/scripts/upload.py -f /opt/scripts/testdata.json -s "$SUBMODELURL" -a "$REGISTRYURL" -edc "$CONTROLPLANEURL" -eu "$MANAGEMENTURL" -d "$DATAPLANEURL" -k "$EDCKEY" -p test --allowedBPNs "$ALLOWEDBPNS" + python /opt/scripts/upload.py -f /opt/scripts/testdata.json -s "$SUBMODELURL" -a "$REGISTRYURL" -edc "$CONTROLPLANEURL" --edcBPN "$ALLOWEDBPNS" -eu "$MANAGEMENTURL" -d "$DATAPLANEURL" -k "$EDCKEY" -p test --allowedBPNs "$ALLOWEDBPNS" fi diff --git a/charts/tx-data-provider/templates/vault-edc-configmap.yaml b/charts/tx-data-provider/templates/vault-edc-configmap.yaml index 31571948..55ccd7de 100644 --- a/charts/tx-data-provider/templates/vault-edc-configmap.yaml +++ b/charts/tx-data-provider/templates/vault-edc-configmap.yaml @@ -17,7 +17,6 @@ # SPDX-License-Identifier: Apache-2.0 # ############################################################################# --- -{{ $cert := genSelfSignedCert "" (list) (list) 365 }} {{- $fullName := include "dataprovider.fullname" . -}} apiVersion: v1 kind: ConfigMap @@ -27,14 +26,14 @@ data: cert.json: |- { "data": { - "content": {{ $cert.Cert | toString | quote }} + "content": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsP1Wl50viKzVqw8HGFWP\nis+M8Im4daTFMned5Qr2z90FNgkj1EVhip0mOdD6kDg3bW4RxyL6z3jWi19JKBHZ\n68UTgZNdPbhhPNLEGcQpu8uwgFcWKL4P/IOykEeE8ResGOVg/HzNE7HkTgiBdr2C\nMTEXL3zTmdr0vbFGMbOTPyOvKMoy/2FaJaJAPXo3poGqfRvr6Gu6top2ktRd/z8N\nhBpuzx9QypIsE62ooLNPpqzjezfvzJbc3tko/cXNOyGoZWuEKMTfKwYq3ZjsTZKk\nbjVNgdoEFSWpd6Tqk76B1Cboxv1CD8xw0cQ149eW0IuLkAk3eF5eZR4iQ5YAOZqA\nUQIDAQAB\n-----END PUBLIC KEY-----\n" } } key.json: |- { "data": { - "content": {{ $cert.Key | toString | quote }} + "content": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCw/VaXnS+IrNWr\nDwcYVY+Kz4zwibh1pMUyd53lCvbP3QU2CSPURWGKnSY50PqQODdtbhHHIvrPeNaL\nX0koEdnrxROBk109uGE80sQZxCm7y7CAVxYovg/8g7KQR4TxF6wY5WD8fM0TseRO\nCIF2vYIxMRcvfNOZ2vS9sUYxs5M/I68oyjL/YVolokA9ejemgap9G+voa7q2inaS\n1F3/Pw2EGm7PH1DKkiwTraigs0+mrON7N+/Mltze2Sj9xc07Iahla4QoxN8rBird\nmOxNkqRuNU2B2gQVJal3pOqTvoHUJujG/UIPzHDRxDXj15bQi4uQCTd4Xl5lHiJD\nlgA5moBRAgMBAAECggEAKD8XjYb8G+WHeexDJgSwzTUonLsIg9H52KHMORz+5mIh\nUPoPmHHFfj6BhoSvsZNjAUKWDtU0uPCGwu8iRNcYWa15I841lfcjP3BDEQPjJJXr\nNyf2fUHJA1gURwxIXgWOyCOC5C9h9/BMFPWIsQ5jeFmsJsuJF5OrcyZIar1lxqWu\nQ+HC7f/7JNkpR26uIyGjs1OXwfp+mHqze2Qf8hLWIXcN9tBCQZ75Cg7rarNVimMC\n59QD80JZCHTaCX1ZtE1T8HM+53Ob78lnFCuBfiBT/S3O/NXVsEN9q6rMWKhETVWR\nUX56EqZ7XGSMOzuZyK7kj1QsHzEMrrHjwDSNSjAqFQKBgQC6hEeAWPCEM+WVoF9n\nmhvwZVZv/PPyLAarykBTGoeHR2hqNyih9JmcXL+XQHMlhy1Ka8NtJHvfyB1xhXgF\n/d91i/Yq02+nZoJPNnVWo8zoXIAIq+xg9CBiu0agBxv45PjJkEkQmmEG4Iej1+Kf\n5/+dI7sFjE2T4q/lLK0Aw3x+zQKBgQDy7Ho7eRi5CV1Ks+r5lpGGdM15hbE5tviE\nfmJvaEUh3oWuwdkyFjD/QEPITG1bFuvhATdEEWxTbuswNEbELLhKCPcixcI0sLUO\n6BeNi1YD6ouuqsWBLvmE4hvoDR7RlkpUduxWpZ2tNIDJYYTwCERhcYK9OtHU15kc\nlS0pEjF/lQKBgEh+28/OQgYQqd7ji9GX+94PdW5n0mXBqQIixafHewAgyDvonpl8\nmixFfI6MlXTzuq3ffwEwGhncDV2vc/xYNf/ZW+A/eHmHhYTGdQss9ZsnQPid4m24\n1dGqWwQeX0f5r52gwFV8u9PRd8c+RS7EHP12At5gL1MY3CdmmwPd98jNAoGASvPV\n/xWtICKYi10aCip/+kl9wJoUhadD5LWOL6uvcPTUsIgVONQKCCfPAjU6pJlc7E7Q\nu4rYrqGRpYzrrMnTjtxXTH5SHqnLI69O3Rh50LmEob8FM4fH601MqPurX6WMh6Ut\n5Moy7Wc+uWQCfYE/gAVi/nnwlkhzcJNCnOKFLUUCgYA4nbhLrdEeCBJas2+Z9aGw\n/SurtHF2z2meAPO3VaYslf0D0xKzUIv5hkkzaNgs0pFGt0BcKfTWkYy/Hh4QXZhm\n//ZrqbkVsqzDOcqGwQcDmUEN/T+vprUJVKqpNHXT6fz3OTydxLQ7K7SXzwXWYfRW\ncpjdr0c1tVVLMyNG+Wahrg==\n-----END PRIVATE KEY-----\n" } } aes-secret.json: |- diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 86c174c0..93f9121c 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -42,18 +42,24 @@ tractusx-connector: vault: false participant: id: changeme - controlplane: - ssi: - miw: + iatp: + id: changeme + trustedIssuers: + - changeme + sts: + dim: url: http://example.org - authorityId: changeme oauth: - tokenurl: http://example.org + token_url: http://example.org client: id: changeme - secretAlias: client-secret + secret_alias: client-secret + controlplane: ingresses: - enabled: false + bdrs: + server: + url: http://example.org endpoints: management: authKey: *edcKey @@ -63,16 +69,19 @@ tractusx-connector: dataplane: ingresses: - enabled: false + token: + signer: + privatekey_alias: changeme + verifier: + publickey_alias: changeme - backendService: - httpProxyTokenReceiverUrl: "https://submodelserver.test/data/endpoint-data-reference-provider1" vault: hashicorp: url: http://{{ .Release.Name }}-edc-provider-vault:8200 token: "root" secretNames: - transferProxyTokenSignerPrivateKey: - transferProxyTokenSignerPublicKey: + transferProxyTokenSignerPrivateKey: changeme + transferProxyTokenSignerPublicKey: changeme transferProxyTokenEncryptionAesKey: aesKey postgresql: From 914a34ee6cd1c3f131ac92672262d024741817a9 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 11:59:20 +0200 Subject: [PATCH 03/24] chore: integrate edc 0.7, bdrs and iatp mock --- .github/workflows/helm-checks.yaml | 7 + charts/umbrella/Chart.yaml | 29 ++- .../templates/post-install-bdrs-setup.yaml | 107 ++++++++ .../templates/post-install-miw-setup.yaml | 70 ------ .../values-adopter-data-exchange.yaml | 106 ++++---- charts/umbrella/values.yaml | 237 +++++++++--------- 6 files changed, 303 insertions(+), 253 deletions(-) create mode 100644 charts/umbrella/templates/post-install-bdrs-setup.yaml delete mode 100644 charts/umbrella/templates/post-install-miw-setup.yaml diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index ae5805ed..c03ed1a3 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -127,6 +127,13 @@ jobs: push: true tags: kind-registry:5000/init-container:testing + - name: Build iatp mock + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 + with: + context: ./iam-mock/ + push: true + tags: kind-registry:5000/iam-mock:testing + - name: Set up Helm uses: azure/setup-helm@b7246b12e77f7134dc2d460a3d5bad15bbe29390 # v4.1.0 with: diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index da14f410..cd91e2a1 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -28,7 +28,7 @@ sources: - https://github.com/eclipse-tractusx/tractus-x-umbrella type: application -version: 0.16.0 +version: 0.17.0 # when adding or updating versions of dependencies, also update list under README.md#Install dependencies: @@ -62,11 +62,6 @@ dependencies: alias: selfdescription repository: https://eclipse-tractusx.github.io/charts/dev version: 2.1.19 - # miw - - name: managed-identity-wallet - repository: https://eclipse-tractusx.github.io/charts/dev - version: 0.4.0 - condition: managed-identity-wallet.enabled # semantic-hub - condition: semantic-hub.enabled name: semantic-hub @@ -75,22 +70,32 @@ dependencies: # TX Data Consumer 1 - name: tx-data-provider alias: dataconsumerOne - version: 0.0.5 - repository: https://eclipse-tractusx.github.io/charts/dev + version: 0.1.0 + repository: file://../tx-data-provider condition: dataconsumerOne.enabled # TX Data Providers - name: tx-data-provider - version: 0.0.5 - repository: https://eclipse-tractusx.github.io/charts/dev + version: 0.1.0 + repository: file://../tx-data-provider condition: tx-data-provider.enabled # TX Data Consumer 2 - name: tx-data-provider alias: dataconsumerTwo - version: 0.0.5 - repository: https://eclipse-tractusx.github.io/charts/dev + version: 0.1.0 + repository: file://../tx-data-provider condition: dataconsumerTwo.enabled # pgadmin4 as helper tool for easy database access - condition: pgadmin4.enabled name: pgadmin4 repository: https://helm.runix.net version: 1.25.x + # bdrs + - name: bdrs-server-memory + repository: https://eclipse-tractusx.github.io/charts/dev + version: 0.0.4 + condition: bdrs-server-memory.enabled + # iatp + - name: iatpmock + version: 0.1.0 + repository: file://../iatpmock + condition: iatpmock.enabled diff --git a/charts/umbrella/templates/post-install-bdrs-setup.yaml b/charts/umbrella/templates/post-install-bdrs-setup.yaml new file mode 100644 index 00000000..33c99984 --- /dev/null +++ b/charts/umbrella/templates/post-install-bdrs-setup.yaml @@ -0,0 +1,107 @@ +# ############################################################################# + # Copyright (c) 2021,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 governing permissions and limitations + # under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ############################################################################# +--- +{{ if index .Values "bdrs-server-memory" "seeding" "enabled" }} +{{- $bdrsUrl := printf "http://%s" (index .Values "bdrs-server-memory" "hostname") -}} +{{- $bdrsKey := index .Values "bdrs-server-memory" "server" "endpoints" "management" "authKey" -}} +{{- $fullName := include "app.fullname" . -}} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ $fullName }}-post-install-bdrs-setup + labels: + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + annotations: + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + "helm.sh/hook": post-install + "helm.sh/hook-weight": "-5" + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +spec: + template: + metadata: + name: "{{ .Release.Name }}" + labels: + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + spec: + restartPolicy: Never + containers: + - name: post-install-job + image: "alpine:3.19" + imagePullPolicy: IfNotPresent + command: + - "/bin/sh" + - "-c" + - | + echo "Waiting 10s to start BDRS seeding..." + sleep 10 + + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003AZQP","did": "did:web:mock-util-service/customer"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003AYRE","did": "did:web:mock-util-service/supplier"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003AVTH","did": "did:web:mock-util-service/BPNL00000003AVTH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003AWSS","did": "did:web:mock-util-service/BPNL00000003AWSS"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003B0Q0","did": "did:web:mock-util-service/BPNL00000003B0Q0"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNS0000000008ZZ","did": "did:web:mock-util-service/BPNS0000000008ZZ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003CNKC","did": "did:web:mock-util-service/BPNL00000003CNKC"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003B6LU","did": "did:web:mock-util-service/BPNL00000003B6LU"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003CML1","did": "did:web:mock-util-service/BPNL00000003CML1"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNS00000008BDFH","did": "did:web:mock-util-service/BPNS00000008BDFH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003B2OM","did": "did:web:mock-util-service/BPNL00000003B2OM"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003CSGV","did": "did:web:mock-util-service/BPNL00000003CSGV"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003B5MJ","did": "did:web:mock-util-service/BPNL00000003B5MJ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003AXS3","did": "did:web:mock-util-service/BPNL00000003AXS3"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000003B3NX","did": "did:web:mock-util-service/BPNL00000003B3NX"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} +{{/* --post-data '{"bpn": "BPNL00000000BJTL","did": "did:web:mock-util-service/BPNL00000000BJTL"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + +{{ end }} diff --git a/charts/umbrella/templates/post-install-miw-setup.yaml b/charts/umbrella/templates/post-install-miw-setup.yaml deleted file mode 100644 index 5ce24782..00000000 --- a/charts/umbrella/templates/post-install-miw-setup.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# ############################################################################# - # Copyright (c) 2021,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 governing permissions and limitations - # under the License. - # - # SPDX-License-Identifier: Apache-2.0 - # ############################################################################# ---- -{{ if index .Values "managed-identity-wallet" "seeding" "enabled" }} -{{- $miwUrl := printf "http://%s" (index .Values "managed-identity-wallet" "miw" "host") -}} -{{- $keycloakUrl := index .Values "managed-identity-wallet" "miw" "keycloak" "url" -}} -{{- $keycloakRealm := index .Values "managed-identity-wallet" "miw" "keycloak" "realm" -}} -{{- $keycloakPath := printf "%s/realms/%s/protocol/openid-connect/token" $keycloakUrl $keycloakRealm -}} -{{- $miwUser := index .Values "managed-identity-wallet" "seeding" "clientId" -}} -{{- $miwSecret := index .Values "managed-identity-wallet" "seeding" "clientSecret" -}} -{{- $fullName := include "app.fullname" . -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ $fullName }}-post-install-miw-setup - labels: - app.kubernetes.io/managed-by: {{ .Release.Service | quote }} - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": post-install - "helm.sh/hook-weight": "-5" - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded -spec: - template: - metadata: - name: "{{ .Release.Name }}" - labels: - app.kubernetes.io/managed-by: {{ .Release.Service | quote }} - app.kubernetes.io/instance: {{ .Release.Name | quote }} - helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - spec: - restartPolicy: Never - containers: - - name: post-install-job - image: "alpine:3.19" - imagePullPolicy: IfNotPresent - command: - - "/bin/sh" - - "-c" - - | - echo "Waiting 30s to start MIW wallet creation..." - sleep 30 - wget {{ $keycloakPath }} --header 'Content-Type: application/x-www-form-urlencoded' \ - --post-data 'grant_type=client_credentials&client_id={{ $miwUser }}&client_secret={{ $miwSecret }}' - TOKEN=`cat token | grep -o '"access_token": *"[^"]*"' | sed 's#"access_token":"\(.*\)"#\1#'` && export TOKEN - - {{- range $bpn, $companyName := index .Values "managed-identity-wallet" "seeding" "companies" }} - wget --header "Content-Type: application/json" --header "Authorization: Bearer $TOKEN" \ - --post-data '{"bpn": "{{ $bpn }}", "name": "{{ $companyName }}"}' "{{ $miwUrl }}/api/wallets" -S -O - - {{- end }} -{{ end }} diff --git a/charts/umbrella/values-adopter-data-exchange.yaml b/charts/umbrella/values-adopter-data-exchange.yaml index ec08433a..561ca6d3 100644 --- a/charts/umbrella/values-adopter-data-exchange.yaml +++ b/charts/umbrella/values-adopter-data-exchange.yaml @@ -35,41 +35,34 @@ centralidp: nginx.ingress.kubernetes.io/proxy-buffers-number: "20" nginx.ingress.kubernetes.io/use-regex: "true" tls: false - # -- uncomment the following for persistance + # -- uncomment the following for persistence # postgresql: # primary: # persistence: # enabled: true -managed-identity-wallet: +iatpmock: enabled: true - seeding: - enabled: true - miw: - keycloak: - url: "http://centralidp.tx.test/auth" - livenessProbe: - initialDelaySeconds: 60 - readinessProbe: - initialDelaySeconds: 60 ingress: enabled: true hosts: - - host: "managed-identity-wallets.tx.test" + - host: iatpmock.tx.test paths: - - path: "/" - pathType: "ImplementationSpecific" - className: "nginx" - annotations: - nginx.ingress.kubernetes.io/cors-allow-origin: http://portal.tx.test - nginx.ingress.kubernetes.io/cors-allow-credentials: "true" - nginx.ingress.kubernetes.io/cors-allow-methods: GET - nginx.ingress.kubernetes.io/enable-cors: "true" - # -- uncomment the following for persistance - # postgresql: - # primary: - # persistence: - # enabled: true + - path: / + pathType: ImplementationSpecific + +bdrs-server-memory: + enabled: true + hostname: &hostname bdrs-server.tx.test + server: + ingresses: + - enabled: true + hostname: *hostname + endpoints: + - directory + - management + tls: + enabled: false dataconsumerOne: enabled: true @@ -78,15 +71,21 @@ dataconsumerOne: tractusx-connector: participant: id: BPNL00000003AZQP - controlplane: - ssi: - miw: - url: http://managed-identity-wallets.tx.test - authorityId: BPNL00000003CRHK + iatp: + id: did:web:mock-util-service/customer + trustedIssuers: + - did:web:mock-util-service/trusted-issuer + sts: + dim: + url: http://mock-util-service:80/sts oauth: - tokenurl: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest01 + controlplane: + bdrs: + server: + url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST1 @@ -108,7 +107,7 @@ dataconsumerOne: - public tls: enabled: false - # -- uncomment the following for persistance + # -- uncomment the following for persistence # postgresql: # primary: # persistence: @@ -122,15 +121,24 @@ tx-data-provider: tractusx-connector: participant: id: BPNL00000003AYRE - controlplane: - ssi: - miw: - url: http://managed-identity-wallets.tx.test - authorityId: BPNL00000003CRHK + iatp: + id: did:web:mock-util-service/supplier + trustedIssuers: + - did:web:mock-util-service/trusted-issuer + sts: + dim: + url: http://mock-util-service:80/sts oauth: - tokenurl: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest02 + controlplane: + bdrs: + server: + url: http://bdrs-server.tx.test/api/directory + endpoints: + management: + authKey: TEST2 ingresses: - enabled: true hostname: "dataprovider-controlplane.tx.test" @@ -149,7 +157,7 @@ tx-data-provider: - public tls: enabled: false - # -- uncomment the following for persistance + # -- uncomment the following for persistence # postgresql: # primary: # persistence: @@ -167,15 +175,19 @@ dataconsumerTwo: tractusx-connector: participant: id: BPNL00000003AVTH - controlplane: - ssi: - miw: - url: http://managed-identity-wallets.tx.test - authorityId: BPNL00000003CRHK + iatp: + id: did:web:mock-util-service/BPNL00000003AVTH + trustedIssuers: + - did:web:mock-util-service/trusted-issuer + sts: oauth: - tokenurl: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest03 + controlplane: + bdrs: + server: + url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST3 @@ -197,7 +209,7 @@ dataconsumerTwo: - public tls: enabled: false - # -- uncomment the following for persistance + # -- uncomment the following for persistence # postgresql: # primary: # persistence: @@ -205,6 +217,6 @@ dataconsumerTwo: pgadmin4: enabled: true - # -- uncomment the following for persistance + # -- uncomment the following for persistence # persistentVolume: # enabled: true diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 168ea31b..a05a6bbb 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -493,7 +493,7 @@ discoveryfinder: initialDelaySeconds: 200 readinessProbe: initialDelaySeconds: 200 - host: semantics.tx.test + host: discovery.tx.test properties: discoveryfinder: initialEndpoints: @@ -574,112 +574,17 @@ selfdescription: # # uncomment the following line for tls # cert-manager.io/cluster-issuer: "my-ca-issuer" -managed-identity-wallet: - enabled: false - seeding: - enabled: false - # -- Map of company BPN and company name. For each of these Companies, a MIW wallet will be created. - companies: - BPNL00000003AZQP: "BPN_OEM_C" - BPNL00000003AYRE: "BPN_OEM_A" - BPNL00000003AVTH: "BPN_OEM_B" - BPNL00000003AWSS: "BPN_IRS_TEST" - BPNL00000003B0Q0: "BPN_N_TIER_A" - BPNS0000000008ZZ: "BPN_TRACEX_A_SITE_A" - BPNL00000003CNKC: "BPN_TRACEX_B" - BPNL00000003B6LU: "BPN_DISMANTLER" - BPNL00000003CML1: "BPN_TRACEX_A" - BPNS00000008BDFH: "BPN_TRACEX_B_SITE_A" - BPNL00000003B2OM: "BPN_TIER_A" - BPNL00000003CSGV: "BPN_TIER_C" - BPNL00000003B5MJ: "BPN_TIER_B" - BPNL00000003AXS3: "BPN_SUB_TIER_B" - BPNL00000003B3NX: "BPN_SUB_TIER_A" - BPNL00000000BJTL: "BPN_SUB_TIER_C" - clientId: sa-cl5-custodian-2 - clientSecret: UIqawwoohsvZ6AZOd1llLhnsUTKMWe4D - # TLS to trust centralidp Keycloak instance of TLS enabled - # uncomment the following line for tls - # initContainers: - # - name: init-certs - # image: docker.io/tractusx/managed-identity-wallet:0.4.0 - # imagePullPolicy: IfNotPresent - # command: ["sh"] - # args: - # - -ec - # - |- - # cp -R /opt/java/openjdk/lib/security/* /cacerts/ - # echo "Copying done" - # keytool -import -noprompt -trustcacerts -alias local -file /certs/tls.crt -keystore /cacerts/cacerts -storepass changeit - # keytool -list -keystore /cacerts/cacerts -alias local - # volumeMounts: - # - name: certificates - # mountPath: /certs - # - name: shared-certs - # mountPath: /cacerts - # extraVolumes: - # - name: certificates - # secret: - # secretName: root-secret - # defaultMode: 420 - # - name: shared-certs - # emptyDir: {} - # extraVolumeMounts: - # - name: certificates - # mountPath: /certs - # - name: shared-certs - # mountPath: /opt/java/openjdk/lib/security - miw: - host: "managed-identity-wallets.tx.test" - authorityWallet: - bpn: &authority-bpn "BPNL00000003CRHK" - name: "Catena-X" - database: - host: "{{ .Release.Name }}-miw-postgres" - secret: "{{ .Release.Name }}-miw-postgres" - keycloak: - url: "http://centralidp.tx.test/auth" - realm: "CX-Central" - clientId: "Cl5-CX-Custodian" - ssi: - enforceHttpsInDidWebResolution: "false" - postgresql: - nameOverride: miw-postgres - primary: - persistence: - enabled: false - size: 1Gi - auth: - password: "dbpasswordmiw" - enablePostgresUser: true - postgresPassword: "dbpasswordmiw" - keycloak: - enabled: false - livenessProbe: - initialDelaySeconds: 90 - readinessProbe: - initialDelaySeconds: 90 - # -- docs: http://managed-identity-wallets.tx.test/ui/swagger-ui/index.html +iatpmock: + enabled: true + nameOverride: mock-util-service + fullnameOverride: mock-util-service ingress: enabled: true hosts: - - host: "managed-identity-wallets.tx.test" + - host: iatpmock.tx.test paths: - - path: "/" - pathType: "ImplementationSpecific" - # uncomment the following lines for tls - # tls: - # - secretName: "managed-identity-wallets.tx.test-tls" - # hosts: - # - "managed-identity-wallets.tx.test" - className: "nginx" - annotations: - # uncomment the following line for tls - # cert-manager.io/cluster-issuer: "my-ca-issuer" - nginx.ingress.kubernetes.io/cors-allow-origin: http://portal.tx.test - nginx.ingress.kubernetes.io/cors-allow-credentials: "true" - nginx.ingress.kubernetes.io/cors-allow-methods: GET - nginx.ingress.kubernetes.io/enable-cors: "true" + - path: / + pathType: ImplementationSpecific dataconsumerOne: enabled: false @@ -691,16 +596,25 @@ dataconsumerOne: nameOverride: dataconsumer-1-edc participant: id: BPNL00000003AZQP - controlplane: - ssi: - miw: - url: http://managed-identity-wallets.tx.test - authorityId: *authority-bpn + iatp: + id: did:web:mock-util-service/customer + trustedIssuers: + - did:web:mock-util-service/trusted-issuer + sts: + dim: + url: http://mock-util-service:80/sts oauth: - tokenurl: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest01 - secretAlias: edc-miw-keycloak-secret + secret_alias: edc-miw-keycloak-secret + controlplane: + env: + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + EDC_IAM_DID_WEB_USE_HTTPS: false + bdrs: + server: + url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST1 @@ -715,6 +629,9 @@ dataconsumerOne: tls: enabled: false dataplane: + env: + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true hostname: "dataconsumer-1-dataplane.tx.test" @@ -724,6 +641,11 @@ dataconsumerOne: className: "nginx" tls: enabled: false + token: + signer: + privatekey_alias: tokenSignerPrivateKey + verifier: + publickey_alias: tokenSignerPublicKey postgresql: nameOverride: dataconsumer-1-db jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-dataconsumer-1-db:5432/edc" @@ -766,16 +688,25 @@ tx-data-provider: nameOverride: dataprovider-edc participant: id: BPNL00000003AYRE - controlplane: - ssi: - miw: - url: http://managed-identity-wallets.tx.test - authorityId: *authority-bpn + iatp: + id: did:web:mock-util-service/supplier + trustedIssuers: + - did:web:mock-util-service/trusted-issuer + sts: + dim: + url: http://mock-util-service:80/sts oauth: - tokenurl: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest02 - secretAlias: edc-miw-keycloak-secret + secret_alias: edc-miw-keycloak-secret + controlplane: + env: + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + EDC_IAM_DID_WEB_USE_HTTPS: false + bdrs: + server: + url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST2 @@ -790,6 +721,9 @@ tx-data-provider: tls: enabled: false dataplane: + env: + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true hostname: "dataprovider-dataplane.tx.test" @@ -799,6 +733,11 @@ tx-data-provider: className: "nginx" tls: enabled: false + token: + signer: + privatekey_alias: tokenSignerPrivateKey + verifier: + publickey_alias: tokenSignerPublicKey postgresql: nameOverride: dataprovider-db jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-dataprovider-db:5432/edc" @@ -845,6 +784,14 @@ semantic-hub: persistence: enabled: false hub: + host: semantics.tx.test + ingress: + enabled: true + tls: false + urlPrefix: / + className: "nginx" + annotations: + kubernetes.io/ingress.class: nginx authentication: false livenessProbe: initialDelaySeconds: 200 @@ -867,16 +814,25 @@ dataconsumerTwo: nameOverride: dataconsumer-2-edc participant: id: BPNL00000003AVTH - controlplane: - ssi: - miw: - url: http://managed-identity-wallets.tx.test - authorityId: *authority-bpn + iatp: + id: did:web:mock-util-service/BPNL00000003AVTH + trustedIssuers: + - did:web:mock-util-service/trusted-issuer + sts: + dim: + url: http://mock-util-service:80/sts oauth: - tokenurl: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest03 - secretAlias: edc-miw-keycloak-secret + secret_alias: edc-miw-keycloak-secret + controlplane: + env: + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + EDC_IAM_DID_WEB_USE_HTTPS: false + bdrs: + server: + url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST3 @@ -891,6 +847,9 @@ dataconsumerTwo: tls: enabled: false dataplane: + env: + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true hostname: "dataconsumer-2-dataplane.tx.test" @@ -900,6 +859,11 @@ dataconsumerTwo: className: "nginx" tls: enabled: false + token: + signer: + privatekey_alias: tokenSignerPrivateKey + verifier: + publickey_alias: tokenSignerPublicKey postgresql: nameOverride: dataconsumer-2-db jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-dataconsumer-2-db:5432/edc" @@ -942,3 +906,28 @@ pgadmin4: paths: - path: / pathType: Prefix + +bdrs-server-memory: + enabled: false + hostname: &hostname bdrs-server.tx.test + seeding: + enabled: true + server: + trustedIssuers: + - did:web:mock-util-service/trusted-issuer + env: + EDC_IAM_DID_WEB_USE_HTTPS: false + + endpoints: + management: + authKey: TEST + ingresses: + - enabled: true + hostname: *hostname + endpoints: + - directory + - management + className: "nginx" + tls: + enabled: false + From b474b6412f1d687e067a9b5da16b9c95469c6465 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 12:09:37 +0200 Subject: [PATCH 04/24] chore: enable all umbrella BPNs --- .../templates/post-install-bdrs-setup.yaml | 60 ++--- .../values-adopter-data-exchange.yaml | 4 +- charts/umbrella/values.yaml | 4 +- iam-mock/constants.py | 213 ++++++++---------- 4 files changed, 133 insertions(+), 148 deletions(-) diff --git a/charts/umbrella/templates/post-install-bdrs-setup.yaml b/charts/umbrella/templates/post-install-bdrs-setup.yaml index 33c99984..abe4481a 100644 --- a/charts/umbrella/templates/post-install-bdrs-setup.yaml +++ b/charts/umbrella/templates/post-install-bdrs-setup.yaml @@ -57,51 +57,51 @@ spec: sleep 10 wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AZQP","did": "did:web:mock-util-service/customer"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003AZQP","did": "did:web:mock-util-service/BPNL00000003AZQP"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AYRE","did": "did:web:mock-util-service/supplier"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003AYRE","did": "did:web:mock-util-service/BPNL00000003AYRE"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003AVTH","did": "did:web:mock-util-service/BPNL00000003AVTH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003AVTH","did": "did:web:mock-util-service/BPNL00000003AVTH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003AWSS","did": "did:web:mock-util-service/BPNL00000003AWSS"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003AWSS","did": "did:web:mock-util-service/BPNL00000003AWSS"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003B0Q0","did": "did:web:mock-util-service/BPNL00000003B0Q0"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003B0Q0","did": "did:web:mock-util-service/BPNL00000003B0Q0"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNS0000000008ZZ","did": "did:web:mock-util-service/BPNS0000000008ZZ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNS0000000008ZZ","did": "did:web:mock-util-service/BPNS0000000008ZZ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003CNKC","did": "did:web:mock-util-service/BPNL00000003CNKC"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003CNKC","did": "did:web:mock-util-service/BPNL00000003CNKC"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003B6LU","did": "did:web:mock-util-service/BPNL00000003B6LU"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003B6LU","did": "did:web:mock-util-service/BPNL00000003B6LU"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003CML1","did": "did:web:mock-util-service/BPNL00000003CML1"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003CML1","did": "did:web:mock-util-service/BPNL00000003CML1"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNS00000008BDFH","did": "did:web:mock-util-service/BPNS00000008BDFH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNS00000008BDFH","did": "did:web:mock-util-service/BPNS00000008BDFH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003B2OM","did": "did:web:mock-util-service/BPNL00000003B2OM"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003B2OM","did": "did:web:mock-util-service/BPNL00000003B2OM"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003CSGV","did": "did:web:mock-util-service/BPNL00000003CSGV"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003CSGV","did": "did:web:mock-util-service/BPNL00000003CSGV"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003B5MJ","did": "did:web:mock-util-service/BPNL00000003B5MJ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003B5MJ","did": "did:web:mock-util-service/BPNL00000003B5MJ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003AXS3","did": "did:web:mock-util-service/BPNL00000003AXS3"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003AXS3","did": "did:web:mock-util-service/BPNL00000003AXS3"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000003B3NX","did": "did:web:mock-util-service/BPNL00000003B3NX"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000003B3NX","did": "did:web:mock-util-service/BPNL00000003B3NX"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - -{{/* wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \*/}} -{{/* --post-data '{"bpn": "BPNL00000000BJTL","did": "did:web:mock-util-service/BPNL00000000BJTL"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O -*/}} + wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ + --post-data '{"bpn": "BPNL00000000BJTL","did": "did:web:mock-util-service/BPNL00000000BJTL"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - {{ end }} diff --git a/charts/umbrella/values-adopter-data-exchange.yaml b/charts/umbrella/values-adopter-data-exchange.yaml index 561ca6d3..cd9f0e4d 100644 --- a/charts/umbrella/values-adopter-data-exchange.yaml +++ b/charts/umbrella/values-adopter-data-exchange.yaml @@ -72,7 +72,7 @@ dataconsumerOne: participant: id: BPNL00000003AZQP iatp: - id: did:web:mock-util-service/customer + id: did:web:mock-util-service/BPNL00000003AZQP trustedIssuers: - did:web:mock-util-service/trusted-issuer sts: @@ -122,7 +122,7 @@ tx-data-provider: participant: id: BPNL00000003AYRE iatp: - id: did:web:mock-util-service/supplier + id: did:web:mock-util-service/BPNL00000003AYRE trustedIssuers: - did:web:mock-util-service/trusted-issuer sts: diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index a05a6bbb..21c3330d 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -597,7 +597,7 @@ dataconsumerOne: participant: id: BPNL00000003AZQP iatp: - id: did:web:mock-util-service/customer + id: did:web:mock-util-service/BPNL00000003AZQP trustedIssuers: - did:web:mock-util-service/trusted-issuer sts: @@ -689,7 +689,7 @@ tx-data-provider: participant: id: BPNL00000003AYRE iatp: - id: did:web:mock-util-service/supplier + id: did:web:mock-util-service/BPNL00000003AYRE trustedIssuers: - did:web:mock-util-service/trusted-issuer sts: diff --git a/iam-mock/constants.py b/iam-mock/constants.py index 75b13969..607c0d29 100644 --- a/iam-mock/constants.py +++ b/iam-mock/constants.py @@ -38,24 +38,22 @@ def read_file(path: Path): EDC_PRIVATE_KEY = read_file(Path("keys/edc.key")) DID_TRUSTED_ISSUER = "did:web:mock-util-service/trusted-issuer" -DID_CUSTOMER = "did:web:mock-util-service/customer" -DID_SUPPLIER = "did:web:mock-util-service/supplier" -# DID_BPNL00000003AYRE = "did:web:mock-util-service/BPNL00000003AYRE" -# DID_BPNL00000003AZQP = "did:web:mock-util-service/BPNL00000003AZQP" -# DID_BPNL00000003AVTH = "did:web:mock-util-service/BPNL00000003AVTH" -# DID_BPNL00000003AWSS = "did:web:mock-util-service/BPNL00000003AWSS" -# DID_BPNL00000003B0Q0 = "did:web:mock-util-service/BPNL00000003B0Q0" -# DID_BPNS0000000008ZZ = "did:web:mock-util-service/BPNS0000000008ZZ" -# DID_BPNL00000003CNKC = "did:web:mock-util-service/BPNL00000003CNKC" -# DID_BPNL00000003B6LU = "did:web:mock-util-service/BPNL00000003B6LU" -# DID_BPNL00000003CML1 = "did:web:mock-util-service/BPNL00000003CML1" -# DID_BPNS00000008BDFH = "did:web:mock-util-service/BPNS00000008BDFH" -# DID_BPNL00000003B2OM = "did:web:mock-util-service/BPNL00000003B2OM" -# DID_BPNL00000003CSGV = "did:web:mock-util-service/BPNL00000003CSGV" -# DID_BPNL00000003B5MJ = "did:web:mock-util-service/BPNL00000003B5MJ" -# DID_BPNL00000003AXS3 = "did:web:mock-util-service/BPNL00000003AXS3" -# DID_BPNL00000003B3NX = "did:web:mock-util-service/BPNL00000003B3NX" -# DID_BPNL00000000BJTL = "did:web:mock-util-service/BPNL00000000BJTL" +DID_BPNL00000003AYRE = "did:web:mock-util-service/BPNL00000003AYRE" +DID_BPNL00000003AZQP = "did:web:mock-util-service/BPNL00000003AZQP" +DID_BPNL00000003AVTH = "did:web:mock-util-service/BPNL00000003AVTH" +DID_BPNL00000003AWSS = "did:web:mock-util-service/BPNL00000003AWSS" +DID_BPNL00000003B0Q0 = "did:web:mock-util-service/BPNL00000003B0Q0" +DID_BPNS0000000008ZZ = "did:web:mock-util-service/BPNS0000000008ZZ" +DID_BPNL00000003CNKC = "did:web:mock-util-service/BPNL00000003CNKC" +DID_BPNL00000003B6LU = "did:web:mock-util-service/BPNL00000003B6LU" +DID_BPNL00000003CML1 = "did:web:mock-util-service/BPNL00000003CML1" +DID_BPNS00000008BDFH = "did:web:mock-util-service/BPNS00000008BDFH" +DID_BPNL00000003B2OM = "did:web:mock-util-service/BPNL00000003B2OM" +DID_BPNL00000003CSGV = "did:web:mock-util-service/BPNL00000003CSGV" +DID_BPNL00000003B5MJ = "did:web:mock-util-service/BPNL00000003B5MJ" +DID_BPNL00000003AXS3 = "did:web:mock-util-service/BPNL00000003AXS3" +DID_BPNL00000003B3NX = "did:web:mock-util-service/BPNL00000003B3NX" +DID_BPNL00000000BJTL = "did:web:mock-util-service/BPNL00000000BJTL" # note: kid_vault = alias used for public key, set in edc.transfer.proxy.token.verifier.publickey.alias DID_DICT = { @@ -63,111 +61,98 @@ def read_file(path: Path): "bpnl": "NONE", "did_resolve_name": "trusted-issuer", }, - DID_SUPPLIER: { + DID_BPNL00000003AYRE: { "bpnl": "BPNL00000003AYRE", - "did_resolve_name": "supplier", + "did_resolve_name": "BPNL00000003AYRE", "kid_vault": "tokenSignerPublicKey", "private_key": EDC_PRIVATE_KEY }, - DID_CUSTOMER: { + DID_BPNL00000003AZQP: { "bpnl": "BPNL00000003AZQP", - "did_resolve_name": "customer", + "did_resolve_name": "BPNL00000003AZQP", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003AVTH: { + "bpnl": "BPNL00000003AVTH", + "did_resolve_name": "BPNL00000003AVTH", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + } + , + DID_BPNL00000003AWSS: { + "bpnl": "BPNL00000003AWSS", + "did_resolve_name": "BPNL00000003AWSS", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003B0Q0: { + "bpnl": "BPNL00000003B0Q0", + "did_resolve_name": "BPNL00000003B0Q0", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNS0000000008ZZ: { + "bpnl": "BPNS0000000008ZZ", + "did_resolve_name": "BPNS0000000008ZZ", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003CNKC: { + "bpnl": "BPNL00000003CNKC", + "did_resolve_name": "BPNL00000003CNKC", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003B6LU: { + "bpnl": "BPNL00000003B6LU", + "did_resolve_name": "BPNL00000003B6LU", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003CML1: { + "bpnl": "BPNL00000003CML1", + "did_resolve_name": "BPNL00000003CML1", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNS00000008BDFH: { + "bpnl": "BPNS00000008BDFH", + "did_resolve_name": "BPNS00000008BDFH", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003B2OM: { + "bpnl": "BPNL00000003B2OM", + "did_resolve_name": "BPNL00000003B2OM", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003CSGV: { + "bpnl": "BPNL00000003CSGV", + "did_resolve_name": "BPNL00000003CSGV", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003B5MJ: { + "bpnl": "BPNL00000003B5MJ", + "did_resolve_name": "BPNL00000003B5MJ", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003AXS3: { + "bpnl": "BPNL00000003AXS3", + "did_resolve_name": "BPNL00000003AXS3", + "kid_vault": "tokenSignerPublicKey", + "private_key": EDC_PRIVATE_KEY + }, + DID_BPNL00000003B3NX: { + "bpnl": "BPNL00000003B3NX", + "did_resolve_name": "BPNL00000003B3NX", "kid_vault": "tokenSignerPublicKey", "private_key": EDC_PRIVATE_KEY } } - # , - # DID_BPNL00000003AYRE: { - # "bpnl": "BPNL00000003AYRE", - # "did_resolve_name": "BPNL00000003AYRE", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003AZQP: { - # "bpnl": "BPNL00000003AZQP", - # "did_resolve_name": "BPNL00000003AZQP", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003AVTH: { - # "bpnl": "BPNL00000003AVTH", - # "did_resolve_name": "BPNL00000003AVTH", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # } - # , - # DID_BPNL00000003AWSS: { - # "bpnl": "BPNL00000003AWSS", - # "did_resolve_name": "BPNL00000003AWSS", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003B0Q0: { - # "bpnl": "BPNL00000003B0Q0", - # "did_resolve_name": "BPNL00000003B0Q0", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNS0000000008ZZ: { - # "bpnl": "BPNS0000000008ZZ", - # "did_resolve_name": "BPNS0000000008ZZ", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003CNKC: { - # "bpnl": "BPNL00000003CNKC", - # "did_resolve_name": "BPNL00000003CNKC", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003B6LU: { - # "bpnl": "BPNL00000003B6LU", - # "did_resolve_name": "BPNL00000003B6LU", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003CML1: { - # "bpnl": "BPNL00000003CML1", - # "did_resolve_name": "BPNL00000003CML1", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNS00000008BDFH: { - # "bpnl": "BPNS00000008BDFH", - # "did_resolve_name": "BPNS00000008BDFH", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003B2OM: { - # "bpnl": "BPNL00000003B2OM", - # "did_resolve_name": "BPNL00000003B2OM", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003CSGV: { - # "bpnl": "BPNL00000003CSGV", - # "did_resolve_name": "BPNL00000003CSGV", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003B5MJ: { - # "bpnl": "BPNL00000003B5MJ", - # "did_resolve_name": "BPNL00000003B5MJ", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003AXS3: { - # "bpnl": "BPNL00000003AXS3", - # "did_resolve_name": "BPNL00000003AXS3", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # }, - # DID_BPNL00000003B3NX: { - # "bpnl": "BPNL00000003B3NX", - # "did_resolve_name": "BPNL00000003B3NX", - # "kid_vault": "tokenSignerPublicKey", - # "private_key": EDC_PRIVATE_KEY, - # } """ lookup did by did_resolve_name From 457a4d06401cef39855a53bfed08b226e08d7428 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 12:10:44 +0200 Subject: [PATCH 05/24] chore: update data exchange test config --- charts/umbrella/values.yaml | 2 +- charts/values-test-data-exchange.yaml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 21c3330d..25739168 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -575,7 +575,7 @@ selfdescription: # cert-manager.io/cluster-issuer: "my-ca-issuer" iatpmock: - enabled: true + enabled: false nameOverride: mock-util-service fullnameOverride: mock-util-service ingress: diff --git a/charts/values-test-data-exchange.yaml b/charts/values-test-data-exchange.yaml index 55126864..4fd695ec 100644 --- a/charts/values-test-data-exchange.yaml +++ b/charts/values-test-data-exchange.yaml @@ -35,7 +35,10 @@ discoveryfinder: selfdescription: enabled: false -managed-identity-wallet: +iatpmock: + enabled: true + +bdrs-server-memory: enabled: true dataconsumer: From 32602623765482fa4fe648c5bbd083b1ccc5f678 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 12:48:39 +0200 Subject: [PATCH 06/24] chore: fix helm lint --- charts/tx-data-provider/templates/vault-edc-configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tx-data-provider/templates/vault-edc-configmap.yaml b/charts/tx-data-provider/templates/vault-edc-configmap.yaml index 55ccd7de..72b52345 100644 --- a/charts/tx-data-provider/templates/vault-edc-configmap.yaml +++ b/charts/tx-data-provider/templates/vault-edc-configmap.yaml @@ -17,7 +17,7 @@ # SPDX-License-Identifier: Apache-2.0 # ############################################################################# --- -{{- $fullName := include "dataprovider.fullname" . -}} +{{ $fullName := include "dataprovider.fullname" . -}} apiVersion: v1 kind: ConfigMap metadata: From fe153b8beb3f11092c3e80c3aabc3233b43e1e9b Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 12:56:06 +0200 Subject: [PATCH 07/24] chore: fix helm lint --- charts/iatpmock/values.yaml | 13 ++++++------- charts/umbrella/values.yaml | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/charts/iatpmock/values.yaml b/charts/iatpmock/values.yaml index f438fa71..5b8e9bbd 100644 --- a/charts/iatpmock/values.yaml +++ b/charts/iatpmock/values.yaml @@ -10,7 +10,7 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: "testing" -imagePullSecrets: [ ] +imagePullSecrets: [] nameOverride: "" fullnameOverride: "" @@ -20,13 +20,13 @@ serviceAccount: # Automatically mount a ServiceAccount's API credentials? automount: true # Annotations to add to the service account - annotations: { } + 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: "" -podAnnotations: { } -podLabels: { } +podAnnotations: {} +podLabels: {} podSecurityContext: fsGroup: 2000 @@ -46,13 +46,13 @@ service: ingress: enabled: false className: "nginx" - annotations: { } + annotations: {} hosts: - host: chart-example.local paths: - path: / pathType: ImplementationSpecific - tls: [ ] + tls: [] resources: # We usually recommend not to specify default resources and to leave this as a conscious @@ -74,4 +74,3 @@ readinessProbe: httpGet: path: /health port: http - diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 25739168..9f650ebd 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -930,4 +930,3 @@ bdrs-server-memory: className: "nginx" tls: enabled: false - From aa48a0bc65aa071df9d1d20c953c4cbdffab1a26 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 15:28:55 +0200 Subject: [PATCH 08/24] chore: disable edc data seeding by default --- charts/tx-data-provider/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 93f9121c..7621e8b8 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -25,7 +25,7 @@ configuration: nameOverride: "" fullnameOverride: "" -seedTestdata: true # Toggle seeding of testdata. Can be disabled when e.g. only edc is used as consumer. Default true. +seedTestdata: false # Toggle seeding of testdata. Can be enabled when the edc should be seeded with testdata on startup. testdataConfigMap: "" # Provide a custom configmap for post-install-job-upload-testdata.yaml. backendUrl: "" # Override the backend service url registryUrl: "" # Override the digital twin registry url From b1db9a35b827118692a7b65925747f651821f411 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 15:29:22 +0200 Subject: [PATCH 09/24] chore: add install and test step for iatpmock --- .github/workflows/helm-checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index c03ed1a3..c6eb9a6e 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -160,6 +160,9 @@ jobs: - name: Install chart and run tests (tx-data-provider) run: ct install --charts charts/tx-data-provider --target-branch ${{ github.event.repository.default_branch }} + - name: Install chart and run tests (iatpmock) + run: ct install --charts charts/iatpmock --target-branch ${{ github.event.repository.default_branch }} + - name: Install chart for shared services (umbrella) run: | helm install umbrella charts/umbrella -f charts/values-test-shared-services.yaml -f charts/values-test-iam-init-container.yaml --namespace shared-services --create-namespace --debug --timeout 10m --set semantic-hub.graphdb.image=kind-registry:5000/jena-fuseki-docker:4.7.0 From d70289330091326f2c8a5d500394fd7466b67e15 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 21 Jun 2024 16:27:47 +0200 Subject: [PATCH 10/24] chore: fix testing docker image --- .github/workflows/helm-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index c6eb9a6e..c77d935e 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -161,7 +161,7 @@ jobs: run: ct install --charts charts/tx-data-provider --target-branch ${{ github.event.repository.default_branch }} - name: Install chart and run tests (iatpmock) - run: ct install --charts charts/iatpmock --target-branch ${{ github.event.repository.default_branch }} + run: ct install --charts charts/iatpmock --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set image.repository=kind-registry:5000/iam-mock --set image.tag=testing" - name: Install chart for shared services (umbrella) run: | From 13b7b6a52f37e8e20a4eadfc34b6d3df95a876c5 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 24 Jun 2024 13:17:01 +0200 Subject: [PATCH 11/24] chore: switch to port 8080 and ingress for iatp mock --- charts/iatpmock/values.yaml | 2 +- .../templates/post-install-bdrs-setup.yaml | 32 ++++++++--------- .../values-adopter-data-exchange.yaml | 16 ++++----- charts/umbrella/values.yaml | 32 ++++++++--------- iam-mock/Dockerfile | 2 +- iam-mock/README.md | 14 ++++---- iam-mock/constants.py | 34 +++++++++---------- iam-mock/mock_util.py | 2 +- 8 files changed, 67 insertions(+), 67 deletions(-) diff --git a/charts/iatpmock/values.yaml b/charts/iatpmock/values.yaml index 5b8e9bbd..55d8d906 100644 --- a/charts/iatpmock/values.yaml +++ b/charts/iatpmock/values.yaml @@ -41,7 +41,7 @@ securityContext: service: type: ClusterIP - port: 80 + port: 8080 ingress: enabled: false diff --git a/charts/umbrella/templates/post-install-bdrs-setup.yaml b/charts/umbrella/templates/post-install-bdrs-setup.yaml index abe4481a..cdb44779 100644 --- a/charts/umbrella/templates/post-install-bdrs-setup.yaml +++ b/charts/umbrella/templates/post-install-bdrs-setup.yaml @@ -57,51 +57,51 @@ spec: sleep 10 wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AZQP","did": "did:web:mock-util-service/BPNL00000003AZQP"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003AZQP","did": "did:web:iatpmock.tx.test/BPNL00000003AZQP"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AYRE","did": "did:web:mock-util-service/BPNL00000003AYRE"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003AYRE","did": "did:web:iatpmock.tx.test/BPNL00000003AYRE"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AVTH","did": "did:web:mock-util-service/BPNL00000003AVTH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003AVTH","did": "did:web:iatpmock.tx.test/BPNL00000003AVTH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AWSS","did": "did:web:mock-util-service/BPNL00000003AWSS"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003AWSS","did": "did:web:iatpmock.tx.test/BPNL00000003AWSS"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B0Q0","did": "did:web:mock-util-service/BPNL00000003B0Q0"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003B0Q0","did": "did:web:iatpmock.tx.test/BPNL00000003B0Q0"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNS0000000008ZZ","did": "did:web:mock-util-service/BPNS0000000008ZZ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNS0000000008ZZ","did": "did:web:iatpmock.tx.test/BPNS0000000008ZZ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003CNKC","did": "did:web:mock-util-service/BPNL00000003CNKC"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003CNKC","did": "did:web:iatpmock.tx.test/BPNL00000003CNKC"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B6LU","did": "did:web:mock-util-service/BPNL00000003B6LU"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003B6LU","did": "did:web:iatpmock.tx.test/BPNL00000003B6LU"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003CML1","did": "did:web:mock-util-service/BPNL00000003CML1"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003CML1","did": "did:web:iatpmock.tx.test/BPNL00000003CML1"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNS00000008BDFH","did": "did:web:mock-util-service/BPNS00000008BDFH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNS00000008BDFH","did": "did:web:iatpmock.tx.test/BPNS00000008BDFH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B2OM","did": "did:web:mock-util-service/BPNL00000003B2OM"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003B2OM","did": "did:web:iatpmock.tx.test/BPNL00000003B2OM"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003CSGV","did": "did:web:mock-util-service/BPNL00000003CSGV"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003CSGV","did": "did:web:iatpmock.tx.test/BPNL00000003CSGV"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B5MJ","did": "did:web:mock-util-service/BPNL00000003B5MJ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003B5MJ","did": "did:web:iatpmock.tx.test/BPNL00000003B5MJ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AXS3","did": "did:web:mock-util-service/BPNL00000003AXS3"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003AXS3","did": "did:web:iatpmock.tx.test/BPNL00000003AXS3"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B3NX","did": "did:web:mock-util-service/BPNL00000003B3NX"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000003B3NX","did": "did:web:iatpmock.tx.test/BPNL00000003B3NX"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000000BJTL","did": "did:web:mock-util-service/BPNL00000000BJTL"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + --post-data '{"bpn": "BPNL00000000BJTL","did": "did:web:iatpmock.tx.test/BPNL00000000BJTL"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - {{ end }} diff --git a/charts/umbrella/values-adopter-data-exchange.yaml b/charts/umbrella/values-adopter-data-exchange.yaml index cd9f0e4d..ec1ad362 100644 --- a/charts/umbrella/values-adopter-data-exchange.yaml +++ b/charts/umbrella/values-adopter-data-exchange.yaml @@ -72,12 +72,12 @@ dataconsumerOne: participant: id: BPNL00000003AZQP iatp: - id: did:web:mock-util-service/BPNL00000003AZQP + id: did:web:iatpmock.tx.test/BPNL00000003AZQP trustedIssuers: - - did:web:mock-util-service/trusted-issuer + - did:web:iatpmock.tx.test/trusted-issuer sts: dim: - url: http://mock-util-service:80/sts + url: http://iatpmock.tx.test/sts oauth: token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: @@ -122,12 +122,12 @@ tx-data-provider: participant: id: BPNL00000003AYRE iatp: - id: did:web:mock-util-service/BPNL00000003AYRE + id: did:web:iatpmock.tx.test/BPNL00000003AYRE trustedIssuers: - - did:web:mock-util-service/trusted-issuer + - did:web:iatpmock.tx.test/trusted-issuer sts: dim: - url: http://mock-util-service:80/sts + url: http://iatpmock.tx.test/sts oauth: token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: @@ -176,9 +176,9 @@ dataconsumerTwo: participant: id: BPNL00000003AVTH iatp: - id: did:web:mock-util-service/BPNL00000003AVTH + id: did:web:iatpmock.tx.test/BPNL00000003AVTH trustedIssuers: - - did:web:mock-util-service/trusted-issuer + - did:web:iatpmock.tx.test/trusted-issuer sts: oauth: token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 9f650ebd..e0b6e221 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -597,12 +597,12 @@ dataconsumerOne: participant: id: BPNL00000003AZQP iatp: - id: did:web:mock-util-service/BPNL00000003AZQP + id: did:web:iatpmock.tx.test/BPNL00000003AZQP trustedIssuers: - - did:web:mock-util-service/trusted-issuer + - did:web:iatpmock.tx.test/trusted-issuer sts: dim: - url: http://mock-util-service:80/sts + url: http://iatpmock.tx.test/sts oauth: token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: @@ -610,7 +610,7 @@ dataconsumerOne: secret_alias: edc-miw-keycloak-secret controlplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: @@ -630,7 +630,7 @@ dataconsumerOne: enabled: false dataplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true @@ -689,12 +689,12 @@ tx-data-provider: participant: id: BPNL00000003AYRE iatp: - id: did:web:mock-util-service/BPNL00000003AYRE + id: did:web:iatpmock.tx.test/BPNL00000003AYRE trustedIssuers: - - did:web:mock-util-service/trusted-issuer + - did:web:iatpmock.tx.test/trusted-issuer sts: dim: - url: http://mock-util-service:80/sts + url: http://iatpmock.tx.test/sts oauth: token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: @@ -702,7 +702,7 @@ tx-data-provider: secret_alias: edc-miw-keycloak-secret controlplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: @@ -722,7 +722,7 @@ tx-data-provider: enabled: false dataplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true @@ -815,12 +815,12 @@ dataconsumerTwo: participant: id: BPNL00000003AVTH iatp: - id: did:web:mock-util-service/BPNL00000003AVTH + id: did:web:iatpmock.tx.test/BPNL00000003AVTH trustedIssuers: - - did:web:mock-util-service/trusted-issuer + - did:web:iatpmock.tx.test/trusted-issuer sts: dim: - url: http://mock-util-service:80/sts + url: http://iatpmock.tx.test/sts oauth: token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: @@ -828,7 +828,7 @@ dataconsumerTwo: secret_alias: edc-miw-keycloak-secret controlplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: @@ -848,7 +848,7 @@ dataconsumerTwo: enabled: false dataplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service:80 + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true @@ -914,7 +914,7 @@ bdrs-server-memory: enabled: true server: trustedIssuers: - - did:web:mock-util-service/trusted-issuer + - did:web:iatpmock.tx.test/trusted-issuer env: EDC_IAM_DID_WEB_USE_HTTPS: false diff --git a/iam-mock/Dockerfile b/iam-mock/Dockerfile index c3167bc1..8fe3be4a 100644 --- a/iam-mock/Dockerfile +++ b/iam-mock/Dockerfile @@ -27,4 +27,4 @@ COPY ./keys /code/keys RUN useradd -u 1000 nonroot USER nonroot -CMD ["uvicorn", "mock_util:app", "--host", "0.0.0.0", "--port", "80"] +CMD ["uvicorn", "mock_util:app", "--host", "0.0.0.0", "--port", "8080"] diff --git a/iam-mock/README.md b/iam-mock/README.md index b820b9bc..f1ac5756 100644 --- a/iam-mock/README.md +++ b/iam-mock/README.md @@ -33,12 +33,12 @@ docker compose up Following services are now reachable: -| Service | address | reachable where | -|-------------------|-------------------------------------------------|--------------------------| -| mock-util-service | http://mock-util-service:80/edr-log | docker compose (miw net) | -| mock-util-service | http://mock-util-service:80/sts | docker compose (miw net) | -| mock-util-service | http://mock-util-service:80/presentations/query | docker compose (miw net) | -| mock-util-service | http://mock-util-service:80/{did-name} | docker compose (miw net) | -| mock-util-service | localhost:8888/* | host machine | +| Service | address | reachable where | +|-------------------|---------------------------------------------------|--------------------------| +| mock-util-service | http://mock-util-service:8080/edr-log | docker compose (miw net) | +| mock-util-service | http://mock-util-service:8080/sts | docker compose (miw net) | +| mock-util-service | http://mock-util-service:8080/presentations/query | docker compose (miw net) | +| mock-util-service | http://mock-util-service:8080/{did-name} | docker compose (miw net) | +| mock-util-service | localhost:8888/* | host machine | Use the service to either simulate the central IAM or just to got some logging api diff --git a/iam-mock/constants.py b/iam-mock/constants.py index 607c0d29..2f3032ab 100644 --- a/iam-mock/constants.py +++ b/iam-mock/constants.py @@ -37,23 +37,23 @@ def read_file(path: Path): # must be same as used in edc for edc.transfer.proxy.signer.privatekey.alias EDC_PRIVATE_KEY = read_file(Path("keys/edc.key")) -DID_TRUSTED_ISSUER = "did:web:mock-util-service/trusted-issuer" -DID_BPNL00000003AYRE = "did:web:mock-util-service/BPNL00000003AYRE" -DID_BPNL00000003AZQP = "did:web:mock-util-service/BPNL00000003AZQP" -DID_BPNL00000003AVTH = "did:web:mock-util-service/BPNL00000003AVTH" -DID_BPNL00000003AWSS = "did:web:mock-util-service/BPNL00000003AWSS" -DID_BPNL00000003B0Q0 = "did:web:mock-util-service/BPNL00000003B0Q0" -DID_BPNS0000000008ZZ = "did:web:mock-util-service/BPNS0000000008ZZ" -DID_BPNL00000003CNKC = "did:web:mock-util-service/BPNL00000003CNKC" -DID_BPNL00000003B6LU = "did:web:mock-util-service/BPNL00000003B6LU" -DID_BPNL00000003CML1 = "did:web:mock-util-service/BPNL00000003CML1" -DID_BPNS00000008BDFH = "did:web:mock-util-service/BPNS00000008BDFH" -DID_BPNL00000003B2OM = "did:web:mock-util-service/BPNL00000003B2OM" -DID_BPNL00000003CSGV = "did:web:mock-util-service/BPNL00000003CSGV" -DID_BPNL00000003B5MJ = "did:web:mock-util-service/BPNL00000003B5MJ" -DID_BPNL00000003AXS3 = "did:web:mock-util-service/BPNL00000003AXS3" -DID_BPNL00000003B3NX = "did:web:mock-util-service/BPNL00000003B3NX" -DID_BPNL00000000BJTL = "did:web:mock-util-service/BPNL00000000BJTL" +DID_TRUSTED_ISSUER = "did:web:iatpmock.tx.test/trusted-issuer" +DID_BPNL00000003AYRE = "did:web:iatpmock.tx.test/BPNL00000003AYRE" +DID_BPNL00000003AZQP = "did:web:iatpmock.tx.test/BPNL00000003AZQP" +DID_BPNL00000003AVTH = "did:web:iatpmock.tx.test/BPNL00000003AVTH" +DID_BPNL00000003AWSS = "did:web:iatpmock.tx.test/BPNL00000003AWSS" +DID_BPNL00000003B0Q0 = "did:web:iatpmock.tx.test/BPNL00000003B0Q0" +DID_BPNS0000000008ZZ = "did:web:iatpmock.tx.test/BPNS0000000008ZZ" +DID_BPNL00000003CNKC = "did:web:iatpmock.tx.test/BPNL00000003CNKC" +DID_BPNL00000003B6LU = "did:web:iatpmock.tx.test/BPNL00000003B6LU" +DID_BPNL00000003CML1 = "did:web:iatpmock.tx.test/BPNL00000003CML1" +DID_BPNS00000008BDFH = "did:web:iatpmock.tx.test/BPNS00000008BDFH" +DID_BPNL00000003B2OM = "did:web:iatpmock.tx.test/BPNL00000003B2OM" +DID_BPNL00000003CSGV = "did:web:iatpmock.tx.test/BPNL00000003CSGV" +DID_BPNL00000003B5MJ = "did:web:iatpmock.tx.test/BPNL00000003B5MJ" +DID_BPNL00000003AXS3 = "did:web:iatpmock.tx.test/BPNL00000003AXS3" +DID_BPNL00000003B3NX = "did:web:iatpmock.tx.test/BPNL00000003B3NX" +DID_BPNL00000000BJTL = "did:web:iatpmock.tx.test/BPNL00000000BJTL" # note: kid_vault = alias used for public key, set in edc.transfer.proxy.token.verifier.publickey.alias DID_DICT = { diff --git a/iam-mock/mock_util.py b/iam-mock/mock_util.py index ff4bcbec..8e6d1b2f 100644 --- a/iam-mock/mock_util.py +++ b/iam-mock/mock_util.py @@ -233,7 +233,7 @@ def return_did(request: Request, partner_did: str, did_path: str): { "id": did_id, "type": "CredentialService", - "serviceEndpoint": "http://mock-util-service:80" + "serviceEndpoint": "http://iatpmock.tx.test" } ], "verificationMethod": [ From 02b2442282023c117aa2c7cff9e139cbf7a5d974 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 24 Jun 2024 13:30:25 +0200 Subject: [PATCH 12/24] chore: rename to iatp-mock --- .github/workflows/helm-checks.yaml | 6 +++--- charts/iatpmock/values.yaml | 2 +- {iam-mock => iatp-mock}/DEPENDENCIES | 0 {iam-mock => iatp-mock}/Dockerfile | 0 {iam-mock => iatp-mock}/README.md | 0 {iam-mock => iatp-mock}/constants.py | 0 {iam-mock => iatp-mock}/credential_service.py | 0 {iam-mock => iatp-mock}/docs/README_SERVICE_OVERVIEW.md | 0 {iam-mock => iatp-mock}/docs/credential_requests.puml | 0 {iam-mock => iatp-mock}/jwtUtils.py | 0 {iam-mock => iatp-mock}/keys/edc.key | 0 {iam-mock => iatp-mock}/keys/private_key.pem | 0 {iam-mock => iatp-mock}/keys/public_key.pem | 0 {iam-mock => iatp-mock}/mock_util.py | 0 {iam-mock => iatp-mock}/requirements.txt | 0 15 files changed, 4 insertions(+), 4 deletions(-) rename {iam-mock => iatp-mock}/DEPENDENCIES (100%) rename {iam-mock => iatp-mock}/Dockerfile (100%) rename {iam-mock => iatp-mock}/README.md (100%) rename {iam-mock => iatp-mock}/constants.py (100%) rename {iam-mock => iatp-mock}/credential_service.py (100%) rename {iam-mock => iatp-mock}/docs/README_SERVICE_OVERVIEW.md (100%) rename {iam-mock => iatp-mock}/docs/credential_requests.puml (100%) rename {iam-mock => iatp-mock}/jwtUtils.py (100%) rename {iam-mock => iatp-mock}/keys/edc.key (100%) rename {iam-mock => iatp-mock}/keys/private_key.pem (100%) rename {iam-mock => iatp-mock}/keys/public_key.pem (100%) rename {iam-mock => iatp-mock}/mock_util.py (100%) rename {iam-mock => iatp-mock}/requirements.txt (100%) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index c77d935e..7e355f44 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -130,9 +130,9 @@ jobs: - name: Build iatp mock uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 with: - context: ./iam-mock/ + context: ./iatp-mock/ push: true - tags: kind-registry:5000/iam-mock:testing + tags: kind-registry:5000/iatp-mock:testing - name: Set up Helm uses: azure/setup-helm@b7246b12e77f7134dc2d460a3d5bad15bbe29390 # v4.1.0 @@ -161,7 +161,7 @@ jobs: run: ct install --charts charts/tx-data-provider --target-branch ${{ github.event.repository.default_branch }} - name: Install chart and run tests (iatpmock) - run: ct install --charts charts/iatpmock --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set image.repository=kind-registry:5000/iam-mock --set image.tag=testing" + run: ct install --charts charts/iatpmock --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set image.repository=kind-registry:5000/iatp-mock --set image.tag=testing" - name: Install chart for shared services (umbrella) run: | diff --git a/charts/iatpmock/values.yaml b/charts/iatpmock/values.yaml index 55d8d906..d505976a 100644 --- a/charts/iatpmock/values.yaml +++ b/charts/iatpmock/values.yaml @@ -5,7 +5,7 @@ replicaCount: 1 image: - repository: tractusx/iam-mock + repository: tractusx/iatp-mock pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "testing" diff --git a/iam-mock/DEPENDENCIES b/iatp-mock/DEPENDENCIES similarity index 100% rename from iam-mock/DEPENDENCIES rename to iatp-mock/DEPENDENCIES diff --git a/iam-mock/Dockerfile b/iatp-mock/Dockerfile similarity index 100% rename from iam-mock/Dockerfile rename to iatp-mock/Dockerfile diff --git a/iam-mock/README.md b/iatp-mock/README.md similarity index 100% rename from iam-mock/README.md rename to iatp-mock/README.md diff --git a/iam-mock/constants.py b/iatp-mock/constants.py similarity index 100% rename from iam-mock/constants.py rename to iatp-mock/constants.py diff --git a/iam-mock/credential_service.py b/iatp-mock/credential_service.py similarity index 100% rename from iam-mock/credential_service.py rename to iatp-mock/credential_service.py diff --git a/iam-mock/docs/README_SERVICE_OVERVIEW.md b/iatp-mock/docs/README_SERVICE_OVERVIEW.md similarity index 100% rename from iam-mock/docs/README_SERVICE_OVERVIEW.md rename to iatp-mock/docs/README_SERVICE_OVERVIEW.md diff --git a/iam-mock/docs/credential_requests.puml b/iatp-mock/docs/credential_requests.puml similarity index 100% rename from iam-mock/docs/credential_requests.puml rename to iatp-mock/docs/credential_requests.puml diff --git a/iam-mock/jwtUtils.py b/iatp-mock/jwtUtils.py similarity index 100% rename from iam-mock/jwtUtils.py rename to iatp-mock/jwtUtils.py diff --git a/iam-mock/keys/edc.key b/iatp-mock/keys/edc.key similarity index 100% rename from iam-mock/keys/edc.key rename to iatp-mock/keys/edc.key diff --git a/iam-mock/keys/private_key.pem b/iatp-mock/keys/private_key.pem similarity index 100% rename from iam-mock/keys/private_key.pem rename to iatp-mock/keys/private_key.pem diff --git a/iam-mock/keys/public_key.pem b/iatp-mock/keys/public_key.pem similarity index 100% rename from iam-mock/keys/public_key.pem rename to iatp-mock/keys/public_key.pem diff --git a/iam-mock/mock_util.py b/iatp-mock/mock_util.py similarity index 100% rename from iam-mock/mock_util.py rename to iatp-mock/mock_util.py diff --git a/iam-mock/requirements.txt b/iatp-mock/requirements.txt similarity index 100% rename from iam-mock/requirements.txt rename to iatp-mock/requirements.txt From 4d28a9062ddbf41dfd426ee20663e0ba479aa39e Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 24 Jun 2024 13:49:14 +0200 Subject: [PATCH 13/24] chore: move iatp-mock to umbrella subchart --- charts/{ => umbrella/charts}/iatpmock/.helmignore | 0 charts/{ => umbrella/charts}/iatpmock/Chart.yaml | 0 charts/{ => umbrella/charts}/iatpmock/templates/NOTES.txt | 0 charts/{ => umbrella/charts}/iatpmock/templates/_helpers.tpl | 0 charts/{ => umbrella/charts}/iatpmock/templates/deployment.yaml | 0 charts/{ => umbrella/charts}/iatpmock/templates/ingress.yaml | 0 charts/{ => umbrella/charts}/iatpmock/templates/service.yaml | 0 .../{ => umbrella/charts}/iatpmock/templates/serviceaccount.yaml | 0 .../charts}/iatpmock/templates/tests/test-connection.yaml | 0 charts/{ => umbrella/charts}/iatpmock/values.yaml | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename charts/{ => umbrella/charts}/iatpmock/.helmignore (100%) rename charts/{ => umbrella/charts}/iatpmock/Chart.yaml (100%) rename charts/{ => umbrella/charts}/iatpmock/templates/NOTES.txt (100%) rename charts/{ => umbrella/charts}/iatpmock/templates/_helpers.tpl (100%) rename charts/{ => umbrella/charts}/iatpmock/templates/deployment.yaml (100%) rename charts/{ => umbrella/charts}/iatpmock/templates/ingress.yaml (100%) rename charts/{ => umbrella/charts}/iatpmock/templates/service.yaml (100%) rename charts/{ => umbrella/charts}/iatpmock/templates/serviceaccount.yaml (100%) rename charts/{ => umbrella/charts}/iatpmock/templates/tests/test-connection.yaml (100%) rename charts/{ => umbrella/charts}/iatpmock/values.yaml (100%) diff --git a/charts/iatpmock/.helmignore b/charts/umbrella/charts/iatpmock/.helmignore similarity index 100% rename from charts/iatpmock/.helmignore rename to charts/umbrella/charts/iatpmock/.helmignore diff --git a/charts/iatpmock/Chart.yaml b/charts/umbrella/charts/iatpmock/Chart.yaml similarity index 100% rename from charts/iatpmock/Chart.yaml rename to charts/umbrella/charts/iatpmock/Chart.yaml diff --git a/charts/iatpmock/templates/NOTES.txt b/charts/umbrella/charts/iatpmock/templates/NOTES.txt similarity index 100% rename from charts/iatpmock/templates/NOTES.txt rename to charts/umbrella/charts/iatpmock/templates/NOTES.txt diff --git a/charts/iatpmock/templates/_helpers.tpl b/charts/umbrella/charts/iatpmock/templates/_helpers.tpl similarity index 100% rename from charts/iatpmock/templates/_helpers.tpl rename to charts/umbrella/charts/iatpmock/templates/_helpers.tpl diff --git a/charts/iatpmock/templates/deployment.yaml b/charts/umbrella/charts/iatpmock/templates/deployment.yaml similarity index 100% rename from charts/iatpmock/templates/deployment.yaml rename to charts/umbrella/charts/iatpmock/templates/deployment.yaml diff --git a/charts/iatpmock/templates/ingress.yaml b/charts/umbrella/charts/iatpmock/templates/ingress.yaml similarity index 100% rename from charts/iatpmock/templates/ingress.yaml rename to charts/umbrella/charts/iatpmock/templates/ingress.yaml diff --git a/charts/iatpmock/templates/service.yaml b/charts/umbrella/charts/iatpmock/templates/service.yaml similarity index 100% rename from charts/iatpmock/templates/service.yaml rename to charts/umbrella/charts/iatpmock/templates/service.yaml diff --git a/charts/iatpmock/templates/serviceaccount.yaml b/charts/umbrella/charts/iatpmock/templates/serviceaccount.yaml similarity index 100% rename from charts/iatpmock/templates/serviceaccount.yaml rename to charts/umbrella/charts/iatpmock/templates/serviceaccount.yaml diff --git a/charts/iatpmock/templates/tests/test-connection.yaml b/charts/umbrella/charts/iatpmock/templates/tests/test-connection.yaml similarity index 100% rename from charts/iatpmock/templates/tests/test-connection.yaml rename to charts/umbrella/charts/iatpmock/templates/tests/test-connection.yaml diff --git a/charts/iatpmock/values.yaml b/charts/umbrella/charts/iatpmock/values.yaml similarity index 100% rename from charts/iatpmock/values.yaml rename to charts/umbrella/charts/iatpmock/values.yaml From 686d896c30de6af83a93b503b803f9861fc4f95c Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 24 Jun 2024 13:50:53 +0200 Subject: [PATCH 14/24] chore: fix bdrs seeding job --- .github/workflows/helm-checks.yaml | 6 +++++- charts/umbrella/Chart.yaml | 2 +- charts/umbrella/templates/post-install-bdrs-setup.yaml | 2 ++ charts/values-test-shared-services.yaml | 5 ++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index 7e355f44..85ed2aa2 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -165,7 +165,11 @@ jobs: - name: Install chart for shared services (umbrella) run: | - helm install umbrella charts/umbrella -f charts/values-test-shared-services.yaml -f charts/values-test-iam-init-container.yaml --namespace shared-services --create-namespace --debug --timeout 10m --set semantic-hub.graphdb.image=kind-registry:5000/jena-fuseki-docker:4.7.0 + helm install umbrella charts/umbrella -f charts/values-test-shared-services.yaml -f charts/values-test-iam-init-container.yaml \ + --namespace shared-services --create-namespace --debug --timeout 10m \ + --set semantic-hub.graphdb.image=kind-registry:5000/jena-fuseki-docker:4.7.0 \ + --set iatpmock.image.repository=kind-registry:5000/iatp-mock --set iatpmock.image.tag=testing + helm uninstall umbrella --namespace shared-services - name: Install chart for data exchange (umbrella) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index cd91e2a1..4a1dc84f 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -97,5 +97,5 @@ dependencies: # iatp - name: iatpmock version: 0.1.0 - repository: file://../iatpmock + repository: file://charts/iatpmock condition: iatpmock.enabled diff --git a/charts/umbrella/templates/post-install-bdrs-setup.yaml b/charts/umbrella/templates/post-install-bdrs-setup.yaml index cdb44779..5eff093c 100644 --- a/charts/umbrella/templates/post-install-bdrs-setup.yaml +++ b/charts/umbrella/templates/post-install-bdrs-setup.yaml @@ -17,6 +17,7 @@ # SPDX-License-Identifier: Apache-2.0 # ############################################################################# --- +{{ if index .Values "bdrs-server-memory" "enabled" }} {{ if index .Values "bdrs-server-memory" "seeding" "enabled" }} {{- $bdrsUrl := printf "http://%s" (index .Values "bdrs-server-memory" "hostname") -}} {{- $bdrsKey := index .Values "bdrs-server-memory" "server" "endpoints" "management" "authKey" -}} @@ -105,3 +106,4 @@ spec: --post-data '{"bpn": "BPNL00000000BJTL","did": "did:web:iatpmock.tx.test/BPNL00000000BJTL"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - {{ end }} +{{ end }} diff --git a/charts/values-test-shared-services.yaml b/charts/values-test-shared-services.yaml index c2743679..80cc4566 100644 --- a/charts/values-test-shared-services.yaml +++ b/charts/values-test-shared-services.yaml @@ -38,7 +38,10 @@ selfdescription: semantic-hub: enabled: true -managed-identity-wallet: +iatpmock: + enabled: true + +bdrs-server-memory: enabled: true dataconsumer: From bbf4d2d4589d6e2654ab51e62101112e056bcf4e Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 24 Jun 2024 14:16:35 +0200 Subject: [PATCH 15/24] chore: remove iatp mock install --- .github/workflows/helm-checks.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index 85ed2aa2..171d3792 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -160,9 +160,6 @@ jobs: - name: Install chart and run tests (tx-data-provider) run: ct install --charts charts/tx-data-provider --target-branch ${{ github.event.repository.default_branch }} - - name: Install chart and run tests (iatpmock) - run: ct install --charts charts/iatpmock --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set image.repository=kind-registry:5000/iatp-mock --set image.tag=testing" - - name: Install chart for shared services (umbrella) run: | helm install umbrella charts/umbrella -f charts/values-test-shared-services.yaml -f charts/values-test-iam-init-container.yaml \ From 2dede85ea1af49078ee7c7a3e09843cf3b54b9f2 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 24 Jun 2024 14:53:53 +0200 Subject: [PATCH 16/24] chore: add license headers --- charts/umbrella/charts/iatpmock/.helmignore | 20 +++++++++++++++++ charts/umbrella/charts/iatpmock/Chart.yaml | 20 +++++++++++++++++ .../charts/iatpmock/templates/_helpers.tpl | 21 ++++++++++++++++++ .../charts/iatpmock/templates/deployment.yaml | 20 +++++++++++++++++ .../charts/iatpmock/templates/ingress.yaml | 22 ++++++++++++++++++- .../charts/iatpmock/templates/service.yaml | 20 +++++++++++++++++ .../iatpmock/templates/serviceaccount.yaml | 22 ++++++++++++++++++- .../templates/tests/test-connection.yaml | 20 +++++++++++++++++ charts/umbrella/charts/iatpmock/values.yaml | 22 ++++++++++++++++--- charts/umbrella/values.yaml | 10 +-------- 10 files changed, 183 insertions(+), 14 deletions(-) diff --git a/charts/umbrella/charts/iatpmock/.helmignore b/charts/umbrella/charts/iatpmock/.helmignore index 0e8a0eb3..411decfc 100644 --- a/charts/umbrella/charts/iatpmock/.helmignore +++ b/charts/umbrella/charts/iatpmock/.helmignore @@ -1,3 +1,23 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################# + # Patterns to ignore when building packages. # This supports shell glob matching, relative path matching, and # negation (prefixed with !). Only one pattern per line. diff --git a/charts/umbrella/charts/iatpmock/Chart.yaml b/charts/umbrella/charts/iatpmock/Chart.yaml index 41594d82..df3b802f 100644 --- a/charts/umbrella/charts/iatpmock/Chart.yaml +++ b/charts/umbrella/charts/iatpmock/Chart.yaml @@ -1,3 +1,23 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################# +--- apiVersion: v2 name: iatpmock description: A Helm chart for Kubernetes diff --git a/charts/umbrella/charts/iatpmock/templates/_helpers.tpl b/charts/umbrella/charts/iatpmock/templates/_helpers.tpl index 99f88cba..bd71510b 100644 --- a/charts/umbrella/charts/iatpmock/templates/_helpers.tpl +++ b/charts/umbrella/charts/iatpmock/templates/_helpers.tpl @@ -1,4 +1,25 @@ {{/* +******************************************************************************* + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,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 governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ******************************************************************************* + */}} +{{/* Expand the name of the chart. */}} {{- define "iatpmock.name" -}} diff --git a/charts/umbrella/charts/iatpmock/templates/deployment.yaml b/charts/umbrella/charts/iatpmock/templates/deployment.yaml index 31c9c038..bcbd7671 100644 --- a/charts/umbrella/charts/iatpmock/templates/deployment.yaml +++ b/charts/umbrella/charts/iatpmock/templates/deployment.yaml @@ -1,3 +1,23 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################# +--- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/charts/umbrella/charts/iatpmock/templates/ingress.yaml b/charts/umbrella/charts/iatpmock/templates/ingress.yaml index 6023765d..ac2f1e7e 100644 --- a/charts/umbrella/charts/iatpmock/templates/ingress.yaml +++ b/charts/umbrella/charts/iatpmock/templates/ingress.yaml @@ -1,4 +1,24 @@ -{{- if .Values.ingress.enabled -}} +# ############################################################################# + # Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + # Copyright (c) 2021,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 governing permissions and limitations + # under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ############################################################################# +--- +{{ if .Values.ingress.enabled -}} {{- $fullName := include "iatpmock.fullname" . -}} {{- $svcPort := .Values.service.port -}} {{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} diff --git a/charts/umbrella/charts/iatpmock/templates/service.yaml b/charts/umbrella/charts/iatpmock/templates/service.yaml index 385075bc..99ab2c1f 100644 --- a/charts/umbrella/charts/iatpmock/templates/service.yaml +++ b/charts/umbrella/charts/iatpmock/templates/service.yaml @@ -1,3 +1,23 @@ +# ############################################################################# + # Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + # Copyright (c) 2021,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 governing permissions and limitations + # under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ############################################################################# +--- apiVersion: v1 kind: Service metadata: diff --git a/charts/umbrella/charts/iatpmock/templates/serviceaccount.yaml b/charts/umbrella/charts/iatpmock/templates/serviceaccount.yaml index f298fe25..c89ac4f8 100644 --- a/charts/umbrella/charts/iatpmock/templates/serviceaccount.yaml +++ b/charts/umbrella/charts/iatpmock/templates/serviceaccount.yaml @@ -1,4 +1,24 @@ -{{- if .Values.serviceAccount.create -}} +# ############################################################################# + # Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + # Copyright (c) 2021,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 governing permissions and limitations + # under the License. + # + # SPDX-License-Identifier: Apache-2.0 + # ############################################################################# +--- +{{ if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: diff --git a/charts/umbrella/charts/iatpmock/templates/tests/test-connection.yaml b/charts/umbrella/charts/iatpmock/templates/tests/test-connection.yaml index 7a95f0d2..dd871c98 100644 --- a/charts/umbrella/charts/iatpmock/templates/tests/test-connection.yaml +++ b/charts/umbrella/charts/iatpmock/templates/tests/test-connection.yaml @@ -1,3 +1,23 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################# +--- apiVersion: v1 kind: Pod metadata: diff --git a/charts/umbrella/charts/iatpmock/values.yaml b/charts/umbrella/charts/iatpmock/values.yaml index d505976a..48d41193 100644 --- a/charts/umbrella/charts/iatpmock/values.yaml +++ b/charts/umbrella/charts/iatpmock/values.yaml @@ -1,6 +1,22 @@ -# Default values for iatpmock. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,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 governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################# replicaCount: 1 diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index e0b6e221..beeddd4e 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -493,7 +493,7 @@ discoveryfinder: initialDelaySeconds: 200 readinessProbe: initialDelaySeconds: 200 - host: discovery.tx.test + host: semantics.tx.test properties: discoveryfinder: initialEndpoints: @@ -784,14 +784,6 @@ semantic-hub: persistence: enabled: false hub: - host: semantics.tx.test - ingress: - enabled: true - tls: false - urlPrefix: / - className: "nginx" - annotations: - kubernetes.io/ingress.class: nginx authentication: false livenessProbe: initialDelaySeconds: 200 From 3a68ca199b18f90fa0b475253284223b18568c14 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 24 Jun 2024 15:57:45 +0200 Subject: [PATCH 17/24] chore: afix bdrs seeding --- .../templates/post-install-bdrs-setup.yaml | 55 ++----------------- charts/umbrella/values.yaml | 38 ++++++++++++- 2 files changed, 40 insertions(+), 53 deletions(-) diff --git a/charts/umbrella/templates/post-install-bdrs-setup.yaml b/charts/umbrella/templates/post-install-bdrs-setup.yaml index 5eff093c..b626d5f9 100644 --- a/charts/umbrella/templates/post-install-bdrs-setup.yaml +++ b/charts/umbrella/templates/post-install-bdrs-setup.yaml @@ -19,7 +19,7 @@ --- {{ if index .Values "bdrs-server-memory" "enabled" }} {{ if index .Values "bdrs-server-memory" "seeding" "enabled" }} -{{- $bdrsUrl := printf "http://%s" (index .Values "bdrs-server-memory" "hostname") -}} +{{- $bdrsUrl := tpl (index .Values "bdrs-server-memory" "seeding" "url") . -}} {{- $bdrsKey := index .Values "bdrs-server-memory" "server" "endpoints" "management" "authKey" -}} {{- $fullName := include "app.fullname" . -}} apiVersion: batch/v1 @@ -54,56 +54,9 @@ spec: - "/bin/sh" - "-c" - | - echo "Waiting 10s to start BDRS seeding..." - sleep 10 - + {{- range $index, $element := index .Values "bdrs-server-memory" "seeding" "bpnList" }} wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AZQP","did": "did:web:iatpmock.tx.test/BPNL00000003AZQP"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AYRE","did": "did:web:iatpmock.tx.test/BPNL00000003AYRE"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AVTH","did": "did:web:iatpmock.tx.test/BPNL00000003AVTH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AWSS","did": "did:web:iatpmock.tx.test/BPNL00000003AWSS"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B0Q0","did": "did:web:iatpmock.tx.test/BPNL00000003B0Q0"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNS0000000008ZZ","did": "did:web:iatpmock.tx.test/BPNS0000000008ZZ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003CNKC","did": "did:web:iatpmock.tx.test/BPNL00000003CNKC"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B6LU","did": "did:web:iatpmock.tx.test/BPNL00000003B6LU"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003CML1","did": "did:web:iatpmock.tx.test/BPNL00000003CML1"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNS00000008BDFH","did": "did:web:iatpmock.tx.test/BPNS00000008BDFH"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B2OM","did": "did:web:iatpmock.tx.test/BPNL00000003B2OM"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003CSGV","did": "did:web:iatpmock.tx.test/BPNL00000003CSGV"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B5MJ","did": "did:web:iatpmock.tx.test/BPNL00000003B5MJ"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003AXS3","did": "did:web:iatpmock.tx.test/BPNL00000003AXS3"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000003B3NX","did": "did:web:iatpmock.tx.test/BPNL00000003B3NX"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - - wget --header "Content-Type: application/json" --header "x-api-key: {{ $bdrsKey }}" \ - --post-data '{"bpn": "BPNL00000000BJTL","did": "did:web:iatpmock.tx.test/BPNL00000000BJTL"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - - + --post-data '{"bpn": "{{ $element.bpn }}","did": "{{ $element.did }}"}' "{{ $bdrsUrl }}/api/management/bpn-directory" -S -O - + {{- end }} {{ end }} {{ end }} diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index beeddd4e..c0f8eda5 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -901,9 +901,43 @@ pgadmin4: bdrs-server-memory: enabled: false - hostname: &hostname bdrs-server.tx.test seeding: + url: "http://{{ .Release.Name }}-bdrs-server-memory:8081" enabled: true + bpnList: + - bpn: "BPNL00000003B3NX" + did: "did:web:iatpmock.tx.test/BPNL00000003B3NX" + - bpn: "BPNL00000003CSGV" + did: "did:web:iatpmock.tx.test/BPNL00000003CSGV" + - bpn: "BPNL00000003B6LU" + did: "did:web:iatpmock.tx.test/BPNL00000003B6LU" + - bpn: "BPNL00000003AXS3" + did: "did:web:iatpmock.tx.test/BPNL00000003AXS3" + - bpn: "BPNL00000003AZQP" + did: "did:web:iatpmock.tx.test/BPNL00000003AZQP" + - bpn: "BPNL00000003AWSS" + did: "did:web:iatpmock.tx.test/BPNL00000003AWSS" + - bpn: "BPNL00000003AYRE" + did: "did:web:iatpmock.tx.test/BPNL00000003AYRE" + - bpn: "BPNL00000003AVTH" + did: "did:web:iatpmock.tx.test/BPNL00000003AVTH" + - bpn: "BPNL00000000BJTL" + did: "did:web:iatpmock.tx.test/BPNL00000000BJTL" + - bpn: "BPNL00000003CML1" + did: "did:web:iatpmock.tx.test/BPNL00000003CML1" + - bpn: "BPNL00000003B2OM" + did: "did:web:iatpmock.tx.test/BPNL00000003B2OM" + - bpn: "BPNL00000003B0Q0" + did: "did:web:iatpmock.tx.test/BPNL00000003B0Q0" + - bpn: "BPNL00000003B5MJ" + did: "did:web:iatpmock.tx.test/BPNL00000003B5MJ" + - bpn: "BPNS0000000008ZZ" + did: "did:web:iatpmock.tx.test/BPNS0000000008ZZ" + - bpn: "BPNL00000003CNKC" + did: "did:web:iatpmock.tx.test/BPNL00000003CNKC" + - bpn: "BPNS00000008BDFH" + did: "did:web:iatpmock.tx.test/BPNS00000008BDFH" + server: trustedIssuers: - did:web:iatpmock.tx.test/trusted-issuer @@ -915,7 +949,7 @@ bdrs-server-memory: authKey: TEST ingresses: - enabled: true - hostname: *hostname + hostname: bdrs-server.tx.test endpoints: - directory - management From 2b23fef1932447209e7e9a2894131555774d49cc Mon Sep 17 00:00:00 2001 From: jhartmann Date: Tue, 25 Jun 2024 14:19:00 +0200 Subject: [PATCH 18/24] chore: fix data consumer reference --- charts/values-test-data-exchange.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/values-test-data-exchange.yaml b/charts/values-test-data-exchange.yaml index 4fd695ec..32ad0824 100644 --- a/charts/values-test-data-exchange.yaml +++ b/charts/values-test-data-exchange.yaml @@ -41,7 +41,7 @@ iatpmock: bdrs-server-memory: enabled: true -dataconsumer: +dataconsumerOne: enabled: true tx-data-provider: From 7045b61e5051616692324a3f15bbca03c9811fa8 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Wed, 26 Jun 2024 16:40:42 +0200 Subject: [PATCH 19/24] chore: fix mock config --- .github/workflows/helm-checks.yaml | 10 ++- .../charts/iatpmock/templates/deployment.yaml | 2 +- charts/umbrella/charts/iatpmock/values.yaml | 5 +- .../values-adopter-data-exchange.yaml | 28 ++----- charts/umbrella/values.yaml | 80 ++++++++++--------- iatp-mock/constants.py | 34 ++++---- iatp-mock/mock_util.py | 2 +- 7 files changed, 76 insertions(+), 85 deletions(-) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index 171d3792..29bd398f 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -165,13 +165,17 @@ jobs: helm install umbrella charts/umbrella -f charts/values-test-shared-services.yaml -f charts/values-test-iam-init-container.yaml \ --namespace shared-services --create-namespace --debug --timeout 10m \ --set semantic-hub.graphdb.image=kind-registry:5000/jena-fuseki-docker:4.7.0 \ - --set iatpmock.image.repository=kind-registry:5000/iatp-mock --set iatpmock.image.tag=testing - + --set iatpmock.image.repository=kind-registry:5000/iatp-mock --set iatpmock.image.tag=testing + helm uninstall umbrella --namespace shared-services - name: Install chart for data exchange (umbrella) run: | - helm install umbrella charts/umbrella -f charts/values-test-data-exchange.yaml -f charts/values-test-iam-init-container.yaml --namespace data-exchange --create-namespace --debug --timeout 10m + helm dep up charts/tx-data-provider + helm dep up charts/umbrella + helm install umbrella charts/umbrella --namespace data-exchange --create-namespace --debug --timeout 10m \ + -f charts/values-test-data-exchange.yaml -f charts/values-test-iam-init-container.yaml \ + --set iatpmock.image.repository=kind-registry:5000/iatp-mock --set iatpmock.image.tag=testing helm uninstall umbrella --namespace data-exchange ## Skip upgrade for now until a working chart is released diff --git a/charts/umbrella/charts/iatpmock/templates/deployment.yaml b/charts/umbrella/charts/iatpmock/templates/deployment.yaml index bcbd7671..6c75a1d2 100644 --- a/charts/umbrella/charts/iatpmock/templates/deployment.yaml +++ b/charts/umbrella/charts/iatpmock/templates/deployment.yaml @@ -55,7 +55,7 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http - containerPort: {{ .Values.service.port }} + containerPort: {{ .Values.container.port }} protocol: TCP livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} diff --git a/charts/umbrella/charts/iatpmock/values.yaml b/charts/umbrella/charts/iatpmock/values.yaml index 48d41193..9125150a 100644 --- a/charts/umbrella/charts/iatpmock/values.yaml +++ b/charts/umbrella/charts/iatpmock/values.yaml @@ -54,10 +54,11 @@ securityContext: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - +container: + port: 8080 service: type: ClusterIP - port: 8080 + port: 80 ingress: enabled: false diff --git a/charts/umbrella/values-adopter-data-exchange.yaml b/charts/umbrella/values-adopter-data-exchange.yaml index ec1ad362..7d19c2d2 100644 --- a/charts/umbrella/values-adopter-data-exchange.yaml +++ b/charts/umbrella/values-adopter-data-exchange.yaml @@ -72,20 +72,14 @@ dataconsumerOne: participant: id: BPNL00000003AZQP iatp: - id: did:web:iatpmock.tx.test/BPNL00000003AZQP + id: did:web:mock-util-service/BPNL00000003AZQP trustedIssuers: - - did:web:iatpmock.tx.test/trusted-issuer + - did:web:mock-util-service/trusted-issuer sts: - dim: - url: http://iatpmock.tx.test/sts oauth: - token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest01 controlplane: - bdrs: - server: - url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST1 @@ -122,20 +116,14 @@ tx-data-provider: participant: id: BPNL00000003AYRE iatp: - id: did:web:iatpmock.tx.test/BPNL00000003AYRE + id: did:web:mock-util-service/BPNL00000003AYRE trustedIssuers: - - did:web:iatpmock.tx.test/trusted-issuer + - did:web:mock-util-service/trusted-issuer sts: - dim: - url: http://iatpmock.tx.test/sts oauth: - token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest02 controlplane: - bdrs: - server: - url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST2 @@ -176,18 +164,14 @@ dataconsumerTwo: participant: id: BPNL00000003AVTH iatp: - id: did:web:iatpmock.tx.test/BPNL00000003AVTH + id: did:web:mock-util-service/BPNL00000003AVTH trustedIssuers: - - did:web:iatpmock.tx.test/trusted-issuer + - did:web:mock-util-service/trusted-issuer sts: oauth: - token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest03 controlplane: - bdrs: - server: - url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST3 diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index c0f8eda5..add853b6 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -597,24 +597,24 @@ dataconsumerOne: participant: id: BPNL00000003AZQP iatp: - id: did:web:iatpmock.tx.test/BPNL00000003AZQP + id: did:web:mock-util-service/BPNL00000003AZQP trustedIssuers: - - did:web:iatpmock.tx.test/trusted-issuer + - did:web:mock-util-service/trusted-issuer sts: dim: - url: http://iatpmock.tx.test/sts + url: http://mock-util-service/sts oauth: - token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://umbrella-centralidp:80/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest01 secret_alias: edc-miw-keycloak-secret controlplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: - url: http://bdrs-server.tx.test/api/directory + url: http://bdrs-server:8082/api/directory endpoints: management: authKey: TEST1 @@ -630,7 +630,7 @@ dataconsumerOne: enabled: false dataplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true @@ -689,24 +689,24 @@ tx-data-provider: participant: id: BPNL00000003AYRE iatp: - id: did:web:iatpmock.tx.test/BPNL00000003AYRE + id: did:web:mock-util-service/BPNL00000003AYRE trustedIssuers: - - did:web:iatpmock.tx.test/trusted-issuer + - did:web:mock-util-service/trusted-issuer sts: dim: - url: http://iatpmock.tx.test/sts + url: http://mock-util-service/sts oauth: - token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://umbrella-centralidp:80/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest02 secret_alias: edc-miw-keycloak-secret controlplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: - url: http://bdrs-server.tx.test/api/directory + url: http://bdrs-server:8082/api/directory endpoints: management: authKey: TEST2 @@ -722,7 +722,7 @@ tx-data-provider: enabled: false dataplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true @@ -807,24 +807,24 @@ dataconsumerTwo: participant: id: BPNL00000003AVTH iatp: - id: did:web:iatpmock.tx.test/BPNL00000003AVTH + id: did:web:mock-util-service/BPNL00000003AVTH trustedIssuers: - - did:web:iatpmock.tx.test/trusted-issuer + - did:web:mock-util-service/trusted-issuer sts: dim: - url: http://iatpmock.tx.test/sts + url: http://mock-util-service/sts oauth: - token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://umbrella-centralidp:80/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest03 secret_alias: edc-miw-keycloak-secret controlplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: - url: http://bdrs-server.tx.test/api/directory + url: http://bdrs-server:8082/api/directory endpoints: management: authKey: TEST3 @@ -840,7 +840,7 @@ dataconsumerTwo: enabled: false dataplane: env: - TX_IAM_IATP_CREDENTIALSERVICE_URL: http://iatpmock.tx.test + TX_IAM_IATP_CREDENTIALSERVICE_URL: http://mock-util-service EDC_IAM_DID_WEB_USE_HTTPS: false ingresses: - enabled: true @@ -900,47 +900,49 @@ pgadmin4: pathType: Prefix bdrs-server-memory: + nameOverride: bdrs-server + fullnameOverride: bdrs-server enabled: false seeding: - url: "http://{{ .Release.Name }}-bdrs-server-memory:8081" + url: "http://bdrs-server:8081" enabled: true bpnList: - bpn: "BPNL00000003B3NX" - did: "did:web:iatpmock.tx.test/BPNL00000003B3NX" + did: "did:web:mock-util-service/BPNL00000003B3NX" - bpn: "BPNL00000003CSGV" - did: "did:web:iatpmock.tx.test/BPNL00000003CSGV" + did: "did:web:mock-util-service/BPNL00000003CSGV" - bpn: "BPNL00000003B6LU" - did: "did:web:iatpmock.tx.test/BPNL00000003B6LU" + did: "did:web:mock-util-service/BPNL00000003B6LU" - bpn: "BPNL00000003AXS3" - did: "did:web:iatpmock.tx.test/BPNL00000003AXS3" + did: "did:web:mock-util-service/BPNL00000003AXS3" - bpn: "BPNL00000003AZQP" - did: "did:web:iatpmock.tx.test/BPNL00000003AZQP" + did: "did:web:mock-util-service/BPNL00000003AZQP" - bpn: "BPNL00000003AWSS" - did: "did:web:iatpmock.tx.test/BPNL00000003AWSS" + did: "did:web:mock-util-service/BPNL00000003AWSS" - bpn: "BPNL00000003AYRE" - did: "did:web:iatpmock.tx.test/BPNL00000003AYRE" + did: "did:web:mock-util-service/BPNL00000003AYRE" - bpn: "BPNL00000003AVTH" - did: "did:web:iatpmock.tx.test/BPNL00000003AVTH" + did: "did:web:mock-util-service/BPNL00000003AVTH" - bpn: "BPNL00000000BJTL" - did: "did:web:iatpmock.tx.test/BPNL00000000BJTL" + did: "did:web:mock-util-service/BPNL00000000BJTL" - bpn: "BPNL00000003CML1" - did: "did:web:iatpmock.tx.test/BPNL00000003CML1" + did: "did:web:mock-util-service/BPNL00000003CML1" - bpn: "BPNL00000003B2OM" - did: "did:web:iatpmock.tx.test/BPNL00000003B2OM" + did: "did:web:mock-util-service/BPNL00000003B2OM" - bpn: "BPNL00000003B0Q0" - did: "did:web:iatpmock.tx.test/BPNL00000003B0Q0" + did: "did:web:mock-util-service/BPNL00000003B0Q0" - bpn: "BPNL00000003B5MJ" - did: "did:web:iatpmock.tx.test/BPNL00000003B5MJ" + did: "did:web:mock-util-service/BPNL00000003B5MJ" - bpn: "BPNS0000000008ZZ" - did: "did:web:iatpmock.tx.test/BPNS0000000008ZZ" + did: "did:web:mock-util-service/BPNS0000000008ZZ" - bpn: "BPNL00000003CNKC" - did: "did:web:iatpmock.tx.test/BPNL00000003CNKC" + did: "did:web:mock-util-service/BPNL00000003CNKC" - bpn: "BPNS00000008BDFH" - did: "did:web:iatpmock.tx.test/BPNS00000008BDFH" + did: "did:web:mock-util-service/BPNS00000008BDFH" server: trustedIssuers: - - did:web:iatpmock.tx.test/trusted-issuer + - did:web:mock-util-service/trusted-issuer env: EDC_IAM_DID_WEB_USE_HTTPS: false diff --git a/iatp-mock/constants.py b/iatp-mock/constants.py index 2f3032ab..607c0d29 100644 --- a/iatp-mock/constants.py +++ b/iatp-mock/constants.py @@ -37,23 +37,23 @@ def read_file(path: Path): # must be same as used in edc for edc.transfer.proxy.signer.privatekey.alias EDC_PRIVATE_KEY = read_file(Path("keys/edc.key")) -DID_TRUSTED_ISSUER = "did:web:iatpmock.tx.test/trusted-issuer" -DID_BPNL00000003AYRE = "did:web:iatpmock.tx.test/BPNL00000003AYRE" -DID_BPNL00000003AZQP = "did:web:iatpmock.tx.test/BPNL00000003AZQP" -DID_BPNL00000003AVTH = "did:web:iatpmock.tx.test/BPNL00000003AVTH" -DID_BPNL00000003AWSS = "did:web:iatpmock.tx.test/BPNL00000003AWSS" -DID_BPNL00000003B0Q0 = "did:web:iatpmock.tx.test/BPNL00000003B0Q0" -DID_BPNS0000000008ZZ = "did:web:iatpmock.tx.test/BPNS0000000008ZZ" -DID_BPNL00000003CNKC = "did:web:iatpmock.tx.test/BPNL00000003CNKC" -DID_BPNL00000003B6LU = "did:web:iatpmock.tx.test/BPNL00000003B6LU" -DID_BPNL00000003CML1 = "did:web:iatpmock.tx.test/BPNL00000003CML1" -DID_BPNS00000008BDFH = "did:web:iatpmock.tx.test/BPNS00000008BDFH" -DID_BPNL00000003B2OM = "did:web:iatpmock.tx.test/BPNL00000003B2OM" -DID_BPNL00000003CSGV = "did:web:iatpmock.tx.test/BPNL00000003CSGV" -DID_BPNL00000003B5MJ = "did:web:iatpmock.tx.test/BPNL00000003B5MJ" -DID_BPNL00000003AXS3 = "did:web:iatpmock.tx.test/BPNL00000003AXS3" -DID_BPNL00000003B3NX = "did:web:iatpmock.tx.test/BPNL00000003B3NX" -DID_BPNL00000000BJTL = "did:web:iatpmock.tx.test/BPNL00000000BJTL" +DID_TRUSTED_ISSUER = "did:web:mock-util-service/trusted-issuer" +DID_BPNL00000003AYRE = "did:web:mock-util-service/BPNL00000003AYRE" +DID_BPNL00000003AZQP = "did:web:mock-util-service/BPNL00000003AZQP" +DID_BPNL00000003AVTH = "did:web:mock-util-service/BPNL00000003AVTH" +DID_BPNL00000003AWSS = "did:web:mock-util-service/BPNL00000003AWSS" +DID_BPNL00000003B0Q0 = "did:web:mock-util-service/BPNL00000003B0Q0" +DID_BPNS0000000008ZZ = "did:web:mock-util-service/BPNS0000000008ZZ" +DID_BPNL00000003CNKC = "did:web:mock-util-service/BPNL00000003CNKC" +DID_BPNL00000003B6LU = "did:web:mock-util-service/BPNL00000003B6LU" +DID_BPNL00000003CML1 = "did:web:mock-util-service/BPNL00000003CML1" +DID_BPNS00000008BDFH = "did:web:mock-util-service/BPNS00000008BDFH" +DID_BPNL00000003B2OM = "did:web:mock-util-service/BPNL00000003B2OM" +DID_BPNL00000003CSGV = "did:web:mock-util-service/BPNL00000003CSGV" +DID_BPNL00000003B5MJ = "did:web:mock-util-service/BPNL00000003B5MJ" +DID_BPNL00000003AXS3 = "did:web:mock-util-service/BPNL00000003AXS3" +DID_BPNL00000003B3NX = "did:web:mock-util-service/BPNL00000003B3NX" +DID_BPNL00000000BJTL = "did:web:mock-util-service/BPNL00000000BJTL" # note: kid_vault = alias used for public key, set in edc.transfer.proxy.token.verifier.publickey.alias DID_DICT = { diff --git a/iatp-mock/mock_util.py b/iatp-mock/mock_util.py index 8e6d1b2f..96e9b8a3 100644 --- a/iatp-mock/mock_util.py +++ b/iatp-mock/mock_util.py @@ -233,7 +233,7 @@ def return_did(request: Request, partner_did: str, did_path: str): { "id": did_id, "type": "CredentialService", - "serviceEndpoint": "http://iatpmock.tx.test" + "serviceEndpoint": "http://mock-util-service" } ], "verificationMethod": [ From cf9f211b1d8cce5178d1a6ae210ae54cd75a65d1 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Wed, 3 Jul 2024 09:45:58 +0200 Subject: [PATCH 20/24] chore: add notice for IATP docker image --- charts/umbrella/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/umbrella/README.md b/charts/umbrella/README.md index c0f4a3b8..e43ef8eb 100644 --- a/charts/umbrella/README.md +++ b/charts/umbrella/README.md @@ -664,6 +664,12 @@ Build fuseki docker image by following the below steps: - Unzip the jena-fuseki-docker-4.7.0.zip. - Build the docker image by running the command - `docker build --build-arg JENA_VERSION=4.7.0 -t jena-fuseki-docker:4.7.0 --platform linux/amd64 .` +## Precondition for IATP Mock + +in case of enabling `iatpmock` (e.g. by using [values-adopter-data-exchange.yaml](values-adopter-data-exchange.yaml)), the iatp-mock docker image must be built first: + +`docker build iatp-mock/ -t tractusx/iatp-mock:testing --platform linux/amd64` + ## How to contribute Before contributing, make sure, you read and understand our [contributing guidelines](/CONTRIBUTING.md). From 6ce7f5845d3a0525a9b5cff489d95a3fdeb1a239 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann <57985712+ds-jhartmann@users.noreply.github.com> Date: Wed, 3 Jul 2024 10:00:25 +0200 Subject: [PATCH 21/24] chore: bump chart version --- charts/umbrella/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index 4a1dc84f..ab0171ff 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -28,7 +28,7 @@ sources: - https://github.com/eclipse-tractusx/tractus-x-umbrella type: application -version: 0.17.0 +version: 0.18.0 # when adding or updating versions of dependencies, also update list under README.md#Install dependencies: From f5905e02607a00e190013557d3ca71aed0b06122 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Fri, 5 Jul 2024 09:38:53 +0200 Subject: [PATCH 22/24] chore: updates to documentation and testing config --- charts/umbrella/README.md | 17 +++++++++++------ charts/umbrella/values.yaml | 12 ++++++------ charts/values-test-data-exchange.yaml | 18 ++++++++++++++++++ iatp-mock/README.md | 4 ++-- 4 files changed, 37 insertions(+), 14 deletions(-) diff --git a/charts/umbrella/README.md b/charts/umbrella/README.md index e43ef8eb..00da71aa 100644 --- a/charts/umbrella/README.md +++ b/charts/umbrella/README.md @@ -115,7 +115,6 @@ If you still face DNS issues, add the hosts to your /etc/hosts file: 192.168.49.2 sharedidp.tx.test 192.168.49.2 portal.tx.test 192.168.49.2 portal-backend.tx.test -192.168.49.2 managed-identity-wallets.tx.test 192.168.49.2 semantics.tx.test 192.168.49.2 sdfactory.tx.test 192.168.49.2 dataconsumer-1-dataplane.tx.test @@ -123,6 +122,8 @@ If you still face DNS issues, add the hosts to your /etc/hosts file: 192.168.49.2 dataprovider-dataplane.tx.test 192.168.49.2 dataconsumer-2-dataplane.tx.test 192.168.49.2 dataconsumer-2-controlplane.tx.test +192.168.49.2 bdrs-server.tx.test +192.168.49.2 iatpmock.tx.test ``` **Additional network setup for Mac** @@ -140,7 +141,6 @@ For Windows edit the hosts file under `C:\Windows\System32\drivers\etc\hosts`: 192.168.49.2 sharedidp.tx.test 192.168.49.2 portal.tx.test 192.168.49.2 portal-backend.tx.test -192.168.49.2 managed-identity-wallets.tx.test 192.168.49.2 semantics.tx.test 192.168.49.2 sdfactory.tx.test 192.168.49.2 dataconsumer-1-dataplane.tx.test @@ -148,6 +148,8 @@ For Windows edit the hosts file under `C:\Windows\System32\drivers\etc\hosts`: 192.168.49.2 dataprovider-dataplane.tx.test 192.168.49.2 dataconsumer-2-dataplane.tx.test 192.168.49.2 dataconsumer-2-controlplane.tx.test +192.168.49.2 bdrs-server.tx.test +192.168.49.2 iatpmock.tx.test ``` ### Install @@ -164,9 +166,11 @@ The currently available components are following: - [sdfactory](https://github.com/eclipse-tractusx/sd-factory/tree/sdfactory-2.1.12) - [managed-identity-wallet](https://github.com/eclipse-tractusx/managed-identity-wallet/tree/v0.4.0) - [semantic-hub](https://github.com/eclipse-tractusx/sldt-semantic-hub/tree/semantic-hub-0.2.2) -- [dataconsumerOne](https://github.com/eclipse-tractusx/tractus-x-umbrella/tree/main/charts/tx-data-provider) ([tractusx-edc](https://github.com/eclipse-tractusx/tractusx-edc/tree/0.5.3), [vault](https://github.com/hashicorp/vault-helm/tree/v0.20.0)) -- [tx-data-provider](https://github.com/eclipse-tractusx/tractus-x-umbrella/tree/main/charts/tx-data-provider) ([tractusx-edc](https://github.com/eclipse-tractusx/tractusx-edc/tree/0.5.3), [digital-twin-registry](https://github.com/eclipse-tractusx/sldt-digital-twin-registry/tree/digital-twin-registry-0.4.5), [vault](https://github.com/hashicorp/vault-helm/tree/v0.20.0), [simple-data-backend](https://github.com/eclipse-tractusx/tractus-x-umbrella/tree/main/charts/simple-data-backend)) -- [dataconsumerTwo](https://github.com/eclipse-tractusx/tractus-x-umbrella/tree/main/charts/tx-data-provider) ([tractusx-edc](https://github.com/eclipse-tractusx/tractusx-edc/tree/0.5.3), [vault](https://github.com/hashicorp/vault-helm/tree/v0.20.0)) +- [dataconsumerOne](https://github.com/eclipse-tractusx/tractus-x-umbrella/tree/main/charts/tx-data-provider) ([tractusx-edc](https://github.com/eclipse-tractusx/tractusx-edc/tree/0.7.1), [vault](https://github.com/hashicorp/vault-helm/tree/v0.20.0)) +- [tx-data-provider](https://github.com/eclipse-tractusx/tractus-x-umbrella/tree/main/charts/tx-data-provider) ([tractusx-edc](https://github.com/eclipse-tractusx/tractusx-edc/tree/0.7.1), [digital-twin-registry](https://github.com/eclipse-tractusx/sldt-digital-twin-registry/tree/digital-twin-registry-0.4.5), [vault](https://github.com/hashicorp/vault-helm/tree/v0.20.0), [simple-data-backend](https://github.com/eclipse-tractusx/tractus-x-umbrella/tree/main/charts/simple-data-backend)) +- [dataconsumerTwo](https://github.com/eclipse-tractusx/tractus-x-umbrella/tree/main/charts/tx-data-provider) ([tractusx-edc](https://github.com/eclipse-tractusx/tractusx-edc/tree/0.7.1), [vault](https://github.com/hashicorp/vault-helm/tree/v0.20.0)) +- [bdrs](https://github.com/eclipse-tractusx/bpn-did-resolution-service/tree/0.0.4) +- [iatp-mock](https://github.com/eclipse-tractusx/tractus-x-umbrella/blob/upgrade/24.05/charts/umbrella/charts/iatpmock/Chart.yaml) > :warning: **Note** > @@ -409,7 +413,6 @@ Currently enabled ingresses: - http://portal-backend.tx.test/api/services/swagger/index.html - http://portal-backend.tx.test/api/notification/swagger/index.html - http://portal.tx.test -- http://managed-identity-wallets.tx.test/ui/swagger-ui/index.html - http://semantics.tx.test/discoveryfinder/swagger-ui/index.html - http://dataconsumer-1-controlplane.tx.test - http://dataconsumer-1-dataplane.tx.test @@ -417,6 +420,8 @@ Currently enabled ingresses: - http://dataconsumer-2-controlplane.tx.test - http://dataconsumer-2-dataplane.tx.test - http://pgadmin4.tx.test +- http://bdrs-server.tx.test +- http://iatpmock.tx.test ### Database Access diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index add853b6..d2c5bc60 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -604,7 +604,7 @@ dataconsumerOne: dim: url: http://mock-util-service/sts oauth: - token_url: http://umbrella-centralidp:80/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest01 secret_alias: edc-miw-keycloak-secret @@ -614,7 +614,7 @@ dataconsumerOne: EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: - url: http://bdrs-server:8082/api/directory + url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST1 @@ -696,7 +696,7 @@ tx-data-provider: dim: url: http://mock-util-service/sts oauth: - token_url: http://umbrella-centralidp:80/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest02 secret_alias: edc-miw-keycloak-secret @@ -706,7 +706,7 @@ tx-data-provider: EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: - url: http://bdrs-server:8082/api/directory + url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST2 @@ -814,7 +814,7 @@ dataconsumerTwo: dim: url: http://mock-util-service/sts oauth: - token_url: http://umbrella-centralidp:80/auth/realms/CX-Central/protocol/openid-connect/token + token_url: http://centralidp.tx.test/auth/realms/CX-Central/protocol/openid-connect/token client: id: satest03 secret_alias: edc-miw-keycloak-secret @@ -824,7 +824,7 @@ dataconsumerTwo: EDC_IAM_DID_WEB_USE_HTTPS: false bdrs: server: - url: http://bdrs-server:8082/api/directory + url: http://bdrs-server.tx.test/api/directory endpoints: management: authKey: TEST3 diff --git a/charts/values-test-data-exchange.yaml b/charts/values-test-data-exchange.yaml index 32ad0824..37dd0fe3 100644 --- a/charts/values-test-data-exchange.yaml +++ b/charts/values-test-data-exchange.yaml @@ -43,6 +43,24 @@ bdrs-server-memory: dataconsumerOne: enabled: true + tractusx-connector: + iatp: + sts: + oauth: + token_url: http://umbrella-centralidp:80/auth/realms/CX-Central/protocol/openid-connect/token + controlplane: + bdrs: + server: + url: http://bdrs-server:8082/api/directory tx-data-provider: enabled: true + tractusx-connector: + iatp: + sts: + oauth: + token_url: http://umbrella-centralidp:80/auth/realms/CX-Central/protocol/openid-connect/token + controlplane: + bdrs: + server: + url: http://bdrs-server:8082/api/directory diff --git a/iatp-mock/README.md b/iatp-mock/README.md index f1ac5756..5287a8bf 100644 --- a/iatp-mock/README.md +++ b/iatp-mock/README.md @@ -1,4 +1,4 @@ -This small project uses fast api to provide basic iam local deployment. +This small project uses fast api to provide basic IATP local deployment. `mock_util.py` -> provides cx util capabilities @@ -41,4 +41,4 @@ Following services are now reachable: | mock-util-service | http://mock-util-service:8080/{did-name} | docker compose (miw net) | | mock-util-service | localhost:8888/* | host machine | -Use the service to either simulate the central IAM or just to got some logging api +Use the service to either simulate the IATP Service or just to got some logging api From cc5200e959ed8d0a12acbfb27d057014f90234ad Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Thu, 18 Jul 2024 20:23:32 +0200 Subject: [PATCH 23/24] chore(iatp): prepare for easy image override --- charts/umbrella/values.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index d2c5bc60..f488454b 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -578,6 +578,12 @@ iatpmock: enabled: false nameOverride: mock-util-service fullnameOverride: mock-util-service + # -- see README ## Precondition for IATP Mock + image: + # override with locally built image if needed, default "tractusx/iatp-mock" + repository: "" + # override tag if needed, default "testing" + tag: "" ingress: enabled: true hosts: From 2e107726b8d0e3c795556b35475a261d755b3833 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 29 Jul 2024 17:04:11 +0200 Subject: [PATCH 24/24] chore: fix values file reference --- .github/workflows/helm-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index 8ec1437b..43c0e357 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -189,7 +189,7 @@ jobs: - name: Install chart for shared services one (umbrella) run: | - helm install umbrella charts/umbrella -f charts/values-test-shared-service-1.yaml -f charts/values-test-iam-init-container.yaml --namespace shared-services --create-namespace --debug --timeout 10m --set iatpmock.image.repository=kind-registry:5000/iatp-mock --set iatpmock.image.tag=testing + helm install umbrella charts/umbrella -f charts/values-test-shared-services-1.yaml -f charts/values-test-iam-init-container.yaml --namespace shared-services --create-namespace --debug --timeout 10m --set iatpmock.image.repository=kind-registry:5000/iatp-mock --set iatpmock.image.tag=testing helm uninstall umbrella --namespace shared-services - name: Install chart for shared services two (umbrella)