Role Management at Slack
Slack replaced its coarse guest/member/admin/owner hierarchy with a role-based access control system that grants granular permissions such as ARCHIVE_CHANNEL scoped to an enterprise or workspace entity. Authorization runs as ordered policy rules in the Hack monolith: deny restricted users, then check legacy preferences, then call a containerized Go permissions service over gRPC. That service reads from the same user_id-sharded Vitess store as the monolith. Clients get non-authoritative permissions via the Flannel edge cache and real-time updates in Redux. Rollout went from a loopback service to dark-mode dual reads compared in Prometheus, then light mode, and a codegen CLI built on HHAST lets other teams add roles without touching framework internals.
Related posts
- Rolling out Roles
incident.io mediumAdeptincident.io added role-based access control by mapping a fixed set of customer-facing roles (owner, admin, etc.) to granular internal scopes. A variadic getIdentity(ctx, requiredScopes...) check in Go puts each API's permission behind a one-line change, and generated type-safe scope enums let the TypeScript frontend gate UI such as a GatedButton. Rollout used a per-organization enforcement timestamp with a March 1st deadline and owner opt-in. Initial owners were the original installers and admins were inferred from past product usage, with owners prompted to review both.
- Unified Grid: How We Re-Architected Slack for Our Largest Customers
Slack Engineering mediumAdeptSlack re-architected its backend and clients to replace the workspace-centric model, where session tokens carried a workspace ID used for shard routing and access control, with an org-wide Unified Grid view for Enterprise Grid customers. The work built on earlier Vitess resharding by channel ID and on RTM changes. APIs were fixed in one of three ways: allowing calls that no longer depended on workspace routing, prompting users to pick a workspace, or fanning queries out across the user's workspaces, capped at 50 relevant workspaces per user. The rollout used a "prototype the path" approach: dogfooding internally, two-pass API fixes, a parallel integration test suite run with org context, shared permission helpers and client data-store migrations, finishing in March 2024.
- Email Classification
Slack Engineering mediumAdeptSlack classifies invited email addresses as internal or external, so it can steer users toward Workspace Invites or Slack Connect. The classifier checks unique domains against org settings and the inviter's domain in O(1), then looks up a per-team aggregate of user counts by domain and role in a Vitess table sharded by team_id. A domain counts as internal when it holds at least a configurable share of the team, for example 10%. Counts are kept current with relative +N/-N UPSERTs from asynchronous mutation jobs, and a Healer job recounts users in memory and applies corrective deltas when drift appears, such as negative counts from re-executed jobs. The result is an eventually consistent aggregate that needs no expensive daily backfills.
- Staying Evergreen: How we automated secure access and repo hygiene in a shared org
GitHub Engineering mediumAdeptEvergreen is a Go-based GitHub App that automates quarterly outside-collaborator access reviews and stale-repo archival in a shared org of 1,400+ GitHub employees, customers and partners, built entirely from native primitives: scheduled Actions firing repository_dispatch, webhooks, issue checklists, custom properties, and per-repo JSON state files in git that double as the audit trail. It fails secure by revoking all access when a review goes unanswered, fails closed by keeping reviews pending until every removal succeeds, and never deletes anything. Rollout relied on a DRY_RUN mode, logfmt logs in Splunk, and proactive pacing to stay under GitHub's secondary content-creation rate limits of 80 requests/minute and 500/hour.
- This Week at Zed Industries: #15
Zed mediumAdeptZed's weekly team update covers several threads of editor work. Project search now streams local results as soon as they are found instead of waiting for the whole search to finish, and new text manipulation and case-conversion commands have landed. A GitHub issue-ranking script was rewritten to use a constant number of API requests, and inlay hint performance is being reworked. The most substantial section redesigns the Channels permission model: cascading ACL roles across a channel DAG allowed a trivial privilege escalation, and adding per-edge "Inherits up to" filters, inspired by object capabilities, closes the hole while keeping human-friendly membership roles. Nathan also sketches a WASM/V8 plugin proposal and a Rosé Pine-based theme schema, where Hsla color ranges are sampled for each UI component in a fast-compiling GPUI playground.