|  | 
| 25 | 25 | import org.eclipse.edc.spi.system.ServiceExtension; | 
| 26 | 26 | import org.eclipse.edc.spi.system.ServiceExtensionContext; | 
| 27 | 27 | 
 | 
|  | 28 | +import static org.eclipse.edc.connector.contract.spi.validation.ContractValidationService.TRANSFER_SCOPE; | 
| 28 | 29 | import static org.eclipse.edc.policy.model.OdrlNamespace.ODRL_SCHEMA; | 
| 29 | 30 | 
 | 
| 30 | 31 | import java.util.Map; | 
| @@ -57,18 +58,28 @@ public String name() { | 
| 57 | 58 |     public void initialize(ServiceExtensionContext context) { | 
| 58 | 59 |         var monitor = context.getMonitor(); | 
| 59 | 60 | 
 | 
| 60 |  | -        // register use action for both negotiation and transfer scope | 
|  | 61 | +        // register use action for both negotiation scope | 
| 61 | 62 |         ruleBindingRegistry.bind("use", NEGOTIATION_SCOPE); | 
| 62 | 63 |         ruleBindingRegistry.bind("USE", NEGOTIATION_SCOPE); | 
| 63 | 64 |         ruleBindingRegistry.bind(ODRL_SCHEMA + "use", NEGOTIATION_SCOPE); | 
| 64 | 65 | 
 | 
| 65 |  | -        // iterate over claim constraint key map and register functions for negotiation and transfer scope | 
|  | 66 | +        ruleBindingRegistry.bind("use", TRANSFER_SCOPE); | 
|  | 67 | +        ruleBindingRegistry.bind("USE", TRANSFER_SCOPE); | 
|  | 68 | +        ruleBindingRegistry.bind(ODRL_SCHEMA + "use", TRANSFER_SCOPE); | 
|  | 69 | + | 
|  | 70 | +        // iterate over claim constraint key map and register functions for negotiation scope | 
| 66 | 71 |         for (Map.Entry<String, String> entry : CONSTRAINT_KEY_MAP.entrySet()) { | 
| 67 | 72 |             ruleBindingRegistry.bind(entry.getKey(), NEGOTIATION_SCOPE); | 
| 68 | 73 |             policyEngine.registerFunction(NEGOTIATION_SCOPE, Permission.class, entry.getKey(), | 
| 69 | 74 |                 new ClientClaimConstraintFunction<>(monitor, entry.getValue(), VERBOSE)); | 
| 70 | 75 |             policyEngine.registerFunction(NEGOTIATION_SCOPE, Prohibition.class, entry.getKey(), | 
| 71 | 76 |                 new ClientClaimConstraintFunction<>(monitor, entry.getValue(), VERBOSE)); | 
|  | 77 | + | 
|  | 78 | +            ruleBindingRegistry.bind(entry.getKey(), TRANSFER_SCOPE); | 
|  | 79 | +            policyEngine.registerFunction(TRANSFER_SCOPE, Permission.class, entry.getKey(), | 
|  | 80 | +                new ClientClaimConstraintFunction<>(monitor, entry.getValue(), VERBOSE)); | 
|  | 81 | +            policyEngine.registerFunction(TRANSFER_SCOPE, Prohibition.class, entry.getKey(), | 
|  | 82 | +                new ClientClaimConstraintFunction<>(monitor, entry.getValue(), VERBOSE)); | 
| 72 | 83 |         } | 
| 73 | 84 | 
 | 
| 74 | 85 |         // also register reimplementation of standard edc contract expiry check function for negotiation scope | 
|  | 
0 commit comments