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

chore: fix dast scan #1690

Merged
merged 1 commit into from
Nov 29, 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
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
Loading