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

Pub/Sub: no need to verify issuer in JWT #4294

Merged
merged 2 commits into from
Jul 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions appengine/standard_python3/pubsub/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ def receive_messages_handler():
# case they would all share the same token for a limited time window.
claim = id_token.verify_oauth2_token(token, requests.Request(),
audience='example.com')
# Must also verify the `iss` claim.
if claim['iss'] not in [
'accounts.google.com',
'https://accounts.google.com'
]:
raise ValueError('Wrong issuer.')
CLAIMS.append(claim)
except Exception as e:
return 'Invalid token: {}\n'.format(e), 400
Expand Down