shieldproject / shield

A standalone system that can perform backup and restore functions for a wide variety of pluggable data systems
MIT License
367 stars 69 forks source link

[BUG] S3 use_instance_profile option doesn't actually use instance profile #686

Closed thomasmitchell closed 4 years ago

thomasmitchell commented 4 years ago

Describe the bug

we assign use_instance_profile to a temporary variable and then never assign it to the field in the Endpoint object here. As a result, IAM Instance Profile support is never really activated and the plugin complains that you haven't provided access key/secret key https://github.com/shieldproject/shield/blob/cc2d8c92772f6c3f19a3d7ab125e4bda61d8fc82/plugin/s3/plugin.go#L266

To Reproduce Steps to reproduce the behavior:

  1. Configure the SHIELD node in S3 to have an IAM Instance Profile with access to your S3 bucket
  2. Configure your cloud store to use S3, with the IAM Instance Profile option set
  3. See that the storage tests are failing

Expected behavior A clear and concise description of what you expected to happen.

I expected the plugin to use the IAM Instance Profile associated with the EC2 instance.

Screenshots If applicable, add screenshots to help explain your problem.

SHIELD versions (please complete the following information):

Browser version(s) (please complete if reporting a web UI bug):

Additional context

The fix should just be assigning the variable properly, but this requires some AWS time to actually test.

thomasmitchell commented 4 years ago

I've ruled out that the issue is precisely what I've listed here, and I'm unable to reproduce the underlying behavior at this time. Closing this out until it rears its ugly head in some form.