-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
aws: rds refresh assertion failure #37752
Draft
nbaws
wants to merge
25
commits into
envoyproxy:main
Choose a base branch
from
nbaws:rds_refresh
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
24d44ae
fix assertion failure during rds
nbaws e918f76
test cases
nbaws 1e3fa55
fix test leak
nbaws a33b142
singleton webidentity
nbaws 6ae5b8a
credential_provider
nbaws f31f22f
string_view scope
nbaws 84c52b5
cleanup
nbaws 8a0056d
additional mocks
nbaws bbb30e4
address feedback
nbaws fa470ef
fix assertion failure during rds
nbaws af5ef98
test cases
nbaws 9d91a1b
fix test leak
nbaws f66cfc7
singleton webidentity
nbaws fcd9d70
Merge commit 'f66cfc7a9ad414e16259e16a70a96bd32e32f056' into rds_refresh
nbaws 0f2bcb2
update for async handling
nbaws 167124a
first async cut
nbaws 353ca78
add async handling
nbaws a1a8006
address feedback
nbaws a0600a5
Merge branch '36769' into rds_refresh
nbaws a638178
merge main
nbaws 2b31631
changes
nbaws 9978344
format
nbaws 27cfb75
merge
nbaws 554ec34
Merge branch 'envoyproxy:main' into rds_refresh
nbaws bf787e7
refactor clusters
nbaws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
177 changes: 146 additions & 31 deletions
177
source/extensions/common/aws/credentials_provider_impl.cc
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,14 +63,12 @@ using AwsSigningHeaderExclusionVector = std::vector<envoy::type::matcher::v3::St | |
class SignerBaseImpl : public Signer, public Logger::Loggable<Logger::Id::aws> { | ||
public: | ||
SignerBaseImpl(absl::string_view service_name, absl::string_view region, | ||
const CredentialsProviderSharedPtr& credentials_provider, | ||
Server::Configuration::CommonFactoryContext& context, | ||
const AwsSigningHeaderExclusionVector& matcher_config, | ||
const bool query_string = false, | ||
const uint16_t expiration_time = SignatureQueryParameterValues::DefaultExpiration) | ||
: service_name_(service_name), region_(region), | ||
excluded_header_matchers_(defaultMatchers(context)), | ||
credentials_provider_(credentials_provider), query_string_(query_string), | ||
excluded_header_matchers_(defaultMatchers(context)), query_string_(query_string), | ||
expiration_time_(expiration_time), time_source_(context.timeSource()), | ||
long_date_formatter_(std::string(SignatureConstants::LongDateFormat)), | ||
short_date_formatter_(std::string(SignatureConstants::ShortDateFormat)) { | ||
|
@@ -81,13 +79,14 @@ class SignerBaseImpl : public Signer, public Logger::Loggable<Logger::Id::aws> { | |
} | ||
} | ||
|
||
absl::Status sign(Http::RequestMessage& message, bool sign_body = false, | ||
absl::Status sign(Http::RequestMessage& message, const Credentials credentials, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we use a mix of |
||
bool sign_body = false, const absl::string_view override_region = "") override; | ||
absl::Status sign(Http::RequestHeaderMap& headers, const Credentials credentials, | ||
const std::string& content_hash, | ||
const absl::string_view override_region = "") override; | ||
absl::Status sign(Http::RequestHeaderMap& headers, const std::string& content_hash, | ||
const absl::string_view override_region = "") override; | ||
absl::Status signEmptyPayload(Http::RequestHeaderMap& headers, | ||
absl::Status signEmptyPayload(Http::RequestHeaderMap& headers, const Credentials credentials, | ||
const absl::string_view override_region = "") override; | ||
absl::Status signUnsignedPayload(Http::RequestHeaderMap& headers, | ||
absl::Status signUnsignedPayload(Http::RequestHeaderMap& headers, const Credentials credentials, | ||
const absl::string_view override_region = "") override; | ||
|
||
protected: | ||
|
@@ -154,7 +153,6 @@ class SignerBaseImpl : public Signer, public Logger::Loggable<Logger::Id::aws> { | |
Http::Headers::get().ForwardedFor.get(), Http::Headers::get().ForwardedProto.get(), | ||
"x-amzn-trace-id"}; | ||
std::vector<Matchers::StringMatcherPtr> excluded_header_matchers_; | ||
CredentialsProviderSharedPtr credentials_provider_; | ||
const bool query_string_; | ||
const uint16_t expiration_time_; | ||
TimeSource& time_source_; | ||
|
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
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
Oops, something went wrong.
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.
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.
nit: owned
std::string
s as parameters.