Skip to content

PubSub: Document how to choose the PubSub auth method#8429

Merged
sduskis merged 3 commits into
googleapis:masterfrom
plamut:iss-7387-workaround
Jun 24, 2019
Merged

PubSub: Document how to choose the PubSub auth method#8429
sduskis merged 3 commits into
googleapis:masterfrom
plamut:iss-7387-workaround

Conversation

@plamut

@plamut plamut commented Jun 19, 2019

Copy link
Copy Markdown
Contributor

Closes #8137.

Describes a possible workaround for #7387, however, it does not close it, the PR just fulfills a GA requirement (documenting a possible workaround).

How to test

Steps to perform:

  • Generate the pubsub docs locally (from inside the pubsub/ directory):
    $ nox -f noxfile.py -s docs
    
  • Open the generated docs for authentication:
    $ google-chrome "file://$GOOG_CLOUD_PYTHON_DIR/pubsub/docs/_build/html/index.html#authentication"
    

Expected result:
The example is understandable and correct, the links point to correct locations.

Background

The issue itself is hard to reproduce in practice, but it was discovered in other PubSub clients that using JWT-based authentication avoids the issue. The goal of this PR is to document how different auth methods can be used with the Python client.

@plamut plamut added api: pubsub Issues related to the Pub/Sub API. type: docs Improvement to the documentation for an API. labels Jun 19, 2019
@plamut plamut requested review from anguillanneuf and sduskis June 19, 2019 15:48
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 19, 2019

@xrmx xrmx left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks @plamut! I've added a small comment as to me the key is the google-auth documentation and not the Credentials reference.

Comment thread pubsub/README.rst Outdated
@plamut

plamut commented Jun 21, 2019

Copy link
Copy Markdown
Contributor Author

I marked the PR to close #8137 based on the issue reporter's feedback (thanks again, @xrmx ).

plamut added 3 commits June 21, 2019 10:17
The link to the library is moved to the first paragraph of the
Authentication section for better visibility.
@plamut plamut force-pushed the iss-7387-workaround branch from a4f789f to ced82c7 Compare June 21, 2019 08:18

@anguillanneuf anguillanneuf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@sduskis sduskis merged commit ad405a7 into googleapis:master Jun 24, 2019
@plamut plamut deleted the iss-7387-workaround branch June 24, 2019 17:34
parthea pushed a commit that referenced this pull request Mar 2, 2026
* Document how to choose the PubSub auth method

* Give more exposure to google-auth in PubSub docs

The link to the library is moved to the first paragraph of the
Authentication section for better visibility.

* Use publisher audience for the publisher client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement. type: docs Improvement to the documentation for an API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pubsub: add 'PublisherClient.from_service_account_dict'

5 participants