Skip to content

gcs table function requires fewer permissions than s3 #70567

@jesse-triplewhale

Description

@jesse-triplewhale

self-hosted 24.8.3.59

It seems that the gcs table function requires fewer permissions than the s3 function, even though it is an alias of it according to the docs

as user default

:) create user u
:) grant create temporary table on *.* to u

as user u

:) select *
from gcs(
        'https://storage.googleapis.com/...',
        <hmac_key>,
        <hmac_secret>,
        'CSV',
        'a String, b String, c String'
    );

Query id: d4c18e52-383d-47d5-8ead-90dae8763587

   ┌─a─┬─b─┬─c─┐
1. │ d │ e │ f │
   └───┴───┴───┘

1 row in set. Elapsed: 0.114 sec. 
:) select *
from s3(
        'https://storage.googleapis.com/...',
        <hmac_key>,
        <hmac_secret>,
        'CSV',
        'a String, b String, c String'
    );

Query id: 0e8e7c5c-6cfb-4411-97bb-f152fd1beddf

Elapsed: 0.002 sec. 

Received exception from server (version 24.8.3):
Code: 497. DB::Exception: Received from localhost:9000. DB::Exception: u: Not enough privileges. To execute this query, it's necessary to have the grant CREATE TEMPORARY TABLE, S3 ON *.*. (ACCESS_DENIED)

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasecomp-rbacAuthorization: roles, grants, quotas, row-level security, access checks.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions