Skip to content

WIP: Feat/federation#7330

Draft
grnd-alt wants to merge 22 commits intomainfrom
feat/federation
Draft

WIP: Feat/federation#7330
grnd-alt wants to merge 22 commits intomainfrom
feat/federation

Conversation

@grnd-alt
Copy link
Member

@grnd-alt grnd-alt commented Oct 21, 2025

Checklist for federation features:

  • share board to federated user on trusted instance
  • share board to federated user on any instance (not-trusted)
  • read Board data from incoming federated share
  • add Cards to incoming federated shares
  • update cards on incoming share (description assign user etc)
  • create Stacks on incoming share
  • delete Stacks on incoming share
  • We should think about if color and name should be per-instance or synced across federated shares
  • update permissions on outgoing federated share
  • Administration settings to restrict federation
  • Better visual indication for remote users in share list

Out of scope for the first round

  • manage board (set color, change name etc.)
  • reshare incoming federated share
  • Attachments
  • Comments
  • List Activity on incoming federated shares
  • List Activity from federated users correctly

How to test this

with nextcloud-docker-dev

  • checkout server branch feat/deck-federation
  • checkout deck branch feat/federation
  • docker compose up -d nextcloud nextcloud2
  • wait for full startup
  • in the web ui:
    • go administration settings > sharing
    • under "Add trusted server" add http://nextcloud.local and http://nextcloud2.local respectively for the other instance
  • docker compose exec nextcloud occ app:enable deck && docker compose exec nextcloud2 occ app:enable deck
  • build deck: npm ci && npm run dev
  • docker compose exec -ti nextcloud occ background-job:worker
  • in a second terminal: docker compose exec -ti nextcloud2 occ background-job:worker
  • docker compose exec nextcloud occ federation:sync-addressbooks && docker compose exec nextcloud2 occ federation:sync-addressbooks
  • in the admin sharing settings the trusted server should show a check mark on both instances like this:
image
  • now federated users can be found when sharing a deck board

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

3 more comments i had pending while we looked through it in the call

$schema = $schemaClosure();

$tableName = 'deck_boards_external';
if ($schema->hasTable($tableName)) {
Copy link
Member

Choose a reason for hiding this comment

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

We should put all db changes of this pr in one migration file before merging

}

public function getExternalBoardFromRemote(Board $localBoard):DataResponse {
$shareToken = $localBoard->getShareToken();
Copy link
Member

Choose a reason for hiding this comment

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

Probably safeguard that the board has a share token here, as we discussed in the call this is checked before in the controller but should be here as well in case this is used in other places

public function getExternalBoardFromRemote(Board $localBoard):DataResponse {
$shareToken = $localBoard->getShareToken();
$participantCloudId = $this->cloudIdManager->getCloudId($this->userId, null);
$ownerCloudId = $this->cloudIdManager->resolveCloudId($localBoard->getOwner());
Copy link
Member

Choose a reason for hiding this comment

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

Worth to double check the length of the owner column so we can properly fit any federated cloud ids in it

@grnd-alt grnd-alt self-assigned this Oct 30, 2025
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Oct 30, 2025
@grnd-alt grnd-alt moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Productivity team Oct 30, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

🐢 Performance warning.
It looks like the query count of the integration tests increased with this PR.
Database query count is now 83373 was 82774 (+0.72%)
Please check your code again. If you added a new test this can be expected and the base value in tests/integration/base-query-count.txt can be increased.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

🐢 Performance warning.
It looks like the query count of the integration tests increased with this PR.
Database query count is now 83371 was 82774 (+0.72%)
Please check your code again. If you added a new test this can be expected and the base value in tests/integration/base-query-count.txt can be increased.

@grnd-alt grnd-alt force-pushed the feat/federation branch 3 times, most recently from f36ef61 to 41b05a6 Compare November 15, 2025 17:08
@grnd-alt grnd-alt force-pushed the feat/federation branch 2 times, most recently from 30048a0 to 1ba8c21 Compare February 4, 2026 09:24
@grnd-alt grnd-alt force-pushed the feat/federation branch 2 times, most recently from 277a420 to 8587fb9 Compare February 10, 2026 12:31
Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

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

Gives a good impression! 🙂

As discussed in the call:

  • naming of new controllers
  • updating cards
  • taking global admin federations settings into account as mandatory
  • (some code style nitpicks)

grnd-alt and others added 12 commits February 16, 2026 16:08
Signed-off-by: grnd-alt <github@belakkaf.net>
Signed-off-by: grnd-alt <github@belakkaf.net>
Signed-off-by: grnd-alt <github@belakkaf.net>
feat: set accessToken from FederationMiddleware
Signed-off-by: grnd-alt <github@belakkaf.net>
Signed-off-by: grnd-alt <github@belakkaf.net>
Signed-off-by: grnd-alt <github@belakkaf.net>
Signed-off-by: grnd-alt <github@belakkaf.net>
Signed-off-by: grnd-alt <github@belakkaf.net>
Signed-off-by: grnd-alt <github@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
$this->configService->ensureFederationEnabled();
$sharedBy = $this->userManager->get($this->userId);
$board = $this->find($boardId);
$token = $this->random->generate(32);

Choose a reason for hiding this comment

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

Nitpick: to follow nextcloud patterns, could consider moving this magic number into a const, maybe DeckFederationProvider::TOKEN_LENGTH and reuse it in the migrations too.

@grnd-alt grnd-alt force-pushed the feat/federation branch 4 times, most recently from bcd956d to 480e269 Compare February 17, 2026 12:07
Signed-off-by: grnd-alt <git@belakkaf.net>
Signed-off-by: grnd-alt <git@belakkaf.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗️ In progress

Development

Successfully merging this pull request may close these issues.

4 participants