diff --git a/libraries/edc-extension/CHANGELOG.md b/libraries/edc-extension/CHANGELOG.md index ffc5734c..9ab685cc 100644 --- a/libraries/edc-extension/CHANGELOG.md +++ b/libraries/edc-extension/CHANGELOG.md @@ -4,6 +4,12 @@ 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/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.1.1 +### Added + +## fixed +- Fix config-parameter definition to not mix uppercase and lowercase like (baseUrl -> base.url) + ## 0.1.0 ### Added - Update edc-extension to edc version 0.7.0 diff --git a/libraries/edc-extension/README.md b/libraries/edc-extension/README.md index e43f7687..3f868c6b 100644 --- a/libraries/edc-extension/README.md +++ b/libraries/edc-extension/README.md @@ -41,8 +41,10 @@ The following table outlines the configuration settings for the `DTR Data Plane ## Compatibility | dtr-edc Extension library version | Digital Twin Registry image version | EDC version | -|-------------------------------|-------------------------------------|-------------| -| `0.1.0` | `> 0.4.2` | `0.7.X` | +|-----------------------------------|-------------------------------------|-------------| +| `0.1.0` | `> 0.4.2` | `0.7.3` | +| `0.1.1` | `> 0.4.2` | `0.7.3` | + ## Using the DTR-EDC Access Control Extension @@ -82,15 +84,15 @@ tractusx-connector: ... env: EDC_GRANULAR_ACCESS_VERIFICATION_ERROR_ENDPOINT_PORT: 9054 - EDC_GRANULAR_ACCESS_VERIFICATION_EDC_DATA_PLANE_BASEURL: http://local-edc-data-plane:9051/public/v2/ + EDC_GRANULAR_ACCESS_VERIFICATION_EDC_DATA_PLANE_BASE_URL: http://local-edc-data-plane:9051 EDC_GRANULAR_ACCESS_VERIFICATION_DTR_NAMES: default EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_DTR_DECISION_CACHE_DURATION_MINUTES: 1 EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_DTR_ACCESS_VERIFICATION_ENDPOINT_URL: http://baseurl-dtr/v2/api/v3/submodel-descriptor/authorized EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_ASPECT_MODEL_URL_PATTERN: http:\/\/baseurl-submodelserver\/pcf\/.* EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_ENDPOINT_URL: http://baseurl-keycloak/iam/access-management/v1/tenants/00000000-0000-0000-0000-000000000000/openid-connect/token - EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_SCOPE: aud:local-edc-dtr - EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_CLIENTID: dtr_client - EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_CLIENTSECRET_PATH: dtrsecret + EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_SCOPE: openid + EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_CLIENT_ID: dtr_client + EDC_GRANULAR_ACCESS_VERIFICATION_DTR_CONFIG_DEFAULT_OAUTH2_TOKEN_CLIENT_SECRET_PATH: dtrsecret ... ``` diff --git a/libraries/edc-extension/src/main/java/org/eclipse/tractusx/semantics/edc/dataplane/http/accesscontrol/DtrDataPlaneAccessControlConfigExtension.java b/libraries/edc-extension/src/main/java/org/eclipse/tractusx/semantics/edc/dataplane/http/accesscontrol/DtrDataPlaneAccessControlConfigExtension.java index 29566990..4d4ac9c0 100644 --- a/libraries/edc-extension/src/main/java/org/eclipse/tractusx/semantics/edc/dataplane/http/accesscontrol/DtrDataPlaneAccessControlConfigExtension.java +++ b/libraries/edc-extension/src/main/java/org/eclipse/tractusx/semantics/edc/dataplane/http/accesscontrol/DtrDataPlaneAccessControlConfigExtension.java @@ -31,7 +31,7 @@ public class DtrDataPlaneAccessControlConfigExtension implements ServiceExtension { @Setting( value = "Contains the base URL of the EDC data plane endpoint where the data plane requests are sent by the end users." ) - public static final String EDC_DATA_PLANE_BASE_URL = "edc.granular.access.verification.edc.data.plane.baseUrl"; + public static final String EDC_DATA_PLANE_BASE_URL = "edc.granular.access.verification.edc.data.plane.base.url"; @Setting( value = "Comma separated list of DTR configuration names used as keys for DTR clients." ) public static final String EDC_DTR_CONFIG_NAMES = "edc.granular.access.verification.dtr.names"; /** diff --git a/libraries/edc-extension/src/main/java/org/eclipse/tractusx/semantics/edc/dataplane/http/accesscontrol/client/DtrAccessVerificationClient.java b/libraries/edc-extension/src/main/java/org/eclipse/tractusx/semantics/edc/dataplane/http/accesscontrol/client/DtrAccessVerificationClient.java index 7400a954..286e9a95 100644 --- a/libraries/edc-extension/src/main/java/org/eclipse/tractusx/semantics/edc/dataplane/http/accesscontrol/client/DtrAccessVerificationClient.java +++ b/libraries/edc-extension/src/main/java/org/eclipse/tractusx/semantics/edc/dataplane/http/accesscontrol/client/DtrAccessVerificationClient.java @@ -110,10 +110,12 @@ public boolean shouldAllowAccess( } private boolean callDtr( final RequestKey requestKey ) { + monitor.debug( "Check submodel-server access. DTR calling with requested URL: " + requestKey.requestedUrl() + " and BPN: " +requestKey.bpn() ); final Request dtrRequest = getDtrRequest( requestKey ); try ( Response response = httpClient.execute( dtrRequest ) ) { return response.isSuccessful(); } catch ( final IOException exception ) { + monitor.debug( "Failed to execute DTR access with requested URL: " + requestKey.requestedUrl() + " and BPN: " +requestKey.bpn() ); monitor.severe( "Failed to execute DTR access verification request.", exception ); throw new AccessControlServiceException( exception ); }