Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 9 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ Helm charts. Remote: `project-construct-x/constructx-edc`; upstream:
3. **Construct-X additions** — keep changes minimal and upstream-aligned. The only Construct-X-specific code is a handful of extensions plus the runtime distributions under `edc-controlplane/edc-controlplane-construct-x/` and `edc-dataplane/edc-dataplane-construct-x/`.

## Construct-X runtimes (review these first for con-x work)
The `con-x-controlplane-postgresql-hashicorp-vault` and `con-x-dataplane-postgresql-hashicorp-vault`
modules do **not** compile sibling source. They are thin `shadowJar` aggregations of **pre-built,
published** upstream artifacts, assembled at runtime via EDC's ServiceLoader autoload (`mergeServiceFiles()`):
There are two variants per plane, differing only in the vault backend:
`con-x-{controlplane,dataplane}-postgresql-hashicorp-vault` (HashiCorp Vault) and
`con-x-{controlplane,dataplane}-postgresql-vault` (Postgres-backed `:edc-extensions:sql-vault`).
**Keep all four build files in sync** — every exclude/dependency change applies to both variants of a plane.
They are thin `shadowJar` aggregations of mostly **pre-built, published** upstream artifacts plus a few
in-repo extensions (`project(":edc-extensions:...")`), assembled at runtime via EDC's ServiceLoader autoload (`mergeServiceFiles()`):
- Dependencies are upstream BOMs/artifacts: `org.eclipse.edc:*` and `org.eclipse.tractusx.edc:*` (e.g. `controlplane-dcp-bom`, `controlplane-feature-sql-bom`, `vault-hashicorp`, `tx-dcp`, `agreements`).
- **Versions are pinned inline** in each module's `build.gradle.kts` (`val edcVersion` / `val txVersion`), deviating from the repo-wide version-catalog rule. To bump, edit those local vals in both runtime build files.
- **Versions come from root `gradle.properties`**, deviating from the repo-wide version-catalog rule: `edcVersion` = `con-x-edcVersion`, `txVersion` = `version` (read via `project.property(...)` in each runtime's `build.gradle.kts`). In-repo extensions are still compiled against the version catalog's `edc` version, so they run on `con-x-edcVersion` binaries — when bumping, also build and test those extensions against the new EDC version. To bump EDC, change `con-x-edcVersion` only, then check the upstream BOMs for changed module composition.
- Entrypoint: `mainClass = org.eclipse.edc.boot.system.runtime.BaseRuntime`.
- Dataplane intentionally `exclude`s `org.eclipse.edc:data-plane-util` in favor of the tractusx `dataplane-util`.
- Dataplanes intentionally `exclude` `org.eclipse.edc:data-plane-util` in favor of the tractusx `dataplane-util`.
- Controlplanes intentionally `exclude` the new `data-plane-signaling*` modules (pulled in by the EDC ≥ 0.18 controlplane BOM) and add legacy `transfer-data-plane-signaling` instead: the con-x dataplane is still the legacy JSON-LD EDC data plane. Without this, transfers terminate with `400 ... missing '@context'` and no EDR is created. Remove once the dataplane implements the new Data Plane Signaling spec.
- To add a feature to a con-x runtime, add the BOM/artifact dependency here — don't wire code — unless authoring a genuinely new extension (then add it as a module and depend on it).
- Build a single runtime image, e.g.: `./gradlew :edc-controlplane:edc-controlplane-construct-x:con-x-controlplane-postgresql-hashicorp-vault:dockerize` (note: that module's README has a typo, `postgres` vs `postgresql`).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
From the project root directory, run

```shell
./gradlew :edc-controlplane:edc-controlplane-construct-x:con-x-controlplane-postgres-hashicorp-vault:dockerize
./gradlew :edc-controlplane:edc-controlplane-construct-x:con-x-controlplane-postgresql-hashicorp-vault:dockerize
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,23 @@ plugins {
alias(libs.plugins.shadow)
}

// Since EDC 0.18 the controlplane BOM ships the new Data Plane Signaling implementation
// (non JSON-LD), which the legacy EDC data plane in con-x-dataplane cannot understand.
// Keep the legacy JSON-LD signaling until the data plane is migrated.
configurations.all {
exclude(group = "org.eclipse.edc", module = "data-plane-signaling")
exclude(group = "org.eclipse.edc", module = "data-plane-signaling-core")
exclude(group = "org.eclipse.edc", module = "data-plane-signaling-api")
exclude(group = "org.eclipse.edc", module = "data-plane-signaling-oauth2")
}

val edcVersion = project.property("con-x-edcVersion") as String
val txVersion = project.property("version") as String

dependencies {
implementation("org.eclipse.edc:controlplane-dcp-bom:$edcVersion")
implementation("org.eclipse.edc:controlplane-feature-sql-bom:$edcVersion")
implementation("org.eclipse.edc:transfer-data-plane-signaling:$edcVersion")

implementation("org.eclipse.edc:vault-hashicorp:$edcVersion")

Expand All @@ -43,8 +54,8 @@ dependencies {


// Hotfix version overrides
implementation("com.fasterxml.jackson.core:jackson-core:2.22.3")
implementation("com.fasterxml.jackson.core:jackson-databind:2.22.4")
implementation("com.fasterxml.jackson.core:jackson-core:2.23.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.23.0")

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ a con-x EDC a bit less difficult.
From the project root directory, run

```shell
./gradlew :edc-controlplane:edc-controlplane-construct-x:con-x-controlplane-postgres-vault:dockerize
./gradlew :edc-controlplane:edc-controlplane-construct-x:con-x-controlplane-postgresql-vault:dockerize
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,23 @@ plugins {
alias(libs.plugins.shadow)
}

// Since EDC 0.18 the controlplane BOM ships the new Data Plane Signaling implementation
// (non JSON-LD), which the legacy EDC data plane in con-x-dataplane cannot understand.
// Keep the legacy JSON-LD signaling until the data plane is migrated.
configurations.all {
exclude(group = "org.eclipse.edc", module = "data-plane-signaling")
exclude(group = "org.eclipse.edc", module = "data-plane-signaling-core")
exclude(group = "org.eclipse.edc", module = "data-plane-signaling-api")
exclude(group = "org.eclipse.edc", module = "data-plane-signaling-oauth2")
}

val edcVersion = project.property("con-x-edcVersion") as String
val txVersion = project.property("version") as String

dependencies {
implementation("org.eclipse.edc:controlplane-dcp-bom:$edcVersion")
implementation("org.eclipse.edc:controlplane-feature-sql-bom:$edcVersion")
implementation("org.eclipse.edc:transfer-data-plane-signaling:$edcVersion")

implementation(project(":edc-extensions:sql-vault"))

Expand All @@ -43,8 +54,8 @@ dependencies {


// Hotfix version overrides
implementation("com.fasterxml.jackson.core:jackson-core:2.22.3")
implementation("com.fasterxml.jackson.core:jackson-databind:2.22.4")
implementation("com.fasterxml.jackson.core:jackson-core:2.23.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.23.0")
}

tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ vars {
ISS_PART_CONT: con-x-issuer
CONS_PART_CONT: user-consumer
PROV_PART_CONT: user-provider
MEM_CRED_ID: https://w3id.org/constructx/credentials/v1.0/ConstructXMembershipCredential
MEM_CRED_ID: https://w3id.org/constructx/credentials/v0.1/MembershipCredential
CUSTOM_CRED_ID: https://foo.org/constructx/bar/credentials/v1/Baustelle123Credential
TARGET_ASSET_ID: demoAssetIdOne
CRFORMAT: VC1_0_JWT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ dependencies {


// Hotfix version overrides
implementation("com.fasterxml.jackson.core:jackson-core:2.22.3")
implementation("com.fasterxml.jackson.core:jackson-databind:2.22.4")
implementation("com.fasterxml.jackson.core:jackson-core:2.23.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.23.0")
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ dependencies {


// Hotfix version overrides
implementation("com.fasterxml.jackson.core:jackson-core:2.22.3")
implementation("com.fasterxml.jackson.core:jackson-databind:2.22.4")
implementation("com.fasterxml.jackson.core:jackson-core:2.23.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.23.0")
}


Expand Down
3 changes: 2 additions & 1 deletion edc-extensions/basic-abac/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,6 @@ There is a technical necessity that the controlplane minimally needs at least on
edc.abac.defaultcredential=https://w3id.org/my/very/special/FooMembershipCredential
```

You are not required to use that property. If you don't, it will default to `https://w3id.org/constructx/credentials/v1.0/ConstructXMembershipCredential`.
You are not required to use that property. If you don't, it will default to
`https://w3id.org/constructx/credentials/v0.1/MembershipCredential`.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
public class BasicAbacExtension implements ServiceExtension {

@Setting(description = "The default credential type to be used",
defaultValue = "https://w3id.org/constructx/credentials/v1.0/ConstructXMembershipCredential",
defaultValue = "https://w3id.org/constructx/credentials/v0.1/MembershipCredential",
key = "edc.abac.defaultcredential")
private String defaultCredential;

Expand Down
2 changes: 1 addition & 1 deletion edc-extensions/sql-vault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension and stick to the HashiCorp vault extension, if you require maximum sec


### Usage
This extension will self-register at boot-time and then deploy initial secrets, which you can define via as described in the following.
This extension will self-register at boot time and deploy initial secrets afterward, which can be defined as described below.

#### Secret definition via explicit property

Expand Down
2 changes: 1 addition & 1 deletion edc-extensions/sql-vault/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {

repositories { mavenCentral() }

val edcVersion = "0.17.0"
val edcVersion = project.property("con-x-edcVersion") as String

dependencies {
implementation("org.eclipse.edc:sql-lib:${edcVersion}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public SqlVault(DataSourceRegistry dataSourceRegistry, String dataSourceName,
return queryExecutor.single(connection, false,
resultSet -> resultSet.getString("secret"), command, key);
} catch (Exception e) {
monitor.severe("Error resolving secret for key: " + key, e);
return null;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ public void start() {
String[] kvPairs = initData.split(";;;");
for (String kvPair : kvPairs) {
try {
String[] kv = kvPair.split(":::");
sqlVault.storeSecret(kv[0], kv[1]);
String[] kv = kvPair.split(":::", 2);
sqlVault.storeSecret(kv[0], kv[1])
.onFailure(f -> monitor.warning("Error storing sql vault data for key " + kv[0] + ": " + f.getFailureDetail()));
} catch (Exception e) {
monitor.warning("Error storing sql vault data: " + kvPair);
}
Expand All @@ -105,8 +106,9 @@ public void start() {
if (Files.isRegularFile(path)) {
String key = path.getFileName().toString();
try {
String value = Files.readString(path);
sqlVault.storeSecret(key, value);
String value = Files.readString(path).strip();
sqlVault.storeSecret(key, value)
.onFailure(f -> monitor.warning("Error storing sql vault data for key " + key + ": " + f.getFailureDetail()));
} catch (Exception ex) {
monitor.warning("Error reading value for key: " + key);
}
Expand Down
22 changes: 0 additions & 22 deletions edc-extensions/sql-vault/src/test/java/SqlVaultTest.java

This file was deleted.

Loading