Repository navigation
feat(ocm): support new format of notfication payload - #66049
cristianscheid wants to merge 1 commit into
Conversation
d447fab to
6f5f300
Compare
7ca357c to
a1de777
Compare
a1de777 to
225e57a
Compare
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
225e57a to
7e38c74
Compare
|
Just for the record, since we agreed that deprecating IMO, deprecating would only make sense in a follow up where we offer an alternative way to handle old format notifications (using result from event listeners instead of cloud federation provider). This PR is focused only on supporting the new format. |
| // http-sig advertisement requires a jwksUri | ||
| $provider->setJwksUri($this->signatoryManager->getLocalJwksUri()); | ||
| $provider->setCapabilities(['http-sig']); | ||
| $provider->setCapabilities(['http-sig', 'notification-sender-domain']); |
There was a problem hiding this comment.
This is not standardized, so either it needs to be proposed as a change to the spec, or we need some other way to figure out if the peer has this capability.
There was a problem hiding this comment.
Since the spec already has the notifications capabilty and nextcloud already anounces it, I think the cleanest thing to do is to look at apiVersion in the discovery, and if it does not say 1.0-proposal1 send the new notifications. Then we update the code to actually set the correct apiVersion instead of setting it in the nostandard version.
|
Closing this PR for now in favor of #66628 |
Summary
/ocm/notificationssenderDomainfield:https://github.com/cs3org/OCM-API/blob/v1.5.0/IETF-OCM.md#notifications
https://datatracker.ietf.org/doc/html/draft-ietf-ocm-open-cloud-mesh-07#name-notifications
RequestHandlerController::receiveNotification()checks whether the payload has asenderDomainfield:senderDomainfield: handles it with the new formatsenderDomainfield: handled as beforesenderDomain(checked withIOCMDiscoveryService::getIncomingSignedRequestFromDomain())CloudFederationProviderFiles), anOCMNotificationReceivedEventis dispatched, which apps can listen to and act onOCMNotificationReceivedEvent::setResult()ISenderDomainAwareCloudFederationNotification, which extendsICloudFederationNotificationwithsenderDomainandshareTypenotification-sender-domainChecklist
3. to review, feature component)stable32)AI (if applicable)