Tutorial: Just-in-Time Database Access
- Roles — standing access. A role bundles permissions (
bb.sql.select,bb.sql.ddl, …) and is bound to a user or group, scoped to databases and environments, optionally expiring. Two ways to get one: granted or requested. - Access grants — temporary elevated access. An access grant authorizes a single read-only statement on specific databases — optionally unmasked or exported — for a limited time, after approval.
- Just-in-Time access — the workflow that uses either model to keep standing privileges at zero: request access when needed, have it approved, let it expire. See Just-in-Time Access.
Permissions
SQL Editor classifies each statement you run and checks the matching permission:
For DDL and DML, the environment scope is part of the permission itself: when granting a role that carries
bb.sql.ddl / bb.sql.dml, the granter selects the environments where those statements may run directly. On databases outside those environments, SQL Editor directs the user to create a database change plan and follow the change workflow instead.
Roles
The built-in roles carry these database permissions:
Read covers
bb.sql.select, bb.sql.explain, and bb.sql.info.
*1 In the environments selected when granting the role. It’s still recommended to make schema and data changes through the change workflow for better traceability.
Project Developer and Project Viewer carry no SQL Editor permissions — they hold bb.issues.create and make changes through the change workflow.
A role reaches a member as a project-level binding that carries a scope — all databases in the project, or specific databases, schemas, and tables, plus the environments where DDL/DML run directly — and an optional expiration. A member gets a role either granted by an admin or by requesting it; role definitions and workspace IAM are covered in Roles and Permissions, where you can also build custom roles from individual permissions — e.g. a role that grants only bb.sql.explain.

