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: support external accounts mapping #10391

Merged

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Dec 7, 2022

Create the class derived from google::cloud::Credentials that will represent external accounts. These classes are mapped to the implementation using google::cloud::internal::CredentialsVisitor, which now supports external accounts. I change the integration test for external accounts to use the credentials to make a GCS request.

Part of the work for #5915


This change is Reviewable

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 0b39503765ac91d251cc2de241e8d691fd69e512

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

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: a346cd9b8b70eda9f3b814766ed1bdeb8e64c693

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

@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Base: 93.86% // Head: 93.84% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (404174b) compared to base (2c3e2f9).
Patch coverage: 37.50% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10391      +/-   ##
==========================================
- Coverage   93.86%   93.84%   -0.03%     
==========================================
  Files        1601     1601              
  Lines      145620   145676      +56     
==========================================
+ Hits       136693   136715      +22     
- Misses       8927     8961      +34     
Impacted Files Coverage Δ
google/cloud/internal/unified_grpc_credentials.cc 74.46% <0.00%> (-15.28%) ⬇️
google/cloud/internal/unified_rest_credentials.cc 75.92% <0.00%> (-24.08%) ⬇️
...cloud/storage/internal/unified_rest_credentials.cc 70.90% <0.00%> (-24.22%) ⬇️
google/cloud/internal/credentials_impl.cc 100.00% <100.00%> (ø)
google/cloud/internal/credentials_impl.h 100.00% <100.00%> (ø)
google/cloud/internal/credentials_impl_test.cc 100.00% <100.00%> (ø)
...e/cloud/pubsublite/internal/alarm_registry_impl.cc 97.05% <0.00%> (-2.95%) ⬇️
google/cloud/pubsub/samples/samples.cc 90.78% <0.00%> (-0.08%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 97.99% <0.00%> (ø)
google/cloud/completion_queue_test.cc 97.32% <0.00%> (+0.19%) ⬆️
... and 1 more

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 force-pushed the feat-oauth2-workload-identity-federation-pr17 branch from a346cd9 to 1dc7285 Compare December 7, 2022 17:19
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 1dc7285e728e8f3a7807c0b788226f009a1afcf1

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

@coryan coryan force-pushed the feat-oauth2-workload-identity-federation-pr17 branch from 1dc7285 to 0f23ebe Compare December 8, 2022 00:51
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 0f23ebe859954b13ecc613fc09bfa125cd26cd67

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

@coryan coryan marked this pull request as ready for review December 8, 2022 01:28
@coryan coryan requested a review from a team as a code owner December 8, 2022 01:28
#include "absl/memory/memory.h"
#include <grpcpp/security/credentials.h>
Copy link
Member

Choose a reason for hiding this comment

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

are we relying on the grpc::experimental namespace being included by the grpc header? should we define it ourselves, just in case?

namespace grpc::experimental {}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. This was just because I wanted to preempt any IWYU questions. We should not be reopening "other" namespaces, and there are plenty of grpc::experimental things

Copy link
Member

Choose a reason for hiding this comment

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

ok, I just worry that we wouldn't control whether using namespace grpc::experimental; breaks one day, because the namespace is not defined. 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I expect we will get a PR to update gRPC and detect the breakage early, before our customers with high likelihood.

google/cloud/internal/credentials_impl.cc Outdated Show resolved Hide resolved
@coryan coryan force-pushed the feat-oauth2-workload-identity-federation-pr17 branch from 0f23ebe to 69a1bd4 Compare December 8, 2022 14:28
Create the class derived from `google::cloud::Credentials` that will
represent external accounts. These classes are mapped to the
implementation using `google::cloud::internal::CredentialsVisitor`,
which now supports external accounts. I change the integration test
for external accounts to use the credentials to make a GCS request.
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 69a1bd47b1ccb6c3dc3985ddfd289c0d53a780d6

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

@coryan coryan force-pushed the feat-oauth2-workload-identity-federation-pr17 branch from 69a1bd4 to 404174b Compare December 8, 2022 14:43
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 404174b74e294773d935413f5180daf1ad46addd

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

@coryan coryan merged commit 926e861 into googleapis:main Dec 8, 2022
@coryan coryan deleted the feat-oauth2-workload-identity-federation-pr17 branch December 8, 2022 16:58
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