Context
Currently, we are not filtering events based on partnerIDs but with the switch to argus as the webhook storage strategy, we'd like to add a configuration option to filter events by such values.
Task:
To do that (xmidt-org/caduceus#181), caduceus needs access to the partnerIDs the listener registered with. On webhook registration, the value needs to be captured and saved as part of a registration
If JWT validation is enabled, the list(string) value will come from the claim allowedResources.allowedPartners
If JWT validation is not enabled, a header based fall back should be provided (As an example, Tr1d1um already does this: https://github.com/xmidt-org/tr1d1um/blob/b117f90bda5d29cea5283da3abee1165cfbf4921/translation/transport.go#L94)
Context
Currently, we are not filtering events based on partnerIDs but with the switch to argus as the webhook storage strategy, we'd like to add a configuration option to filter events by such values.
Task:
To do that (xmidt-org/caduceus#181), caduceus needs access to the partnerIDs the listener registered with. On webhook registration, the value needs to be captured and saved as part of a registration
If JWT validation is enabled, the list(string) value will come from the claim
allowedResources.allowedPartnersIf JWT validation is not enabled, a header based fall back should be provided (As an example, Tr1d1um already does this: https://github.com/xmidt-org/tr1d1um/blob/b117f90bda5d29cea5283da3abee1165cfbf4921/translation/transport.go#L94)