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

impl(oauth2): support IMDSv2 in AWS token sources #10434

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Dec 13, 2022

This is the easiest configuration to implement for AWS token sources.

Part of the work for #5915


This change is Reviewable

This is the easiest configuration to implement for AWS token sources.
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 307e5359b1320a18f4dd9c80b9bdcf1841f5925f

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

Base: 93.89% // Head: 93.89% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (307e535) compared to base (2e70cd9).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10434   +/-   ##
=======================================
  Coverage   93.89%   93.89%           
=======================================
  Files        1612     1612           
  Lines      146330   146392   +62     
=======================================
+ Hits       137393   137457   +64     
+ Misses       8937     8935    -2     
Impacted Files Coverage Δ
...loud/internal/external_account_token_source_aws.cc 98.03% <100.00%> (+4.09%) ⬆️
...internal/external_account_token_source_aws_test.cc 100.00% <100.00%> (ø)
...ud/internal/oauth2_external_account_credentials.cc 98.37% <100.00%> (+0.02%) ⬆️
...ternal/oauth2_external_account_credentials_test.cc 98.22% <100.00%> (+0.03%) ⬆️
...e/cloud/pubsublite/internal/alarm_registry_impl.cc 97.05% <0.00%> (-2.95%) ⬇️
...integration_tests/schema_admin_integration_test.cc 98.88% <0.00%> (-1.12%) ⬇️
google/cloud/storage/parallel_upload.cc 98.62% <0.00%> (+0.34%) ⬆️
...bigtable/examples/bigtable_hello_instance_admin.cc 83.00% <0.00%> (+2.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@coryan coryan marked this pull request as ready for review December 13, 2022 22:55
@coryan coryan requested a review from a team as a code owner December 13, 2022 22:55
internal::ErrorContext const& ec) {
auto info = ParseExternalAccountTokenSourceAws(credentials_source, ec);
if (!info) return std::move(info).status();
if (!info->imdsv2_session_token_url.empty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Reverse test to make "success" the fall through?

Options const& opts) {
return Idmsv2TokenSource(info, cf, opts);
}};
}
return internal::UnimplementedError("WIP", GCP_ERROR_INFO().WithContext(ec));
Copy link
Contributor

Choose a reason for hiding this comment

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

"WIP"?

@coryan
Copy link
Contributor Author

coryan commented Dec 14, 2022

Sorry, I just realized I misread the documentation. The IDMSv2 case is not the easy case, it is the most complicated case. Sigh... I need to close this.

@coryan coryan closed this Dec 14, 2022
@coryan coryan deleted the feat-oauth2-workload-identity-federation-pr22 branch February 14, 2023 21:10
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.

3 participants