-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
Iceberg Database does not respect s3.endpoint
setting of catalog config
#74558
Comments
with that unmerged implementation, do you also have "null" for credentials, but non-null endpoint parameter? E.g. I got
|
@kssenii Hm strange, no, I get the credentials. They need to be set as environment variables, though. E.g. the catalog (from {
"name": "test_s3_catalog",
// ...
"storageConfigInfo": {
"storageType": "S3_COMPATIBLE",
"s3.endpoint": "https://my.s3.endpoint",
"s3.credentials.catalog.accessKeyId": "ACCESS_KEY_ID", // this needs to match the name(!) of the environment variable holding the actual value
"s3.credentials.catalog.secretAccessKey": "SECRET_ACCESS_KEY",
// ...
}
} and the polaris pod looks like this (I actually have secret refs there, but it's simplified for illustration): spec:
containers:
- name: polaris
env:
- name: AWS_REGION
value: irrelevant
- name: ACCESS_KEY_ID
value: foo
- name: SECRET_ACCESS_KEY
value: bar So when I query the catalog API (from {
// ...
"config": {
"s3.path-style-access": "true",
"s3.access-key-id": "foo",
"s3.secret-access-key": "bar",
"s3.endpoint": "https://my.s3.endpoint",
"client.region": "irrelevant"
}
} |
The culprit was |
Interesting 🤔 For me it works with that setting, as I need it because the ceph cluster I connect to doesn't have STS configured. Skipping the indirection makes Polaris return the static credentials instead of generating an STS token on demand. Tbh, I would not have expected this to have an impact on the |
Support for |
Describe the unexpected behaviour
When using an Iceberg database/table with
vended_credentials
, the config settings3.endpoint
from the REST catalog is not used. Instead, the request is sent to AWS (unless astorage_endpoint
is explicitly set in the database engine settings).How to reproduce
clickhouse/clickhouse-server:head
with dockerSELECT count() FROM test.<table.name>
Expected behavior
The underlying request should fire against the
s3.endpoint
configured in the catalog and successfully return data.Error message and/or stacktrace
This error is returned:
This indicates that the request is fired against the default AWS S3 endpoint (ending up in an authorization error) instead of the configured one.
Additional context
I would expect the logic to be somewhere around here, where the response from the
api/catalog/v1/test_s3_catalog/namespaces/<namespace>/tables/<table>
is processed. This response does include theconfig
object (if headerX-Iceberg-Access-Delegation:vended-credentials
is set) and that object includes thes3.endpoint
setting, but it's not used by ClickHouse.When adding
storage_endpoint = 'http://<S3_ENDPOINT>/<BUCKET_NAME>'
to the database engine settings, the request works, but this would contradict one of the key advantages/features of a REST catalog: abstracting away the storage implementation.The text was updated successfully, but these errors were encountered: