-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update gem dependencies #7
Conversation
revert rakefile changes
add final newline
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.
Looks good, my main ask is, if timing at all allows, to get the 3.3 pre-upgrade PR merged before this. They both change the aws-sdk-core version, and Elijah and I saw very complicated poste bugs slightly adjacent to that. The merge conflicts have been 😩
@@ -108,6 +108,7 @@ | |||
expiration = provider.expiration | |||
_(expiration).must_equal(provider.expiration) | |||
Timecop.travel(1.5.hours.from_now) do | |||
provider.refresh! |
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.
@Hamms The newer versions of aws-sdk-core do not automatically refresh when you check the expiration
property, so this test no longer triggers a refresh. I've added an explicit call to refresh
on our provider, so what we're testing here is the handling of expired tokens in our google.rb refresh method.
} | ||
|
||
# Use the AWS CLI to set the credentials in the session profile | ||
credentials_map.each do |key, value| | ||
system("aws configure set #{key} #{value} --profile #{@session_profile}") |
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.
Not an issue with your current code changes, just a vulnerability in general. This putting secrets on CLI arguments allows other people to sniff the creds with a simple ps auxw
. This is a recommendation by ChatGPT for an alternate (untested). Should I add this as a separate PR?
require 'aws-sdk-core'
def write_credentials
shared_credentials = Aws::SharedCredentials.new(profile_name: @session_profile)
shared_credentials.load
shared_credentials.update(
access_key_id: @credentials.access_key_id,
secret_access_key: @credentials.secret_access_key,
session_token: @credentials.session_token,
expiration: @expiration
)
end
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.
yeah, sounds like a good idea
|
This PR does a bit too much, happy to break up if preferred.
Update
aws-sdk-core
This is why I started this work. We want to update
aws-sdk-autoscaling
in the code-dot-org repository, and this was blocking that.Updates other gems to their latest versions compatible with Ruby 3.0.5
Because why not?
A bunch of automatic linting
Prettier was not happy about 6 year old code.
Adds some Docker tooling for developer experience
Added this after struggling with ruby versions and other installed gems on my local workstation. Isolating the development environment while working on the gem was handy
Add a GitHub action to run tests on PR's
My decaf mocha may or may not have been decaf, clearly overreaching here. This runs tests against both the latest Ruby (3.3.x) and the version pinned in code-dot-org (3.0.5)