-
Notifications
You must be signed in to change notification settings - Fork 102
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
Improve how RDS proxy command handles grant expiry and proxy connection errors #770
Merged
chrnorm
merged 3 commits into
main
from
josh/cf-3652-handshake-failed-caused-database-proxy-to-shut-down
Oct 9, 2024
Merged
Improve how RDS proxy command handles grant expiry and proxy connection errors #770
chrnorm
merged 3 commits into
main
from
josh/cf-3652-handshake-failed-caused-database-proxy-to-shut-down
Oct 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrnorm
approved these changes
Oct 9, 2024
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.
confirmed working for me in a local build
chrnorm
deleted the
josh/cf-3652-handshake-failed-caused-database-proxy-to-shut-down
branch
October 9, 2024 10:41
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Oct 11, 2024
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [common-fate/granted](https://github.com/common-fate/granted) | minor | `v0.33.0` -> `v0.35.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>common-fate/granted (common-fate/granted)</summary> ### [`v0.35.1`](https://github.com/common-fate/granted/releases/tag/v0.35.1) [Compare Source](common-fate/granted@v0.35.0...v0.35.1) This release includes bug fixes for the RDS plugin. #### What's Changed - Remove Grant is activated message, use new Grant Output API by [@​JoshuaWilkes](https://github.com/JoshuaWilkes) in common-fate/granted#769 - Improve how RDS proxy command handles grant expiry and proxy connection errors by [@​JoshuaWilkes](https://github.com/JoshuaWilkes) in common-fate/granted#770 **Full Changelog**: common-fate/granted@v0.35.0...v0.35.1 ### [`v0.35.0`](https://github.com/common-fate/granted/releases/tag/v0.35.0) [Compare Source](common-fate/granted@v0.34.1...v0.35.0) #### AWS IAM Identity Center phishing protection ![Frame 13](https://github.com/user-attachments/assets/4e315c6c-694f-45bf-84bc-7f56f1df47d2) This release adds support for the new [Granted browser extension for Chrome](https://chromewebstore.google.com/detail/granted/cjjieeldgoohbkifkogalkmfpddeafcm), which confirms the user code automatically when logging in to AWS IAM Identity Center. This makes authenticating faster and protects against being phished for your AWS credentials. [Read more in our announcement blog post here.](https://www.commonfate.io/blog/granted-mitigates-aws-phishing). [Follow our install guide here to get set up with Granted.](https://docs.commonfate.io/granted/getting-started) #### What's Changed - add fixes to setting custom browser by [@​meyerjrr](https://github.com/meyerjrr) in common-fate/granted#760 - Fix the version output when running `assume -v` by [@​chrnorm](https://github.com/chrnorm) in common-fate/granted#762 - Added support for manual setting of PassDir to avoid pass password pollution in default location by [@​VigneshSelvaraj96](https://github.com/VigneshSelvaraj96) in common-fate/granted#761 - Add apigw -> apigateway service shortcut by [@​alexjurkiewicz](https://github.com/alexjurkiewicz) in common-fate/granted#763 - Add AWS IAM Identity Center device code flow automation by [@​chrnorm](https://github.com/chrnorm) in common-fate/granted#765 #### New Contributors - [@​VigneshSelvaraj96](https://github.com/VigneshSelvaraj96) made their first contribution in common-fate/granted#761 **Full Changelog**: common-fate/granted@v0.34.2...v0.35.0 ### [`v0.34.1`](https://github.com/common-fate/granted/releases/tag/v0.34.1) [Compare Source](common-fate/granted@v0.34.0...v0.34.1) This release fixes a folder permissions issue introduced in v0.34.0, and fixes an issue with using `assume -s ram` to open Resource Access Manager. A big thankyou to contributors [@​jpbelleau](https://github.com/jpbelleau) and [@​wayne-folkes](https://github.com/wayne-folkes). #### What's Changed - Add RAM (Resource Access Manager) by [@​wayne-folkes](https://github.com/wayne-folkes) in common-fate/granted#757 - Revert "update file permissions to read/write ([#​751](common-fate/granted#751))" by [@​chrnorm](https://github.com/chrnorm) and [@​jpbelleau](https://github.com/jpbelleau) in common-fate/granted#755 **Full Changelog**: common-fate/granted@v0.34.0...v0.34.1 ### [`v0.34.0`](https://github.com/common-fate/granted/releases/tag/v0.34.0) [Compare Source](common-fate/granted@v0.33.0...v0.34.0) #### What's Changed - Sort sso profiles by profile name by [@​shwethaumashanker](https://github.com/shwethaumashanker) in common-fate/granted#733 - Fix using default duration on auto approved requests by [@​meyerjrr](https://github.com/meyerjrr) in common-fate/granted#748 - Update file permissions to read/write by [@​meyerjrr](https://github.com/meyerjrr) in common-fate/granted#751 - Implement custom templated launch for sso browser option by [@​meyerjrr](https://github.com/meyerjrr) in common-fate/granted#750 **Full Changelog**: common-fate/granted@v0.33.0...v0.34.0 </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 MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed?
This PR resolves some issues with handling the case where the proxy server terminates a connection due to any number of reasons, like grant expiry or an inaccessible target database.
The CLI client now listens for a signal that the session has closed and prints a friendly error message.
Implementation wise, I've done a major refactor to split the command up into smaller functions to improve readability.
I've also removed some go routines which were flakey and instead the code now waits for specific conditions like the SSM connection starting up and being ready without.
I've improved the handling of the client connection listener so it now switches on either the session being closed or a new connection coming in.
Why?
Confusing error messages and the proxy would hang sometimes due to the SSM handler not shutting down as expected.
How did you test it?
Locally against a production database.
Potential risks
Is patch release candidate?
Link to relevant docs PRs