What goes wrong
The federation "Pull now" action does not fetch the peer. It passes the peer URL to OpenCatalogi in a parameter OpenCatalogi ignores, so what gets mirrored as the peer's catalogue is this instance's own directory listing. Federation is also off by default and can only be switched on through app config, not in the settings page.
Evidence, re-read at c9760e0
lib/Service/Federation/FederationService.php:428-434 fetchPeerCatalog() gets OCA\OpenCatalogi\Service\DirectoryService and calls $directory->getDirectory(['url' => $peerUrl]). The comment above it says the URL is passed "so OC performs the SSRF-aware HTTP call and returns the published publications".
- OpenCatalogi
lib/Service/DirectoryService.php:2423 getDirectory(array $requestParams), read on ConductionNL/opencatalogi development at 2ccec488, reads only filters, limit, offset and include-federated from $requestParams. It never reads url. It builds its listing from the local directory and this instance's own directory route (opencatalogi.directory.index, :2492-2494).
- The result is used as the peer's entries (:441-446) and written as mirrors into the organisation schema (
FederationService.php:56 PEER_MIRROR_TYPE) by pullPeer().
- Switch:
lib/Service/Federation/FederationConfig.php:56 reads federation_enabled with default false, and lib/Repair/InitializeSettings.php:125-126 seeds it to false. No controller or src/ code writes it. src/views/settings/sections/FederationSettings.vue:56-60 only tells the admin "Enable it in the app configuration", which means occ config:app:set.
Why it matters
An admin who enables federation and presses Pull now gets duplicated local listings labelled as coming from the peer, which silently pollutes the organisation register rather than failing.
Needs a live check
Code reading across two repos. Confirm with a pull against a peer whose catalogue differs from the local one, and compare the mirrored entries.
Surfaced by the capability matrix in stackiq#1072 (merge 38b9938), rows share-federation-pull and share-federation-peers.
What goes wrong
The federation "Pull now" action does not fetch the peer. It passes the peer URL to OpenCatalogi in a parameter OpenCatalogi ignores, so what gets mirrored as the peer's catalogue is this instance's own directory listing. Federation is also off by default and can only be switched on through app config, not in the settings page.
Evidence, re-read at c9760e0
lib/Service/Federation/FederationService.php:428-434fetchPeerCatalog()getsOCA\OpenCatalogi\Service\DirectoryServiceand calls$directory->getDirectory(['url' => $peerUrl]). The comment above it says the URL is passed "so OC performs the SSRF-aware HTTP call and returns the published publications".lib/Service/DirectoryService.php:2423getDirectory(array $requestParams), read onConductionNL/opencatalogidevelopmentat 2ccec488, reads onlyfilters,limit,offsetandinclude-federatedfrom$requestParams. It never readsurl. It builds its listing from the local directory and this instance's own directory route (opencatalogi.directory.index, :2492-2494).FederationService.php:56PEER_MIRROR_TYPE) bypullPeer().lib/Service/Federation/FederationConfig.php:56readsfederation_enabledwith defaultfalse, andlib/Repair/InitializeSettings.php:125-126seeds it tofalse. No controller orsrc/code writes it.src/views/settings/sections/FederationSettings.vue:56-60only tells the admin "Enable it in the app configuration", which meansocc config:app:set.Why it matters
An admin who enables federation and presses Pull now gets duplicated local listings labelled as coming from the peer, which silently pollutes the organisation register rather than failing.
Needs a live check
Code reading across two repos. Confirm with a pull against a peer whose catalogue differs from the local one, and compare the mirrored entries.
Surfaced by the capability matrix in stackiq#1072 (merge 38b9938), rows
share-federation-pullandshare-federation-peers.