Skip to content

Rework DataFlowPropertiesProviderExtension #2669

@arnoweiss

Description

@arnoweiss

WHAT

The DataFlowPropertiesProviderExtension populates the DataFlowStartMessage (sent today from provider controlplane to provider dataplane) and the TransferStartMessage (sent from provider controlplane to consumer controlplane) with the https://w3id.org/tractusx/auth/audience property set to the counterparty's did. This did is used by the provider dataplane to perform the token refresh. Currently, that extension has a dependency on the BDRS.

That should be changed because there's an implicit dependency from the BDRS to the token refresh mechanism. That makes it unusable for other Dataspaces.

WHY

Enable downstream projects to use the refresh feature without duplicating the extension

HOW

I think there's three options

  1. leave everything as-is because this activity will likely be disrupted when the DPS features are downstreamed.
  2. split extension in two as sketched below. The refresh mechanism could remain untouched.
    1. legacy: checks if assignee is BPN and calls BDRS to resolve it to a did. Populates https://w3id.org/tractusx/auth/audience with did. Does nothing otherwise.
    2. default: checks if assignee is a did and populates tx-auth:audience with did. Does nothing otherwise.
  3. contemporary tractusx-edcs always set the assignee to a did. This might justify to rework the refresh mechanism such that it works without https://w3id.org/tractusx/auth/audience entirely. This would impact DataPlaneTokenRefreshServiceImpl and AuthTokenAudienceRule.

FURTHER NOTES

This isn't urgent but could remove a set of technical debt that is currently inherited by each connector using the tx token refresh mechanism.

Some more analysis on Option 3: AuthTokenAudienceRule could also evaluate against participantId or participant_Id which hold the same value as https://w3id.org/tractusx/auth/audience. All are in accessTokenData.additionalProperties() [1].

I'm unsure if it's a plausible scenario that there's connectors that still have BPNs in participantId or participant_id persisted in the AccessTokenStore

[1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlaterImportant issue, but not urgent

    Type

    No type

    Projects

    Status

    Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions