-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: add contract definition empty asset selector validator #1786
base: main
Are you sure you want to change the base?
feat: add contract definition empty asset selector validator #1786
Conversation
|
It is used to validate requests that create or update contract definitions via the data management API endpoint. | ||
When enabled, it prevents contract definitions with no asset selector, or an empty one, from being created. | ||
|
||
This extension is included with the standard tractusx-edc distribution, but is disabled by default. To enable it, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would a bit of text to explain why this is required - most people might not know.
I.e. "When enabled, it prevents contract definitions with no asset selector, or an empty one, from being created which elsewise leads to all available assets being included in the Contract Definition"?
Have we already discussed to enable that per default for Tractus-X? I would heavily support that... |
Believe during technical discussion it was set as default disabled to avoid adding breaking changes. Additionally as default it is seen as a "querying" approach, i. e., a filtering view in each no value in asset selector means no filter. Changing this would be adopter's choice. |
In the DR we agreed on "off by default": https://github.com/eclipse-tractusx/tractusx-edc/tree/main/docs/development/decision-records/2025-01-30-empty-asset-selector-validator BTW I don't have strong feelings here |
WHAT
Adds a validator that replaces the existing contract definition validator for the data management API.
WHY
Implementation of #1774
FURTHER NOTES
Additionally to the decision written in the DR, this PR also includes the possibility for a user to bypass the blocker, by specifying a specific private property.
There are cases where bypassing the blocker might be required, and in such cases the user is usually aware of what will happen if the asset selector is left empty.
Closes #1773