Skip to content

Commit

Permalink
Defect-5677 - Fixed the Review points
Browse files Browse the repository at this point in the history
  • Loading branch information
vinodhabib committed Oct 1, 2024
1 parent e7c009c commit 075312b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions examples/example-gauth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ gcloud pubsub topics create Topic1
5. You will now need to set up [authentication](https://cloud.google.com/docs/authentication/) and a
[service account](https://cloud.google.com/docs/authentication/#service_accounts) in order to access
Pub/Sub via gRPC APIs as described [here](https://cloud.google.com/iam/docs/creating-managing-service-accounts).

Note: This step is unnecessary on Google platforms (Google App Engine / Google Cloud Shell / Google Compute Engine) as it will
automatically use the in-built Google credentials.

Assign the [role](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts) `Project -> Owner`
and for Key type select JSON. Once you click `Create`, a JSON file containing your key is downloaded to
your computer. Note down the path of this file or copy this file to the computer and file system where
you will be running the example application as described later. Assume this JSON file is available at
`/path/to/JSON/file`. You can also use the `gcloud` shell commands to
`/path/to/JSON/file` Set the value of the environment variable GOOGLE_APPLICATION_CREDENTIALS to this file path. You can also use the `gcloud` shell commands to
[create the service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts#iam-service-accounts-create-gcloud)

Note : JSON file is unnecessary on Google platforms, if it's still required somewhere else then we can set the location
(path of the JSON file where its available) of JSON file to GOOGLE_APPLICATION_CREDENTIALS env variable.

#### To build the examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ public void getTopics(String projectID) {
* arg0 = project name in the form "projects/balmy-cirrus-225307" where "balmy-cirrus-225307" is
* the project ID for the project you created.
*
* JSON file is unnecessary on Google platforms, if it's still required somewhere else then we can set the location
* (path of the JSON file where its available) of JSON file to GOOGLE_APPLICATION_CREDENTIALS env variable.
* On non-Google platforms, the GOOGLE_APPLICATION_CREDENTIALS env variable should be set to the
* location of the JSON file for the service account you created in the GCP console.
*
*/
public static void main(String[] args) throws Exception {
if (args.length < 1) {
Expand Down

0 comments on commit 075312b

Please sign in to comment.