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

doc(common): make authentication docs easier to find #10110

Merged
merged 1 commit into from Oct 27, 2022

Conversation

coryan
Copy link
Member

@coryan coryan commented Oct 27, 2022

I created a page for all the authentication components. I also moved some general overview stuff out of the Credentials class into the components overview.


This change is Reviewable

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: f86e23df04a8c5f51563ae463583b98c3e52e994

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

I created a page for all the authentication components. I also moved
some general overview stuff out of the `Credentials` class into the
components overview.
@coryan coryan force-pushed the doc-common-authentication-components branch from f86e23d to abe605a Compare October 27, 2022 19:28
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: abe605af4f2a930a0aa5aa76fafd9091a80fe673

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

@coryan
Copy link
Member Author

coryan commented Oct 27, 2022

This is a rendered version, because the source may be hard to grok:

pr-10110.pdf

@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

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

Coverage data is based on head (abe605a) compared to base (69561fe).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10110   +/-   ##
=======================================
  Coverage   93.97%   93.97%           
=======================================
  Files        1513     1513           
  Lines      139964   139964           
=======================================
+ Hits       131534   131536    +2     
+ Misses       8430     8428    -2     
Impacted Files Coverage Δ
google/cloud/internal/async_connection_ready.cc 89.36% <0.00%> (-4.26%) ⬇️
...integration_tests/schema_admin_integration_test.cc 98.88% <0.00%> (-1.12%) ⬇️
google/cloud/storage/parallel_upload.cc 98.28% <0.00%> (-0.35%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 98.65% <0.00%> (ø)
...le/cloud/storage/internal/curl_download_request.cc 89.63% <0.00%> (+0.33%) ⬆️
...te/integration_tests/publisher_integration_test.cc 98.68% <0.00%> (+6.57%) ⬆️

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 October 27, 2022 20:21
@coryan coryan requested a review from a team as a code owner October 27, 2022 20:21
Copy link
Member

@scotthart scotthart left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @coryan)

@coryan coryan merged commit 74eb04b into googleapis:main Oct 27, 2022
@coryan coryan deleted the doc-common-authentication-components branch October 27, 2022 20:47
/*!
@defgroup guac Authentication Components

Most services in Google Cloud Platform requires the client to authenticate the
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/requires/require/

Most services in Google Cloud Platform requires the client to authenticate the
requests. Notable exceptions include public buckets in GCS and public data
sets in BigQuery. The C++ client libraries are automatically configured
to use "Google Default Credentials", some applications may need to override this
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/some/but some/

requests. Notable exceptions include public buckets in GCS and public data
sets in BigQuery. The C++ client libraries are automatically configured
to use "Google Default Credentials", some applications may need to override this
default. The functions and classes related to change the authentication
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/change/changing/


## General Concepts

As mentioned complete overview of authentication and authorization for Google
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/mentioned /mentioned, /


Access tokens usually expire in about an hour. The client libraries
automatically refresh these tokens when needed. The only exception is
`MakeAccessTokenCredentials()` where the application provides the access token.
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/ where/, where/


## Development Workstations

During development the most common configuration to use Application Default
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/configuration to/configurations that/

During development the most common configuration to use Application Default
Credentials are:

1. Use the `gcloud auth application-default` to authentication using the
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/authentication/authenticate/


1. Use the `gcloud auth application-default` to authentication using the
developer's account for authentication.
1. Set `GOOGLE_APPLICATION_CREDENTIALS` environment variable to load a service
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/Set/Set the/

developer's account for authentication.
1. Set `GOOGLE_APPLICATION_CREDENTIALS` environment variable to load a service
account key. The value of this environment variable is the full path of a
file which contains the service account key.
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/which/that/

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I fixed this and your other comments (thanks!) in #10111

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.

None yet

4 participants