Scopes & Security

Both the In-App AI Assistant and external MCP API Keys are deny-by-default: unless a scope is explicitly enabled, hibase rejects access cleanly.

Security Controls

  • Zero credential exposure: AI tools never access or return database passwords, connector OAuth tokens, or API secrets. Every action runs through your workspace's authenticated API within your configured scopes.
  • Scoped authentication: External MCP clients authenticate with revocable hib_live_... API keys created in Settings → MCP API Keys, while the in-app assistant runs strictly within the scopes configured in Settings → AI Assistant.
  • Strict allowlists & automatic redaction: Tool responses return only permitted metadata fields and automatically redact sensitive credential patterns before responses reach the model or client.
  • Capped live query outputs: Live SQL and connector execution tools enforce row and size caps (up to 500 rows / 512 KB) to prevent oversized data transfers.

The 12 Permission Scopes (3 Tiers)

Think of scopes in three progressive risk tiers:

Allows full structural inspection of pipelines, schedules, schemas, query definitions, and execution logs without reading actual warehouse rows or changing anything.

Scope What It Grants
workflows:read List workflows (paginated summaries), inspect workflow steps & parameters, inspect dependency graph (summary/subgraph), workflow tags, version history, and overdue/failing diagnostics.
logs:read List workflow execution log groups and inspect log entries (including errors_only filtering).
databases:read List connected databases (adapter/host/database name metadata; never passwords) and inspect table lists, columns, types, primary keys, and foreign keys.
queries:read List & inspect saved SQL queries, dry-run SQL template compilation (compile_sql_query against dialect without executing on warehouse), and evaluate hibase templating expressions (test_expression).
connectors:read List connectors, endpoint schemas/parameters, active subscriptions (metadata only, never tokens), and saved connector queries.

Tier 2 — Workflow & Query Authoring / Execution

Allows triggering runs, editing workflows (always version-controlled with commit messages), saving standalone queries, and modifying target schemas.

Scope What It Grants
workflows:run Manually trigger a workflow (run_workflow, full or single step, with optional temporary params) or abort a running workflow (stop_workflow).
workflows:write Create or update workflows (create_or_update_workflow) including inline SQL, connector, and filter queries inside steps_attributes[].
queries:write Create or update standalone saved SQL queries (create_or_update_sql_query) and saved connector queries (create_or_update_connector_query).
schema:write Reserved scope for schema-modifying operations via authorized endpoints.

Tier 3 — Live Data Execution (Opt-In)

Allows the AI to execute queries against your live connected warehouses and external connector APIs, subject to row and byte caps.

Scope What It Grants
queries:execute_sql_read Run read-only SQL (SELECT, WITH, EXPLAIN) via execute_sql_query, execute saved read queries (execute_saved_sql_query), and resolve dynamic step parameter queries (parse_step_params).
queries:execute_sql_write Run modifying/DDL SQL (INSERT, UPDATE, DELETE, MERGE, CREATE, ALTER, DROP, TRUNCATE, GRANT) via execute_sql_query. Also requires queries:execute_sql_read.
queries:execute_connector Execute live connector API queries (execute_connector_query) against an active subscription and endpoint (row-capped).

SQL Read vs. Write Guardrail

Even when queries:execute_sql_read is enabled, hibase rejects any SQL containing mutating or DDL statements (INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, TRUNCATE, MERGE, GRANT, etc.) unless the active key explicitly holds queries:execute_sql_write.

  • Safe workspace analyst / debugger: All 5 Tier 1 metadata scopes (workflows:read, logs:read, databases:read, queries:read, connectors:read).
  • Agentic pipeline builder (most teams): Tier 1 metadata scopes + workflows:write + queries:write (and optionally workflows:run).
  • Full interactive data debugging: Add queries:execute_sql_read and/or queries:execute_connector; keep queries:execute_sql_write disabled unless specifically needed for controlled maintenance tasks.