Skip to content

refactor(console)!: remove per-guild sign-in clients - #197

Merged
TheMeinerLP merged 2 commits into
mainfrom
refactor/remove-guild-sign-in-clients
Nov 8, 2026
Merged

TheMeinerLP merged 2 commits into
mainfrom
refactor/remove-guild-sign-in-clients

Conversation

@TheMeinerLP

@TheMeinerLP TheMeinerLP commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Sturnus serves one team on one Discord server, but the console still carried a way to separate tenants inside one installation. A guild could register its own Outline OAuth client under a slug, and its members signed in through /api/auth/login?guild=…. Nobody uses this, and it made every change to authentication think about a second path.

The login flow had to decide, on every request, whether it was using this deployment's client or a guild's. Its ?guild= branch also had to answer every unknown slug with the same 404, so that a list of names could not be used to find out which organisations are present. The table behind it held OAuth client secrets, wrapped by the master key, and no one rotated them because no one knew they existed.

This change removes the per-guild path. Login has one client again, the installation's Outline client, and a guild parameter on the link is ignored. The table and the guild_id column in the console state are dropped by migration 0014. That migration cannot be undone, so take a database backup before upgrading. The downgrade recreates the empty shapes only.

The sharding removal is a separate pull request. This change follows the OpenSpec change remove-multi-guild-machinery.

Checks

  • ruff check, ruff format --check, mypy --strict: clean
  • pytest: 2605 passed, 0 failed
  • Migration tests: 8 passed. These cover one head, upgrade over a populated guild_oauth_client row, and downgrade to empty shapes.
  • Console and architecture tests pass

BEGIN_COMMIT_OVERRIDE
refactor(console)!: remove per-guild sign-in clients

BREAKING CHANGE: an irreversible migration drops the guild_oauth_client table and console_state.guild_id; take a database backup before upgrading. Sign-in through the installation's Outline client is unchanged.
END_COMMIT_OVERRIDE

Removes the per-guild OAuth sign-in clients: the guild_oauth_client table,
the ?guild= branch of /api/auth/login, the /api/guilds/{id}/oauth-client
routes and console_state.guild_id.

Sign-in through the installation's Outline client is unchanged.

Migration 0014 drops guild_oauth_client and console_state.guild_id. Its
downgrade recreates both empty and restores no rows.

BREAKING CHANGE: the guild_oauth_client table and console_state.guild_id
  are dropped by an irreversible migration; take a database backup before
  upgrading. Sign-in through the installation's Outline client is unchanged.
@TheMeinerLP
TheMeinerLP force-pushed the refactor/remove-guild-sign-in-clients branch from f54ef90 to 129d5d8 Compare November 8, 2026 11:52
@TheMeinerLP
TheMeinerLP merged commit 76a449e into main Nov 8, 2026
12 checks passed
@TheMeinerLP
TheMeinerLP deleted the refactor/remove-guild-sign-in-clients branch November 8, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant