diff --git a/advanced/advanced-01-open-telemetry/docker-compose.yaml b/advanced/advanced-01-open-telemetry/docker-compose.yaml index 91d7d413..7358e4b9 100644 --- a/advanced/advanced-01-open-telemetry/docker-compose.yaml +++ b/advanced/advanced-01-open-telemetry/docker-compose.yaml @@ -28,6 +28,8 @@ services: WEB_HTTP_MANAGEMENT_PATH: /management WEB_HTTP_PROTOCOL_PORT: 29194 WEB_HTTP_PROTOCOL_PATH: /protocol + WEB_HTTP_VERSION_PORT: 29195 + WEB_HTTP_VERSION_PATH: /version EDC_CONTROL_ENDPOINT: http://consumer:29192/control EDC_DSP_CALLBACK_ADDRESS: http://consumer:29194/protocol EDC_PARTICIPANT_ID: consumer @@ -65,6 +67,8 @@ services: WEB_HTTP_MANAGEMENT_PATH: /management WEB_HTTP_PROTOCOL_PORT: 19194 WEB_HTTP_PROTOCOL_PATH: /protocol + WEB_HTTP_VERSION_PORT: 19195 + WEB_HTTP_VERSION_PATH: /version EDC_CONTROL_ENDPOINT: http://provider:19192/control EDC_DSP_CALLBACK_ADDRESS: http://provider:19194/protocol EDC_PARTICIPANT_ID: provider diff --git a/advanced/advanced-01-open-telemetry/open-telemetry-runtime/build.gradle.kts b/advanced/advanced-01-open-telemetry/open-telemetry-runtime/build.gradle.kts index fcc6faa1..73506060 100644 --- a/advanced/advanced-01-open-telemetry/open-telemetry-runtime/build.gradle.kts +++ b/advanced/advanced-01-open-telemetry/open-telemetry-runtime/build.gradle.kts @@ -29,6 +29,8 @@ dependencies { implementation(libs.edc.control.plane.api.client) implementation(libs.edc.control.plane.api) implementation(libs.edc.control.plane.core) + implementation(libs.edc.edr.store.core) + implementation(libs.edc.token.core) implementation(libs.edc.dsp) implementation(libs.edc.http) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1f005eaa..e9246954 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ format.version = "1.1" [versions] awaitility = "4.2.2" -edc = "0.9.1" +edc = "0.10.0" jupiter = "5.11.3" okhttp-mockwebserver = "5.0.0-alpha.14" restAssured = "5.5.0" @@ -16,6 +16,8 @@ awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" edc-api-observability = { module = "org.eclipse.edc:api-observability", version.ref = "edc" } edc-auth-tokenbased = { module = "org.eclipse.edc:auth-tokenbased", version.ref = "edc" } edc-boot = { module = "org.eclipse.edc:boot", version.ref = "edc" } +edc-bom-controlplane-base = { module = "org.eclipse.edc:controlplane-base-bom", version.ref = "edc" } +edc-bom-dataplane-base = { module = "org.eclipse.edc:dataplane-base-bom", version.ref = "edc" } edc-build-plugin = { module = "org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin", version.ref = "edc" } edc-configuration-filesystem = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" } edc-connector-core = { module = "org.eclipse.edc:connector-core", version.ref = "edc" } @@ -49,6 +51,7 @@ edc-junit = { module = "org.eclipse.edc:junit", version.ref = "edc" } edc-management-api = { module = "org.eclipse.edc:management-api", version.ref = "edc" } edc-management-api-test-fixtures = { module = "org.eclipse.edc:management-api-test-fixtures", version.ref = "edc" } edc-monitor-jdk-logger = { module = "org.eclipse.edc:monitor-jdk-logger", version.ref = "edc" } +edc-token-core = { module = "org.eclipse.edc:token-core", version.ref = "edc" } edc-transfer-data-plane-signaling = { module = "org.eclipse.edc:transfer-data-plane-signaling", version.ref = "edc" } edc-transfer-pull-http-receiver = { module = "org.eclipse.edc:transfer-pull-http-dynamic-receiver", version.ref = "edc" } edc-transfer-pull-http-dynamic-receiver = { module = "org.eclipse.edc:transfer-pull-http-dynamic-receiver", version.ref = "edc" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f..d64cd491 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 17655d0e..df97d72b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c7873..1aa94a42 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +214,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32..7101f8e4 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,89 +1,92 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/policy/policy-01-policy-enforcement/README.md b/policy/policy-01-policy-enforcement/README.md index cdde3832..bad9f7b3 100644 --- a/policy/policy-01-policy-enforcement/README.md +++ b/policy/policy-01-policy-enforcement/README.md @@ -37,25 +37,25 @@ When creating a rule binding, we can bind an action type or constraint to either Here, we bind the action type `use` to all scopes, so that rules with this action type are always evaluated. For the location constraint we choose the negotiation scope, meaning it will only be evaluated during the contract negotiation. Information on available scopes can be found -[here](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/policy-engine.md). +[here](https://eclipse-edc.github.io/documentation/for-adopters/control-plane/policy-engine/). ### Implementing the function for evaluation With the rule bindings in place, the provider will now try to evaluate our policy including the constraint during a contract negotiation, but it does not yet know *how* to evaluate this constraint. For this, we need to implement a -function, for which the EDC offer two interfaces: `AtomicConstraintFunction` and `RuleFunction`. The former is meant -for evaluating a single constraint of a rule, while is latter is meant for evaluating a complete rule node (including -constraints as well as duties that may be associated with a permission). For our example, we choose to implement an -`AtomicConstraintFunction`, as we want to evaluate our location constraint: +function, for which the EDC offer two interfaces: `AtomicConstraintRuleFunction` and `PolicyRuleFunction`. The former is +meant for evaluating a single constraint of a rule, while is latter is meant for evaluating a complete rule node +(including constraints as well as duties that may be associated with a permission). For our example, we choose to +implement an `AtomicConstraintRuleFunction`, as we want to evaluate our location constraint: ```java -public class LocationConstraintFunction implements AtomicConstraintFunction { +public class LocationConstraintFunction implements AtomicConstraintRuleFunction { //... @Override - public boolean evaluate(Operator operator, Object rightValue, Permission rule, PolicyContext context) { - var region = context.getContextData(ParticipantAgent.class).getClaims().get("region"); + public boolean evaluate(Operator operator, Object rightValue, Permission rule, ContractNegotiationPolicyContext context) { + var region = context.participantAgent().getClaims().get("region"); monitor.info(format("Evaluating constraint: location %s %s", operator, rightValue.toString())); @@ -70,12 +70,13 @@ public class LocationConstraintFunction implements AtomicConstraintFunction { +public class LocationConstraintFunction implements AtomicConstraintRuleFunction { private final Monitor monitor; @@ -35,8 +34,8 @@ public LocationConstraintFunction(Monitor monitor) { } @Override - public boolean evaluate(Operator operator, Object rightValue, Permission rule, PolicyContext context) { - var region = context.getContextData(ParticipantAgent.class).getClaims().get("region"); + public boolean evaluate(Operator operator, Object rightValue, Permission rule, ContractNegotiationPolicyContext context) { + var region = context.participantAgent().getClaims().get("region"); monitor.info(format("Evaluating constraint: location %s %s", operator, rightValue.toString())); @@ -47,4 +46,4 @@ public boolean evaluate(Operator operator, Object rightValue, Permission rule, P default -> false; }; } -} \ No newline at end of file +} diff --git a/policy/policy-01-policy-enforcement/policy-functions/src/main/java/org/eclipse/edc/sample/extension/policy/PolicyFunctionsExtension.java b/policy/policy-01-policy-enforcement/policy-functions/src/main/java/org/eclipse/edc/sample/extension/policy/PolicyFunctionsExtension.java index 0d1018d7..85f80c09 100644 --- a/policy/policy-01-policy-enforcement/policy-functions/src/main/java/org/eclipse/edc/sample/extension/policy/PolicyFunctionsExtension.java +++ b/policy/policy-01-policy-enforcement/policy-functions/src/main/java/org/eclipse/edc/sample/extension/policy/PolicyFunctionsExtension.java @@ -14,6 +14,7 @@ package org.eclipse.edc.sample.extension.policy; +import org.eclipse.edc.connector.controlplane.contract.spi.policy.ContractNegotiationPolicyContext; import org.eclipse.edc.policy.engine.spi.PolicyEngine; import org.eclipse.edc.policy.engine.spi.RuleBindingRegistry; import org.eclipse.edc.policy.model.Permission; @@ -21,7 +22,7 @@ import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; -import static org.eclipse.edc.connector.controlplane.contract.spi.validation.ContractValidationService.NEGOTIATION_SCOPE; +import static org.eclipse.edc.connector.controlplane.contract.spi.policy.ContractNegotiationPolicyContext.NEGOTIATION_SCOPE; import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.ODRL_USE_ACTION_ATTRIBUTE; import static org.eclipse.edc.policy.engine.spi.PolicyEngine.ALL_SCOPES; import static org.eclipse.edc.spi.constants.CoreConstants.EDC_NAMESPACE; @@ -45,6 +46,6 @@ public void initialize(ServiceExtensionContext context) { ruleBindingRegistry.bind(ODRL_USE_ACTION_ATTRIBUTE, ALL_SCOPES); ruleBindingRegistry.bind(LOCATION_CONSTRAINT_KEY, NEGOTIATION_SCOPE); - policyEngine.registerFunction(ALL_SCOPES, Permission.class, LOCATION_CONSTRAINT_KEY, new LocationConstraintFunction(monitor)); + policyEngine.registerFunction(ContractNegotiationPolicyContext.class, Permission.class, LOCATION_CONSTRAINT_KEY, new LocationConstraintFunction(monitor)); } } diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/transfer/Transfer05fileTransferCloudTest.java b/system-tests/src/test/java/org/eclipse/edc/samples/transfer/Transfer05fileTransferCloudTest.java index bf90d45e..3023f68f 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/transfer/Transfer05fileTransferCloudTest.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/transfer/Transfer05fileTransferCloudTest.java @@ -38,6 +38,7 @@ import java.nio.charset.StandardCharsets; import java.util.Map; +import static java.util.Map.entry; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Fail.fail; import static org.eclipse.edc.samples.common.FileTransferCloudCommon.runNegotiation; @@ -116,28 +117,30 @@ EDC_FS_CONFIG, getFileFromRelativePath(CLOUD_CONSUMER_CONFIG_PROPERTIES_FILE_PAT protected static RuntimeExtension provider = new RuntimePerClassExtension(new EmbeddedRuntime( PROVIDER, Map.ofEntries( - Map.entry("edc.participant.id", "provider"), - Map.entry("edc.dsp.callback.address", "http://localhost:19194/protocol"), - Map.entry("web.http.port", "19191"), - Map.entry("web.http.path", "/api"), - Map.entry("web.http.management.port", "19193"), - Map.entry("web.http.management.path", "/management"), - Map.entry("web.http.protocol.port", "19194"), - Map.entry("web.http.protocol.path", "/protocol"), - Map.entry("edc.api.auth.key", "password"), - Map.entry("edc.transfer.proxy.token.signer.privatekey.alias", "private-key"), - Map.entry("edc.transfer.proxy.token.verifier.publickey.alias", "public-key"), - Map.entry("web.http.public.port", "19291"), - Map.entry("web.http.public.path", "/public"), - Map.entry("web.http.control.port", "19192"), - Map.entry("web.http.control.path", "/control"), - Map.entry("edc.vault.hashicorp.url", "http://127.0.0.1:" + getVaultPort()), - Map.entry("edc.vault.hashicorp.token", ""), - Map.entry("edc.vault.hashicorp.api.secret.path", "/v1/secret"), - Map.entry("edc.vault.hashicorp.health.check.enabled", "false"), - Map.entry("edc.blobstore.endpoint.template", "http://127.0.0.1:" + getAzuritePort() + "/%s"), - Map.entry("edc.aws.access.key", "accessKeyId"), - Map.entry("edc.aws.secret.access.key", "secretAccessKey") + entry("edc.participant.id", "provider"), + entry("edc.dsp.callback.address", "http://localhost:19194/protocol"), + entry("web.http.port", "19191"), + entry("web.http.path", "/api"), + entry("web.http.management.port", "19193"), + entry("web.http.management.path", "/management"), + entry("web.http.protocol.port", "19194"), + entry("web.http.protocol.path", "/protocol"), + entry("web.http.version.port", "19195"), + entry("web.http.version.path", "/version"), + entry("edc.api.auth.key", "password"), + entry("edc.transfer.proxy.token.signer.privatekey.alias", "private-key"), + entry("edc.transfer.proxy.token.verifier.publickey.alias", "public-key"), + entry("web.http.public.port", "19291"), + entry("web.http.public.path", "/public"), + entry("web.http.control.port", "19192"), + entry("web.http.control.path", "/control"), + entry("edc.vault.hashicorp.url", "http://127.0.0.1:" + getVaultPort()), + entry("edc.vault.hashicorp.token", ""), + entry("edc.vault.hashicorp.api.secret.path", "/v1/secret"), + entry("edc.vault.hashicorp.health.check.enabled", "false"), + entry("edc.blobstore.endpoint.template", "http://127.0.0.1:" + getAzuritePort() + "/%s"), + entry("edc.aws.access.key", "accessKeyId"), + entry("edc.aws.secret.access.key", "secretAccessKey") ), PROVIDER_MODULE_PATH )); diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/StreamingParticipant.java b/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/StreamingParticipant.java index 6b8de79a..8325a345 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/StreamingParticipant.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/StreamingParticipant.java @@ -38,8 +38,10 @@ public String createAsset(String requestBody) { .contentType(JSON) .body(requestBody) .when() + .header("x-api-key", "bau") .post("/v3/assets") .then() + .log().ifValidationFails() .statusCode(200) .contentType(JSON) .extract().jsonPath().getString(ID); diff --git a/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/build.gradle.kts b/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/build.gradle.kts index 741ad74f..4d8e0946 100644 --- a/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/build.gradle.kts +++ b/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/build.gradle.kts @@ -29,6 +29,7 @@ dependencies { implementation(libs.edc.configuration.filesystem) implementation(libs.edc.iam.mock) implementation(libs.edc.management.api) + implementation(libs.edc.edr.store.core) implementation(libs.edc.dsp) implementation(libs.edc.http) implementation(libs.edc.data.plane.selector.api) diff --git a/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/consumer.properties b/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/consumer.properties index a778cd4d..a5779078 100644 --- a/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/consumer.properties +++ b/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/consumer.properties @@ -6,6 +6,8 @@ web.http.protocol.port=28182 web.http.protocol.path=/protocol web.http.control.port=28183 web.http.control.path=/control +web.http.version.port=28184 +web.http.version.path=/version edc.dsp.callback.address=http://localhost:28182/protocol edc.participant.id=consumer edc.ids.id=urn:connector:consumer diff --git a/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/provider.properties b/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/provider.properties index a357378a..4d06c1ad 100644 --- a/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/provider.properties +++ b/transfer/streaming/streaming-01-http-to-http/streaming-01-runtime/provider.properties @@ -6,6 +6,8 @@ web.http.protocol.port=18182 web.http.protocol.path=/protocol web.http.control.port=18183 web.http.control.path=/control +web.http.version.port=18184 +web.http.version.path=/version edc.dsp.callback.address=http://localhost:18182/protocol edc.participant.id=provider edc.ids.id=urn:connector:provider diff --git a/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/build.gradle.kts b/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/build.gradle.kts index e2e80757..83ab5362 100644 --- a/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/build.gradle.kts +++ b/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/build.gradle.kts @@ -29,6 +29,7 @@ dependencies { implementation(libs.edc.configuration.filesystem) implementation(libs.edc.iam.mock) implementation(libs.edc.management.api) + implementation(libs.edc.edr.store.core) implementation(libs.edc.dsp) implementation(libs.edc.http) implementation(libs.edc.data.plane.selector.api) diff --git a/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/consumer.properties b/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/consumer.properties index a778cd4d..a5779078 100644 --- a/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/consumer.properties +++ b/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/consumer.properties @@ -6,6 +6,8 @@ web.http.protocol.port=28182 web.http.protocol.path=/protocol web.http.control.port=28183 web.http.control.path=/control +web.http.version.port=28184 +web.http.version.path=/version edc.dsp.callback.address=http://localhost:28182/protocol edc.participant.id=consumer edc.ids.id=urn:connector:consumer diff --git a/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/provider.properties b/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/provider.properties index a357378a..4d06c1ad 100644 --- a/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/provider.properties +++ b/transfer/streaming/streaming-02-kafka-to-http/streaming-02-runtime/provider.properties @@ -6,6 +6,8 @@ web.http.protocol.port=18182 web.http.protocol.path=/protocol web.http.control.port=18183 web.http.control.path=/control +web.http.version.port=18184 +web.http.version.path=/version edc.dsp.callback.address=http://localhost:18182/protocol edc.participant.id=provider edc.ids.id=urn:connector:provider diff --git a/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/build.gradle.kts b/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/build.gradle.kts index dfd2b529..2304b73c 100644 --- a/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/build.gradle.kts +++ b/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/build.gradle.kts @@ -28,6 +28,7 @@ dependencies { implementation(libs.edc.management.api) implementation(libs.edc.dsp) implementation(libs.edc.http) + implementation(libs.edc.edr.store.core) implementation(libs.edc.data.plane.selector.api) implementation(libs.edc.transfer.data.plane.signaling) implementation(libs.edc.transfer.pull.http.dynamic.receiver) diff --git a/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/consumer.properties b/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/consumer.properties index da471ae1..c8013132 100644 --- a/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/consumer.properties +++ b/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/consumer.properties @@ -6,6 +6,8 @@ web.http.protocol.port=28182 web.http.protocol.path=/protocol web.http.control.port=28183 web.http.control.path=/control +web.http.version.port=28184 +web.http.version.path=/version edc.dsp.callback.address=http://localhost:28182/protocol edc.participant.id=consumer edc.receiver.http.dynamic.endpoint=http://localhost:4000/receiver diff --git a/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/provider.properties b/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/provider.properties index a06dcb9f..706fe3a5 100644 --- a/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/provider.properties +++ b/transfer/streaming/streaming-03-kafka-broker/streaming-03-runtime/provider.properties @@ -6,6 +6,8 @@ web.http.protocol.port=18182 web.http.protocol.path=/protocol web.http.control.port=18183 web.http.control.path=/control +web.http.version.port=18184 +web.http.version.path=/version edc.dsp.callback.address=http://localhost:18182/protocol edc.participant.id=provider edc.ids.id=urn:connector:provider diff --git a/transfer/transfer-00-prerequisites/connector/build.gradle.kts b/transfer/transfer-00-prerequisites/connector/build.gradle.kts index b3c2902e..97ebd64b 100644 --- a/transfer/transfer-00-prerequisites/connector/build.gradle.kts +++ b/transfer/transfer-00-prerequisites/connector/build.gradle.kts @@ -23,6 +23,7 @@ dependencies { implementation(libs.edc.control.plane.api.client) implementation(libs.edc.control.plane.api) implementation(libs.edc.control.plane.core) + implementation(libs.edc.token.core) implementation(libs.edc.dsp) implementation(libs.edc.http) implementation(libs.edc.configuration.filesystem) diff --git a/transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties b/transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties index 5b2059ad..37e27eed 100644 --- a/transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties +++ b/transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties @@ -12,3 +12,5 @@ web.http.public.port=29291 web.http.public.path=/public web.http.control.port=29192 web.http.control.path=/control +web.http.version.port=29195 +web.http.version.path=/version diff --git a/transfer/transfer-00-prerequisites/resources/configuration/provider-configuration.properties b/transfer/transfer-00-prerequisites/resources/configuration/provider-configuration.properties index 733d735a..7f0dffd5 100644 --- a/transfer/transfer-00-prerequisites/resources/configuration/provider-configuration.properties +++ b/transfer/transfer-00-prerequisites/resources/configuration/provider-configuration.properties @@ -12,4 +12,6 @@ web.http.public.port=19291 web.http.public.path=/public web.http.control.port=19192 web.http.control.path=/control +web.http.version.port=19195 +web.http.version.path=/version edc.dataplane.api.public.baseurl=http://localhost:19291/public diff --git a/transfer/transfer-04-event-consumer/consumer-with-listener/build.gradle.kts b/transfer/transfer-04-event-consumer/consumer-with-listener/build.gradle.kts index 1b91f66a..4b26d60b 100644 --- a/transfer/transfer-04-event-consumer/consumer-with-listener/build.gradle.kts +++ b/transfer/transfer-04-event-consumer/consumer-with-listener/build.gradle.kts @@ -19,24 +19,33 @@ plugins { } dependencies { - + implementation(libs.edc.control.api.configuration) implementation(libs.edc.control.plane.api.client) implementation(libs.edc.control.plane.api) implementation(libs.edc.control.plane.core) + implementation(libs.edc.token.core) implementation(libs.edc.dsp) + implementation(libs.edc.http) implementation(libs.edc.configuration.filesystem) implementation(libs.edc.iam.mock) implementation(libs.edc.management.api) implementation(libs.edc.transfer.data.plane.signaling) implementation(libs.edc.transfer.pull.http.receiver) + implementation(libs.edc.validator.data.address.http.data) + + implementation(libs.edc.edr.cache.api) + implementation(libs.edc.edr.store.core) + implementation(libs.edc.edr.store.receiver) implementation(libs.edc.data.plane.selector.api) implementation(libs.edc.data.plane.selector.core) + implementation(libs.edc.data.plane.self.registration) implementation(libs.edc.data.plane.signaling.api) implementation(libs.edc.data.plane.public.api) implementation(libs.edc.data.plane.core) implementation(libs.edc.data.plane.http) + implementation(libs.edc.data.plane.iam) implementation(project(":transfer:transfer-04-event-consumer:listener")) } diff --git a/transfer/transfer-05-file-transfer-cloud/cloud-transfer-consumer/build.gradle.kts b/transfer/transfer-05-file-transfer-cloud/cloud-transfer-consumer/build.gradle.kts index eef2cc1a..a5f27724 100644 --- a/transfer/transfer-05-file-transfer-cloud/cloud-transfer-consumer/build.gradle.kts +++ b/transfer/transfer-05-file-transfer-cloud/cloud-transfer-consumer/build.gradle.kts @@ -30,6 +30,7 @@ dependencies { implementation(libs.edc.configuration.filesystem) implementation(libs.edc.iam.mock) implementation(libs.edc.management.api) + implementation(libs.edc.edr.store.core) implementation(libs.edc.transfer.data.plane.signaling) implementation(libs.edc.transfer.pull.http.receiver) implementation(libs.edc.validator.data.address.http.data) diff --git a/transfer/transfer-05-file-transfer-cloud/cloud-transfer-provider/build.gradle.kts b/transfer/transfer-05-file-transfer-cloud/cloud-transfer-provider/build.gradle.kts index 989ff65f..124d26b7 100644 --- a/transfer/transfer-05-file-transfer-cloud/cloud-transfer-provider/build.gradle.kts +++ b/transfer/transfer-05-file-transfer-cloud/cloud-transfer-provider/build.gradle.kts @@ -33,6 +33,7 @@ dependencies { implementation(libs.edc.configuration.filesystem) implementation(libs.edc.iam.mock) implementation(libs.edc.management.api) + implementation(libs.edc.edr.store.core) implementation(libs.edc.transfer.data.plane.signaling) implementation(libs.edc.transfer.pull.http.receiver) implementation(libs.edc.validator.data.address.http.data)