Skip to content

secret is not put in the TransferRequestMessage (for legacy signaling flows) #5753

@ndr-brt

Description

@ndr-brt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions