Skip to content

Commit

Permalink
chore: fix dast scan
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood committed Nov 29, 2024
1 parent bc34588 commit 529d3f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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());
Expand Down
4 changes: 3 additions & 1 deletion samples/edc-dast/edc-dast-runtime/configuration.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
tx.vault.seed.secrets=client_secret_alias:secret
edc.transfer.proxy.token.signer.privatekey.alias=privatekeyAlias
edc.transfer.proxy.token.verifier.publickey.alias=publickeyAlias

0 comments on commit 529d3f8

Please sign in to comment.