From 529d3f86cf17e710f3793a03c6c6f8e8ece71934 Mon Sep 17 00:00:00 2001 From: Enrico Risa Date: Fri, 29 Nov 2024 09:58:31 +0100 Subject: [PATCH] chore: fix dast scan --- .../org/eclipse/tractusx/edc/dast/DastSeedExtension.java | 8 ++++---- .../edc-dast/edc-dast-runtime/configuration.properties | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/samples/edc-dast/edc-dast-extensions/src/main/java/org/eclipse/tractusx/edc/dast/DastSeedExtension.java b/samples/edc-dast/edc-dast-extensions/src/main/java/org/eclipse/tractusx/edc/dast/DastSeedExtension.java index 1a8a30321..42c2ca4dd 100644 --- a/samples/edc-dast/edc-dast-extensions/src/main/java/org/eclipse/tractusx/edc/dast/DastSeedExtension.java +++ b/samples/edc-dast/edc-dast-extensions/src/main/java/org/eclipse/tractusx/edc/dast/DastSeedExtension.java @@ -55,7 +55,6 @@ import org.eclipse.edc.spi.EdcException; import org.eclipse.edc.spi.security.Vault; import org.eclipse.edc.spi.system.ServiceExtension; -import org.eclipse.edc.spi.system.ServiceExtensionContext; import java.security.InvalidAlgorithmParameterException; import java.security.KeyPair; @@ -106,8 +105,7 @@ private static JsonArray types(String type) { } @Override - public void initialize(ServiceExtensionContext context) { - ServiceExtension.super.initialize(context); + public void prepare() { var keyPair = generateKeyPair(); var participantKey = getKeyPairAsJwk(keyPair, METHOD_ID); @@ -164,10 +162,12 @@ private DidDocument boostrap(ParticipantContextService participantContextService .keyId(KEY) .publicKeyJwk(participantKey.toPublicJWK().toJSONObject()) .privateKeyAlias(PRIVATE_METHOD_ID) + .active(true) .build(); var participantManifest = ParticipantManifest.Builder.newInstance() .participantId(DID) + .active(true) .did(DID) .key(key) .build(); @@ -206,7 +206,7 @@ private DidDocument generateDidDocument(JWK jwk) { private String toBase64(String s) { return Base64.getUrlEncoder().encodeToString(s.getBytes()); } - + private KeyPair generateKeyPair() { try { KeyPairGenerator gen = KeyPairGenerator.getInstance("EC", new BouncyCastleProvider()); diff --git a/samples/edc-dast/edc-dast-runtime/configuration.properties b/samples/edc-dast/edc-dast-runtime/configuration.properties index e08fcccd1..425bdba50 100644 --- a/samples/edc-dast/edc-dast-runtime/configuration.properties +++ b/samples/edc-dast/edc-dast-runtime/configuration.properties @@ -27,4 +27,6 @@ web.http.sts.port=8990 web.http.sts.path=/v1/sts edc.api.auth.key=password tx.edc.iam.iatp.bdrs.server.url=http://localhost:8081 -tx.vault.seed.secrets=client_secret_alias:secret \ No newline at end of file +tx.vault.seed.secrets=client_secret_alias:secret +edc.transfer.proxy.token.signer.privatekey.alias=privatekeyAlias +edc.transfer.proxy.token.verifier.publickey.alias=publickeyAlias \ No newline at end of file