Bug Report
Describe the Bug
Currently the VaultDataAddressStore is reading a "secret" from the vault (based on the keyName) and puts it in the DataAddress when a TransferRequestMessage needs to be dispatched:
|
var dataDestination = Optional.ofNullable(originalDestination) |
|
.map(DataAddress::getKeyName) |
|
.map(key -> vault.resolveSecret(transferProcess.getParticipantContextId(), key)) |
|
.map(secret -> originalDestination.toBuilder().property(EDC_DATA_ADDRESS_SECRET, secret).build()) |
|
.orElse(originalDestination); |
problem is that this happens only when the address is not stored in the vault, so, for new transfers, "never", so potentially all the PUSH transfers could be broken since version 0.16.0 (verified in downstream project mds-edc: PR).
note that this fix is necessary only for legacy signaling data flow, with the new DPS the DataAddress is completely managed by the DataPlane and it will already bring the related secrets with it.
Expected Behavior
if "keyName" is set, the secret is fetched from the vault in any case.
Context Information
- EDC 0.16.0
- current main as well
Possible implementation
when a DataAddress is stored, if it contains the keyName property, look up for the secret in the vault, if it exists, put it in the DataAddress and remove the keyName, then store the DataAddress in the vault.
This way, the secrets will always be stored together with the DataAddress securely in the vault
Bug Report
Describe the Bug
Currently the
VaultDataAddressStoreis reading a "secret" from the vault (based on the keyName) and puts it in the DataAddress when aTransferRequestMessageneeds to be dispatched:Connector/core/control-plane/control-plane-transfer/src/main/java/org/eclipse/edc/connector/controlplane/transfer/dataaddress/VaultDataAddressStore.java
Lines 118 to 122 in 64cadb7
problem is that this happens only when the address is not stored in the vault, so, for new transfers, "never", so potentially all the PUSH transfers could be broken since version 0.16.0 (verified in downstream project
mds-edc: PR).note that this fix is necessary only for legacy signaling data flow, with the new DPS the
DataAddressis completely managed by the DataPlane and it will already bring the related secrets with it.Expected Behavior
if "keyName" is set, the secret is fetched from the vault in any case.
Context Information
Possible implementation
when a
DataAddressis stored, if it contains thekeyNameproperty, look up for the secret in the vault, if it exists, put it in theDataAddressand remove thekeyName, then store theDataAddressin the vault.This way, the secrets will always be stored together with the
DataAddresssecurely in thevault