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

Fix aws default credentials #1963

Merged
merged 1 commit into from
May 23, 2024
Merged

Conversation

yongzhang
Copy link
Contributor

@yongzhang yongzhang commented May 13, 2024

What is the problem I am trying to address?

Unable to access s3 with default config in v0.14.0, but v0.13.x works very well.

How is the fix applied?

Mention briefly how you have applied the fix.

What GitHub issue(s) does this PR fix or close?

Fixes #1961

@@ -40,10 +40,6 @@ func New(s3Conf *config.S3Config, timeout time.Duration, options ...func(*aws.Co
return nil, errors.E(op, err)
}

// Remove anonymous credentials from the default config so that
// session.NewSession can auto-resolve credentials from role, profile, env etc.
awsConfig.Credentials = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, this is interesting. I wonder if roles, profiles, and ENV settings will break now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think I understand the problem. Line 38 should be using this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, nevermind - this clearly says that roles, profiles, env etc should be covered by LoadDefaultConfig

@@ -40,10 +40,6 @@ func New(s3Conf *config.S3Config, timeout time.Duration, options ...func(*aws.Co
return nil, errors.E(op, err)
}

// Remove anonymous credentials from the default config so that
// session.NewSession can auto-resolve credentials from role, profile, env etc.
awsConfig.Credentials = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, nevermind - this clearly says that roles, profiles, env etc should be covered by LoadDefaultConfig

@matt0x6F
Copy link
Contributor

@yongzhang have you tested the build of this branch in your own infrastructure to verify it works?

@yongzhang
Copy link
Contributor Author

@yongzhang have you tested the build of this branch in your own infrastructure to verify it works?

yea I tested and confirmed it works, but actually I didn't get a chance to test this part.

@matt0x6F matt0x6F merged commit 0e1af85 into gomods:main May 23, 2024
11 checks passed
@matt0x6F matt0x6F added this to the 0.14.1 milestone Jun 2, 2024
matt0x6F pushed a commit to gomods/athens-charts that referenced this pull request Jun 3, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [gomods/athens](https://togithub.com/gomods/athens) | patch |
`v0.14.0` -> `v0.14.1` |

---

### Release Notes

<details>
<summary>gomods/athens (gomods/athens)</summary>

### [`v0.14.1`](https://togithub.com/gomods/athens/releases/tag/v0.14.1)

[Compare
Source](https://togithub.com/gomods/athens/compare/v0.14.0...v0.14.1)

#### What's Changed

- CI dependency updates in
[gomods/athens#1962
- Fix for AWS default credentials by
[@&#8203;yongzhang](https://togithub.com/yongzhang) in
[gomods/athens#1963
- Fix for E2E test runs by
[@&#8203;joeymhills](https://togithub.com/joeymhills) in
[gomods/athens#1966
- Feature gcp/saver: Only return errors.KindAlreadyExists if all three
exist by [@&#8203;dwbuiten](https://togithub.com/dwbuiten) in
[gomods/athens#1957
- Fix to set correct content type and send only once by
[@&#8203;matt0x6F](https://togithub.com/matt0x6F) in
[gomods/athens#1965

#### New Contributors

- [@&#8203;yongzhang](https://togithub.com/yongzhang) made their first
contribution in
[gomods/athens#1963
- [@&#8203;joeymhills](https://togithub.com/joeymhills) made their first
contribution in
[gomods/athens#1966
- [@&#8203;dwbuiten](https://togithub.com/dwbuiten) made their first
contribution in
[gomods/athens#1957

**Full Changelog**:
gomods/athens@v0.14.0...v0.14.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/gomods/athens-charts).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Athens is creating unsigned requests to S3 buckets causing 403 errors
2 participants