Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 03b9dfb

Browse filesBrowse files
author
Mohan Krishnan
committed
Fix the call to validate_iap (GoogleCloudPlatform#4260)
The method signature for validate_iap changed with 41c173 but the call to validate_iap from example_gce_backend.py was not changed
1 parent 2c0d10c commit 03b9dfb
Copy full SHA for 03b9dfb

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎iap/example_gce_backend.py

Copy file name to clipboardExpand all lines: iap/example_gce_backend.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ def root():
2929
jwt = flask.request.headers.get('x-goog-iap-jwt-assertion')
3030
if jwt is None:
3131
return 'Unauthorized request.'
32+
expected_audience = '/projects/{}/global/backendServices/{}'.format(CLOUD_PROJECT_ID, BACKEND_SERVICE_ID)
3233
user_id, user_email, error_str = (
3334
validate_jwt.validate_iap_jwt(
34-
jwt, CLOUD_PROJECT_ID, BACKEND_SERVICE_ID))
35+
jwt, expected_audience))
3536
if error_str:
3637
return 'Error: {}'.format(error_str)
3738
else:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.