Skip to content

Document the read privileges CREATE TABLE ... FROM SOURCE requires - #38491

Merged
maheshwarip merged 1 commit into
mainfrom
tonydu/sql-655-docs-create-table-from-source-privileges
Aug 27, 2026
Merged

Document the read privileges CREATE TABLE ... FROM SOURCE requires#38491
maheshwarip merged 1 commit into
mainfrom
tonydu/sql-655-docs-create-table-from-source-privileges

Conversation

@tonydu-mz

@tonydu-mz tonydu-mz commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Document the read privileges CREATE TABLE ... FROM SOURCE requires

Motivation

CREATE TABLE ... FROM SOURCE populates the new table from an existing
ingestion, so creating it reads that source's data.
#38480 makes the privilege requirements match that,
fixing a case where CREATE on the destination schema alone was enough to read
a source the role had been denied (SQL-655, 2026 penetration test finding H02).

The privileges include for CREATE TABLE still lists only the schema and type
requirements, so it understates what the statement needs.

Description

Add the read requirement to create-table.md, the single include used by all
five CREATE TABLE pages and by the generated privileges appendix: SELECT on
the source plus USAGE on its schema.

The note about scope is the part worth reading. The source is the authorization
boundary, so SELECT on it permits attaching any reference that source ingests,
including references with no existing table and columns some existing table
omitted. An admin deciding whether to grant it needs that sentence.

Split out from #38480 so that fix, which is an urgent security finding, is not
gated on a second CODEOWNERS scope. It is accurate to merge this either before
or after #38480: before, it documents a requirement that is about to exist;
after, it closes a gap where the docs understate what is enforced.

Verification

Prose only. Rendering is unchanged in shape, four bullets where there were three.

@linear-code

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown

SQL-655

### Motivation

`CREATE TABLE ... FROM SOURCE` populates the new table from an existing
ingestion, so creating it reads that source's data.
#38480 makes the privilege requirements match that,
fixing a case where `CREATE` on the destination schema alone was enough to read
a source the role had been denied (SQL-655, 2026 penetration test finding H02).

The privileges include for `CREATE TABLE` still lists only the schema and type
requirements, so it understates what the statement needs.

### Description

Add the read requirement to `create-table.md`, the single include used by all
five `CREATE TABLE` pages and by the generated privileges appendix: `SELECT` on
the source plus `USAGE` on its schema.

The note about scope is the part worth reading. The source is the authorization
boundary, so `SELECT` on it permits attaching any reference that source ingests,
including references with no existing table and columns some existing table
omitted. An admin deciding whether to grant it needs that sentence.

Split out from #38480 so that fix, which is an urgent security finding, is not
gated on a second CODEOWNERS scope. It is accurate to merge this either before
or after #38480: before, it documents a requirement that is about to exist;
after, it closes a gap where the docs understate what is enforced.

### Verification

Prose only. Rendering is unchanged in shape, four bullets where there were three.
@tonydu-mz
tonydu-mz force-pushed the tonydu/sql-655-docs-create-table-from-source-privileges branch from d02ca65 to c85b10d Compare August 27, 2026 01:37
@tonydu-mz
tonydu-mz marked this pull request as ready for review August 27, 2026 02:46
@tonydu-mz
tonydu-mz requested a review from a team as a code owner August 27, 2026 02:46
@maheshwarip
maheshwarip merged commit e058fd7 into main Aug 27, 2026
12 checks passed
@maheshwarip
maheshwarip deleted the tonydu/sql-655-docs-create-table-from-source-privileges branch August 27, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants