Skip to content

Commit

Permalink
feat: add BOM modules for IH (eclipse-edc#475)
Browse files Browse the repository at this point in the history
* feat(build): add BOM modules

* fix launcher test, dependencies

* add missing config
  • Loading branch information
paullatzelsperger authored Oct 11, 2024
1 parent bb4e4dd commit 10d9cd4
Show file tree
Hide file tree
Showing 13 changed files with 233 additions and 39 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
-e "WEB_HTTP_IDENTITY_PATH=/api/identity" \
-e "WEB_HTTP_PRESENTATION_PORT=10001" \
-e "WEB_HTTP_PRESENTATION_PATH=/api/presentation" \
-e "EDC_API_ACCOUNTS_KEY=password" \
identity-hub:latest
- name: 'Wait for Identity Hub to be healthy'
Expand Down Expand Up @@ -102,3 +103,16 @@ jobs:
if: github.event_name == 'pull_request'
uses: eclipse-edc/.github/.github/workflows/verify-openapi.yml@main
secrets: inherit

Verify-IH-BOM:
strategy:
fail-fast: false

# we can't test the "controlplane-oauth2-com" because it only starts successfully if the public key is already in the vault
matrix:
bom-directory: [ "dist/bom/identityhub-bom",
"dist/bom/identityhub-with-sts-bom" ]
uses: eclipse-edc/.github/.github/workflows/verify-bom.yml@main
with:
module-dir: ${{ matrix.bom-directory }}
properties-file: example.properties
22 changes: 12 additions & 10 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.18.0, Apache-2.
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.14.0, Apache-2.0, approved, #5933
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.16.2, Apache-2.0, approved, #11855
maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.18.0, Apache-2.0, approved, #16370
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.18.0, Apache-2.0, restricted, clearlydefined
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.18.0, Apache-2.0, approved, #16622
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.0, Apache-2.0, approved, #4699
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.16.2, Apache-2.0, approved, #11853
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.18.0, , restricted, clearlydefined
maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-base/2.18.0, , restricted, clearlydefined
maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.18.0, Apache-2.0, approved, #16625
maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-base/2.18.0, Apache-2.0, approved, #16626
maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.16.2, Apache-2.0, approved, #11858
maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.18.0, , restricted, clearlydefined
maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.18.0, Apache-2.0, approved, #16623
maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.17.1, Apache-2.0, approved, #13668
maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.18.0, Apache-2.0, approved, #16368
maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.16.2, Apache-2.0, approved, #11852
maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.18.0, , restricted, clearlydefined
maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.18.0, Apache-2.0, approved, #16628
maven/mavencentral/com.fasterxml.uuid/java-uuid-generator/4.1.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.github.cliftonlabs/json-simple/3.0.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.github.docker-java/docker-java-api/3.4.0, Apache-2.0, approved, clearlydefined
Expand Down Expand Up @@ -247,6 +247,7 @@ maven/mavencentral/org.eclipse.edc/boot-lib/0.10.0-SNAPSHOT, Apache-2.0, approve
maven/mavencentral/org.eclipse.edc/boot-spi/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/boot/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/catalog-spi/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/configuration-filesystem/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/connector-core/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/contract-spi/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/control-plane-spi/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
Expand Down Expand Up @@ -296,6 +297,7 @@ maven/mavencentral/org.eclipse.edc/sql-core/0.10.0-SNAPSHOT, Apache-2.0, approve
maven/mavencentral/org.eclipse.edc/sql-pool-apache-commons/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/state-machine-lib/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/store-lib/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/sts-client-store-sql/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/token-core/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/token-spi/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
maven/mavencentral/org.eclipse.edc/transaction-datasource-spi/0.10.0-SNAPSHOT, Apache-2.0, approved, technology.edc
Expand Down Expand Up @@ -362,8 +364,8 @@ maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.9.10, Apache-2.0, a
maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.9.10, Apache-2.0, approved, #11827
maven/mavencentral/org.jetbrains/annotations/13.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.jetbrains/annotations/17.0.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.jetbrains/annotations/25.0.0, , restricted, clearlydefined
maven/mavencentral/org.jetbrains/annotations/26.0.0, , restricted, clearlydefined
maven/mavencentral/org.jetbrains/annotations/25.0.0, Apache-2.0, approved, #16624
maven/mavencentral/org.jetbrains/annotations/26.0.0, Apache-2.0, approved, #16629
maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.11.1, EPL-2.0, approved, #15935
maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.11.2, EPL-2.0, approved, #15935
maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.11.1, EPL-2.0, approved, #15939
Expand Down Expand Up @@ -396,10 +398,10 @@ maven/mavencentral/org.slf4j/slf4j-api/1.7.35, MIT, approved, CQ13368
maven/mavencentral/org.slf4j/slf4j-api/1.7.36, MIT, approved, CQ13368
maven/mavencentral/org.slf4j/slf4j-api/2.0.6, MIT, approved, #5915
maven/mavencentral/org.slf4j/slf4j-api/2.0.9, MIT, approved, #5915
maven/mavencentral/org.testcontainers/database-commons/1.20.2, , restricted, clearlydefined
maven/mavencentral/org.testcontainers/jdbc/1.20.2, , restricted, clearlydefined
maven/mavencentral/org.testcontainers/database-commons/1.20.2, Apache-2.0, approved, #16630
maven/mavencentral/org.testcontainers/jdbc/1.20.2, Apache-2.0, approved, #16621
maven/mavencentral/org.testcontainers/junit-jupiter/1.20.2, None, restricted, #16552
maven/mavencentral/org.testcontainers/postgresql/1.20.2, , restricted, clearlydefined
maven/mavencentral/org.testcontainers/postgresql/1.20.2, None, restricted, #16627
maven/mavencentral/org.testcontainers/testcontainers/1.20.2, MIT, approved, #15747
maven/mavencentral/org.xmlresolver/xmlresolver/5.2.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.xmlunit/xmlunit-core/2.9.1, Apache-2.0, approved, #6272
Expand Down
46 changes: 46 additions & 0 deletions dist/bom/identityhub-base-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* 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
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
runtimeOnly(project(":core:presentation-api"))
runtimeOnly(project(":core:identity-hub-did"))
runtimeOnly(project(":core:identity-hub-core"))
runtimeOnly(project(":core:identity-hub-participants"))
runtimeOnly(project(":core:identity-hub-keypairs"))
runtimeOnly(project(":extensions:did:local-did-publisher"))
runtimeOnly(project(":extensions:common:credential-watchdog"))
runtimeOnly(project(":extensions:sts:sts-account-provisioner"))
runtimeOnly(project(":extensions:api:identity-api:did-api"))
runtimeOnly(project(":extensions:api:identity-api:participant-context-api"))
runtimeOnly(project(":extensions:api:identity-api:verifiable-credentials-api"))
runtimeOnly(project(":extensions:api:identity-api:keypair-api"))
runtimeOnly(project(":extensions:api:identity-api:api-configuration"))
runtimeOnly(project(":extensions:api:identityhub-api-authentication"))
runtimeOnly(project(":extensions:api:identityhub-api-authorization"))
runtimeOnly(libs.edc.identity.did.core)
runtimeOnly(libs.edc.core.token)
runtimeOnly(libs.edc.api.version)

runtimeOnly(libs.edc.identity.did.web)
runtimeOnly(libs.edc.jsonld)
runtimeOnly(libs.bundles.connector)
}

edcBuild {

}
26 changes: 26 additions & 0 deletions dist/bom/identityhub-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* 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
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
api(project(":dist:bom:identityhub-base-bom"))
runtimeOnly(project(":extensions:sts:sts-account-service-remote"))
}

edcBuild {

}
10 changes: 10 additions & 0 deletions dist/bom/identityhub-bom/example.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
edc.ih.iam.id=did:web:test
edc.ih.iam.publickey.path=/some/path/to/key.pem
web.http.presentation.port=10001
web.http.presentation.path=/api/resolution
web.http.identity.port=8080
web.http.identity.path=/api/identity
web.http.port=8181
web.http.path=/api/v1/
edc.sts.account.api.url=https://sts.com/accounts
edc.sts.accounts.api.auth.header.value=password
34 changes: 34 additions & 0 deletions dist/bom/identityhub-feature-sql-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* 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
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {

// sql modules
api(project(":extensions:store:sql:identity-hub-credentials-store-sql"))
api(project(":extensions:store:sql:identity-hub-did-store-sql"))
api(project(":extensions:store:sql:identity-hub-keypair-store-sql"))
api(project(":extensions:store:sql:identity-hub-participantcontext-store-sql"))

api(libs.edc.sql.core)
api(libs.edc.sql.pool)
api(libs.edc.sql.transactionlocal)
api(libs.edc.sql.bootstrapper)

// third-party deps
api(libs.postgres)
}
28 changes: 28 additions & 0 deletions dist/bom/identityhub-feature-sql-sts-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* 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
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {

// sql modules
api(project(":dist:bom:identityhub-feature-sql-bom"))
api(libs.edc.sql.ih.stsstore.sql)


// third-party deps
api(libs.postgres)
}
30 changes: 30 additions & 0 deletions dist/bom/identityhub-with-sts-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* 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
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
api(project(":dist:bom:identityhub-base-bom"))
runtimeOnly(project(":extensions:sts:sts-account-service-local"))
runtimeOnly(libs.edc.sts.core)
runtimeOnly(libs.edc.sts)
runtimeOnly(libs.edc.sts.api)
runtimeOnly(libs.edc.sts.api.accounts)
}

edcBuild {

}
13 changes: 13 additions & 0 deletions dist/bom/identityhub-with-sts-bom/example.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
edc.ih.iam.id=did:web:test
edc.ih.iam.publickey.path=/some/path/to/key.pem
web.http.presentation.port=10001
web.http.presentation.path=/api/resolution
web.http.identity.port=8080
web.http.identity.path=/api/identity
web.http.port=8181
web.http.path=/api/v1/
web.http.sts.port=8090
web.http.sts.path=/api/sts
web.http.accounts.port=8091
web.http.accounts.path=/api/accounts
edc.api.accounts.key=some-auth-key
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ public Map<String, String> config() {
put("web.http.identity.path", identityEndpoint.getUrl().getPath());
put("web.http.sts.port", String.valueOf(getFreePort()));
put("web.http.sts.path", "/api/sts");
put("web.http.acounts.port", String.valueOf(getFreePort()));
put("web.http.accounts.path", "/api/accounts");
put("edc.runtime.id", name);
put("edc.ih.iam.id", "did:web:consumer");
put("edc.sql.schema.autocreate", "true");
put("edc.api.accounts.key", "password");
}
};
}
Expand Down
12 changes: 9 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ tink = "1.15.0"

edc-junit = { module = "org.eclipse.edc:junit", version.ref = "edc" }
edc-boot = { module = "org.eclipse.edc:boot", version.ref = "edc" }
edc-config-fs = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" }
edc-spi-core = { module = "org.eclipse.edc:core-spi", version.ref = "edc" }
edc-spi-jwt = { module = "org.eclipse.edc:jwt-spi", version.ref = "edc" }
edc-spi-http = { module = "org.eclipse.edc:http-spi", version.ref = "edc" }
Expand Down Expand Up @@ -55,8 +56,6 @@ edc-jsonld = { module = "org.eclipse.edc:json-ld", version.ref = "edc" }
edc-observability = { module = "org.eclipse.edc:api-observability", version.ref = "edc" }
edc-transaction-local = { module = "org.eclipse.edc:transaction-local", version.ref = "edc" }
edc-testfixtures-managementapi = { module = "org.eclipse.edc:management-api-test-fixtures", version.ref = "edc" }
edc-sql-pool = { module = "org.eclipse.edc:sql-pool-apache-commons", version.ref = "edc" }
edc-sql-bootstrapper = { module = "org.eclipse.edc:sql-bootstrapper", version.ref = "edc" }
edc-api-version = { module = "org.eclipse.edc:version-api", version.ref = "edc" }


Expand All @@ -73,6 +72,13 @@ edc-lib-json = { module = "org.eclipse.edc:json-lib", version.ref = "edc" }
edc-lib-common-crypto = { module = "org.eclipse.edc:crypto-common-lib", version.ref = "edc" }
edc-core-jerseyproviders = { module = "org.eclipse.edc:jersey-providers-lib", version.ref = "edc" }

# SQL dependencies
edc-sql-core = { module = "org.eclipse.edc:sql-core", version.ref = "edc" }
edc-sql-pool = { module = "org.eclipse.edc:sql-pool-apache-commons", version.ref = "edc" }
edc-sql-bootstrapper = { module = "org.eclipse.edc:sql-bootstrapper", version.ref = "edc" }
edc-sql-transactionlocal = { module = "org.eclipse.edc:transaction-local", version.ref = "edc" }
edc-sql-ih-stsstore-sql = { module = "org.eclipse.edc:sts-client-store-sql", version.ref = "edc" }

# EDC STS dependencies
edc-sts-spi = { module = "org.eclipse.edc:identity-trust-sts-spi", version.ref = "edc" }
edc-sts-core = { module = "org.eclipse.edc:identity-trust-sts-core", version.ref = "edc" }
Expand Down Expand Up @@ -100,7 +106,7 @@ jersey-common = { module = "org.glassfish.jersey.core:jersey-common", version.re
tink = { module = "com.google.crypto.tink:tink", version.ref = "tink" }

[bundles]
connector = ["edc-boot", "edc-core-connector", "edc-http", "edc-observability", "edc-jsonld"]
connector = ["edc-boot", "edc-core-connector", "edc-http", "edc-observability", "edc-jsonld", "edc-config-fs"]

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
27 changes: 1 addition & 26 deletions launcher/identityhub/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,7 @@ plugins {
}

dependencies {
runtimeOnly(project(":core:presentation-api"))
runtimeOnly(project(":core:identity-hub-did"))
runtimeOnly(project(":core:identity-hub-core"))
runtimeOnly(project(":core:identity-hub-participants"))
runtimeOnly(project(":core:identity-hub-keypairs"))
runtimeOnly(project(":extensions:did:local-did-publisher"))
runtimeOnly(project(":extensions:common:credential-watchdog"))
runtimeOnly(project(":extensions:sts:sts-account-provisioner"))
runtimeOnly(project(":extensions:sts:sts-account-service-local"))
runtimeOnly(project(":extensions:api:identity-api:did-api"))
runtimeOnly(project(":extensions:api:identity-api:participant-context-api"))
runtimeOnly(project(":extensions:api:identity-api:verifiable-credentials-api"))
runtimeOnly(project(":extensions:api:identity-api:keypair-api"))
runtimeOnly(project(":extensions:api:identity-api:api-configuration"))
runtimeOnly(project(":extensions:api:identityhub-api-authentication"))
runtimeOnly(project(":extensions:api:identityhub-api-authorization"))
runtimeOnly(libs.edc.identity.did.core)
runtimeOnly(libs.edc.core.token)
runtimeOnly(libs.edc.api.version)
runtimeOnly(libs.edc.sts.core)
runtimeOnly(libs.edc.sts)
runtimeOnly(libs.edc.sts.api)

runtimeOnly(libs.edc.identity.did.web)
runtimeOnly(libs.edc.jsonld)
runtimeOnly(libs.bundles.connector)
runtimeOnly(project(":dist:bom:identityhub-with-sts-bom"))
}

application {
Expand Down
7 changes: 7 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,10 @@ include(":e2e-tests:api-tests")
include(":e2e-tests:sts-tests")
include(":e2e-tests:runtimes:identityhub-remote-sts")
include(":e2e-tests:runtimes:sts")

// BOM modules
include(":dist:bom:identityhub-base-bom")
include(":dist:bom:identityhub-bom")
include(":dist:bom:identityhub-with-sts-bom")
include(":dist:bom:identityhub-feature-sql-bom")
include(":dist:bom:identityhub-feature-sql-sts-bom")

0 comments on commit 10d9cd4

Please sign in to comment.