From 3ce0ecdf0efe007d338068bf5a49553aeab9560b Mon Sep 17 00:00:00 2001 From: Enrico Risa Date: Wed, 3 Apr 2024 17:38:16 +0200 Subject: [PATCH] chore: fix after upstream changes --- core/core-utils/build.gradle.kts | 1 + .../utils/credentials/CredentialTypePredicate.java | 3 ++- edc-extensions/cx-policy/build.gradle.kts | 1 + .../AbstractDynamicCredentialConstraintFunction.java | 2 +- .../DismantlerCredentialConstraintFunction.java | 2 +- ...FrameworkAgreementCredentialConstraintFunction.java | 2 +- .../tractusx/edc/policy/cx/CredentialFunctions.java | 6 +++--- .../FrameworkAgreementConstraintFunctionTest.java | 2 +- .../edc/iam/iatp/identity/IatpIdentityExtractor.java | 2 +- .../iam/iatp/identity/IatpIdentityExtractorTest.java | 6 +++--- .../tests/transfer/iatp/harness/DataspaceIssuer.java | 10 +++++----- gradle/libs.versions.toml | 1 + 12 files changed, 21 insertions(+), 17 deletions(-) diff --git a/core/core-utils/build.gradle.kts b/core/core-utils/build.gradle.kts index 9eb6a95d7..5a8a90ae2 100644 --- a/core/core-utils/build.gradle.kts +++ b/core/core-utils/build.gradle.kts @@ -24,4 +24,5 @@ plugins { dependencies { implementation(libs.edc.spi.core) implementation(libs.edc.spi.identitytrust) + implementation(libs.edc.spi.vc) } diff --git a/core/core-utils/src/main/java/org/eclipse/tractusx/edc/core/utils/credentials/CredentialTypePredicate.java b/core/core-utils/src/main/java/org/eclipse/tractusx/edc/core/utils/credentials/CredentialTypePredicate.java index 91ad8a92a..5523299f5 100644 --- a/core/core-utils/src/main/java/org/eclipse/tractusx/edc/core/utils/credentials/CredentialTypePredicate.java +++ b/core/core-utils/src/main/java/org/eclipse/tractusx/edc/core/utils/credentials/CredentialTypePredicate.java @@ -19,7 +19,8 @@ package org.eclipse.tractusx.edc.core.utils.credentials; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; + +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; import java.util.function.Predicate; diff --git a/edc-extensions/cx-policy/build.gradle.kts b/edc-extensions/cx-policy/build.gradle.kts index 15a293e37..b8d56b1ec 100644 --- a/edc-extensions/cx-policy/build.gradle.kts +++ b/edc-extensions/cx-policy/build.gradle.kts @@ -27,6 +27,7 @@ dependencies { implementation(libs.edc.spi.policyengine) implementation(libs.jakartaJson) implementation(libs.edc.spi.identitytrust) + implementation(libs.edc.spi.vc) testImplementation(libs.jacksonJsonP) testImplementation(libs.titaniumJsonLd) } diff --git a/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/common/AbstractDynamicCredentialConstraintFunction.java b/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/common/AbstractDynamicCredentialConstraintFunction.java index e94ac99fb..91d08d29c 100644 --- a/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/common/AbstractDynamicCredentialConstraintFunction.java +++ b/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/common/AbstractDynamicCredentialConstraintFunction.java @@ -19,7 +19,7 @@ package org.eclipse.tractusx.edc.policy.cx.common; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; import org.eclipse.edc.policy.engine.spi.DynamicAtomicConstraintFunction; import org.eclipse.edc.policy.engine.spi.PolicyContext; import org.eclipse.edc.policy.model.Operator; diff --git a/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/dismantler/DismantlerCredentialConstraintFunction.java b/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/dismantler/DismantlerCredentialConstraintFunction.java index 008879b71..12c319854 100644 --- a/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/dismantler/DismantlerCredentialConstraintFunction.java +++ b/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/dismantler/DismantlerCredentialConstraintFunction.java @@ -20,7 +20,7 @@ package org.eclipse.tractusx.edc.policy.cx.dismantler; import jakarta.json.JsonObject; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; import org.eclipse.edc.policy.engine.spi.PolicyContext; import org.eclipse.edc.policy.model.Operator; import org.eclipse.edc.policy.model.Permission; diff --git a/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/framework/FrameworkAgreementCredentialConstraintFunction.java b/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/framework/FrameworkAgreementCredentialConstraintFunction.java index 2806f26bd..253e01b2c 100644 --- a/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/framework/FrameworkAgreementCredentialConstraintFunction.java +++ b/edc-extensions/cx-policy/src/main/java/org/eclipse/tractusx/edc/policy/cx/framework/FrameworkAgreementCredentialConstraintFunction.java @@ -19,7 +19,7 @@ package org.eclipse.tractusx.edc.policy.cx.framework; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; import org.eclipse.edc.policy.engine.spi.PolicyContext; import org.eclipse.edc.policy.model.Operator; import org.eclipse.edc.policy.model.Permission; diff --git a/edc-extensions/cx-policy/src/test/java/org/eclipse/tractusx/edc/policy/cx/CredentialFunctions.java b/edc-extensions/cx-policy/src/test/java/org/eclipse/tractusx/edc/policy/cx/CredentialFunctions.java index d8551dd17..1aedea42d 100644 --- a/edc-extensions/cx-policy/src/test/java/org/eclipse/tractusx/edc/policy/cx/CredentialFunctions.java +++ b/edc-extensions/cx-policy/src/test/java/org/eclipse/tractusx/edc/policy/cx/CredentialFunctions.java @@ -20,9 +20,9 @@ package org.eclipse.tractusx.edc.policy.cx; -import org.eclipse.edc.iam.identitytrust.spi.model.CredentialSubject; -import org.eclipse.edc.iam.identitytrust.spi.model.Issuer; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.CredentialSubject; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.Issuer; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; import java.time.Instant; import java.time.temporal.ChronoUnit; diff --git a/edc-extensions/cx-policy/src/test/java/org/eclipse/tractusx/edc/policy/cx/framework/FrameworkAgreementConstraintFunctionTest.java b/edc-extensions/cx-policy/src/test/java/org/eclipse/tractusx/edc/policy/cx/framework/FrameworkAgreementConstraintFunctionTest.java index bcda76c88..56ef833f1 100644 --- a/edc-extensions/cx-policy/src/test/java/org/eclipse/tractusx/edc/policy/cx/framework/FrameworkAgreementConstraintFunctionTest.java +++ b/edc-extensions/cx-policy/src/test/java/org/eclipse/tractusx/edc/policy/cx/framework/FrameworkAgreementConstraintFunctionTest.java @@ -19,7 +19,7 @@ package org.eclipse.tractusx.edc.policy.cx.framework; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; import org.eclipse.edc.policy.engine.spi.PolicyContext; import org.eclipse.edc.policy.model.Operator; import org.eclipse.edc.policy.model.Permission; diff --git a/edc-extensions/iatp/tx-iatp/src/main/java/org/eclipse/tractusx/edc/iam/iatp/identity/IatpIdentityExtractor.java b/edc-extensions/iatp/tx-iatp/src/main/java/org/eclipse/tractusx/edc/iam/iatp/identity/IatpIdentityExtractor.java index ce43b9801..59754f3c1 100644 --- a/edc-extensions/iatp/tx-iatp/src/main/java/org/eclipse/tractusx/edc/iam/iatp/identity/IatpIdentityExtractor.java +++ b/edc-extensions/iatp/tx-iatp/src/main/java/org/eclipse/tractusx/edc/iam/iatp/identity/IatpIdentityExtractor.java @@ -19,7 +19,7 @@ package org.eclipse.tractusx.edc.iam.iatp.identity; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.agent.ParticipantAgentServiceExtension; import org.eclipse.edc.spi.iam.ClaimToken; diff --git a/edc-extensions/iatp/tx-iatp/src/test/java/org/eclipse/tractusx/edc/iam/iatp/identity/IatpIdentityExtractorTest.java b/edc-extensions/iatp/tx-iatp/src/test/java/org/eclipse/tractusx/edc/iam/iatp/identity/IatpIdentityExtractorTest.java index 8db77d945..5e2727dea 100644 --- a/edc-extensions/iatp/tx-iatp/src/test/java/org/eclipse/tractusx/edc/iam/iatp/identity/IatpIdentityExtractorTest.java +++ b/edc-extensions/iatp/tx-iatp/src/test/java/org/eclipse/tractusx/edc/iam/iatp/identity/IatpIdentityExtractorTest.java @@ -19,9 +19,9 @@ package org.eclipse.tractusx.edc.iam.iatp.identity; -import org.eclipse.edc.iam.identitytrust.spi.model.CredentialSubject; -import org.eclipse.edc.iam.identitytrust.spi.model.Issuer; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.CredentialSubject; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.Issuer; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.iam.ClaimToken; import org.junit.jupiter.api.Test; diff --git a/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/harness/DataspaceIssuer.java b/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/harness/DataspaceIssuer.java index 37ce54ec1..6a03cd8eb 100644 --- a/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/harness/DataspaceIssuer.java +++ b/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/harness/DataspaceIssuer.java @@ -26,11 +26,11 @@ import jakarta.json.JsonObject; import org.eclipse.edc.iam.did.spi.document.DidDocument; import org.eclipse.edc.iam.did.spi.document.VerificationMethod; -import org.eclipse.edc.iam.identitytrust.spi.model.CredentialFormat; -import org.eclipse.edc.iam.identitytrust.spi.model.CredentialSubject; -import org.eclipse.edc.iam.identitytrust.spi.model.Issuer; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredential; -import org.eclipse.edc.iam.identitytrust.spi.model.VerifiableCredentialContainer; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.CredentialFormat; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.CredentialSubject; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.Issuer; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential; +import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredentialContainer; import org.eclipse.edc.identityhub.spi.model.VerifiableCredentialResource; import org.eclipse.edc.jsonld.spi.JsonLd; import org.eclipse.edc.security.signature.jws2020.JwkMethod; diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 826e1f057..a3bec4cb4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -45,6 +45,7 @@ edc-spi-jwt = { module = "org.eclipse.edc:jwt-spi", version.ref = "edc" } edc-spi-token = { module = "org.eclipse.edc:token-spi", version.ref = "edc" } edc-spi-transform = { module = "org.eclipse.edc:transform-spi", version.ref = "edc" } edc-spi-identity-did = { module = "org.eclipse.edc:identity-did-spi", version.ref = "edc" } +edc-spi-vc = { module = "org.eclipse.edc:verifiable-credentials-spi", version.ref = "edc" } edc-spi-edrstore = { module = "org.eclipse.edc:edr-store-spi", version.ref = "edc" } edc-token-core = { module = "org.eclipse.edc:token-core", version.ref = "edc" } edc-spi-oauth2 = { module = "org.eclipse.edc:oauth2-spi", version.ref = "edc" }