-
Notifications
You must be signed in to change notification settings - Fork 240
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: provide additional policy scopes #1569
feat: provide additional policy scopes #1569
Conversation
...in/java/org/eclipse/dataspaceconnector/ids/api/multipart/handler/ArtifactRequestHandler.java
Fixed
Show fixed
Hide fixed
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.
You wrote
The first one is contract.offer-generation, which is used during the cataloging phase.
Why not call it contract.cataloging
then? I am not sure whether there could be also policy enforcement during the contract.offering
phase, that may need to be separated in the future. Or call it contract.offer.generation
if we may have subtypes of contract.offer.**
? I know this is hard to decide...
On top of that, I would detail provisioning
. Cause it's resource provisioning, we could name it resource.provisioning
? If we need to separate "resource" actions. Or provisioning.resource
.. don't know if this is too much at the moment but we should not block expandability.
@juliapampus you're right, they should be renamed.
Probably
As the evaluation is done after the |
Codecov Report
@@ Coverage Diff @@
## main #1569 +/- ##
==========================================
- Coverage 67.93% 67.91% -0.03%
==========================================
Files 783 783
Lines 16828 16910 +82
Branches 1068 1091 +23
==========================================
+ Hits 11432 11484 +52
- Misses 4922 4946 +24
- Partials 474 480 +6
Continue to review full report at Codecov.
|
This pull request is stale because it has been open for 7 days with no activity. |
a7a9aab
to
824ebd9
Compare
What this PR changes/adds
It introduces two new policy scopes. The first one is
contract.cataloging
, which is used during the cataloging phase. The previously existing scopecontract.negotiation
is now used during the negotiation itself and to re-evaluate the policies before a new transfer process is created. The other new scope isprovision.manifest.verify
, which is used to evaluate a generatedResourceManifest
to ensure that it fulfils the given policy.For the purpose of evaluating
ResourceManifests
, also two new function interfaces are introduced:ResourceDefinitionRuleFunction
andResourceDefinitionAtomicConstraintFunction
. These are analogous to the existing function interfaces, but are bound to a specific sub-type ofResourceDefinition
and can return a modified version of that definition.Why it does that
Currently, policy evaluation only takes place during the negotiation phase.
Further notes
The interfaces for the
PolicyEngine
and the evaluation functions are moved to thepolicy-spi
and the function interfaces from thepolicy-evaluator
are moved topolicy-engine
, to avoid circular dependencies betweenpolicy-evaluator
,core-spi
andtransfer-spi
.Linked Issue(s)
Closes #1446
Closes #1331
Checklist
no-changelog
)