Skip to content

feat(federation): Federated table sharing - #2786

Merged
blizzz merged 10 commits into
mainfrom
feat/federated-sharing
Aug 27, 2026
Merged

feat(federation): Federated table sharing#2786
blizzz merged 10 commits into
mainfrom
feat/federated-sharing

Conversation

@benjaminfrueh

@benjaminfrueh benjaminfrueh commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Federated table sharing

Allows sharing tables with users on other Nextcloud instances.

Todo

  • Schema, outgoing share and frontend support
  • Incoming share: create local table on receiving instance
  • Read support: fetch columns and rows from owner instance
  • Write support: create, update and delete rows on remote table
  • Permission propagation
  • Delete local table on receiving instance when table or share is deleted on owner instance
  • Update table metadata (title, emoji) when updated on owner instance
  • Update view metadata (title, emoji) when updated on owner instance
  • View federation
  • Admin config to enable/disable tables federation
  • Unit and E2E tests

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔙 Backport requests are created or not needed: /backport to stableX.X
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@benjaminfrueh
benjaminfrueh marked this pull request as draft July 3, 2026 14:40
@benjaminfrueh
benjaminfrueh requested a review from grnd-alt July 3, 2026 14:41
@benjaminfrueh benjaminfrueh changed the title feat(federation): schema, outgoing share and frontend support feat(federation): Federated Table Sharing Jul 3, 2026
@benjaminfrueh benjaminfrueh changed the title feat(federation): Federated Table Sharing feat(federation): Federated table sharing Jul 3, 2026
@AndyScherzinger AndyScherzinger added enhancement New feature or request 2. developing Work in progress labels Jul 3, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Jul 3, 2026
@benjaminfrueh benjaminfrueh moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Productivity team Jul 3, 2026
@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch 7 times, most recently from 403289e to ba97e23 Compare July 8, 2026 07:13
Comment thread lib/Controller/FederationColumnOCSController.php Outdated
@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch from 4da0386 to 35b4e5e Compare July 13, 2026 16:28
@benjaminfrueh
benjaminfrueh marked this pull request as ready for review July 14, 2026 14:33
@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch 2 times, most recently from 1bf2714 to e948b30 Compare July 14, 2026 14:46
@benjaminfrueh benjaminfrueh added this to the v2.3.0 milestone Jul 14, 2026
@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch 5 times, most recently from 8a02508 to 63c7628 Compare July 16, 2026 08:50
@benjaminfrueh

Copy link
Copy Markdown
Contributor Author

Did not entirely check all code paths yet. But the general structure looks good 🔥

What I noticed though: when creating a federated share it instantly shows as a new table on the receiving user's view. In Deck I think we're sending a notification that the user has to confirm before it shows in the app, so user's don't get spammed.

Thanks for the feedback! After checking Deck's shareReceived(), it also seems to insert the board immediately and just sends an informational notification without accept/decline flow.
An "Pending shares" acceptance flow, similar to how Files handles federated shares would maybe be a good addition to both deck and tables federated sharing - maybe we can consider it as a follow-up feature?

@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch from 4beef8f to a38af3d Compare July 17, 2026 14:10
@benjaminfrueh
benjaminfrueh requested a review from grnd-alt July 17, 2026 14:11
@blizzz
blizzz force-pushed the feat/federated-sharing branch from a38af3d to e6485cc Compare July 22, 2026 18:30
namespace OCA\Tables\AppInfo;

use Exception;
use OC\OCM\OCMSignatoryManager;

@blizzz blizzz Jul 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be cool (and more sustainable) when there will be a public interface for this, but definitely out of scope for now, might be accompanied by an issue against server if there is not one yet.

(On second look it might be more complicated than that)

@blizzz blizzz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some things that would be good to have, but no definite blocker by reading the code

Comment thread lib/Controller/Api1Controller.php Outdated
Comment thread lib/Controller/Api1Controller.php Outdated
Comment thread lib/Controller/RowController.php Outdated
Comment thread lib/Controller/RowController.php Outdated
#[RequirePermission(permission: Application::PERMISSION_UPDATE, typeParam: 'nodeCollection')]
#[ApiRoute(verb: 'PUT', url: '/api/2/{nodeCollection}/{nodeId}/rows/{rowId}', requirements: ['nodeCollection' => '(tables|views)', 'nodeId' => '(\d+)'])]
public function updateRow(string $nodeCollection, int $nodeId, int $rowId, mixed $data): DataResponse {
if (is_string($data)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$data could be of type string|array then?

Comment thread lib/Federation/FederationProxy.php
Comment thread lib/Migration/Version002003Date20260630000000.php Outdated
}

public function notifyPermissionUpdate(Share $share): void {
$this->proxy->sendNotification(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if any of those requests do not get through (maybe the remote nextcloud is being updated), will they be retried?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently no retry mechanism, if the notification fails it is logged as a warning.

Comment thread psalm.xml
<referencedClass name="Doctrine\DBAL\Types\Types" />
<referencedClass name="OC\Core\Command\Base" />
<referencedClass name="OC\Http\Client\Response" />
<referencedClass name="OC\OCM\OCMSignatoryManager" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stub would be preferred

Comment thread psalm.xml
<referencedClass name="Doctrine\DBAL\Schema\Table" />
<referencedClass name="Doctrine\DBAL\Types\Types" />
<referencedClass name="OC\Core\Command\Base" />
<referencedClass name="OC\Http\Client\Response" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should have an interface?

Comment thread lib/Federation/FederationProxy.php
Comment thread lib/Federation/FederationProxy.php Outdated
Comment thread lib/Controller/Api1Controller.php Outdated
@samin-z
samin-z force-pushed the feat/federated-sharing branch 2 times, most recently from ac23763 to 6e4b66d Compare August 6, 2026 15:14
benjaminfrueh and others added 5 commits August 20, 2026 20:18
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>

# Conflicts:
#	lib/AppInfo/Application.php
#	psalm.xml
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch from 3bad71c to aec831b Compare August 20, 2026 18:21
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch from aec831b to eb8eb93 Compare August 20, 2026 18:27
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch from aa3787c to 198e5a2 Compare August 21, 2026 18:52
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
@benjaminfrueh
benjaminfrueh force-pushed the feat/federated-sharing branch from 198e5a2 to c0f2f78 Compare August 21, 2026 18:52
… signature verification

Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
@blizzz

blizzz commented Aug 24, 2026

Copy link
Copy Markdown
Member

[Follow up/General tech debt] One thing about Migrations, because i just stumbled across them recently, are the attributes. Can be added as followup, and I do not think we have them in place elsewhere. https://docs.nextcloud.com/server/latest/developer_manual/basics/storage/migrations.html#migrations-and-metadata

@blizzz
blizzz merged commit ded3ca0 into main Aug 27, 2026
79 checks passed
@blizzz
blizzz deleted the feat/federated-sharing branch August 27, 2026 07:48
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 📝 Productivity team Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress AI assisted enhancement New feature or request

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

6 participants