Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: credentials for external sources should be enforced #11086

Closed
arkbriar opened this issue Jul 20, 2023 · 2 comments · Fixed by #11120
Closed

bug: credentials for external sources should be enforced #11086

arkbriar opened this issue Jul 20, 2023 · 2 comments · Fixed by #11120
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@arkbriar
Copy link
Contributor

arkbriar commented Jul 20, 2023

Describe the bug

For now, the credentials can be omitted, e.g,.

CREATE TABLE side_input(
      key BIGINT PRIMARY KEY,
      value VARCHAR
    )  WITH (
    connector = 's3',
    s3.region_name = 'us-east-1',
    s3.bucket_name = 'xxxx',
    match_pattern = 'side-input.csv'
    ) FORMAT PLAIN ENCODE CSV (
        without_header = 'true',
        delimiter = ','
    );

, and RisingWave will use the local AWS credentials to access the S3 bucket.

It might be handy for local deployments but it's dangerous when RisingWave is serving external queries. There's a chance that the querier can have access to files in the RisingWave's state store.

Error message/log

ERROR:  QueryError: internal error: connector error: service error

To Reproduce

No response

Expected behavior

I expected to see that the credentials are enforced and the SQL is rejected because lacking of them, like what Snowflake does.

CREATE TABLE side_input(
      key BIGINT PRIMARY KEY,
      value VARCHAR
    )  WITH (
    connector = 's3',
    s3.region_name = 'us-east-1',
    s3.bucket_name = 'xxxx',
    s3.credentials.access='dummy',
    s3.credentials.secret='dummy',
    match_pattern = 'side-input.csv'
    ) FORMAT PLAIN ENCODE CSV (
        without_header = 'true',
        delimiter = ','
    );

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@arkbriar arkbriar added the type/bug Something isn't working label Jul 20, 2023
@github-actions github-actions bot added this to the release-1.1 milestone Jul 20, 2023
@huangjw806
Copy link
Contributor

Only when the bucket is Publicly accessible, we can not write ak, sk. As long as the bucket is private, we must provide ak, sk?

@arkbriar
Copy link
Contributor Author

Only when the bucket is Publicly accessible, we can not write ak, sk. As long as the bucket is private, we must provide ak, sk?

Yes. And for those not provided with AK/SK, we shouldn't allow them to use the local ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants