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

Warn if no credentials are in effect for S3 #473

Open
qc00 opened this issue Jun 8, 2023 · 4 comments
Open

Warn if no credentials are in effect for S3 #473

qc00 opened this issue Jun 8, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@qc00
Copy link
Contributor

qc00 commented Jun 8, 2023

Is your feature request related to a problem? Please describe.
When setting S3 credentials via environment variables, aws_auth=true also has to be set, but there's no explicit information about this.

Describe the solution you'd like
Possibilities:

  • Require the URI to have a credential (aws_auth=true or credentials in URI)
  • Print a warning if AWS_* environment variables are set but aws_auth is not.
@qc00 qc00 added the enhancement New feature or request label Jun 8, 2023
@mehertz
Copy link
Collaborator

mehertz commented Jun 19, 2023

I've been thinking about this.

Print a warning if AWS_* environment variables are set but aws_auth is not.

They might not be using AWS env vars. I think this is quite hard to do actually.

Maybe we should focus our efforts on standardising the URI instead?

@qc00
Copy link
Contributor Author

qc00 commented Jun 19, 2023

Yeah, I don't want to tightly couple to any AWSSDK-specific stuff, either.

Maybe something like: if no explicit credentials or aws_auth, make a test connection to the bucket.

Maybe we should focus our efforts on standardising the URI instead?

I am not sure that would necessarily help. My understanding of the user's issue is: the library appears to "open" successfully but the first call fails with an opaque error.

@mehertz
Copy link
Collaborator

mehertz commented Jun 19, 2023

if no explicit credentials or aws_auth, make a test connection to the bucket.

I think that's a good idea. Maybe just HEAD the bucket? Hope that would give a non-200 if you don't have any creds.

@mehertz
Copy link
Collaborator

mehertz commented Jun 21, 2023

We need to be careful not to let this overload storages though. Would be adding a new request per object creation.

qc00 added a commit that referenced this issue Jul 3, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
qc00 added a commit that referenced this issue Jul 3, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
qc00 added a commit that referenced this issue Jul 3, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
qc00 added a commit that referenced this issue Jul 4, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use function
qc00 added a commit that referenced this issue Jul 4, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use function
qc00 added a commit that referenced this issue Jul 4, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use function
qc00 added a commit that referenced this issue Jul 4, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use function
qc00 added a commit that referenced this issue Jul 6, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use one function
qc00 added a commit that referenced this issue Jul 11, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use one function
qc00 added a commit that referenced this issue Jul 11, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use one function
qc00 added a commit that referenced this issue Jul 11, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use one function
qc00 added a commit that referenced this issue Jul 12, 2023
+ warn if AWS auth is being used and machine identity is disabled
+ Refactor S3 fixtures so various errors can be simulated
* Removed pytest-server-fixtures dependency which is a bit old and we only use one function
@poodlewars poodlewars added this to the Release 2 milestone Jul 31, 2023
@mehertz mehertz modified the milestones: 2.0.0, Release 3 Aug 14, 2023
qc00 added a commit that referenced this issue Aug 21, 2023
Also, warn if AWS auth is being used and machine identity is disabled
@mehertz mehertz modified the milestones: Release 3, Release 4 Aug 25, 2023
@poodlewars poodlewars modified the milestones: Release 4, 4.2.0 Oct 24, 2023
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

3 participants