> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/engine-guide/redshift/permissions-and-grants.md).

# Permissions and Grants

Set up Redshift roles, grants, and DataOS access for Vulcan.

This is the authorize stage. Complete it before configuring a gateway or writing models.

## Redshift-side permissions and grants

Provision access before configuring a gateway. Three roles are required, each with a distinct scope. Do not collapse them into one.

| Role                | Who holds it                      | Purpose                                                                    |
| ------------------- | --------------------------------- | -------------------------------------------------------------------------- |
| Admin role          | AWS / warehouse admin             | Provisions the cluster, creates databases/schemas, WLM, Spectrum IAM roles |
| Vulcan service role | DB user Vulcan uses via the depot | `CREATE` / `INSERT` / `DELETE` / `MERGE` on target schemas; read sources   |
| Consumer role       | BI users, endpoint consumers      | `SELECT` on published schemas/tables only                                  |

Run minimum grants as admin on the cluster:

```sql
-- Target schemas (adjust names to your project; reference fixture uses bronzev2 / silverv2 / goldv2)
CREATE SCHEMA IF NOT EXISTS bronzev2;
CREATE SCHEMA IF NOT EXISTS silverv2;
CREATE SCHEMA IF NOT EXISTS goldv2;

GRANT USAGE ON SCHEMA bronzev2, silverv2, goldv2 TO vulcan_etl;
GRANT CREATE ON SCHEMA bronzev2, silverv2, goldv2 TO vulcan_etl;
GRANT ALL ON ALL TABLES IN SCHEMA bronzev2 TO vulcan_etl;
GRANT ALL ON ALL TABLES IN SCHEMA silverv2 TO vulcan_etl;
GRANT ALL ON ALL TABLES IN SCHEMA goldv2 TO vulcan_etl;

-- Source / public staging (example)
GRANT USAGE ON SCHEMA public TO vulcan_etl;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO vulcan_etl;
```

Consumer role (read-only):

```sql
GRANT USAGE ON SCHEMA goldv2 TO bi_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA goldv2 TO bi_reader;
```

Verify:

```sql
SELECT current_user, current_database();
SELECT schema_name FROM information_schema.schemata ORDER BY 1;
```

{% hint style="warning" %}
Match semantic identifiers to the physical column casing on the cluster; this is often **lowercase snake\_case**. Mismatches surface later as `column not found` errors in the semantic layer, not at grant time.
{% endhint %}

## DataOS permissions

| Permission                                        | What it unlocks                                        | Who to request from         |
| ------------------------------------------------- | ------------------------------------------------------ | --------------------------- |
| Tenant Access                                     | Build and manage Data Products in the tenant           | DataOS operator / admin     |
| `roles:id:data-dev` (or your tenant's equivalent) | Create and apply Vulcan resources                      | DataOS operator / admin     |
| Can Use on the target Compute                     | Run the Vulcan workload                                | DataOS operator             |
| Can Use on the Redshift Depot                     | Use the configured Redshift connection                 | DataOS operator             |
| `depot:rw:<redshift-depot-name>`                  | Read/write depot for the Vulcan workflow               | DataOS operator             |
| `depot:r:<redshift-depot-name>`                   | Read-only depot (consumer / scan)                      | DataOS operator             |
| Can Use on required Secrets                       | Resolve Redshift credentials and runtime configuration | DataOS operator             |
| Can Use on the `git-sync` Secret                  | Read repository credentials for model-code sync        | DataOS operator / VCS admin |

{% hint style="info" %}
DataOS resource access is deny-by-default. Role tags and depot grants do not grant Can Use access to Compute, Depots, or Secrets.
{% endhint %}

Verify the data-developer tag with `dataos-ctl user get`. Confirm `roles:id:data-dev`, or its tenant equivalent, appears in the **TAGS** column.

Verify the Redshift Depot with `dataos-ctl get -t depot`. Confirm it appears and that you can use it. The production pattern uses `spec.depots` on the Vulcan resource pointing at `dataos://<depot-name>?purpose=rw`.

Typical secret keys: `REDSHIFT_HOST`, `REDSHIFT_PORT`, `REDSHIFT_DATABASE`, `REDSHIFT_USER`, `REDSHIFT_PASSWORD` (bound to depot `purpose: rw` / `query` / `scan`).

### Before you connect checklist

* [ ] Cluster endpoint (`host`) and port **5439** (or custom) documented
* [ ] Database exists; the service user can connect with **SSL** (`sslmode=require`)
* [ ] Target schemas exist or will be created in `before_all` (`CREATE SCHEMA IF NOT EXISTS`)
* [ ] WLM queues admit Vulcan concurrency without chronic queue timeouts
* [ ] `statement_timeout` set for long-running dev sessions if needed (`SET statement_timeout` in `before_all`)
* [ ] After large loads, **`ANALYZE`** runs on hot tables (see the `after_all` pattern in [Materialization Behavior](https://v2.dataos.info/references/engine-guide/redshift/materialization-behavior.md))

### Next step

After access is ready, configure the gateway in [Connect to Redshift](https://v2.dataos.info/references/engine-guide/redshift/connect-to-redshift.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/references/engine-guide/redshift/permissions-and-grants.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
