-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: use http async client to fetch metadata credentials #30626
aws: use http async client to fetch metadata credentials #30626
Conversation
Signed-off-by: Sunil Narasimhamurthy <sunnrs@amazon.com>
In this PR already addressed the initial set of code review comments given in #29880 (review) |
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 to me, just a couple of nits, thanks!
To @mattklein123 again for the senior maintainer pass, with the same caveats as last time (that it would have been nice if the CODEOWNERS did a pass first, but they were so conspicuously absent on the previous PR that it doesn't seem worth even inviting them this time.) |
use a method instead of checking for feature flag at multiple locations. Signed-off-by: Sunil Narasimhamurthy <sunnrs@amazon.com>
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.
Nice! Exciting to see this finally being burned down.
Following the merge of #29880 and #30626 we can mark the curl usage as deprecated. Meanwhile bazel/repositories.bzl had stale info that OpenCensus tracer was still using libcurl. We can continue to keep the Issue #11816 open until curl is removed entirely after the deprecation time (Probably for v1.31 release). Signed-off-by: Sunil Narasimhamurthy <sunnrs@amazon.com>
@suniltheta can this flag be flipped true? Otherwise it looks offhand like curl is still being used by default? |
cc: @nbaws to help with the flip. |
Commit Message: aws: use http async client to fetch metadata credentials
Additional Description:
This is
part #2
of set of changes to update common aws extension utility to make use of http async client to fetch aws credentials metadata instead of using libcurl.Previous PR #29880 introduced a
class MetadataFetcher
and a function in utility.cc to add internal static cluster config. In this PR we are adding functionality intoInstanceProfileCredentialsProvider
andTaskRoleCredentialsProvider
to useMetadataFetcher
object to fetch the credentials instead of using libcurl.Risk Level: Low
Testing: Added unit testing to cover the new code path
Docs Changes: Updated
Release Notes: Updated
Platform Specific Features: NA
Runtime guard:
envoy.reloadable_features.use_libcurl_to_fetch_aws_credentials
Deprecated: libcurl
General Description about the overall effort:
For the effort to remove curl from Envoy #11816. This change will use http async client to make the call towards EC2 instance metadata & ECS task metadata service. To make http async client work it needs cluster manager with statically defined cluster configurations. If clusters with fixed names are not provided it will add the cluster during init.
There are 2 http filters with which this change works without issue
However, with AWS IAM gRPC credentials provider plugin there is a problem⚠️ The http async client will not support AWS IAM gRPC plugin because it needs Envoy server fully initialized before using cluster manager. When gRPC service tries to use the Cluster Manager the static clusters are not available for reasons explained on #27586. So in future changes if curl is removed entirely then we need to update docs to clearly state that AWS IAM gRPC plugin can only support Environment or File based credentials fetching. Other option is to add a curl version of AWS IAM gRPC credentials plugin into the contrib folder.
So far I am not aware if there are any Envoy users other than within AWS that uses AWS IAM gRPC plugin. Please let me know what is the best way to maintain it for everyone's convenience.
I have put a short doc to explain the implementation here https://docs.google.com/document/d/1m1KE_LGDnxrXwnUC1OEKYLmw8szy4r06OX_O3JcM-wM