-
Notifications
You must be signed in to change notification settings - Fork 159
S3 Explicit Credentials #8354
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 Explicit Credentials #8354
Conversation
b347232 to
d3448f5
Compare
royendo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice,
Getting Strange Behavior, likely because PLAT-278 was just merged but not applied.
steps to reproduce.
- create s3 cred with wrong creds
- create s3 cred with right creds
- create model with appropriate bucket path that cred_2 can access but it fails due likley using cred 1 in the backend.
Did a quick test, lets go ahead and add the
create_secrets_from_connectors: s3 key into the YAML, solves the above issue. (this will be for all cloud storage: azure, s3, gcs)
Second issue is the name of the YAML. looks like its iterating on s3, s4 due to the integer.

https://jam.dev/c/f3536ced-5c16-411f-b6fb-add0f9b3dcfb
Other than that looks good! public buckets working too.
d3448f5 to
3604ff3
Compare
Fixed in a38d1df |
Is this part of the scope of the ticket? I don't see frontend changes for https://linear.app/rilldata/issue/PLAT-278/support-create-secrets-from-connectors-for-duckdb @royendo |
|
adding frontend changes isn't part of the scope in PLAT-278. |
9135a0e to
d80c37b
Compare
Added in d80c37b Can you also provide a brief explanation of when the |
royendo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also provide a brief explanation of when the create_secrets_from_connectors: s3 function should be included in a S3 model file? If no S3 connector file is created, should we omit the create_secrets_from_connectors function from the model file?
So basically today, we(duck) does some magic to select which credentials to use if you have multiple secrets defined. In my QA i had two connectors and it was 50/50 on which connector it wanted to use. so we add it in on Rill side to ensure its using the correct one.
Id pick to not add anything to the YAML for public sources. This makes the logic easier as we wont need to consider "which one should we add?"
A few things i noticed:
- it doesnt grab the correct connector_name when multiple connectors
- cant see
create_secrets_from_connectorsin model preview
https://jam.dev/c/5dd636b6-2703-4c58-bd03-c0a6f8c35fbf
We currently don’t know which connector instance name to use until submission because the lookup happens asynchronously during submission. Update: Oh! I think I'm misunderstanding this flow. We will get the connector instance name when user is in the multi step form. Update: Added the fix fb5605b |
d0aa62e to
fb5605b
Compare
royendo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost!
one strange behavior i see is that
create_secrets_from_connectors: s3
works even when there is no connector present.
Code Review: Abstractions and Function BoundariesThis PR introduces good patterns but has several areas that need attention before merge. Focusing on code structure and boundaries: 🚨 Blocking Issues1. Validation Logic Broken (
|
ericpgreen2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some specific comments below, and also see the Claude Code comment above. Most importantly, please add e2e tests for the S3 flow.
| Description: "Optional external ID to use when assuming an AWS role for cross-account access.", | ||
| }, | ||
| }, | ||
| SourceProperties: []*drivers.PropertySpec{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these used anymore? Can we delete them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }) | ||
| .join("\n"); | ||
|
|
||
| // Add create_secrets_from_connectors for S3 models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused that we're creating model YAML within a compileSourceYAML function. To match the compileConnectorYAML function, shouldn't we have a compileModelYAML function that accepts the connectorName as a parameter? Then we can avoid passing a connectorInstanceName to this compileSourceYAML function, which is quite confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compileSourceYAML is the old naming convention. I've cleaned it up in this commit 5c7d43e
| } | ||
| } | ||
|
|
||
| async function resolveConnectorInstanceName( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a function-level comment to describe what this does?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we don't have a formalized concept of a connector instance. So it's a bit confusing to see that terminology introduced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Superseded by #8467 |




This PR supports explicit credentials for S3 connector. Closes https://linear.app/rilldata/issue/APP-396/s3-explicit-credential-flow-for-models
Checklist: