Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix compilation #464

Merged
merged 2 commits into from
Sep 27, 2024
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
12 changes: 7 additions & 5 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
maven/mavencentral/com.apicatalog/carbon-did/0.3.0, Apache-2.0, approved, clearlydefined

Check warning on line 1 in DEPENDENCIES

View workflow job for this annotation

GitHub Actions / Dependency-Check / Dash-Verify-Licenses

Restricted Dependencies found

Some dependencies are marked 'restricted' - please review them
maven/mavencentral/com.apicatalog/copper-multibase/0.5.0, Apache-2.0, approved, #14501
maven/mavencentral/com.apicatalog/copper-multicodec/0.1.1, Apache-2.0, approved, #14500
maven/mavencentral/com.apicatalog/iron-verifiable-credentials/0.14.0, Apache-2.0, approved, clearlydefined
Expand Down Expand Up @@ -124,7 +124,6 @@
maven/mavencentral/io.rest-assured/xml-path/5.5.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.setl/rdf-urdna/1.1, Apache-2.0, approved, clearlydefined
maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.22, Apache-2.0, approved, #5947
maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.23, Apache-2.0, approved, #5947
maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.24, Apache-2.0, approved, #5947
maven/mavencentral/io.swagger.core.v3/swagger-annotations/2.2.22, Apache-2.0, approved, #11362
maven/mavencentral/io.swagger.core.v3/swagger-annotations/2.2.8, Apache-2.0, approved, #11362
Expand Down Expand Up @@ -358,13 +357,16 @@
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/24.1.0, Apache-2.0, approved, clearlydefined
maven/mavencentral/org.jetbrains/annotations/25.0.0, , restricted, clearlydefined
maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.11.0, EPL-2.0, approved, #15935
maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.11.0, EPL-2.0, approved, #15939
maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.11.0, EPL-2.0, approved, #15940
maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.11.1, EPL-2.0, approved, #15935
maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.11.1, EPL-2.0, approved, #15939
maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.11.1, EPL-2.0, approved, #15940
maven/mavencentral/org.junit.platform/junit-platform-commons/1.11.0, EPL-2.0, approved, #15936
maven/mavencentral/org.junit.platform/junit-platform-engine/1.11.0, EPL-2.0, approved, #15932
maven/mavencentral/org.junit.platform/junit-platform-commons/1.11.1, EPL-2.0, approved, #15936
maven/mavencentral/org.junit.platform/junit-platform-engine/1.11.1, EPL-2.0, approved, #15932
maven/mavencentral/org.junit/junit-bom/5.11.0, EPL-2.0, approved, #16062
maven/mavencentral/org.junit/junit-bom/5.11.1, EPL-2.0, approved, #16062
maven/mavencentral/org.jvnet.mimepull/mimepull/1.9.15, CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, CQ21484
maven/mavencentral/org.mock-server/mockserver-client-java/5.15.0, Apache-2.0 AND LGPL-3.0-only, approved, #9324
maven/mavencentral/org.mock-server/mockserver-core/5.15.0, Apache-2.0, approved, clearlydefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import io.restassured.http.Header;
import org.eclipse.edc.iam.did.spi.document.DidDocument;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsClientStore;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsAccountStore;
import org.eclipse.edc.identithub.spi.did.events.DidDocumentPublished;
import org.eclipse.edc.identithub.spi.did.events.DidDocumentUnpublished;
import org.eclipse.edc.identithub.spi.did.store.DidResourceStore;
Expand Down Expand Up @@ -53,7 +53,7 @@ public class DidManagementApiEndToEndTest {
abstract static class Tests {

@AfterEach
void tearDown(ParticipantContextService pcService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, StsClientStore stsClientStore) {
void tearDown(ParticipantContextService pcService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, StsAccountStore stsAccountStore) {
// purge all users, dids, keypairs

pcService.query(QuerySpec.max()).getContent()
Expand All @@ -64,8 +64,8 @@ void tearDown(ParticipantContextService pcService, DidResourceStore didResourceS
keyPairResourceStore.query(QuerySpec.max()).getContent()
.forEach(kpr -> keyPairResourceStore.deleteById(kpr.getId()).getContent());

stsClientStore.findAll(QuerySpec.max())
.forEach(sts -> stsClientStore.deleteById(sts.getId()).getContent());
stsAccountStore.findAll(QuerySpec.max())
.forEach(sts -> stsAccountStore.deleteById(sts.getId()).getContent());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import io.restassured.http.ContentType;
import io.restassured.http.Header;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsClientStore;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsAccountStore;
import org.eclipse.edc.identithub.spi.did.events.DidDocumentPublished;
import org.eclipse.edc.identithub.spi.did.model.DidState;
import org.eclipse.edc.identithub.spi.did.store.DidResourceStore;
Expand Down Expand Up @@ -68,7 +68,7 @@ public class KeyPairResourceApiEndToEndTest {
abstract static class Tests {

@AfterEach
void tearDown(ParticipantContextService pcService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, StsClientStore stsClientStore) {
void tearDown(ParticipantContextService pcService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, StsAccountStore accountStore) {
// purge all users, dids, keypairs

pcService.query(QuerySpec.max()).getContent()
Expand All @@ -79,8 +79,8 @@ void tearDown(ParticipantContextService pcService, DidResourceStore didResourceS
keyPairResourceStore.query(QuerySpec.max()).getContent()
.forEach(kpr -> keyPairResourceStore.deleteById(kpr.getId()).getContent());

stsClientStore.findAll(QuerySpec.max())
.forEach(sts -> stsClientStore.deleteById(sts.getId()).getContent());
accountStore.findAll(QuerySpec.max())
.forEach(sts -> accountStore.deleteById(sts.getId()).getContent());
}

@Test
Expand Down Expand Up @@ -375,7 +375,7 @@ void rotate_withSuperUserToken(IdentityHubEndToEndTestContext context, EventRout

@ParameterizedTest(name = "New KeyID {0}")
@ValueSource(strings = { "did:web:user1#new-key-id", "new-key-id" })
void rotate_withUserToken(String keyId, IdentityHubEndToEndTestContext context, EventRouter router, StsClientStore clientStore) {
void rotate_withUserToken(String keyId, IdentityHubEndToEndTestContext context, EventRouter router, StsAccountStore accountStore) {
var subscriber = mock(EventSubscriber.class);
router.registerSync(KeyPairRotated.class, subscriber);
router.registerSync(KeyPairAdded.class, subscriber);
Expand Down Expand Up @@ -417,15 +417,15 @@ void rotate_withUserToken(String keyId, IdentityHubEndToEndTestContext context,
}));

// verify that the STS client got updated correctly
assertThat(clientStore.findById(participantId)).isSucceeded()
assertThat(accountStore.findById(participantId)).isSucceeded()
.satisfies(stsClient -> {
assertThat(stsClient.getPrivateKeyAlias()).isEqualTo("new-key-alias");
assertThat(stsClient.getPublicKeyReference()).isEqualTo("did:web:" + participantId + "#new-key-id");
});
}

@Test
void rotate_withoutNewKey(IdentityHubEndToEndTestContext context, EventRouter router, StsClientStore clientStore) {
void rotate_withoutNewKey(IdentityHubEndToEndTestContext context, EventRouter router, StsAccountStore accountStore) {

var participantId = "user1";
var userToken = context.createParticipant(participantId);
Expand Down Expand Up @@ -458,7 +458,7 @@ void rotate_withoutNewKey(IdentityHubEndToEndTestContext context, EventRouter ro
verify(subscriber, never()).on(argThat(env -> env.getPayload() instanceof KeyPairAdded));

// verify that the STS client got updated correctly
assertThat(clientStore.findById(participantId)).isSucceeded()
assertThat(accountStore.findById(participantId)).isSucceeded()
.satisfies(stsClient -> {
assertThat(stsClient.getPrivateKeyAlias()).isEqualTo("");
assertThat(stsClient.getPublicKeyReference()).isEqualTo("");
Expand Down Expand Up @@ -583,7 +583,7 @@ void rotate_withNewKey_whenDidNotPublished_shouldNotUpdate(IdentityHubEndToEndTe

@ParameterizedTest(name = "New Key-ID: {0}")
@ValueSource(strings = { "new-keyId", "did:web:user1#new-keyId" })
void revoke(String newKeyId, IdentityHubEndToEndTestContext context, StsClientStore clientStore) {
void revoke(String newKeyId, IdentityHubEndToEndTestContext context, StsAccountStore accountStore) {
var superUserKey = context.createSuperUser();
var participantId = "user1";
var token = context.createParticipant(participantId);
Expand Down Expand Up @@ -611,7 +611,7 @@ void revoke(String newKeyId, IdentityHubEndToEndTestContext context, StsClientSt
.allSatisfy(dd -> assertThat(dd.getVerificationMethod()).noneMatch(vm -> vm.getId().equals(keyId)));

// verify that the STS client got updated correctly
assertThat(clientStore.findById(participantId)).isSucceeded()
assertThat(accountStore.findById(participantId)).isSucceeded()
.satisfies(stsClient -> {
assertThat(stsClient.getPrivateKeyAlias()).isEqualTo("new-alias");
assertThat(stsClient.getPublicKeyReference()).isEqualTo("did:web:" + participantId + "#new-keyId");
Expand All @@ -620,7 +620,7 @@ void revoke(String newKeyId, IdentityHubEndToEndTestContext context, StsClientSt
}

@Test
void revoke_withoutNewKey(IdentityHubEndToEndTestContext context, EventRouter router, StsClientStore clientStore) {
void revoke_withoutNewKey(IdentityHubEndToEndTestContext context, EventRouter router, StsAccountStore accountStore) {
var subscriber = mock(EventSubscriber.class);
router.registerSync(KeyPairRotated.class, subscriber);
router.registerSync(KeyPairRevoked.class, subscriber);
Expand Down Expand Up @@ -651,7 +651,7 @@ void revoke_withoutNewKey(IdentityHubEndToEndTestContext context, EventRouter ro
verify(subscriber, never()).on(argThat(env -> env.getPayload() instanceof KeyPairAdded));

// verify that the STS client got updated correctly
assertThat(clientStore.findById(participantId)).isSucceeded()
assertThat(accountStore.findById(participantId)).isSucceeded()
.satisfies(stsClient -> {
assertThat(stsClient.getPrivateKeyAlias()).isEqualTo("");
assertThat(stsClient.getPublicKeyReference()).isEqualTo("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import io.restassured.http.ContentType;
import io.restassured.http.Header;
import org.eclipse.edc.iam.did.spi.document.DidDocument;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsClientStore;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsAccountStore;
import org.eclipse.edc.identithub.spi.did.DidConstants;
import org.eclipse.edc.identithub.spi.did.DidDocumentPublisher;
import org.eclipse.edc.identithub.spi.did.DidDocumentPublisherRegistry;
Expand Down Expand Up @@ -77,7 +77,7 @@ public class ParticipantContextApiEndToEndTest {
abstract static class Tests {

@AfterEach
void tearDown(ParticipantContextService pcService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, StsClientStore stsClientStore) {
void tearDown(ParticipantContextService pcService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, StsAccountStore accountStore) {
// purge all users, dids, keypairs

pcService.query(QuerySpec.max()).getContent()
Expand All @@ -88,8 +88,8 @@ void tearDown(ParticipantContextService pcService, DidResourceStore didResourceS
keyPairResourceStore.query(QuerySpec.max()).getContent()
.forEach(kpr -> keyPairResourceStore.deleteById(kpr.getId()).getContent());

stsClientStore.findAll(QuerySpec.max())
.forEach(sts -> stsClientStore.deleteById(sts.getId()).getContent());
accountStore.findAll(QuerySpec.max())
.forEach(sts -> accountStore.deleteById(sts.getId()).getContent());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import jakarta.json.JsonString;
import jakarta.json.JsonValue;
import org.eclipse.edc.iam.did.spi.resolution.DidPublicKeyResolver;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsClientStore;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsAccountStore;
import org.eclipse.edc.iam.verifiablecredentials.spi.model.CredentialFormat;
import org.eclipse.edc.iam.verifiablecredentials.spi.model.CredentialStatus;
import org.eclipse.edc.iam.verifiablecredentials.spi.model.RevocationServiceRegistry;
Expand Down Expand Up @@ -132,7 +132,7 @@ void setup(IdentityHubEndToEndTestContext context) {
}

@AfterEach
void teardown(ParticipantContextService contextService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, CredentialStore store, StsClientStore stsClientStore) {
void teardown(ParticipantContextService contextService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, CredentialStore store, StsAccountStore accountStore) {
// purge all participant contexts

contextService.query(QuerySpec.max()).getContent()
Expand All @@ -148,8 +148,8 @@ void teardown(ParticipantContextService contextService, DidResourceStore didReso
.map(creds -> creds.stream().map(cred -> store.deleteById(cred.getId())).toList())
.orElseThrow(f -> new RuntimeException(f.getFailureDetail()));

stsClientStore.findAll(QuerySpec.max())
.forEach(sts -> stsClientStore.deleteById(sts.getId()).getContent());
accountStore.findAll(QuerySpec.max())
.forEach(sts -> accountStore.deleteById(sts.getId()).getContent());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package org.eclipse.edc.identityhub.tests;

import io.restassured.http.Header;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsClientStore;
import org.eclipse.edc.iam.identitytrust.sts.spi.store.StsAccountStore;
import org.eclipse.edc.iam.verifiablecredentials.spi.model.CredentialFormat;
import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredential;
import org.eclipse.edc.iam.verifiablecredentials.spi.model.VerifiableCredentialContainer;
Expand Down Expand Up @@ -47,7 +47,7 @@ public class VerifiableCredentialApiEndToEndTest {
abstract static class Tests {

@AfterEach
void tearDown(ParticipantContextService pcService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, StsClientStore stsClientStore) {
void tearDown(ParticipantContextService pcService, DidResourceStore didResourceStore, KeyPairResourceStore keyPairResourceStore, StsAccountStore stsAccountStore) {
// purge all users, dids, keypairs

pcService.query(QuerySpec.max()).getContent()
Expand All @@ -58,8 +58,8 @@ void tearDown(ParticipantContextService pcService, DidResourceStore didResourceS
keyPairResourceStore.query(QuerySpec.max()).getContent()
.forEach(kpr -> keyPairResourceStore.deleteById(kpr.getId()).getContent());

stsClientStore.findAll(QuerySpec.max())
.forEach(sts -> stsClientStore.deleteById(sts.getId()).getContent());
stsAccountStore.findAll(QuerySpec.max())
.forEach(sts -> stsAccountStore.deleteById(sts.getId()).getContent());

}

Expand Down
Loading
Loading