From 6f50427c9a1c2f8468354c1ac037f77f252b4e13 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Fri, 16 Feb 2024 15:07:10 +0100 Subject: [PATCH 01/23] chore(dast-owasp-zap): remove summary and set retention-days (#39) --- .github/workflows/owasp-zap.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/owasp-zap.yml b/.github/workflows/owasp-zap.yml index 9dbfac9..a5e41e2 100644 --- a/.github/workflows/owasp-zap.yml +++ b/.github/workflows/owasp-zap.yml @@ -124,15 +124,10 @@ jobs: echo "... done." - - name: Add Summary - if: success() || failure() - run: | - echo "Publishing Job summary... " - cat report_md.md >> $GITHUB_STEP_SUMMARY - - name: Upload HTML report if: success() || failure() uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: name: ZAP scan report path: ./report_html.html + retention-days: 1 From 46dd82e90dd258397a9fba4ff141ef18374ac169 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 19 Feb 2024 16:58:20 +0100 Subject: [PATCH 02/23] chore: fix git tag push after chart release (#40) --- .github/workflows/chart-release.yaml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/chart-release.yaml b/.github/workflows/chart-release.yaml index 28f9de5..a90a0ad 100644 --- a/.github/workflows/chart-release.yaml +++ b/.github/workflows/chart-release.yaml @@ -57,14 +57,30 @@ jobs: helm dependency update - name: Run chart-releaser - id: chart-release uses: helm/chart-releaser-action@v1.4.1 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" CR_SKIP_EXISTING: "true" + - name: Get current helm chart version + id: chart-version + run: | + current=$(cat ./charts/policy-hub/Chart.yaml | grep "version:" | head -1 | cut -d ":" -d " " -f2) + echo "current=$current" >> $GITHUB_OUTPUT + echo "Exported $current helm chart version" + + - name: Check for previous version + id: version-check + run: | + exists=$(git tag -l "v${{ steps.chart-version.outputs.current }}") + if [[ -n "$exists" ]]; then + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "exists=false" >> $GITHUB_OUTPUT + fi + - name: Push git tag for release workflow to be triggered uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 # v1.7.2 with: - tag: v${{ steps.chart-release.outputs.chart_version }} - if: ${{ steps.chart-release.outputs.changed_charts }} + tag: v${{ steps.chart-version.outputs.current }} + if: steps.version-check.outputs.exists == 'false' From b4d0d79feca3ff0238d22f1f8ba9b8addb461023 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Tue, 20 Feb 2024 10:14:47 +0100 Subject: [PATCH 03/23] feat(helm-chart): define templates for db hostname uniquely (#41) --- charts/policy-hub/templates/_helpers.tpl | 12 ++++++------ charts/policy-hub/templates/deployment-hub.yaml | 2 +- .../templates/job-policy-hub-migrations.yaml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/policy-hub/templates/_helpers.tpl b/charts/policy-hub/templates/_helpers.tpl index c3a0e51..7d7c033 100644 --- a/charts/policy-hub/templates/_helpers.tpl +++ b/charts/policy-hub/templates/_helpers.tpl @@ -72,19 +72,19 @@ Create the name of the service account to use Determine database hostname for subchart */}} -{{- define "postgresql.primary.fullname" -}} +{{- define "phub.postgresql.primary.fullname" -}} {{- if eq .Values.postgresql.architecture "replication" }} -{{- printf "%s-primary" (include "chart-name-postgresql-dependency" .) | trunc 63 | trimSuffix "-" -}} +{{- printf "%s-primary" (include "phub.chart.name.postgresql.dependency" .) | trunc 63 | trimSuffix "-" -}} {{- else -}} - {{- include "chart-name-postgresql-dependency" . -}} + {{- include "phub.chart.name.postgresql.dependency" . -}} {{- end -}} {{- end -}} -{{- define "postgresql.readReplica.fullname" -}} -{{- printf "%s-read" (include "chart-name-postgresql-dependency" .) | trunc 63 | trimSuffix "-" -}} +{{- define "phub.postgresql.readReplica.fullname" -}} +{{- printf "%s-read" (include "phub.chart.name.postgresql.dependency" .) | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{- define "chart-name-postgresql-dependency" -}} +{{- define "phub.chart.name.postgresql.dependency" -}} {{- if .Values.postgresql.fullnameOverride -}} {{- .Values.postgresql.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} diff --git a/charts/policy-hub/templates/deployment-hub.yaml b/charts/policy-hub/templates/deployment-hub.yaml index 6b4c9d7..b06c6b2 100644 --- a/charts/policy-hub/templates/deployment-hub.yaml +++ b/charts/policy-hub/templates/deployment-hub.yaml @@ -57,7 +57,7 @@ spec: name: "{{ template "phub.postgresSecretName" . }}" key: "password" - name: "CONNECTIONSTRINGS__POLICYHUBDB" - value: "Server={{ template "postgresql.primary.fullname" . }};Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.username }};Password=$(POLICY_HUB_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + value: "Server={{ template "phub.postgresql.primary.fullname" . }};Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.username }};Password=$(POLICY_HUB_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" {{- end }} {{- if not .Values.postgresql.enabled }} - name: "POLICY_HUB_PASSWORD" diff --git a/charts/policy-hub/templates/job-policy-hub-migrations.yaml b/charts/policy-hub/templates/job-policy-hub-migrations.yaml index 75dea02..94bef04 100644 --- a/charts/policy-hub/templates/job-policy-hub-migrations.yaml +++ b/charts/policy-hub/templates/job-policy-hub-migrations.yaml @@ -53,7 +53,7 @@ spec: name: "{{ template "phub.postgresSecretName" . }}" key: "password" - name: "CONNECTIONSTRINGS__POLICYHUBDB" - value: "Server={{ template "postgresql.primary.fullname" . }};Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.username }};Password=$(POLICY_HUB_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" + value: "Server={{ template "phub.postgresql.primary.fullname" . }};Database={{ .Values.postgresql.auth.database }};Port={{ .Values.postgresql.auth.port }};User Id={{ .Values.postgresql.auth.username }};Password=$(POLICY_HUB_PASSWORD);Ssl Mode={{ .Values.dbConnection.sslMode }};" {{- end }} {{- if not .Values.postgresql.enabled }} - name: "POLICY_HUB_PASSWORD" From 178933624765f7849b2253d24076e58dbac49224 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Wed, 21 Feb 2024 17:30:37 +0100 Subject: [PATCH 04/23] feat(helm-chart): improve ingress, labels and namespace setting (#45) --- charts/policy-hub/templates/configmap-postgres-init.yaml | 2 ++ charts/policy-hub/templates/deployment-hub.yaml | 4 ++-- charts/policy-hub/templates/ingress.yaml | 3 ++- charts/policy-hub/templates/job-policy-hub-migrations.yaml | 3 +++ charts/policy-hub/templates/secret-external-db.yaml | 2 ++ charts/policy-hub/templates/secret-postgres.yaml | 2 ++ charts/policy-hub/templates/service-hub.yaml | 2 +- charts/policy-hub/values.yaml | 5 ++--- consortia/environments/values-beta.yaml | 2 -- consortia/environments/values-dev.yaml | 2 -- consortia/environments/values-int.yaml | 2 -- consortia/environments/values-pen.yaml | 2 -- consortia/environments/values-rc.yaml | 2 -- 13 files changed, 16 insertions(+), 17 deletions(-) diff --git a/charts/policy-hub/templates/configmap-postgres-init.yaml b/charts/policy-hub/templates/configmap-postgres-init.yaml index 6ac456b..c6bdd95 100644 --- a/charts/policy-hub/templates/configmap-postgres-init.yaml +++ b/charts/policy-hub/templates/configmap-postgres-init.yaml @@ -23,6 +23,8 @@ kind: ConfigMap metadata: name: {{ .Release.Name }}-phub-cm-postgres namespace: {{ .Release.Namespace }} + labels: + {{- include "phub.labels" . | nindent 4 }} data: 02-init-db.sql: | CREATE SCHEMA hub; diff --git a/charts/policy-hub/templates/deployment-hub.yaml b/charts/policy-hub/templates/deployment-hub.yaml index b06c6b2..185daa1 100644 --- a/charts/policy-hub/templates/deployment-hub.yaml +++ b/charts/policy-hub/templates/deployment-hub.yaml @@ -21,7 +21,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "phub.fullname" . }} - namespace: {{ .Values.namespace }} + namespace: {{ .Release.Namespace }} labels: {{- include "phub.labels" . | nindent 4 }} spec: @@ -37,7 +37,7 @@ spec: {{- include "phub.selectorLabels" . | nindent 8 }} spec: containers: - - name: {{ .Chart.Name }} + - name: {{ include "phub.fullname" . }} securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/charts/policy-hub/templates/ingress.yaml b/charts/policy-hub/templates/ingress.yaml index 225956e..a99dd4c 100644 --- a/charts/policy-hub/templates/ingress.yaml +++ b/charts/policy-hub/templates/ingress.yaml @@ -35,6 +35,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ .Release.Namespace }} labels: {{- include "phub.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} @@ -73,7 +74,7 @@ spec: number: {{ $svcPort }} {{- else }} serviceName: {{ $fullName }} - servicePort: {{ .backend.port }} + servicePort: {{ $svcPort }} {{- end }} {{- end }} {{- end }} diff --git a/charts/policy-hub/templates/job-policy-hub-migrations.yaml b/charts/policy-hub/templates/job-policy-hub-migrations.yaml index 94bef04..f5df3b3 100644 --- a/charts/policy-hub/templates/job-policy-hub-migrations.yaml +++ b/charts/policy-hub/templates/job-policy-hub-migrations.yaml @@ -21,6 +21,9 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ include "phub.fullname" . }}-migrations + namespace: {{ .Release.Namespace }} + labels: + {{- include "phub.labels" . | nindent 4 }} annotations: "batch.kubernetes.io/job-tracking": "true" "helm.sh/hook": post-install,post-upgrade diff --git a/charts/policy-hub/templates/secret-external-db.yaml b/charts/policy-hub/templates/secret-external-db.yaml index 78c60e5..0361eb0 100644 --- a/charts/policy-hub/templates/secret-external-db.yaml +++ b/charts/policy-hub/templates/secret-external-db.yaml @@ -23,6 +23,8 @@ kind: Secret metadata: name: {{ .Values.externalDatabase.existingSecret }} namespace: {{ .Release.Namespace }} + labels: + {{- include "portal.labels" . | nindent 4 }} type: Opaque # use lookup function to check if secret exists {{- $secret := (lookup "v1" "Secret" .Release.Namespace .Values.externalDatabase.existingSecret) }} diff --git a/charts/policy-hub/templates/secret-postgres.yaml b/charts/policy-hub/templates/secret-postgres.yaml index 59c49fb..4606147 100644 --- a/charts/policy-hub/templates/secret-postgres.yaml +++ b/charts/policy-hub/templates/secret-postgres.yaml @@ -24,6 +24,8 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ .Release.Namespace }} + labels: + {{- include "phub.labels" . | nindent 4 }} type: Opaque # use lookup function to check if secret exists {{- $secret := (lookup "v1" "Secret" .Release.Namespace $secretName) }} diff --git a/charts/policy-hub/templates/service-hub.yaml b/charts/policy-hub/templates/service-hub.yaml index 678cfad..38371df 100644 --- a/charts/policy-hub/templates/service-hub.yaml +++ b/charts/policy-hub/templates/service-hub.yaml @@ -21,7 +21,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "phub.fullname" . }} - namespace: {{ .Values.namespace }} + namespace: {{ .Release.Namespace }} labels: {{- include "phub.labels" . | nindent 4 }} spec: diff --git a/charts/policy-hub/values.yaml b/charts/policy-hub/values.yaml index ed6f6ed..257878c 100644 --- a/charts/policy-hub/values.yaml +++ b/charts/policy-hub/values.yaml @@ -24,7 +24,6 @@ ingress: # -- Policy Hub ingress parameters, # enable ingress record generation for policy-hub. enabled: false - name: "policy-hub" className: "nginx" annotations: nginx.ingress.kubernetes.io/use-regex: "true" @@ -44,9 +43,9 @@ ingress: paths: - path: "/api/policy-hub" pathType: "Prefix" - backend: - port: 8080 + dotnetEnvironment: "Production" + dbConnection: schema: "hub" sslMode: "Disable" diff --git a/consortia/environments/values-beta.yaml b/consortia/environments/values-beta.yaml index f674c43..0b1a885 100644 --- a/consortia/environments/values-beta.yaml +++ b/consortia/environments/values-beta.yaml @@ -37,8 +37,6 @@ ingress: paths: - path: "/api/policy-hub" pathType: "Prefix" - backend: - port: 8080 policyhub: swaggerEnabled: true diff --git a/consortia/environments/values-dev.yaml b/consortia/environments/values-dev.yaml index 8981a74..4211542 100644 --- a/consortia/environments/values-dev.yaml +++ b/consortia/environments/values-dev.yaml @@ -37,8 +37,6 @@ ingress: paths: - path: "/api/policy-hub" pathType: "Prefix" - backend: - port: 8080 keycloak: central: diff --git a/consortia/environments/values-int.yaml b/consortia/environments/values-int.yaml index 7303746..3187077 100644 --- a/consortia/environments/values-int.yaml +++ b/consortia/environments/values-int.yaml @@ -37,8 +37,6 @@ ingress: paths: - path: "/api/policy-hub" pathType: "Prefix" - backend: - port: 8080 keycloak: central: diff --git a/consortia/environments/values-pen.yaml b/consortia/environments/values-pen.yaml index 6fdbc5d..884f407 100644 --- a/consortia/environments/values-pen.yaml +++ b/consortia/environments/values-pen.yaml @@ -37,8 +37,6 @@ ingress: paths: - path: "/api/policy-hub" pathType: "Prefix" - backend: - port: 8080 policyhub: swaggerEnabled: true diff --git a/consortia/environments/values-rc.yaml b/consortia/environments/values-rc.yaml index e167976..f1add82 100644 --- a/consortia/environments/values-rc.yaml +++ b/consortia/environments/values-rc.yaml @@ -37,8 +37,6 @@ ingress: paths: - path: "/api/policy-hub" pathType: "Prefix" - backend: - port: 8080 policyhub: image: "docker.io/tractusx/policy-hub-service:rc" From 5ab9e4e091f3b0bd1579e04621eeabfc6e5a1901 Mon Sep 17 00:00:00 2001 From: Carsten Lenz Date: Thu, 22 Feb 2024 11:49:01 +0100 Subject: [PATCH 05/23] chore(ci): fix dash tool file name in workflow (#50) A new version of the dash tool has been pushed to the repository but the workflow wasn't updated. Solves #49 --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index eeee8ea..f30bba9 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -57,7 +57,7 @@ jobs: run: dotnet list src package --include-transitive --interactive | grep ">" | grep -Pv "\s(Org.Eclipse.TractusX|Microsoft|NuGet|System|runtime|docker|Docker|NETStandard)" | sed -E -e "s/\s+> ([a-zA-Z\.\-]+).+\s([0-9]+\.[0-9]+\.[0-9]+)\s*/nuget\/nuget\/\-\/\1\/\2/g" | awk '!seen[$0]++' > PACKAGES - name: Generate Dependencies file - run: java -jar ./scripts/download/org.eclipse.dash.licenses-1.0.2.jar PACKAGES -project automotive.tractusx -summary DEPENDENCIES || true + run: java -jar ./scripts/download/org.eclipse.dash.licenses-1.1.1-20240213.065029-71.jar PACKAGES -project automotive.tractusx -summary DEPENDENCIES || true - name: Check if dependencies were changed id: dependencies-changed From 27d2fe41a646ef1c2739e3dba09ce10924a3a244 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Fri, 23 Feb 2024 15:03:21 +0100 Subject: [PATCH 06/23] chore: remove selectorLabels from job (#53) --- charts/policy-hub/templates/job-policy-hub-migrations.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/charts/policy-hub/templates/job-policy-hub-migrations.yaml b/charts/policy-hub/templates/job-policy-hub-migrations.yaml index f5df3b3..e9765b9 100644 --- a/charts/policy-hub/templates/job-policy-hub-migrations.yaml +++ b/charts/policy-hub/templates/job-policy-hub-migrations.yaml @@ -31,8 +31,7 @@ metadata: spec: template: metadata: - labels: - {{- include "phub.selectorLabels" . | nindent 8 }} + name: {{ .Values.policyhubmigrations.name }}-migrations spec: restartPolicy: Never containers: From daf2dff35cdf93528095e6795c4987e1365b7e2a Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Sat, 24 Feb 2024 18:43:55 +0100 Subject: [PATCH 07/23] chore(documentation): add request documentation (#7) * add postman collection * add documentation with example requests ------------- Reviewed-By: Evelyn Gurschler --- .../requests/example-requests.md | 228 +++++++ .../policy-hub.postman_collection.json | 646 ++++++++++++++++++ 2 files changed, 874 insertions(+) create mode 100644 docs/developer/Technical-Documentation/requests/example-requests.md create mode 100644 docs/developer/Technical-Documentation/requests/policy-hub.postman_collection.json diff --git a/docs/developer/Technical-Documentation/requests/example-requests.md b/docs/developer/Technical-Documentation/requests/example-requests.md new file mode 100644 index 0000000..b40485a --- /dev/null +++ b/docs/developer/Technical-Documentation/requests/example-requests.md @@ -0,0 +1,228 @@ +# Example Requests + +The policy hub provides 4 endpoints. All endpoints are readonly endpoints although one of them is a post endpoint. + +## GET: Policy Attributes + +The endpoint is accessible under `/api/policy-hub/policy-attributes` and can be used to receive all possible attribute types. + +## GET: Policy Types + +The endpoint is accessible under `/api/policy-hub/policy-types`. It can be used to receive all available policies with all their attributes. + +It's possible to filter the results by one of the following or both attributes: + +- Type + - Access + - Usage + - Purpose +- UseCase + - Traceability + - Quality + - PCF + - Behavioraltwin + - Sustainability + +As an result you'll receive a list of policies: + +```json +[ + { + "technicalKey": "BusinessPartnerNumber", + "type": [ + "Access", + "Usage" + ], + "description": "The business partner number restriction can get used to define which exact business partners (based on BPNL) are allowed to view or negotiate the respective data offer. Please ensure that you add minimum one 16-digit BPNL Number in the rightOperand; wildcards are not supported.", + "useCase": [ + "Traceability", + "Quality", + "PCF", + "Behavioraltwin", + "Sustainability" + ], + "attribute": [ + { + "key": "Regex", + "value": "^BPNL[\\w|\\d]{12}$" + } + ], + "technicalEnforced": true + }, + { + "technicalKey": "Membership", + "type": [ + "Access", + "Usage" + ], + "description": "The membership credential can get used to ensure that only CX members are allowed to view or negotiate the respective data offer.", + "useCase": [ + "Traceability", + "Quality", + "PCF", + "Behavioraltwin", + "Sustainability" + ], + "attribute": [ + { + "key": "Static", + "value": "active" + } + ], + "technicalEnforced": true + }, + { + "technicalKey": "FrameworkAgreement.traceability", + "type": [ + "Usage" + ], + "description": "With the Framework Credential, only those participants which have signed the respective framework agreement (general or via a specific version) are allowed to view or negotiate the respective data offer. Generic: \"rightOperand\": \"active\"; specific \"rightOperand\": \"active:{version}\"", + "useCase": [ + "Traceability" + ], + "attribute": [ + { + "key": "Version", + "value": "1.0" + }, + { + "key": "Version", + "value": "1.1" + }, + { + "key": "Version", + "value": "1.2" + } + ], + "technicalEnforced": true + } +] +``` + +## GET PolicyContent + +The endpoint is accessible under `/api/policy-hub/policy-content?useCase={useCase}&type={type}&credential={technicalKey}&operatorId={operator}&value={value}` and can be used to receive a concrete json file for a policy. + +The parameter you need to set for this endpoint can be received from the [policy-types](#get-policy-types) endpoint. The useCase as well as value are optional parameters. If you try to receive the content for a policy which has the Regex Attribute a value needs to be passed which is matching the regex pattern. + +A possible response can look like this: + +```json +{ + "content": { + "@context": [ + "https://www.w3.org/ns/odrl.jsonld", + { + "cx": "https://w3id.org/catenax/v0.0.1/ns/" + } + ], + "@type": "Offer", + "@id": "....", + "permission": { + "action": "use", + "constraint": { + "leftOperand": "FrameworkAgreement.traceability", + "operator": "eq", + "rightOperand": "@FrameworkAgreement.traceability-Version" + } + } + }, + "attributes": [ + { + "key": "@FrameworkAgreement.traceability-Version", + "possibleValues": [ + "active:1.0", + "active:1.1", + "active:1.2" + ] + } + ] +} +``` + +As you can see the policy content was requested with operatorId = Equals, since the FrameworkAgreement.traceability has multiple values the values of the rightOperand will be displayed in an attributes array with the respective key used to link the values. + +## POST: Policy Content + +The endpoint is accessible under `/api/policy-hub/policy-content` and can be used to receive a concrete json file for a policy with and / or linked constraints. + +The body of the request needs to contain the policyType and constraintOperand, valid values for the contraintOperand are `And` or `Or`. + +The constrains can be passed as an array, the content of the array is a combination of the technicalKey of a policy type and the operator either `Equals` or `In`. + +Limitations: the technicalKey of a constraint must only be included once. + +And example: + +```json +{ + "policyType": "Usage", + "constraintOperand": "And", + "constraints": [ + { + "key": "FrameworkAgreement.traceability", + "operator": "Equals" + }, + { + "key": "companyRole.dismantler", + "operator": "In" + } + ] +} + +``` + +Or example: + +```json +{ + "PolicyType": "Usage", + "ConstraintOperand": "Or", + "Constraints": [ + { + "Key": "FrameworkAgreement.traceability", + "Operator": "Equals" + }, + { + "Key": "companyRole.dismantler", + "Operator": "In" + } + ] +} + +``` + +Multiple constrains example: + +```json +{ + "PolicyType": "Usage", + "ConstraintOperand": "And", + "Constraints": [ + { + "Key": "FrameworkAgreement.traceability", + "Operator": "Equals" + }, + { + "Key": "companyRole.dismantler", + "Operator": "In" + }, + { + "Key": "BusinessPartnerNumber", + "Operator": "Equals", + "Value": "BPNL00000003CRHK" + } + ] +} + +``` + +If you want to try it out, check the [postman collection](/docs/developer/Technical-Documentation/requests/policy-hub.postman_collection.json) + +## NOTICE + +This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). + +- SPDX-License-Identifier: Apache-2.0 +- SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/developer/Technical-Documentation/requests/policy-hub.postman_collection.json b/docs/developer/Technical-Documentation/requests/policy-hub.postman_collection.json new file mode 100644 index 0000000..eceb5e2 --- /dev/null +++ b/docs/developer/Technical-Documentation/requests/policy-hub.postman_collection.json @@ -0,0 +1,646 @@ +{ + "info": { + "_postman_id": "664c9cb3-c8fc-433f-bbdc-912bd2122052", + "name": "Policy Hub", + "description": "Hey there 👋\n\nthis collection gives you an overview of the policy hub api and some example requests.\n\nTo use the collection please set a environment variable called `baseUrl` with the url you want to test, e.g. [https://localhost:5001](https://localhost:5001) to test locally or https://policy-hub.dev.demo.catena-x.net\n\nto test the policy hub on dev.\n\nTo be able to test the api you need a valid token from the respective keycloak instance. Set the keyloak token within a variable called `hubToken`", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "2223943" + }, + "item": [ + { + "name": "Get PolicyTypes", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-types", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-types" + ] + } + }, + "response": [ + { + "name": "Get PolicyTypes With Type Filter", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-types?type=Access", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-types" + ], + "query": [ + { + "key": "type", + "value": "Access" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get PolicyTypes With UseCase Filter", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-types?useCase=Traceability", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-types" + ], + "query": [ + { + "key": "useCase", + "value": "Traceability" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + } + ] + }, + { + "name": "Get PolicyContent", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?type=Usage&credential=FrameworkAgreement.traceability&operatorId=Equals", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "useCase", + "value": "Traceability", + "disabled": true + }, + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "FrameworkAgreement.traceability" + }, + { + "key": "operatorId", + "value": "Equals" + } + ] + } + }, + "response": [ + { + "name": "Get Membership Content", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?type=Usage&credential=Membership&operatorId=Equals", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "Membership" + }, + { + "key": "operatorId", + "value": "Equals" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get BPN Content", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?type=Usage&credential=BusinessPartnerNumber&operatorId=Equals&value=BPNL00000003CRHK", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "BusinessPartnerNumber" + }, + { + "key": "operatorId", + "value": "Equals" + }, + { + "key": "value", + "value": "BPNL00000003CRHK" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get Framework Content", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?type=Usage&credential=FrameworkAgreement.traceability&operatorId=Equals", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "useCase", + "value": "Traceability", + "disabled": true + }, + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "FrameworkAgreement.traceability" + }, + { + "key": "operatorId", + "value": "Equals" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get Dismantler Content", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?type=Usage&credential=companyRole.dismantler&operatorId=In", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "companyRole.dismantler" + }, + { + "key": "operatorId", + "value": "In" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get Purpose TraceBattery", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?useCase=Traceability&type=Usage&credential=purpose.trace.v1.TraceBattery&operatorId=Equals", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "useCase", + "value": "Traceability" + }, + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "purpose.trace.v1.TraceBattery" + }, + { + "key": "operatorId", + "value": "Equals" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get Purpose Trace Aspects", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?useCase=Traceability&type=Usage&credential=purpose.trace.v1.aspects&operatorId=Equals", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "useCase", + "value": "Traceability" + }, + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "purpose.trace.v1.aspects" + }, + { + "key": "operatorId", + "value": "Equals" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get Purpose QualityAnalysis", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?useCase=Traceability&type=Usage&credential=purpose.trace.v1.qualityanalysis&operatorId=Equals", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "useCase", + "value": "Traceability" + }, + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "purpose.trace.v1.qualityanalysis" + }, + { + "key": "operatorId", + "value": "Equals" + } + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get PolicyContent", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content?type=Usage&credential=companyRole.dismantler&operatorId=In", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ], + "query": [ + { + "key": "type", + "value": "Usage" + }, + { + "key": "credential", + "value": "companyRole.dismantler" + }, + { + "key": "operatorId", + "value": "In" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Date", + "value": "Tue, 14 Nov 2023 21:53:59 GMT" + }, + { + "key": "Server", + "value": "Kestrel" + }, + { + "key": "Transfer-Encoding", + "value": "chunked" + } + ], + "cookie": [], + "body": "{\n \"content\": {\n \"@context\": [\n \"https://www.w3.org/ns/odrl.jsonld\",\n {\n \"cx\": \"https://w3id.org/catenax/v0.0.1/ns/\"\n }\n ],\n \"@type\": \"Offer\",\n \"@id\": \"....\",\n \"permission\": {\n \"action\": \"use\",\n \"constraint\": {\n \"leftOperand\": \"Dismantler.activityType\",\n \"operator\": \"in\",\n \"rightOperand\": [\n \"Audi\",\n \"BMW\",\n \"VW\"\n ]\n }\n }\n }\n}" + } + ] + }, + { + "name": "Get PolicyContent", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\r\n \"PolicyType\": \"Usage\",\r\n \"ConstraintOperand\": \"And\",\r\n \"Constraints\": [\r\n {\r\n \"Key\": \"FrameworkAgreement.traceability\",\r\n \"Operator\": \"Equals\"\r\n },\r\n {\r\n \"Key\": \"companyRole.dismantler\",\r\n \"Operator\": \"In\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ] + } + }, + "response": [ + { + "name": "Get Content with AND", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"PolicyType\": \"Usage\",\r\n \"ConstraintOperand\": \"And\",\r\n \"Constraints\": [\r\n {\r\n \"Key\": \"FrameworkAgreement.traceability\",\r\n \"Operator\": \"Equals\"\r\n },\r\n {\r\n \"Key\": \"companyRole.dismantler\",\r\n \"Operator\": \"In\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get with multiple constraints", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"PolicyType\": \"Usage\",\r\n \"ConstraintOperand\": \"And\",\r\n \"Constraints\": [\r\n {\r\n \"Key\": \"FrameworkAgreement.traceability\",\r\n \"Operator\": \"Equals\"\r\n },\r\n {\r\n \"Key\": \"companyRole.dismantler\",\r\n \"Operator\": \"In\"\r\n },\r\n {\r\n \"Key\": \"BusinessPartnerNumber\",\r\n \"Operator\": \"Equals\",\r\n \"Value\": \"BPNL00000003CRHK\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + }, + { + "name": "Get Content with OR", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"PolicyType\": \"Usage\",\r\n \"ConstraintOperand\": \"Or\",\r\n \"Constraints\": [\r\n {\r\n \"Key\": \"FrameworkAgreement.traceability\",\r\n \"Operator\": \"Equals\"\r\n },\r\n {\r\n \"Key\": \"companyRole.dismantler\",\r\n \"Operator\": \"In\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-content", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-content" + ] + } + }, + "_postman_previewlanguage": null, + "header": null, + "cookie": [], + "body": null + } + ] + }, + { + "name": "Get Attributes", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/policy-hub/policy-attributes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "api", + "policy-hub", + "policy-attributes" + ] + } + }, + "response": [] + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{hubToken}}", + "type": "string" + } + ] + }, + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] +} \ No newline at end of file From c61ade8ece5cbbd371bd2f03f6621326116eb274 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 26 Feb 2024 08:15:49 +0100 Subject: [PATCH 08/23] chore: remove additional license (#54) will be reintroduced once needed ref: https://github.com/eclipse-tractusx/policy-hub/issues/52 --- LICENSES/CC-BY-4.0.txt | 395 ----------------------------------------- 1 file changed, 395 deletions(-) delete mode 100644 LICENSES/CC-BY-4.0.txt diff --git a/LICENSES/CC-BY-4.0.txt b/LICENSES/CC-BY-4.0.txt deleted file mode 100644 index 4ea99c2..0000000 --- a/LICENSES/CC-BY-4.0.txt +++ /dev/null @@ -1,395 +0,0 @@ -Attribution 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution 4.0 International Public License ("Public License"). To the -extent this Public License may be interpreted as a contract, You are -granted the Licensed Rights in consideration of Your acceptance of -these terms and conditions, and the Licensor grants You such rights in -consideration of benefits the Licensor receives from making the -Licensed Material available under these terms and conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the “Licensor.” The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - -Creative Commons may be contacted at creativecommons.org. From 3c559276de0d919c138128a31d301ecc631db01d Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Fri, 23 Feb 2024 16:02:11 +0100 Subject: [PATCH 09/23] chore: change release-please trigger --- .github/workflows/release-please.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 406b4ad..049e3c0 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -22,7 +22,7 @@ name: Release Please on: push: branches: - - 'v*.*.*' + - 'changelog/v*.*.*' workflow_dispatch: permissions: From 7b24ad306d55083790a63f5be4b6665b9b197118 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Fri, 23 Feb 2024 16:02:28 +0100 Subject: [PATCH 10/23] docs: update release process --- .../release-process/Release Process.md | 62 +++++++------------ 1 file changed, 22 insertions(+), 40 deletions(-) diff --git a/docs/technical-documentation/release-process/Release Process.md b/docs/technical-documentation/release-process/Release Process.md index a2256d4..3911d56 100644 --- a/docs/technical-documentation/release-process/Release Process.md +++ b/docs/technical-documentation/release-process/Release Process.md @@ -4,10 +4,8 @@ The release process for a new version can roughly be divided into the following - [Preparations on the release branch](#preparations-on-the-release-branch) - [Update CHANGELOG.md](#update-changelogmd) -- [Tag and build of versioned images](#tag-and-build-of-versioned-images) -- [Create releases from tags](#create-releases-from-tags) - [Merge release branch](#merge-release-branch) -- [RC: provide successive RC branch and change base of open PRs](#rc-provide-successive-rc-branch-and-change-base-of-open-prs) +- [RC: provide successive rc branch and change base of open PRs](#rc-provide-successive-rc-branch-and-change-base-of-open-prs) The process builds on the development flow which, usually, takes place within forks and leads to merged pull requests in the repositories of the eclipse-tractusx organization. @@ -15,25 +13,27 @@ For assigning and incrementing **version** numbers [Semantic Versioning](https:/ ## Preparations on the release branch -Checking out from the dev branch a release branch (release/{to be released version} e.g. release/v1.2.0, or respectively release/v1.2.0-RC1 for a release candidate). +Checking out from the dev branch a release branch (release/{to be released version} e.g. release/v1.2.0, or respectively release/v1.2.0-rc.1 for a release candidate). On the release branch the following steps are executed: ### 1. Aggregate migrations Migrations should be **aggregated in the case of releasing a new version**, in order to not release the entire history of migrations which accumulate during the development process. -Once a version has been released, migrations **mustn't be aggregated** in order to ensure upgradeability this also applies to **release candidates > RC1 and hotfixes**. +Once a version has been released, migrations **mustn't be aggregated** in order to ensure upgradeability this also applies to **release candidates > rc.1 and hotfixes**. Be aware that migrations coming release branches for release candidates or from hotfix branches, will **need to be incorporated into dev and main**. ### 2. Version bump The version needs to be updated in the `src` directory within the 'Directory.Build.props' file. -Bump helm chart and image version (also for argocd-app-templates, needed for consortia-environments). +Also, bump the chart and app version in the [Chart.yaml](../../../charts/policy-hub/Chart.yaml) and the version of the images in the [values.yaml](../../../charts/policy-hub/values.yaml). + +_Consortia relevant: Update the version of the targetRevision tag in the [argocd-app-templates](../../../consortia/argocd-app-templates/), used for consortia-environments._ Example for commit message: -_release: bump version for vx.x.x_ +_build: bump version for vx.x.x_ ### 3. Update README (on chart level) @@ -45,12 +45,12 @@ helm-docs --chart-search-root [charts-dir] --sort-values-order file Example for commit message: -_release: update readme for vx.x.x_ +_build: update readme for vx.x.x_ ## Update CHANGELOG.md The changelog file tracks all notable changes since the last released version. -Once a new version is ready to be released, the changelog gets automatically created by triggering the [release-please workflow](../../../.github/workflows/release-please.yml). +Once a new version is ready to be released, the changelog can get updated via an automatically created pull request using the [release-please workflow](../../../.github/workflows/release-please.yml) which can be triggered manually or by pushing a _changelog/v*.*.*_ branch. Please see: @@ -58,28 +58,6 @@ Please see: - [How do I change the version number?](https://github.com/googleapis/release-please/tree/v16.7.0?tab=readme-ov-file#how-do-i-change-the-version-number) - [How can I fix release notes?](https://github.com/googleapis/release-please/tree/v16.7.0?tab=readme-ov-file#how-can-i-fix-release-notes) -## Tag and build of versioned images - -It's important to pull the latest state of the release branch locally. -Then create and push a tag for the released version. -The push of the tag triggers the [release workflow](../../../.github/workflows/release.yml) which creates the versioned image/s. - -Example for tag: - -_v0.1.0_ - -Examples for tag messages: - -_Version 0.1.0: Policy-Hub for Catena-X_ - -## Create releases from tags - -Create the release from the tag available in repository. - -Examples for release messages: - -_Version 0.1.0: Policy-Hub for Catena-X_ - ## Merge release branch The release branch must be merged into main. @@ -88,26 +66,30 @@ Those merges need to happen via PRs. Example for PR titles: -_release(1.2.0): merge release into main_ +_build(1.2.0): merge release into main_ + +_build(1.2.0): merge main to dev_ -_release(1.2.0): merge main to dev_ +> Be aware that the merge into main triggers the workflow with the [helm-chart releaser action](../../../.github/workflows/chart-release.yaml). +> +> The workflow creates a 'policy-hub-x.x.x' tag and release. The release contains the new chart. +> +> This workflow also pushes the version tag that triggers the [release workflow](../../../.github/workflows/release.yml) which creates the versioned docker image/s. -Be aware that merge into main trigger the workflow with the [helm-chart releaser](../../../.github/workflows/chart-release.yaml). -Besides the official chart itself, there is also created a 'policy-hub-x.x.x' tag. -This tag is used to install (with the convenience of the argocd-app-templates) or upgrade the version via AgroCD on the consortia K8s clusters. +_Consortia relevant: The 'policy-hub-x.x.x' tag is used to install (with the convenience of the argocd-app-templates) or upgrade the version via AgroCD on the consortia K8s clusters._ -## RC: provide successive RC branch and change base of open PRs +## RC: provide successive rc branch and change base of open PRs -During a release candidate phase, checkout the successive 'RC' branch and push it to the server, so that it can be used for further bugfixes. +During a release candidate phase, checkout the successive 'rc' branch and push it to the server, so that it can be used for further bugfixes. Example: ```bash -git checkout tags/v0.1.0-RC2 -b release/v0.1.0-RC3 +git checkout tags/v0.1.0-rc.2 -b release/v0.1.0-rc.3 ``` -Also make sure to change the base of all open pull requests still pointing to the previous 'RC' branch to the newly pushed 'RC' branch. +Also make sure to change the base of all open pull requests still pointing to the previous 'rc' branch to the newly pushed 'rc' branch. ## NOTICE From 716f057aa56a867b3c99d93aa7947c8393fde471 Mon Sep 17 00:00:00 2001 From: szymonkowalczykzf <150558682+szymonkowalczykzf@users.noreply.github.com> Date: Tue, 27 Feb 2024 13:28:10 +0100 Subject: [PATCH 11/23] docs: create security assessment (#42) ref: https://github.com/eclipse-tractusx/sig-security/issues/56 --- .../Security_Assessment.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 docs/technical-documentation/Security_Assessment.md diff --git a/docs/technical-documentation/Security_Assessment.md b/docs/technical-documentation/Security_Assessment.md new file mode 100644 index 0000000..e686657 --- /dev/null +++ b/docs/technical-documentation/Security_Assessment.md @@ -0,0 +1,89 @@ +# Security Assessment Policy-Hub + +| | | +| ------------------------- | ---------------------------------------------------------------------------------------------- | +| Contact for product | [@evegufy](https://github.com/evegufy)
[@jjeroch](https://github.com/jjeroch) | +| Security responsible | [Szymon Kowalczyk](szymon.kowalczyk@zf.com) | +| Version number of product | 0.1.0 | +| Dates of assessment | 2024-02-16: Assessment | +| Status of assessment | Assessment Report | + +## Product Description + +Policy-Hub project is an readonly REST API project, without implementation of an UI. (Pure Backend Component) + +Main purpose of the product is to provide interested and authenticated C-X Users with read access to policy data, use cases, credential types, policy rules, that are created during an application seeding. + +The Policy-Hub comprise the technical foundation for interaction, monitoring, auditing and further functionalities. +They are state of the art in terms of technology portfolio, consist of open-source components whenever possible and are open-sourced themselves 100%. + +Policy-Hub can be run anywhere: it can be deployed as a docker image, e. g. on Kubernetes (platform-independent, cloud, on prem or local). + +The policy hub is using following key frameworks: + +- .Net +- Entity Framework +[architecture & development concept](https://github.com/eclipse-tractusx/policy-hub/blob/main/docs/technical-documentation/architecture/Development%20Concept.md) + +## Data Flow Diagram + +```mermaid +flowchart LR + + CU(Company user) + K("Keycloak (REST API)") + PH(Policy Hub API) + PHD[("Postgres Database \n \n (Data created with \n application seeding)")] + + subgraph centralidp[centralidp Keycloak] + K + end + + subgraph companyrealm[SharedIdP Keycloak or ownIdP] + CU + end + + subgraph Policy-Hub Product + PH + PHD + end + + K-->|"Authentication & Authorization Data \n (Using JWT)"|PH + CU-->|"Consumption of central, read-only REST API \n [HTTPS]"|PH + PH-->|"Read policies, use cases, \n credential types, policy rules"|PHD + CU-->|"IAM with OIDC \n [HTTPS]"|K +``` + +### Changes compared to last Security Assessment + +N/A + +### Features for Upcoming Versions + +N/A + +## Threats & Risks + +All potential threats discussed during the assessment were already mitigated. + +### Mitigated Threats + +N/A + +### Performed Security Checks + +- Static Application Security Testing (SAST) - CodeQL +- Dynamic Application Security Testing (DAST) - OWASP ZAP +- Secret Scanning - GitGuardian +- Software Composition Analysis (SCA) - SNYK +- Container Scan conducted - Trivy +- Infrastructure as Code - KICS +- Securing code, dependencies, containers, IaC and Cloud Deployments - SNYK + +## NOTICE + +This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). + +- SPDX-License-Identifier: Apache-2.0 +- SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/policy-hub From c7aefe8265f746b3dfb803731c6d4322fafc23d5 Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Thu, 29 Feb 2024 11:44:11 +0100 Subject: [PATCH 12/23] chore: adjust policy hub docu (#56) Reviewed-By: Evelyn Gurschler --- .../architecture/Architecture Constraints.md | 2 +- .../architecture/Whitebox Overall System.md | 22 +++++++++++++++++-- .../authentication/authentication.md | 2 +- .../dev-process/Enumeration Handling.md | 1 - .../requests/example-requests.md | 0 .../policy-hub.postman_collection.json | 0 6 files changed, 22 insertions(+), 5 deletions(-) rename docs/{developer/Technical-Documentation => technical-documentation}/requests/example-requests.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/requests/policy-hub.postman_collection.json (100%) diff --git a/docs/technical-documentation/architecture/Architecture Constraints.md b/docs/technical-documentation/architecture/Architecture Constraints.md index 3d19338..d0d5be8 100644 --- a/docs/technical-documentation/architecture/Architecture Constraints.md +++ b/docs/technical-documentation/architecture/Architecture Constraints.md @@ -2,7 +2,7 @@ ## General -- This project is an readonly API project, there is no plan to implement an UI yet. +- This project provides an readonly API, there is no plan to implement an UI yet. - Run anywhere: can be deployed as a docker image, e. g. on Kubernetes (platform-independent, cloud, on prem or local). diff --git a/docs/technical-documentation/architecture/Whitebox Overall System.md b/docs/technical-documentation/architecture/Whitebox Overall System.md index 43c2054..a672578 100644 --- a/docs/technical-documentation/architecture/Whitebox Overall System.md +++ b/docs/technical-documentation/architecture/Whitebox Overall System.md @@ -4,12 +4,30 @@ In the following image you see the overall system overview of the Policy Hub -TODO (PS): add image for system view +```mermaid +flowchart LR + + C(Customer) + ING(Ingress) + PH(Policy Hub API) + PHD[("Postgres Database \n \n (Data created with \n application seeding)")] + + subgraph Policy-Hub Product + ING + PH + PHD + end + + C-->|"Authentication & Authorization Data \n (Using JWT)"|ING + ING-->|"Forward Request"|PH + PH-->|"Read policies, use cases, \n credential types, policy rules"|PHD + +``` ## NOTICE This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/authentication/authentication.md b/docs/technical-documentation/authentication/authentication.md index 9ed3a9d..a083181 100644 --- a/docs/technical-documentation/authentication/authentication.md +++ b/docs/technical-documentation/authentication/authentication.md @@ -2,7 +2,7 @@ The authentication process for the Policy Hub involves interaction with the central IAM (Identity and Access Management). The configuration for IAM can be customized either locally during development through secrets or within the chart for the Docker image. -Currently, the Policy Hub performs a basic validation by checking for a valid token in the request. However, it's important to note that no permission checks are conducted at this stage. +Currently, the Policy Hub performs a basic validation by checking for a valid token with a configurable Audience in the request. However, it's important to note that no permission checks are conducted at this stage. ## NOTICE diff --git a/docs/technical-documentation/dev-process/Enumeration Handling.md b/docs/technical-documentation/dev-process/Enumeration Handling.md index e77f773..53eb4eb 100644 --- a/docs/technical-documentation/dev-process/Enumeration Handling.md +++ b/docs/technical-documentation/dev-process/Enumeration Handling.md @@ -12,7 +12,6 @@ List of used enums in the policy hub application that are stored in the database ### Add Enums New enums can get added easily be enhancing the enumeration table (via the seeding data). With the next deployment; the new enum is getting auto deployed to the respective env. -Since enums have an enhanced impact on the system functionality; it is mandatorily needed to test (FE wise) the impacted screens / flows before releasing new enums. It is likely that the enum has an enhanced impact on the user journey / flow and break the system if not well tested. ### Change Enums diff --git a/docs/developer/Technical-Documentation/requests/example-requests.md b/docs/technical-documentation/requests/example-requests.md similarity index 100% rename from docs/developer/Technical-Documentation/requests/example-requests.md rename to docs/technical-documentation/requests/example-requests.md diff --git a/docs/developer/Technical-Documentation/requests/policy-hub.postman_collection.json b/docs/technical-documentation/requests/policy-hub.postman_collection.json similarity index 100% rename from docs/developer/Technical-Documentation/requests/policy-hub.postman_collection.json rename to docs/technical-documentation/requests/policy-hub.postman_collection.json From 4c1c6ad2ee51e8994aabc320cb62175cd357e244 Mon Sep 17 00:00:00 2001 From: jjeroch <94133633+jjeroch@users.noreply.github.com> Date: Thu, 29 Feb 2024 11:52:21 +0100 Subject: [PATCH 13/23] docs: enhancing release 24.03. system documentation (#58) * update Architecture Constraints details * update Context and scope.md file business context * Update Requirements.md requirement list --------- Co-authored-by: Phil Schneider Reviewed-by: Phil Schneider --- .../architecture/Architecture Constraints.md | 14 +++++++++++--- .../architecture/Context and scope.md | 3 ++- .../architecture/Requirements.md | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/technical-documentation/architecture/Architecture Constraints.md b/docs/technical-documentation/architecture/Architecture Constraints.md index d0d5be8..27d4b36 100644 --- a/docs/technical-documentation/architecture/Architecture Constraints.md +++ b/docs/technical-documentation/architecture/Architecture Constraints.md @@ -2,7 +2,7 @@ ## General -- This project provides an readonly API, there is no plan to implement an UI yet. +- This project provides an readonly API, there is no plan to implement an UI at the current stage. - Run anywhere: can be deployed as a docker image, e. g. on Kubernetes (platform-independent, cloud, on prem or local). @@ -18,8 +18,16 @@ ## Code analysis, linting and code coverage ---comming soon--- -(Veracode; Eslinter, Sonarcloud, etc.) +As part of the standard reviews, following code analysis and security checks have been executed: + +- SonarCloud Code Analysis +- Thread Modelling Analysis +- Static Application Security Testing (SAST) +- Dynamic Application Security Testing (DAST) +- Secret Scans +- Software Composition Analysis (SCA) +- Container Scans +- Infrastructure as Code (IaC) ## NOTICE diff --git a/docs/technical-documentation/architecture/Context and scope.md b/docs/technical-documentation/architecture/Context and scope.md index 28b675c..ef11afd 100644 --- a/docs/technical-documentation/architecture/Context and scope.md +++ b/docs/technical-documentation/architecture/Context and scope.md @@ -2,7 +2,8 @@ ## Business Context -TODO (PS): add description +The policy hub is created to enable data provider, consumer as well as app provider to get via a single-point-of-truth a statement of the current CX existing policies, their attributes as well as the policy key and structure. +Additionally the user can receive a complete policy template (based on Catena-X dataspace rules) to use the same for stored company rules; making offers inside the dataspace, etc. ## Technical Context diff --git a/docs/technical-documentation/architecture/Requirements.md b/docs/technical-documentation/architecture/Requirements.md index 2918aa0..8942ed9 100644 --- a/docs/technical-documentation/architecture/Requirements.md +++ b/docs/technical-documentation/architecture/Requirements.md @@ -10,8 +10,8 @@ For Catena-X Member Companies |ID|Title|Requirement| |--------|--------|--------| |REQ-C-004|Identity Integration|Authentication is done vis IdP Federation to minimize administration overhead and to simplify logins. Authorization not included, this must be done Catena-X specific by the Central-IdP| - -TODO (PS): tbd with julia +|REQ|Single-Point-Of-Thruth of the current supported, allowed and defined policy rules.|| +|REQ|Share joint efforts by supporting stakeholders with one solution which can run anywhere. Maintenance efforts can get reduced.|| ## NOTICE From 29b66adf1037651280db329940d309d8b9ce1eeb Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Wed, 6 Mar 2024 11:21:12 +0100 Subject: [PATCH 14/23] chore(docker-notice): update link to dockerfile --- docker/notice-policy-hub-migrations.md | 2 +- docker/notice-policy-hub-service.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/notice-policy-hub-migrations.md b/docker/notice-policy-hub-migrations.md index eff4b02..e549341 100644 --- a/docker/notice-policy-hub-migrations.md +++ b/docker/notice-policy-hub-migrations.md @@ -13,7 +13,7 @@ __Policy Hub Migrations__ __Used base images__ -- Dockerfile: [mcr.microsoft.com/dotnet/runtime:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/runtime/7.0/alpine3.17/amd64/Dockerfile) +- Dockerfile: [mcr.microsoft.com/dotnet/runtime:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/runtime/7.0/alpine3.19/amd64/Dockerfile) - GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) - DockerHub: [https://hub.docker.com/_/microsoft-dotnet-runtime](https://hub.docker.com/_/microsoft-dotnet-runtime) diff --git a/docker/notice-policy-hub-service.md b/docker/notice-policy-hub-service.md index 6faaca6..6d10d9e 100644 --- a/docker/notice-policy-hub-service.md +++ b/docker/notice-policy-hub-service.md @@ -13,7 +13,7 @@ __Policy Hub Service__ __Used base images__ -- Dockerfile: [mcr.microsoft.com/dotnet/aspnet:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/7.0/alpine3.17/amd64/Dockerfile) +- Dockerfile: [mcr.microsoft.com/dotnet/aspnet:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/7.0/alpine3.19/amd64/Dockerfile) - GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) - DockerHub: [https://hub.docker.com/_/microsoft-dotnet-aspnet](https://hub.docker.com/_/microsoft-dotnet-aspnet) From 20200d0182aa53f57dfa4b9aac4123b4feed5a42 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Wed, 6 Mar 2024 11:35:01 +0100 Subject: [PATCH 15/23] docs: reference to installation details and docker-notice file --- README.md | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e63733c..aa51790 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@ This repository contains the backend code for the Policy-Hub written in C#. +For **installation** details, please refer to the [README.md](./charts/policy-hub/README.md) of the provided helm chart. + ## How to build and run -Install [the .NET 7.0 SDK](https://www.microsoft.com/net/download). +Install the [.NET 7.0 SDK](https://www.microsoft.com/net/download). Run the following command from the CLI: @@ -23,24 +25,10 @@ dotnet run This application provides container images for demonstration purposes. -### DockerHub - -* [https://hub.docker.com/r/tractusx/policy-hub-service](https://hub.docker.com/r/tractusx/policy-hub-service) -* [https://hub.docker.com/r/tractusx/policy-hub-migrations](https://hub.docker.com/r/tractusx/policy-hub-migrations) - -### Base images - -mcr.microsoft.com/dotnet/aspnet:7.0-alpine: - -* Dockerfile: [mcr.microsoft.com/dotnet/aspnet:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/aspnet/7.0/alpine3.17/amd64/Dockerfile) -* GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) -* DockerHub: [https://hub.docker.com/_/microsoft-dotnet-aspnet](https://hub.docker.com/_/microsoft-dotnet-aspnet) - -mcr.microsoft.com/dotnet/runtime:7.0-alpine: +See Docker notice files for more information: -* Dockerfile: [mcr.microsoft.com/dotnet/runtime:7.0-alpine](https://github.com/dotnet/dotnet-docker/blob/main/src/runtime/7.0/alpine3.17/amd64/Dockerfile) -* GitHub project: [https://github.com/dotnet/dotnet-docker](https://github.com/dotnet/dotnet-docker) -* DockerHub: [https://hub.docker.com/_/microsoft-dotnet-runtime](https://hub.docker.com/_/microsoft-dotnet-runtime) +* [policy-hub-service](./docker/notice-policy-hub-service.md) +* [policy-hub-migrations](./docker/notice-policy-hub-migrations.md) ## License From 7b9c11ffbee9eec3ccc26332222097a6657f136a Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Wed, 6 Mar 2024 11:35:39 +0100 Subject: [PATCH 16/23] docs: fix link to technical documentation --- charts/policy-hub/README.md.gotmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/policy-hub/README.md.gotmpl b/charts/policy-hub/README.md.gotmpl index 499eb7a..42a9589 100644 --- a/charts/policy-hub/README.md.gotmpl +++ b/charts/policy-hub/README.md.gotmpl @@ -2,7 +2,7 @@ This helm chart installs the Catena-X Policy Hub application. -For further information please refer to [Technical Documentation](./docs/technical-documentation). +For further information please refer to [Technical Documentation](../../docs/technical-documentation/). The referenced container images are for demonstration purposes only. From d28041f867f22941452e1b6d5cf5a475f3083197 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Wed, 6 Mar 2024 11:37:59 +0100 Subject: [PATCH 17/23] chore: add notice footer --- FILEHEADER.md | 10 +++++++++- scripts/check-dependencies.md | 8 ++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/FILEHEADER.md b/FILEHEADER.md index 79d8879..99a2df5 100644 --- a/FILEHEADER.md +++ b/FILEHEADER.md @@ -12,4 +12,12 @@ Every time you create a new file or edit a file that you created and doesn't yet Currently the following templates are available: * cx_header_default -* cx_header_with_# \ No newline at end of file +* cx_header_with_# + +## NOTICE + +This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). + +- SPDX-License-Identifier: Apache-2.0 +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/policy-hub \ No newline at end of file diff --git a/scripts/check-dependencies.md b/scripts/check-dependencies.md index 4391390..875f930 100644 --- a/scripts/check-dependencies.md +++ b/scripts/check-dependencies.md @@ -7,3 +7,11 @@ This workflow uses the executable jar in the download directory. In order to update the executable jar run the following command from the root directory: curl -L --output ./scripts/download/org.eclipse.dash.licenses-1.0.2.jar 'https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=1.0.2' + +## NOTICE + +This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). + +- SPDX-License-Identifier: Apache-2.0 +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation +- Source URL: https://github.com/eclipse-tractusx/policy-hub From 9e32c0cc7cca67b70d29766f0cf243be9268fbd9 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Wed, 6 Mar 2024 11:41:30 +0100 Subject: [PATCH 18/23] chore: update year file header --- .github/workflows/dependencies.yml | 2 +- .github/workflows/kics.yml | 2 +- .github/workflows/policy-hub-chart-test.yml | 2 +- .github/workflows/policy-hub-migrations.yml | 2 +- .github/workflows/policy-hub-service.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/release_candidate.yml | 2 +- .github/workflows/sonarcloud.yml | 2 +- .github/workflows/test-automation.yml | 2 +- .github/workflows/trivy-dev.yml | 2 +- .github/workflows/trivy.yml | 2 +- .github/workflows/unit.tests-formatting.yml | 2 +- .tractusx | 2 +- charts/chart-testing-config.yaml | 2 +- charts/policy-hub/Chart.yaml | 2 +- charts/policy-hub/templates/configmap-postgres-init.yaml | 2 +- charts/policy-hub/templates/deployment-hub.yaml | 2 +- charts/policy-hub/templates/ingress.yaml | 2 +- charts/policy-hub/templates/job-policy-hub-migrations.yaml | 2 +- charts/policy-hub/templates/secret-external-db.yaml | 2 +- charts/policy-hub/templates/service-hub.yaml | 2 +- charts/policy-hub/values.yaml | 2 +- consortia/argocd-app-templates/appsetup-beta.yaml | 2 +- consortia/argocd-app-templates/appsetup-dev.yaml | 2 +- consortia/argocd-app-templates/appsetup-int.yaml | 2 +- consortia/argocd-app-templates/appsetup-pen.yaml | 2 +- consortia/argocd-app-templates/appsetup-rc.yaml | 2 +- consortia/argocd-app-templates/appsetup-stable.yaml | 2 +- consortia/argocd-app-templates/appsetup-upgrade.yaml | 2 +- consortia/environments/values-beta.yaml | 2 +- consortia/environments/values-dev.yaml | 2 +- consortia/environments/values-int.yaml | 2 +- consortia/environments/values-pen.yaml | 2 +- consortia/environments/values-rc.yaml | 2 +- consortia/environments/values-upgrade.yaml | 2 +- docker/Dockerfile-policy-hub-migrations | 2 +- docker/Dockerfile-policy-hub-service | 2 +- .../architecture/Architecture Constraints.md | 2 +- .../technical-documentation/architecture/Context and scope.md | 2 +- .../architecture/Development Concept.md | 2 +- docs/technical-documentation/architecture/Requirements.md | 2 +- .../technical-documentation/architecture/Solution strategy.md | 2 +- .../architecture/operational-concept.md | 2 +- docs/technical-documentation/authentication/authentication.md | 2 +- docs/technical-documentation/database/db-view.md | 2 +- docs/technical-documentation/database/seeding.md | 2 +- .../dev-process/Dev-flow_deploy-dev-env.md | 2 +- .../dev-process/Dev-flow_git-diagram.md | 2 +- .../dev-process/Enumeration Handling.md | 2 +- docs/technical-documentation/dev-process/How to contribute.md | 2 +- scripts/add_notice_footer.sh | 2 +- scripts/license.sh | 2 +- src/Directory.Build.props | 2 +- .../DependencyInjection/HubRepositoriesServiceExtensions.cs | 2 +- src/database/PolicyHub.DbAccess/HubRepositories.cs | 2 +- src/database/PolicyHub.DbAccess/IHubRepositories.cs | 2 +- src/database/PolicyHub.DbAccess/Models/PolicyTypeResponse.cs | 2 +- src/database/PolicyHub.DbAccess/PolicyHub.DbAccess.csproj | 2 +- .../PolicyHub.DbAccess/Repositories/IPolicyRepository.cs | 2 +- .../PolicyHub.DbAccess/Repositories/PolicyRepository.cs | 2 +- src/database/PolicyHub.Entities/Entities/AttributeKey.cs | 2 +- src/database/PolicyHub.Entities/Entities/ConstraintOperand.cs | 2 +- src/database/PolicyHub.Entities/Entities/Operator.cs | 2 +- src/database/PolicyHub.Entities/Entities/Policy.cs | 2 +- .../PolicyHub.Entities/Entities/PolicyAssignedTypes.cs | 2 +- .../PolicyHub.Entities/Entities/PolicyAssignedUseCases.cs | 2 +- src/database/PolicyHub.Entities/Entities/PolicyAttribute.cs | 2 +- src/database/PolicyHub.Entities/Entities/PolicyKind.cs | 2 +- .../PolicyHub.Entities/Entities/PolicyKindConfiguration.cs | 2 +- src/database/PolicyHub.Entities/Entities/PolicyType.cs | 2 +- src/database/PolicyHub.Entities/Entities/UseCase.cs | 2 +- src/database/PolicyHub.Entities/Enums/AttributeKeyId.cs | 2 +- src/database/PolicyHub.Entities/Enums/ConstraintOperandId.cs | 2 +- src/database/PolicyHub.Entities/Enums/OperatorId.cs | 2 +- src/database/PolicyHub.Entities/Enums/PolicyKindId.cs | 2 +- src/database/PolicyHub.Entities/Enums/PolicyTypeId.cs | 2 +- src/database/PolicyHub.Entities/Enums/UseCaseId.cs | 2 +- .../PolicyHub.Entities/Extensions/PolicyKindExtensions.cs | 2 +- src/database/PolicyHub.Entities/PolicyHub.Entities.csproj | 2 +- src/database/PolicyHub.Entities/PolicyHubContext.cs | 2 +- .../Migrations/20240122150103_0.1.0-rc.1.Designer.cs | 2 +- .../Migrations/20240122150103_0.1.0-rc.1.cs | 2 +- .../Migrations/PolicyHubContextModelSnapshot.cs | 2 +- src/database/PolicyHub.Migrations/PolicyHub.Migrations.csproj | 2 +- src/database/PolicyHub.Migrations/Program.cs | 2 +- src/database/PolicyHub.Migrations/Seeder/BatchInsertSeeder.cs | 2 +- .../Authentication/KeycloakClaimsTransformation.cs | 2 +- .../BusinessLogic/IPolicyHubBusinessLogic.cs | 2 +- .../PolicyHub.Service/BusinessLogic/PolicyHubBusinessLogic.cs | 2 +- src/hub/PolicyHub.Service/Controllers/PolicyHubController.cs | 2 +- .../PolicyHub.Service/Extensions/JsonGenerationExtensions.cs | 2 +- .../Extensions/RouteHandlerBuilderExtensions.cs | 2 +- src/hub/PolicyHub.Service/Models/Constants.cs | 2 +- src/hub/PolicyHub.Service/Models/PolicyContentRequest.cs | 2 +- src/hub/PolicyHub.Service/Models/PolicyFileContent.cs | 2 +- src/hub/PolicyHub.Service/PolicyHub.Service.csproj | 2 +- src/hub/PolicyHub.Service/Program.cs | 2 +- src/settings-coverage.xml | 4 ++-- .../PolicyHub.DbAccess.Tests/PolicyHub.DbAccess.Tests.csproj | 2 +- .../PolicyHub.DbAccess.Tests/PolicyRepositoryTests.cs | 2 +- .../database/PolicyHub.DbAccess.Tests/Setup/TestDbFixture.cs | 2 +- tests/database/PolicyHub.DbAccess.Tests/Usings.cs | 2 +- .../PolicyHub.Entities.Tests/PolicyHub.Entities.Tests.csproj | 2 +- .../PolicyHub.Entities.Tests/PolicyKindExtensionsTests.cs | 2 +- tests/database/PolicyHub.Entities.Tests/Usings.cs | 2 +- .../Authentication/KeycloakClaimsTransformationTests.cs | 2 +- .../BusinessLogic/PolicyHubBusinessLogicTests.cs | 2 +- .../Controllers/PolicyHubControllerTests.cs | 2 +- .../Extensions/JsonGenerationExtensionsTests.cs | 2 +- .../PolicyHub.Service.Tests/PolicyHub.Service.Tests.csproj | 2 +- .../hub/PolicyHub.Service.Tests/Setup/FakePolicyEvaluator.cs | 3 +-- .../PolicyHub.Service.Tests/Setup/IntegrationTestFactory.cs | 2 +- tests/hub/PolicyHub.Service.Tests/Usings.cs | 2 +- 113 files changed, 114 insertions(+), 115 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index f30bba9..a2b1515 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index e02e801..36caacb 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/policy-hub-chart-test.yml b/.github/workflows/policy-hub-chart-test.yml index d1b97a9..845aa33 100644 --- a/.github/workflows/policy-hub-chart-test.yml +++ b/.github/workflows/policy-hub-chart-test.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/policy-hub-migrations.yml b/.github/workflows/policy-hub-migrations.yml index e7fc618..d7a2d58 100644 --- a/.github/workflows/policy-hub-migrations.yml +++ b/.github/workflows/policy-hub-migrations.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/policy-hub-service.yml b/.github/workflows/policy-hub-service.yml index e2bf484..c9f8add 100644 --- a/.github/workflows/policy-hub-service.yml +++ b/.github/workflows/policy-hub-service.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78ead14..d6f11fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/release_candidate.yml b/.github/workflows/release_candidate.yml index e8ed839..19541fa 100644 --- a/.github/workflows/release_candidate.yml +++ b/.github/workflows/release_candidate.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index fd09881..d3149d5 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/test-automation.yml b/.github/workflows/test-automation.yml index 46d1ac9..7f53550 100644 --- a/.github/workflows/test-automation.yml +++ b/.github/workflows/test-automation.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/trivy-dev.yml b/.github/workflows/trivy-dev.yml index e6be35d..0d67c16 100644 --- a/.github/workflows/trivy-dev.yml +++ b/.github/workflows/trivy-dev.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 0219a5f..9145989 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.github/workflows/unit.tests-formatting.yml b/.github/workflows/unit.tests-formatting.yml index 45247b5..ad33db0 100644 --- a/.github/workflows/unit.tests-formatting.yml +++ b/.github/workflows/unit.tests-formatting.yml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/.tractusx b/.tractusx index cb64071..d1deea0 100644 --- a/.tractusx +++ b/.tractusx @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/charts/chart-testing-config.yaml b/charts/chart-testing-config.yaml index fc9a54d..8349acb 100644 --- a/charts/chart-testing-config.yaml +++ b/charts/chart-testing-config.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/charts/policy-hub/Chart.yaml b/charts/policy-hub/Chart.yaml index 65a92c5..200fac4 100644 --- a/charts/policy-hub/Chart.yaml +++ b/charts/policy-hub/Chart.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/charts/policy-hub/templates/configmap-postgres-init.yaml b/charts/policy-hub/templates/configmap-postgres-init.yaml index c6bdd95..783afe3 100644 --- a/charts/policy-hub/templates/configmap-postgres-init.yaml +++ b/charts/policy-hub/templates/configmap-postgres-init.yaml @@ -1,5 +1,5 @@ {{- /* -* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +* Copyright (c) 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. diff --git a/charts/policy-hub/templates/deployment-hub.yaml b/charts/policy-hub/templates/deployment-hub.yaml index 185daa1..dddacb5 100644 --- a/charts/policy-hub/templates/deployment-hub.yaml +++ b/charts/policy-hub/templates/deployment-hub.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/charts/policy-hub/templates/ingress.yaml b/charts/policy-hub/templates/ingress.yaml index a99dd4c..3f0df2c 100644 --- a/charts/policy-hub/templates/ingress.yaml +++ b/charts/policy-hub/templates/ingress.yaml @@ -1,5 +1,5 @@ {{- /* -* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +* Copyright (c) 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. diff --git a/charts/policy-hub/templates/job-policy-hub-migrations.yaml b/charts/policy-hub/templates/job-policy-hub-migrations.yaml index e9765b9..518b570 100644 --- a/charts/policy-hub/templates/job-policy-hub-migrations.yaml +++ b/charts/policy-hub/templates/job-policy-hub-migrations.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/charts/policy-hub/templates/secret-external-db.yaml b/charts/policy-hub/templates/secret-external-db.yaml index 0361eb0..550d37a 100644 --- a/charts/policy-hub/templates/secret-external-db.yaml +++ b/charts/policy-hub/templates/secret-external-db.yaml @@ -1,5 +1,5 @@ {{- /* -* Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +* Copyright (c) 2023 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. diff --git a/charts/policy-hub/templates/service-hub.yaml b/charts/policy-hub/templates/service-hub.yaml index 38371df..70393c6 100644 --- a/charts/policy-hub/templates/service-hub.yaml +++ b/charts/policy-hub/templates/service-hub.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/charts/policy-hub/values.yaml b/charts/policy-hub/values.yaml index 257878c..614cbb7 100644 --- a/charts/policy-hub/values.yaml +++ b/charts/policy-hub/values.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/argocd-app-templates/appsetup-beta.yaml b/consortia/argocd-app-templates/appsetup-beta.yaml index dcdc965..3f56806 100644 --- a/consortia/argocd-app-templates/appsetup-beta.yaml +++ b/consortia/argocd-app-templates/appsetup-beta.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/argocd-app-templates/appsetup-dev.yaml b/consortia/argocd-app-templates/appsetup-dev.yaml index 841b621..208043e 100644 --- a/consortia/argocd-app-templates/appsetup-dev.yaml +++ b/consortia/argocd-app-templates/appsetup-dev.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/argocd-app-templates/appsetup-int.yaml b/consortia/argocd-app-templates/appsetup-int.yaml index b6f23bf..ce67ac2 100644 --- a/consortia/argocd-app-templates/appsetup-int.yaml +++ b/consortia/argocd-app-templates/appsetup-int.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/argocd-app-templates/appsetup-pen.yaml b/consortia/argocd-app-templates/appsetup-pen.yaml index 71b4d27..6dde8f3 100644 --- a/consortia/argocd-app-templates/appsetup-pen.yaml +++ b/consortia/argocd-app-templates/appsetup-pen.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/argocd-app-templates/appsetup-rc.yaml b/consortia/argocd-app-templates/appsetup-rc.yaml index 3297d1a..e316d00 100644 --- a/consortia/argocd-app-templates/appsetup-rc.yaml +++ b/consortia/argocd-app-templates/appsetup-rc.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/argocd-app-templates/appsetup-stable.yaml b/consortia/argocd-app-templates/appsetup-stable.yaml index 1ac0f6a..5dae41c 100644 --- a/consortia/argocd-app-templates/appsetup-stable.yaml +++ b/consortia/argocd-app-templates/appsetup-stable.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/argocd-app-templates/appsetup-upgrade.yaml b/consortia/argocd-app-templates/appsetup-upgrade.yaml index d207e26..2bd595a 100644 --- a/consortia/argocd-app-templates/appsetup-upgrade.yaml +++ b/consortia/argocd-app-templates/appsetup-upgrade.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/environments/values-beta.yaml b/consortia/environments/values-beta.yaml index 0b1a885..01ddbef 100644 --- a/consortia/environments/values-beta.yaml +++ b/consortia/environments/values-beta.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/environments/values-dev.yaml b/consortia/environments/values-dev.yaml index 4211542..9ac129b 100644 --- a/consortia/environments/values-dev.yaml +++ b/consortia/environments/values-dev.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/environments/values-int.yaml b/consortia/environments/values-int.yaml index 3187077..2c8ce65 100644 --- a/consortia/environments/values-int.yaml +++ b/consortia/environments/values-int.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/environments/values-pen.yaml b/consortia/environments/values-pen.yaml index 884f407..b80707e 100644 --- a/consortia/environments/values-pen.yaml +++ b/consortia/environments/values-pen.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/environments/values-rc.yaml b/consortia/environments/values-rc.yaml index f1add82..5f909cf 100644 --- a/consortia/environments/values-rc.yaml +++ b/consortia/environments/values-rc.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/consortia/environments/values-upgrade.yaml b/consortia/environments/values-upgrade.yaml index aa58620..f613d45 100644 --- a/consortia/environments/values-upgrade.yaml +++ b/consortia/environments/values-upgrade.yaml @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/docker/Dockerfile-policy-hub-migrations b/docker/Dockerfile-policy-hub-migrations index 17514e3..edcb02e 100644 --- a/docker/Dockerfile-policy-hub-migrations +++ b/docker/Dockerfile-policy-hub-migrations @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/docker/Dockerfile-policy-hub-service b/docker/Dockerfile-policy-hub-service index 3e31033..1652752 100644 --- a/docker/Dockerfile-policy-hub-service +++ b/docker/Dockerfile-policy-hub-service @@ -1,5 +1,5 @@ ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/docs/technical-documentation/architecture/Architecture Constraints.md b/docs/technical-documentation/architecture/Architecture Constraints.md index 27d4b36..ef15105 100644 --- a/docs/technical-documentation/architecture/Architecture Constraints.md +++ b/docs/technical-documentation/architecture/Architecture Constraints.md @@ -34,5 +34,5 @@ As part of the standard reviews, following code analysis and security checks hav This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/architecture/Context and scope.md b/docs/technical-documentation/architecture/Context and scope.md index ef11afd..414c379 100644 --- a/docs/technical-documentation/architecture/Context and scope.md +++ b/docs/technical-documentation/architecture/Context and scope.md @@ -14,5 +14,5 @@ The policy hub comprise the technical foundation for interaction, monitoring, au This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/architecture/Development Concept.md b/docs/technical-documentation/architecture/Development Concept.md index d15bfb4..e99e60f 100644 --- a/docs/technical-documentation/architecture/Development Concept.md +++ b/docs/technical-documentation/architecture/Development Concept.md @@ -139,5 +139,5 @@ Policy Hub configuration is mainly possible via the appsettings files as well as This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/architecture/Requirements.md b/docs/technical-documentation/architecture/Requirements.md index 8942ed9..95a7fc5 100644 --- a/docs/technical-documentation/architecture/Requirements.md +++ b/docs/technical-documentation/architecture/Requirements.md @@ -18,5 +18,5 @@ For Catena-X Member Companies This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/architecture/Solution strategy.md b/docs/technical-documentation/architecture/Solution strategy.md index 6893ebd..267c920 100644 --- a/docs/technical-documentation/architecture/Solution strategy.md +++ b/docs/technical-documentation/architecture/Solution strategy.md @@ -10,5 +10,5 @@ This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/architecture/operational-concept.md b/docs/technical-documentation/architecture/operational-concept.md index 485faae..0a8726b 100644 --- a/docs/technical-documentation/architecture/operational-concept.md +++ b/docs/technical-documentation/architecture/operational-concept.md @@ -43,5 +43,5 @@ Currently all backend services write log entries as structural data in json form This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/authentication/authentication.md b/docs/technical-documentation/authentication/authentication.md index a083181..07c8542 100644 --- a/docs/technical-documentation/authentication/authentication.md +++ b/docs/technical-documentation/authentication/authentication.md @@ -9,5 +9,5 @@ Currently, the Policy Hub performs a basic validation by checking for a valid to This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/database/db-view.md b/docs/technical-documentation/database/db-view.md index b96c247..2289042 100644 --- a/docs/technical-documentation/database/db-view.md +++ b/docs/technical-documentation/database/db-view.md @@ -101,5 +101,5 @@ The `policies` table serves as the repository for comprehensive information abou This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/database/seeding.md b/docs/technical-documentation/database/seeding.md index ab92302..85eed33 100644 --- a/docs/technical-documentation/database/seeding.md +++ b/docs/technical-documentation/database/seeding.md @@ -40,5 +40,5 @@ The seeder includes a check to ensure that only data not yet existing in the dat This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md b/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md index 4db0726..bd2fcda 100644 --- a/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md +++ b/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md @@ -27,5 +27,5 @@ Note\*\* Trivy and KICS scans are scheduled to daily This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md b/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md index 92be5c1..dd80de8 100644 --- a/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md +++ b/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md @@ -129,5 +129,5 @@ gitGraph This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/dev-process/Enumeration Handling.md b/docs/technical-documentation/dev-process/Enumeration Handling.md index 53eb4eb..a3de3e7 100644 --- a/docs/technical-documentation/dev-process/Enumeration Handling.md +++ b/docs/technical-documentation/dev-process/Enumeration Handling.md @@ -35,5 +35,5 @@ It is not recommended to delete enums; instead .......... to be updated; we need This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/docs/technical-documentation/dev-process/How to contribute.md b/docs/technical-documentation/dev-process/How to contribute.md index ed4f051..9da0a85 100644 --- a/docs/technical-documentation/dev-process/How to contribute.md +++ b/docs/technical-documentation/dev-process/How to contribute.md @@ -107,5 +107,5 @@ What was changed, why was it changed (e.g. which issue was fixed or which requir This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub diff --git a/scripts/add_notice_footer.sh b/scripts/add_notice_footer.sh index 083c2f4..a440aeb 100644 --- a/scripts/add_notice_footer.sh +++ b/scripts/add_notice_footer.sh @@ -1,7 +1,7 @@ #!/bin/bash ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/scripts/license.sh b/scripts/license.sh index 31d5e88..81a0d82 100644 --- a/scripts/license.sh +++ b/scripts/license.sh @@ -1,7 +1,7 @@ #!/bin/bash ############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation +# Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9c39635..d83dc44 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,5 +1,5 @@