Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat | fix : New pcf submodel v 7.0.0 support changes and security file update #201

Merged
merged 4 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Added
- New changes for PCF v7.0.0 support.
- Security config changes.
- Updated changelog and dependency file.

## [2.4.1] - 2024-05-24

### Added
Expand Down
74 changes: 37 additions & 37 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
maven/mavencentral/ch.qos.logback/logback-classic/1.5.6, EPL-1.0 AND LGPL-2.1-only, approved, #13282
maven/mavencentral/ch.qos.logback/logback-core/1.5.6, EPL-1.0 AND LGPL-2.1-only, approved, #13283
maven/mavencentral/ch.qos.logback/logback-classic/1.5.6, EPL-1.0 AND LGPL-2.1-only, approved, #15279
maven/mavencentral/ch.qos.logback/logback-core/1.5.6, EPL-1.0 AND LGPL-2.1-only, approved, #15210
maven/mavencentral/com.ethlo.time/itu/1.8.0, Apache-2.0, approved, #12927
maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.4, Apache-2.0, approved, #7947
maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.4, MIT AND Apache-2.0, approved, #7932
maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.4, Apache-2.0, approved, #7934
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.15.4, Apache-2.0, approved, #9160
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.4, Apache-2.0, approved, #8802
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.15.4, Apache-2.0, approved, #8808
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.4, Apache-2.0, approved, #7930
maven/mavencentral/com.fasterxml.jackson.module/jackson-module-parameter-names/2.15.4, Apache-2.0, approved, #8803
maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.4, Apache-2.0, approved, #15260
maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.4, , approved, #15194
maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.4, Apache-2.0, approved, #15199
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.15.4, Apache-2.0, approved, #15242
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.4, Apache-2.0, approved, #15207
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.15.4, Apache-2.0, approved, #15281
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.4, Apache-2.0, approved, #15189
maven/mavencentral/com.fasterxml.jackson.module/jackson-module-parameter-names/2.15.4, Apache-2.0, approved, #15219
maven/mavencentral/com.fasterxml/classmate/1.6.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.github.ben-manes.caffeine/caffeine/3.1.8, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.github.docker-java/docker-java-api/3.3.6, Apache-2.0, approved, #10346
maven/mavencentral/com.github.docker-java/docker-java-transport-zerodep/3.3.6, Apache-2.0 AND (Apache-2.0 AND BSD-3-Clause), approved, #7946
maven/mavencentral/com.github.docker-java/docker-java-transport-zerodep/3.3.6, Apache-2.0 AND (Apache-2.0 AND BSD-3-Clause), approved, #15251
maven/mavencentral/com.github.docker-java/docker-java-transport/3.3.6, Apache-2.0, approved, #7942
maven/mavencentral/com.github.stephenc.jcip/jcip-annotations/1.0-1, Apache-2.0, approved, CQ21949
maven/mavencentral/com.google.code.gson/gson/2.10.1, Apache-2.0, approved, #6159
Expand All @@ -23,12 +23,12 @@ maven/mavencentral/com.jayway.jsonpath/json-path/2.9.0, Apache-2.0, approved, cl
maven/mavencentral/com.networknt/json-schema-validator/1.4.0, Apache-2.0 AND Unicode-TOU, approved, #13812
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.24.4, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.opencsv/opencsv/5.9, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #2590
maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #15290
maven/mavencentral/com.vaadin.external.google/android-json/0.0.20131108.vaadin1, Apache-2.0, approved, CQ21310
maven/mavencentral/com.zaxxer/HikariCP/5.0.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/commons-beanutils/commons-beanutils/1.9.4, Apache-2.0, approved, CQ12654
maven/mavencentral/commons-codec/commons-codec/1.16.1, Apache-2.0 AND (Apache-2.0 AND BSD-3-Clause), approved, #9157
maven/mavencentral/commons-collections/commons-collections/3.2.2, Apache-2.0, approved, CQ10385
maven/mavencentral/commons-collections/commons-collections/3.2.2, Apache-2.0, approved, #15185
maven/mavencentral/commons-io/commons-io/2.16.1, Apache-2.0, approved, #14190
maven/mavencentral/commons-logging/commons-logging/1.2, Apache-2.0, approved, CQ10162
maven/mavencentral/io.github.openfeign.form/feign-form-spring/3.8.0, Apache-2.0, approved, clearlydefined
Expand All @@ -51,7 +51,7 @@ maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.2, BSD-3-Clause, ap
maven/mavencentral/junit/junit/4.13.2, EPL-2.0, approved, CQ23636
maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.13, Apache-2.0, approved, #7164
maven/mavencentral/net.bytebuddy/byte-buddy/1.14.13, Apache-2.0 AND BSD-3-Clause, approved, #7163
maven/mavencentral/net.java.dev.jna/jna/5.13.0, Apache-2.0 AND LGPL-2.1-or-later, approved, #6709
maven/mavencentral/net.java.dev.jna/jna/5.13.0, Apache-2.0 AND LGPL-2.1-or-later, approved, #15196
maven/mavencentral/net.minidev/accessors-smart/2.5.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/net.minidev/json-smart/2.5.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.antlr/antlr4-runtime/4.13.0, BSD-3-Clause, approved, #10767
Expand All @@ -61,12 +61,12 @@ maven/mavencentral/org.apache.commons/commons-csv/1.11.0, Apache-2.0, approved,
maven/mavencentral/org.apache.commons/commons-lang3/3.13.0, Apache-2.0, approved, #9820
maven/mavencentral/org.apache.commons/commons-text/1.12.0, Apache-2.0, approved, #14414
maven/mavencentral/org.apache.logging.log4j/log4j-api/2.21.1, Apache-2.0 AND (Apache-2.0 AND LGPL-2.0-or-later), approved, #11079
maven/mavencentral/org.apache.logging.log4j/log4j-to-slf4j/2.21.1, Apache-2.0, approved, #11919
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-core/10.1.20, Apache-2.0 AND (EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND (CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND W3C AND CC0-1.0, approved, #5949
maven/mavencentral/org.apache.logging.log4j/log4j-to-slf4j/2.21.1, Apache-2.0, approved, #15262
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-core/10.1.20, Apache-2.0 AND (EPL-2.0 OR (GPL-2.0 WITH Classpath-exception-2.0)) AND CDDL-1.0 AND (CDDL-1.1 OR (GPL-2.0-only WITH Classpath-exception-2.0)) AND EPL-2.0, approved, #15195
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-el/10.1.20, Apache-2.0, approved, #6997
maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.20, Apache-2.0, approved, #7920
maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.aspectj/aspectjweaver/1.9.22, Apache-2.0 AND BSD-3-Clause AND EPL-1.0 AND BSD-3-Clause AND Apache-1.1, approved, #7695
maven/mavencentral/org.aspectj/aspectjweaver/1.9.22, Apache-2.0 AND BSD-3-Clause AND EPL-1.0 AND BSD-3-Clause AND Apache-1.1, approved, #15252
maven/mavencentral/org.assertj/assertj-core/3.24.2, Apache-2.0, approved, #6161
maven/mavencentral/org.awaitility/awaitility/4.2.1, Apache-2.0, approved, #14178
maven/mavencentral/org.bouncycastle/bcprov-jdk18on/1.78.1, MIT AND CC0-1.0, approved, #14433
Expand All @@ -89,7 +89,7 @@ maven/mavencentral/org.eclipse.tractusx/serial-part/0.0.1, Apache-2.0, approved,
maven/mavencentral/org.eclipse.tractusx/single-level-bom-as-built/0.0.1, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx/single-level-bom-as-planned/0.0.1, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx/single-level-usage-as-built/0.0.1, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.flywaydb/flyway-core/9.22.3, Apache-2.0, approved, #10349
maven/mavencentral/org.flywaydb/flyway-core/9.22.3, Apache-2.0, approved, #15215
maven/mavencentral/org.glassfish.jaxb/jaxb-core/4.0.5, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/org.glassfish.jaxb/jaxb-runtime/4.0.5, BSD-3-Clause, approved, ee4j.jaxb-impl
maven/mavencentral/org.glassfish.jaxb/txw2/4.0.5, BSD-3-Clause, approved, ee4j.jaxb-impl
Expand All @@ -102,8 +102,8 @@ maven/mavencentral/org.jboss.logging/jboss-logging/3.5.3.Final, Apache-2.0, appr
maven/mavencentral/org.jetbrains/annotations/17.0.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.10.2, EPL-2.0, approved, #9714
maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.10.2, EPL-2.0, approved, #9711
maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.10.2, EPL-2.0, approved, #9708
maven/mavencentral/org.junit.jupiter/junit-jupiter/5.10.2, EPL-2.0, approved, #13393
maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.10.2, EPL-2.0, approved, #15250
maven/mavencentral/org.junit.jupiter/junit-jupiter/5.10.2, EPL-2.0, approved, #15197
maven/mavencentral/org.junit.platform/junit-platform-commons/1.10.2, EPL-2.0, approved, #9715
maven/mavencentral/org.junit.platform/junit-platform-engine/1.10.2, EPL-2.0, approved, #9709
maven/mavencentral/org.mapstruct/mapstruct/1.5.5.Final, Apache-2.0, approved, #6277
Expand All @@ -113,7 +113,7 @@ maven/mavencentral/org.objenesis/objenesis/3.3, Apache-2.0, approved, clearlydef
maven/mavencentral/org.opentest4j/opentest4j/1.3.0, Apache-2.0, approved, #9713
maven/mavencentral/org.ow2.asm/asm/9.6, BSD-3-Clause, approved, #10776
maven/mavencentral/org.postgresql/postgresql/42.7.3, BSD-2-Clause AND Apache-2.0, approved, #11681
maven/mavencentral/org.projectlombok/lombok/1.18.32, MIT AND LicenseRef-Public-Domain, approved, CQ23907
maven/mavencentral/org.projectlombok/lombok/1.18.32, MIT, approved, #15192
maven/mavencentral/org.rnorth.duct-tape/duct-tape/1.0.8, MIT, approved, clearlydefined
maven/mavencentral/org.skyscreamer/jsonassert/1.5.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.slf4j/jul-to-slf4j/2.0.13, MIT, approved, #7698
Expand Down Expand Up @@ -144,8 +144,8 @@ maven/mavencentral/org.springframework.cloud/spring-cloud-context/4.1.2, Apache-
maven/mavencentral/org.springframework.cloud/spring-cloud-openfeign-core/4.1.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.springframework.cloud/spring-cloud-starter-openfeign/4.1.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.springframework.cloud/spring-cloud-starter/4.1.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.springframework.data/spring-data-commons/3.2.5, Apache-2.0, approved, #11917
maven/mavencentral/org.springframework.data/spring-data-jpa/3.2.5, Apache-2.0, approved, #11882
maven/mavencentral/org.springframework.data/spring-data-commons/3.2.5, Apache-2.0, approved, #15202
maven/mavencentral/org.springframework.data/spring-data-jpa/3.2.5, Apache-2.0, approved, #15183
maven/mavencentral/org.springframework.security/spring-security-config/6.1.2, Apache-2.0, approved, #9736
maven/mavencentral/org.springframework.security/spring-security-core/6.2.4, Apache-2.0, approved, #11904
maven/mavencentral/org.springframework.security/spring-security-crypto/6.2.4, Apache-2.0 AND ISC, approved, #11908
Expand All @@ -155,25 +155,25 @@ maven/mavencentral/org.springframework.security/spring-security-oauth2-resource-
maven/mavencentral/org.springframework.security/spring-security-rsa/1.1.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.springframework.security/spring-security-test/6.2.4, Apache-2.0, approved, #12922
maven/mavencentral/org.springframework.security/spring-security-web/6.2.4, Apache-2.0, approved, #11911
maven/mavencentral/org.springframework/spring-aop/6.1.6, Apache-2.0, approved, #11755
maven/mavencentral/org.springframework/spring-aspects/6.1.6, Apache-2.0, approved, #11905
maven/mavencentral/org.springframework/spring-beans/6.1.6, Apache-2.0, approved, #11754
maven/mavencentral/org.springframework/spring-aop/6.1.6, Apache-2.0, approved, #15221
maven/mavencentral/org.springframework/spring-aspects/6.1.6, Apache-2.0, approved, #15193
maven/mavencentral/org.springframework/spring-beans/6.1.6, Apache-2.0, approved, #15213
maven/mavencentral/org.springframework/spring-context-support/6.1.6, Apache-2.0, approved, #13496
maven/mavencentral/org.springframework/spring-context/6.1.6, Apache-2.0, approved, #11753
maven/mavencentral/org.springframework/spring-core/6.1.6, Apache-2.0 AND BSD-3-Clause, approved, #11750
maven/mavencentral/org.springframework/spring-expression/6.1.6, Apache-2.0, approved, #11747
maven/mavencentral/org.springframework/spring-jcl/6.1.6, Apache-2.0, approved, #11749
maven/mavencentral/org.springframework/spring-jdbc/6.1.6, Apache-2.0, approved, #11897
maven/mavencentral/org.springframework/spring-orm/6.1.6, Apache-2.0, approved, #11924
maven/mavencentral/org.springframework/spring-test/6.1.6, Apache-2.0, approved, #12919
maven/mavencentral/org.springframework/spring-tx/6.1.6, Apache-2.0, approved, #11901
maven/mavencentral/org.springframework/spring-web/6.1.6, Apache-2.0, approved, #11748
maven/mavencentral/org.springframework/spring-webmvc/6.1.6, Apache-2.0, approved, #11879
maven/mavencentral/org.springframework/spring-context/6.1.6, Apache-2.0, approved, #15261
maven/mavencentral/org.springframework/spring-core/6.1.6, Apache-2.0 AND BSD-3-Clause, approved, #15206
maven/mavencentral/org.springframework/spring-expression/6.1.6, Apache-2.0, approved, #15264
maven/mavencentral/org.springframework/spring-jcl/6.1.6, Apache-2.0, approved, #15266
maven/mavencentral/org.springframework/spring-jdbc/6.1.6, Apache-2.0, approved, #15191
maven/mavencentral/org.springframework/spring-orm/6.1.6, Apache-2.0, approved, #15278
maven/mavencentral/org.springframework/spring-test/6.1.6, Apache-2.0, approved, #15265
maven/mavencentral/org.springframework/spring-tx/6.1.6, Apache-2.0, approved, #15229
maven/mavencentral/org.springframework/spring-web/6.1.6, Apache-2.0, approved, #15188
maven/mavencentral/org.springframework/spring-webmvc/6.1.6, Apache-2.0, approved, #15182
maven/mavencentral/org.testcontainers/database-commons/1.19.8, Apache-2.0, approved, #10345
maven/mavencentral/org.testcontainers/jdbc/1.19.8, Apache-2.0, approved, #10348
maven/mavencentral/org.testcontainers/junit-jupiter/1.19.1, MIT, approved, #10344
maven/mavencentral/org.testcontainers/postgresql/1.19.1, MIT, approved, #10350
maven/mavencentral/org.testcontainers/testcontainers/1.19.8, Apache-2.0 AND MIT, approved, #10347
maven/mavencentral/org.testcontainers/testcontainers/1.19.8, MIT, approved, #15203
maven/mavencentral/org.webjars/swagger-ui/5.13.0, Apache-2.0, approved, #14547
maven/mavencentral/org.xmlunit/xmlunit-core/2.9.1, Apache-2.0, approved, #6272
maven/mavencentral/org.yaml/snakeyaml/2.2, Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause OR EPL-1.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later), approved, #10232
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public SecurityFilterChain filterChain(HttpSecurity http, Jwt2AuthenticationConv
// @formatter:on
http.headers(headers -> headers
.xssProtection(xssProtection -> xssProtection.headerValue(HeaderValue.ENABLED_MODE_BLOCK))
.contentSecurityPolicy(policy -> policy.policyDirectives("default-src 'self'; script-src 'self'"))
.contentSecurityPolicy(policy -> policy.policyDirectives("default-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; img-src * 'self' data: https:;"))
.httpStrictTransportSecurity(httStrict -> httStrict.includeSubDomains(true).maxAgeInSeconds(15724800)));

return http.build();
Expand Down
6 changes: 6 additions & 0 deletions modules/sde-submodules/pcf/pcf.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ This module use for PCF submodel specification and descriptors. It's contain the
#### PCF Aspect Model URN: urn:samm:io.catenax.pcf:6.0.0#Pcf
#### Semantic Id: urn:samm:io.catenax.pcf:6.0.0
---
---
#### Version: 7.0.0
#### PCF Aspect Model URN: urn:samm:io.catenax.pcf:7.0.0#Pcf
#### Semantic Id: urn:samm:io.catenax.pcf:7.0.0
---

### Schema

Please find below links for schema details:

- [schema](src/main/resources/pcf-v6.0.0.json)
- [schema](src/main/resources/pcf-v7.0.0.json)


### PCF CSV file headers
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/********************************************************************************
* Copyright (c) 2024 T-Systems International GmbH
* Copyright (c) 2024 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

package org.eclipse.tractusx.sde.submodels.pcf;

import org.eclipse.tractusx.sde.common.entities.PolicyModel;
import org.eclipse.tractusx.sde.common.submodel.executor.EDCUsecaseStep;
import org.eclipse.tractusx.sde.common.submodel.executor.Step;
import org.springframework.stereotype.Service;

import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.gson.JsonObject;

import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service("pcfEDCUsecaseHandler")
@RequiredArgsConstructor
public class PCFEDCUsecaseHandler extends Step implements EDCUsecaseStep {

@SneakyThrows
public ObjectNode run(Integer rowNumber, ObjectNode objectNode, String processId, PolicyModel policy) {

Check notice

Code scanning / CodeQL

Missing Override annotation Note

This method overrides
EDCUsecaseStep.run
; it is advisable to add an Override annotation.
log.warn("No need to create EDC asset for PCF exchange");
return objectNode;
}

public void delete(Integer rowIndex, JsonObject jsonObject, String delProcessId, String refProcessId) {

Check notice

Code scanning / CodeQL

Missing Override annotation Note

This method overrides
EDCUsecaseStep.delete
; it is advisable to add an Override annotation.
log.warn("No need to delete EDC asset for PCF exchange");
}
}
Loading
Loading