Elffuss BraidHub

kikocis/EDC public

main · 2.3 KiBRenderedRawPermalink
1# Static Callbacks Extension
2
3This extension priovides an implementation and configuration for static callbacks outlined in this [DecisionRecord](https://github.com/eclipse-edc/Connector/tree/main/docs/developer/decision-records/2023-02-28-processing-callbacks#static-endpoints)
4The callacks are built on top of the EDC event system. When an event is fired in EDC all registered callacks will be invoked.
5
6## Configuration
7
8| Parameter name | Description | Mandatory | Default value |
9|---------------------------------------|-------------------------------------------------------------------------------------------------|-----------|---------------|
10| `edc.callback.<name>.uri` | The address used to dispatch a callback notification | true | null |
11| `edc.callback.<name>.events` | The comma separated events on which the callback should be invoked. | true | null |
12| `edc.callback.<name>.transactional` | If the callback should be invoked inside the transactional boundaries of the configured events. | false | false |
13| `edc.callback.<name>.auth-key` | Transport specific header to use for sending an authentication value. | false | null |
14| `edc.callback.<name>.auth-code-id` | The id for the authorization value that will be resolved by the Vault. | false | null |
15
16
17Example configuration with two callbacks:
18
19```bash
20edc.callback.endpoint1.uri=http://localhost:8080/hooks
21edc.callback.endpoint1.events=contract.negotiation,transfer.process
22edc.callback.endpoint1.transactional=true
23
24edc.callback.endpoint2.uri=http://localhost:8081/hooks
25edc.callback.endpoint2.events=contract.negotiation.finalized,transfer.process.completed
26edc.callback.endpoint2.transactional=false
27edc.callback.endpoint2.auth-key=X-API-KEY
28edc.callback.endpoint2.auth-code-id=mysecret
29```
30
31The first one `endpoint1` will be invoked transactionally in all events emitted from the `ContractNegotiation` and `TransferProcess` state machines.
32
33The second one will only be invoked asynchronously only when a `ContractNegotiatin` is finalized and a `TransferProcess` is completed.