Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

incident.io 6 min read Case study mediumAdept

Rolling out Roles

incident.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.

Assumes: RBAC conceptsGo basics

Related posts

  • Role Management at Slack

    Slack Engineering mediumAdept

    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.

  • Onboarding yourself as an engineer at incident.io

    incident.io mediumAdept

    New engineers at incident.io onboard themselves by opening a PR to the infrastructure repo that adds them as a user, puts them on a team in a Jsonnet config, and defines a Spacelift dev stack. Once merged, Terraform provisions their dev environment, grants Google Cloud access based on user tags, and syncs Google Group memberships from the same config. The Catalog Importer then maps that team data into incident.io's Team catalog type, so the company's own product is configured as code alongside GCP, Sentry and Spacelift.

  • Now you see me, now you don't: feature-flagging with LaunchDarkly at incident.io

    incident.io mediumAdept

    incident.io ships to production many times a day and uses feature flags to merge large features like Announcement Rules incrementally while hiding them from customers until launch. The team chose LaunchDarkly over building its own system because feature flagging isn't a differentiator, and integrated it across backend and frontend in a day. On the backend, the Go SDK is wrapped in a featureflags package that centralizes flag names as constants, initializes a singleton client, returns clients scoped to user and organization IDs, and supports injecting mocks so tests cover both flag states. On the frontend, the React SDK hook gates UI, and flags are mostly targeted per organization to run beta tests.

  • Organizing ownership: How we assign errors in our monolith

    incident.io mediumAdept

    incident.io assigns error ownership inside its monolith by dividing the codebase into team-owned units (apps, backend feature packages, integrations), each with a required jsonnet module file declaring owner, criticality and customer-facing features. A CI check enforces that every package has an owner, and a script rolls these up into a CODEOWNERS file. Error-wrapping middleware in Go recursively unwraps errors, maps stack-frame source paths against CODEOWNERS to find the deepest owning team, and tags the error with a team field that monitoring and alerting tools use for routing. A manual override is supported, and errors with no identifiable owner stay untagged and fall back to the on-call team.

  • Staying Evergreen: How we automated secure access and repo hygiene in a shared org

    GitHub Engineering mediumAdept

    Evergreen 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.

The quest for software engineering knowledge.

Look:
Layout: