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

Distributed Identity Improvements #109

Merged
merged 157 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
157 commits
Select commit Hold shift + click to select a range
15673aa
added basic boilerplate code for the ION implementation
paullatzelsperger Aug 9, 2021
3eb5817
moved ion code to the identity subdir
paullatzelsperger Aug 9, 2021
52f05d6
added skeleton for a registration service impl
paullatzelsperger Aug 9, 2021
b76a355
added did document store
paullatzelsperger Aug 9, 2021
d64b248
added registration service and did-document storage
paullatzelsperger Aug 9, 2021
37a2805
updated ion crawler
paullatzelsperger Aug 9, 2021
eacaf98
fixed missing dependency
paullatzelsperger Aug 10, 2021
7cff9bd
updated ionclient to forego the challenge-solution stuff on custom nodes
paullatzelsperger Aug 10, 2021
fee46b5
added tests for the inmem did doc store
paullatzelsperger Aug 11, 2021
c92ae3f
added more tests
paullatzelsperger Aug 11, 2021
523b8e9
simplified the crawler job
paullatzelsperger Aug 11, 2021
089212a
fixed dependency issues
paullatzelsperger Aug 11, 2021
08924aa
renamed reg-srv app
paullatzelsperger Aug 11, 2021
df832e4
crawler job now produces (random) results
paullatzelsperger Aug 12, 2021
00ebc60
renamed controller
paullatzelsperger Aug 12, 2021
5c36d6e
renamed ion impl. folder
paullatzelsperger Aug 12, 2021
5c6d397
moved REST API to a separate package
paullatzelsperger Aug 12, 2021
ebe6c11
moved launcher to hackathon subdir
paullatzelsperger Aug 12, 2021
684c348
added event publishing for the crawler
paullatzelsperger Aug 12, 2021
311c53d
Added infrastructure for Hackathon
paullatzelsperger Aug 12, 2021
8441aa3
renamed scripts folder
paullatzelsperger Aug 12, 2021
428700f
updated app with rest api
paullatzelsperger Aug 12, 2021
9f81c6b
removed unneeded configs
paullatzelsperger Aug 13, 2021
6390ced
query real ion api instead of randomized stuff
paullatzelsperger Aug 17, 2021
1ed557d
added possibility to randomize
paullatzelsperger Aug 17, 2021
2b78703
added docker deployment
paullatzelsperger Aug 17, 2021
13d83d7
added deserialization of ion data entries
paullatzelsperger Aug 17, 2021
3ac1856
added a dataflow controller
paullatzelsperger Aug 17, 2021
d10bda8
added provider and junit-consumer capabilities
paullatzelsperger Aug 17, 2021
a7d5313
azure blob -> s3 works
paullatzelsperger Aug 17, 2021
3ffebcb
added docker build and deployment
paullatzelsperger Aug 17, 2021
cc19240
avoid double entries
paullatzelsperger Aug 17, 2021
e03649e
switched to new crawler API
paullatzelsperger Aug 18, 2021
7ddc741
removed unneeded type
paullatzelsperger Aug 18, 2021
b35328a
added consumer with control rest interface
paullatzelsperger Aug 18, 2021
d657f39
added two more files to the catalog
paullatzelsperger Aug 18, 2021
dd6a4fc
added deployment for consumer connector
paullatzelsperger Aug 18, 2021
ddaf14c
fixed small problem with transfer process states
paullatzelsperger Aug 18, 2021
8b19127
add auto-deployment for hackathon
paullatzelsperger Aug 18, 2021
9c7afd4
don't run tests in docker build
paullatzelsperger Aug 18, 2021
71da0da
added deployment
paullatzelsperger Aug 18, 2021
8016980
added AWS credentials
paullatzelsperger Aug 18, 2021
bf2ce1f
changed env
paullatzelsperger Aug 18, 2021
371907e
actually resolve DID documents after they're fetched from ION core
paullatzelsperger Aug 18, 2021
349150c
improved signature
paullatzelsperger Aug 18, 2021
1607fac
fixed deployment
paullatzelsperger Aug 18, 2021
5180a63
parallelized resolving the DIDs. speedup is 10fold.
paullatzelsperger Aug 19, 2021
78d38be
added source docs
paullatzelsperger Aug 19, 2021
9f61c9c
output urls after terraform apply
paullatzelsperger Aug 19, 2021
bcf5436
Add sequence diagrams
jimmarino Aug 19, 2021
0016896
Add identity service shell
jimmarino Aug 19, 2021
7aaa3e0
Add vault
jimmarino Aug 19, 2021
5cf0a7f
Start on distributed identity service
jimmarino Aug 19, 2021
2731d50
Add modules for identity hub
jimmarino Aug 19, 2021
ce21a81
Reorg packges
jimmarino Aug 19, 2021
aeb20c4
Add identity hub skeletons
jimmarino Aug 19, 2021
ae44dbf
Work on Identity Hub implementation
jimmarino Aug 21, 2021
f402827
Spelling
jimmarino Aug 21, 2021
f7697bf
More spelling
jimmarino Aug 21, 2021
82a19fd
More spelling
jimmarino Aug 21, 2021
8967baf
Work on IdentityHub
jimmarino Aug 23, 2021
ca124de
Fix version clash; add DID extensions to runtime
jimmarino Aug 23, 2021
e01b83e
Work on identity hub
jimmarino Aug 23, 2021
0dad130
Cleanup module structure; gneralize DID identity SPI; pull up resolver
jimmarino Aug 24, 2021
d5ed6de
Remove ion-core dependency on spi and util; change hub core to genera…
jimmarino Aug 24, 2021
47de52f
More cleanup
jimmarino Aug 24, 2021
dc6cfc6
Add assertion
jimmarino Aug 24, 2021
e1a5c6c
Work on distributed identity service
jimmarino Aug 24, 2021
6f92830
More work on distributed identity service
jimmarino Aug 25, 2021
468f3be
Factor out credentials verifier; cleanup test cer loaders
jimmarino Aug 25, 2021
9146ade
Typo
jimmarino Aug 25, 2021
6ded166
Push to eclipse branch; Fix typo
jimmarino Aug 25, 2021
d690f29
End-to-End DID resolution and authorization working
jimmarino Aug 26, 2021
69e34e8
Add Hackathon task markers
jimmarino Aug 27, 2021
c5ca973
Fixes for Hackathon use case
jimmarino Aug 31, 2021
3bafb16
Add credential commit for external UI
jimmarino Aug 31, 2021
c0ba4d4
Fix serviceEndpoint
jimmarino Aug 31, 2021
263922c
fix DidDocument json deserialization
Aug 31, 2021
979aa5b
fixed wrong azuread provider version
paullatzelsperger Aug 31, 2021
7a7c83d
fixed tf deployment
paullatzelsperger Aug 31, 2021
e5fd1db
Small fixes for DID shape
jimmarino Aug 31, 2021
e84e477
changed paths
paullatzelsperger Sep 1, 2021
9f9d947
removed local config files
paullatzelsperger Sep 1, 2021
abeb976
replaced ip address of ION node with FQDN
paullatzelsperger Sep 3, 2021
e90a398
moved/renamed model classes
paullatzelsperger Sep 3, 2021
621e129
cleaned up ion module
paullatzelsperger Sep 3, 2021
5bfb30e
more cleanup, source comments
paullatzelsperger Sep 3, 2021
ced8477
moved ion to data-protocols
paullatzelsperger Sep 3, 2021
37d5799
moved in-mem did store to extensions
paullatzelsperger Sep 3, 2021
331faec
moved identity-service stuff to IAM and extensions packages respectively
paullatzelsperger Sep 6, 2021
96ce7e4
moved gaiax-verifier to samples
paullatzelsperger Sep 6, 2021
dfb7bbc
moved out registration service and test fixtures
paullatzelsperger Sep 6, 2021
e6dea98
moved registration service launcher to launcher/
paullatzelsperger Sep 6, 2021
053301b
moved azure/s3 implementation to samples
paullatzelsperger Sep 6, 2021
47945a8
added exceptions
paullatzelsperger Sep 6, 2021
b6c6e36
moved launchers out
paullatzelsperger Sep 6, 2021
74c3731
moved control-rest to the api-extension
paullatzelsperger Sep 6, 2021
7a368e1
fixed compiler error
paullatzelsperger Sep 6, 2021
7a8d0dd
disable build+publish on pull requests
paullatzelsperger Sep 6, 2021
d926275
moved hackathon code samples
paullatzelsperger Sep 10, 2021
5aa2634
removed unneeded files
paullatzelsperger Sep 13, 2021
56b7763
moved terraform scripts to another directory
paullatzelsperger Sep 13, 2021
dac5568
cleaned ion-sample deployment
paullatzelsperger Sep 13, 2021
a1d6633
straightened out terraform scripts
paullatzelsperger Sep 13, 2021
41f0246
updated docker build files
paullatzelsperger Sep 13, 2021
a1a80c9
updated directory structure
paullatzelsperger Sep 13, 2021
c82e6aa
updated deployment script
paullatzelsperger Sep 13, 2021
5ac4888
enable deployment on all feature branches
paullatzelsperger Sep 13, 2021
2b4ba8a
fixed docker copy paths
paullatzelsperger Sep 13, 2021
57bac90
improved logline
paullatzelsperger Sep 14, 2021
58986bc
adapted to PR comments
paullatzelsperger Sep 15, 2021
9189794
adapted to PR comments v2
paullatzelsperger Sep 15, 2021
8c8d4e6
moved control-rest module to samples. threw out old DemoUiApiController
paullatzelsperger Sep 15, 2021
bec48d9
added simple READMEs to describe new modules
paullatzelsperger Sep 16, 2021
1cb4d37
removed empty javadoc comments
paullatzelsperger Sep 16, 2021
23b1ae1
copied multihash libs/files directly into code base
paullatzelsperger Sep 16, 2021
27a1467
updated publishing scripts
paullatzelsperger Sep 19, 2021
98b1a2b
renamed private key resolver. updated build file
paullatzelsperger Sep 19, 2021
cc93811
moved identityhub feature string to IdentityHub
paullatzelsperger Sep 20, 2021
c77cdf9
added test for deserialization
paullatzelsperger Sep 20, 2021
410446f
revamped keyresolver pt 1
paullatzelsperger Sep 20, 2021
166b4ed
added test for vault resolver
paullatzelsperger Sep 20, 2021
47a20fc
fixed test
paullatzelsperger Sep 20, 2021
334f017
fixed test
paullatzelsperger Sep 20, 2021
bd40563
replaced a few hard-coded dependencies with constants
paullatzelsperger Sep 20, 2021
bf7bc0f
Added feature constant
paullatzelsperger Sep 20, 2021
561e41b
formatting, feature-as-constant
paullatzelsperger Sep 21, 2021
3f1761a
wrap concrete public and private keys so that not only RSA keys can b…
paullatzelsperger Sep 22, 2021
a70eeae
fixed core services test
paullatzelsperger Sep 22, 2021
c0cca5b
fixed compile/tests problems after rebase
paullatzelsperger Sep 23, 2021
7bea6f3
added utility method
paullatzelsperger Sep 23, 2021
38b1f49
fixed tests, removed old remnants
paullatzelsperger Sep 23, 2021
e589167
fixed wrong tests, removed old rebase leftovers
paullatzelsperger Sep 23, 2021
9b294b8
added constants file
paullatzelsperger Sep 25, 2021
3a6323c
refactored ion-core packages
paullatzelsperger Sep 27, 2021
83c3ab5
moved IonClient instantiation to a separate extension
paullatzelsperger Sep 27, 2021
93cc8b2
fixed class hierarchy in did document properties
paullatzelsperger Sep 27, 2021
0ea1f19
code-dump from ion demo repo
paullatzelsperger Sep 27, 2021
e2c7eb6
updated README
paullatzelsperger Sep 27, 2021
5ca79f2
checkstyle
paullatzelsperger Sep 27, 2021
f05de2b
move reporting level to error
paullatzelsperger Sep 27, 2021
a55b253
applied code style
paullatzelsperger Sep 27, 2021
3089e3d
improved module structure and dependency graph
paullatzelsperger Sep 28, 2021
e1b3a88
further decoupled some of the modules
paullatzelsperger Sep 28, 2021
dfa304a
checkstyle
paullatzelsperger Sep 28, 2021
a4e6633
changed default did type to crawl (for ion demo)
paullatzelsperger Sep 29, 2021
255a585
fixed deployment of s3 schema
paullatzelsperger Sep 29, 2021
2636065
some refactoring, moving around classes
paullatzelsperger Sep 30, 2021
295397c
moved ion to extensions/
paullatzelsperger Sep 30, 2021
4e06e8a
fixed compiler issues
paullatzelsperger Sep 30, 2021
3afd21d
moved hub verifier out. removed old launchers
paullatzelsperger Sep 30, 2021
dd22361
checkstyle
paullatzelsperger Sep 30, 2021
4eaf0c2
Added dummy verifier
paullatzelsperger Sep 30, 2021
c2820f6
fixed bug during resolver initialization
paullatzelsperger Sep 30, 2021
4b941f9
removed old AzurePrivateKeyResolver
paullatzelsperger Oct 6, 2021
5ea0105
checkstyle
paullatzelsperger Oct 6, 2021
1049657
moved the VaultPrivateKeyResolver to core:bootstrap package
paullatzelsperger Oct 7, 2021
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
Prev Previous commit
Next Next commit
checkstyle
  • Loading branch information
paullatzelsperger committed Oct 4, 2021
commit 5ca79f29c3e0d550e6a9089c3d2c1df2db4c43cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class DistributedIdentityService implements IdentityService {
private final Monitor monitor;

public DistributedIdentityService(VerifiableCredentialProvider vcProvider, DidResolver didResolver, CredentialsVerifier credentialsVerifier, Monitor monitor) {
this.verifiableCredentialProvider = vcProvider;
verifiableCredentialProvider = vcProvider;
this.didResolver = didResolver;
this.credentialsVerifier = credentialsVerifier;
this.monitor = monitor;
Expand Down Expand Up @@ -66,15 +66,15 @@ public VerificationResult verifyJwtToken(String token, String audience) {

//convert the POJO into a usable PK-wrapper:
JwkPublicKey publicKeyJwk = publicKey.get().getPublicKeyJwk();
PublicKeyWrapper publicKeyWRapper = KeyConverter.toPublicKeyWrapper(publicKeyJwk, publicKey.get().getId());
PublicKeyWrapper publicKeyWrapper = KeyConverter.toPublicKeyWrapper(publicKeyJwk, publicKey.get().getId());

monitor.debug("Verifying JWT with public key...");
if (!VerifiableCredentialFactory.verify(jwt, publicKeyWRapper)) {
if (!VerifiableCredentialFactory.verify(jwt, publicKeyWrapper)) {
return new VerificationResult("Token could not be verified!");
}
monitor.debug("verification successful! Fetching data from IdentityHub");
String hubUrl = getHubUrl(did);
var credentialsResult = credentialsVerifier.verifyCredentials(hubUrl, publicKeyWRapper);
var credentialsResult = credentialsVerifier.verifyCredentials(hubUrl, publicKeyWrapper);

monitor.debug("Building ClaimToken");
var tokenBuilder = ClaimToken.Builder.newInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

/**
* Test the {@link DistributedIdentityService} with different key algorithms.
* See {@link WithP_256} and {@link WithSecp256k1} for concrete impls.
* See {@link WithP256} and {@link WithSecp256k1} for concrete impls.
*/

abstract class DistributedIdentityServiceTest {
Expand Down Expand Up @@ -156,7 +156,7 @@ public static class WithSecp256k1 extends DistributedIdentityServiceTest {
}
}

public static class WithP_256 extends DistributedIdentityServiceTest {
public static class WithP256 extends DistributedIdentityServiceTest {
@Override
protected @NotNull JWK getKeyPair() {
return KeyPairFactory.generateKeyPairP256();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
public class EcPrivateKeyPemParser implements KeyParser<ECKey> {

@Override
public boolean canParse(Class<?> aClass) {
return aClass.equals(ECKey.class);
public boolean canParse(Class<?> keyClass) {
return keyClass.equals(ECKey.class);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public IonDidPublicKeyResolver(IonClient ionClient) {
VerificationMethod verificationMethod = didDocument.getVerificationMethod().get(0);
var jwk = verificationMethod.getPublicKeyJwk();
try {
return KeyConverter.toPublicKeyWrapper(jwk, verificationMethod.getId());
return KeyConverter.toPublicKeyWrapper(jwk, verificationMethod.getId());
} catch (IllegalArgumentException e) {
throw new PublicKeyResolutionException("Public Key was not a valid EC Key! Details: " + e.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class KeyConverter {
* @return an {@link ECKey}
* @throws IllegalArgumentException if any of the public key's properties are not valid. Check {@link ECKey} for details.
*/
public static ECKey toECKey(EllipticCurvePublicKey jwk, String id) {
public static ECKey toEcKey(EllipticCurvePublicKey jwk, String id) {
return new ECKey(Curve.parse(jwk.getCrv()),
Base64URL.from(jwk.getX()),
Base64URL.from(jwk.getY()),
Expand Down Expand Up @@ -53,7 +53,7 @@ public static ECKey toECKey(EllipticCurvePublicKey jwk, String id) {
if (!(publicKey instanceof EllipticCurvePublicKey)) {
throw new IllegalArgumentException(format("Public key has 'kty' = '%s' but its Java type was %s!", publicKey.getKty(), publicKey.getClass()));
}
return new EcPublicKeyWrapper(toECKey((EllipticCurvePublicKey) publicKey, id));
return new EcPublicKeyWrapper(toEcKey((EllipticCurvePublicKey) publicKey, id));
default:
throw new IllegalArgumentException(format("Only public-key-JWK of type 'EC' can be used at the moment, but '%s' was specified!", publicKey.getKty()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import javax.crypto.interfaces.DHPrivateKey;
import java.security.interfaces.RSAPrivateKey;
import javax.crypto.interfaces.DHPrivateKey;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import com.nimbusds.jose.JOSEException;
import com.nimbusds.jose.jwk.ECKey;
import org.eclipse.dataspaceconnector.iam.did.spi.resolution.*;
import org.eclipse.dataspaceconnector.iam.did.spi.resolution.DidConstants;
import org.eclipse.dataspaceconnector.iam.did.spi.resolution.DidDocument;
import org.eclipse.dataspaceconnector.iam.did.spi.resolution.EllipticCurvePublicKey;
import org.eclipse.dataspaceconnector.iam.did.spi.resolution.Service;
import org.eclipse.dataspaceconnector.iam.did.spi.resolution.VerificationMethod;
import org.eclipse.dataspaceconnector.ion.spi.IonClient;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand All @@ -11,7 +15,9 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.easymock.EasyMock.*;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.niceMock;
import static org.easymock.EasyMock.replay;
import static org.eclipse.dataspaceconnector.verifiablecredential.TestHelper.readFile;

class IonDidPublicKeyResolverTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@ class KeyConverterTest {

@Test
void toEcKey_illegalParams() {
assertThatThrownBy(() -> KeyConverter.toECKey(null, "some-id")).isInstanceOf(NullPointerException.class);
assertThatThrownBy(() -> KeyConverter.toECKey(new EllipticCurvePublicKey(), "some-id")).isInstanceOf(IllegalArgumentException.class);
assertThatThrownBy(() -> KeyConverter.toEcKey(null, "some-id")).isInstanceOf(NullPointerException.class);
assertThatThrownBy(() -> KeyConverter.toEcKey(new EllipticCurvePublicKey(), "some-id")).isInstanceOf(IllegalArgumentException.class);
}

@Test
void toEcKey_invalidCurve() {
assertThatThrownBy(() -> KeyConverter.toECKey(new EllipticCurvePublicKey("foobar", "EC", "asdf", "ASdfkl"), "some-id"))
assertThatThrownBy(() -> KeyConverter.toEcKey(new EllipticCurvePublicKey("foobar", "EC", "asdf", "ASdfkl"), "some-id"))
.isInstanceOf(IllegalArgumentException.class)
.hasMessageContaining("unsupported curve");
}

@Test
void toEcKey_invalidType_shouldCorrectAutomatically() {
assertThat(KeyConverter.toECKey(new EllipticCurvePublicKey("secp256k1", "foobar", "wSwuib0Eyfsvdb_RPpQQLlFoHsQE4TSlFdncLePp6Zg", "uxjZNS8HQ9krKn5ZXpjBtSAAj9FQXSDlHlEMR2YA7Hs"), "some-id"))
assertThat(KeyConverter.toEcKey(new EllipticCurvePublicKey("secp256k1", "foobar", "wSwuib0Eyfsvdb_RPpQQLlFoHsQE4TSlFdncLePp6Zg", "uxjZNS8HQ9krKn5ZXpjBtSAAj9FQXSDlHlEMR2YA7Hs"), "some-id"))
.isNotNull()
.hasFieldOrPropertyWithValue("kty", KeyType.EC);
}

@Test
void toEcKey_invalidCoordinates() {
assertThatThrownBy(() -> KeyConverter.toECKey(new EllipticCurvePublicKey("secp256k1", "EC", "foobar", "uxjZNS8HQ9krKn5ZXpjBtSAAj9FQXSDlHlEMR2YA7Hs"), "some-id"))
assertThatThrownBy(() -> KeyConverter.toEcKey(new EllipticCurvePublicKey("secp256k1", "EC", "foobar", "uxjZNS8HQ9krKn5ZXpjBtSAAj9FQXSDlHlEMR2YA7Hs"), "some-id"))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("Invalid EC JWK: The 'x' and 'y' public coordinates are not on the secp256k1 curve");

assertThatThrownBy(() -> KeyConverter.toECKey(new EllipticCurvePublicKey("secp256k1", "EC", "wSwuib0Eyfsvdb_RPpQQLlFoHsQE4TSlFdncLePp6Zg", "foobar"), "some-id"))
assertThatThrownBy(() -> KeyConverter.toEcKey(new EllipticCurvePublicKey("secp256k1", "EC", "wSwuib0Eyfsvdb_RPpQQLlFoHsQE4TSlFdncLePp6Zg", "foobar"), "some-id"))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("Invalid EC JWK: The 'x' and 'y' public coordinates are not on the secp256k1 curve");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ public class PemKeyReaderUtility {
@Test
@Disabled
void readPemFile() {
var jwk1 = parsePemAsJWK("/home/paul/dev/ion-demo/keys2/consumer-public.pem");
var jwk2 = parsePemAsJWK("/home/paul/dev/ion-demo/keys2/verifier-public.pem");
var jwk3 = parsePemAsJWK("/home/paul/dev/ion-demo/keys2/provider-public.pem");
var jwk1 = parsePemAsJwk("/home/paul/dev/ion-demo/keys2/consumer-public.pem");
var jwk2 = parsePemAsJwk("/home/paul/dev/ion-demo/keys2/verifier-public.pem");
var jwk3 = parsePemAsJwk("/home/paul/dev/ion-demo/keys2/provider-public.pem");
System.out.println("Public keys: ");
System.out.printf("consumer: %s%n", jwk1);
System.out.printf("verifier: %s%n", jwk2);
System.out.printf("provider: %s%n", jwk3);
}


private JWK parsePemAsJWK(String resourceName) {
private JWK parsePemAsJwk(String resourceName) {

try {
var pemContents = Files.readString(Path.of(resourceName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
import org.eclipse.dataspaceconnector.verifiablecredential.spi.VerifiableCredentialProvider;
import org.junit.jupiter.api.Test;

import static org.easymock.EasyMock.*;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.anyString;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.niceMock;
import static org.easymock.EasyMock.notNull;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.strictMock;

class VerifiableCredentialLoaderExtensionTest {

Expand Down