-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Connect to Amazon S3 without specifying Credentials #8
Comments
Yes @jmsvl You can create a new IAM user for your application only (with minimal access rights) and use its credentials. |
The situation I detected is specifically for Amazon S3 and the classes created for this specific storage type: The constructor for AmazonS3Service does not allow empty values for AccessKeyId and SecretAccessKey (ArgumentException thrown on the constructor code if any of these variables are empty or null). But the method to Get the AmazonS3Client calls GetAwsCredentials that tries to get Credentials from CredentialProfileStoreChain and, if there's no value defined for AccessKeyId and SecretAccessKey (impossible because of constructos ArgumentExceptions), tries to get from Env Variables (unreachable method) |
These parameters are not optional at this moment. You must have to provide them in the configuration. |
@a-patel this is becoming a big compliance issue. Is there any way I can make a pull request to fix this? |
@firedeepan Let me work on this and release a new version. |
I have released the 9.0.0 version with this change. Configuration parameters are conditionally optional. Below is the way to authenticate with AWS:
|
It seems that it is not possible to leave the AccessKeyId and SecretAccessKey values blank so the library would use the EnvironmentVariablesAWSCredentials.
The Argument validations for AccessKeyId and SecretAccessKey are really necessary on AmazonS3Service constructor?
The text was updated successfully, but these errors were encountered: