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

S3 security via query interception #46

Closed
danthegoodman1 opened this issue Jul 4, 2023 · 3 comments
Closed

S3 security via query interception #46

danthegoodman1 opened this issue Jul 4, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@danthegoodman1
Copy link
Owner

Since relying on IAM only works with solutions like minio, we can intercept S3 read conditions.

For example if our IAM allows reading of all objects in a bucket (path), but we have the tenant ID as the prefix for an object path, we can intercept the reads to that S3 bucket and ensures that only valid files would be read (otherwise cancel the query).

DuckDB has an inherent issue here that we'd be looking at only allowing S3 querying to a single bucket at a time, unlike clickhouse which can use the s3 table engine and read from multiple private buckets per-query.

For example a tenant would not be able to join data on their own private s3 bucket.

@danthegoodman1
Copy link
Owner Author

Realted to #45

@danthegoodman1
Copy link
Owner Author

Apparently with DuckDB you can use query params the same as the settings to query buckets in-line like:

s3://bucket/path?s3_endpoint=...&s3_access_key_id=...

@danthegoodman1
Copy link
Owner Author

Because of the above, we could also achieve security by injecting AWS credentials into the final query, rather than having them within the session, so that read_parquet can't be abused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant