Skip to content
Open
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
2 changes: 1 addition & 1 deletion iap/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ requests==2.32.4
requests-toolbelt==1.0.0
Werkzeug==3.1.4
google-cloud-iam~=2.17.0
PyJWT~=2.10.1
PyJWT~=2.12.0
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.

high

Updating PyJWT to 2.12.0 is necessary for security, but the current codebase has issues that will prevent it from working correctly after this update:

  • TypeError in jwt.encode: In iap/generate_self_signed_jwt.py (line 101), a JSON string is passed to jwt.encode. PyJWT 2.x requires the payload to be a dict or bytes. Passing a str (as returned by generate_jwt_payload) will raise a TypeError. The generate_jwt_payload function should be refactored to return a dictionary for this usage.
  • Missing Dependency: iap/generate_self_signed_jwt.py imports iam_credentials_v1, which requires the google-cloud-iam-credentials package. This package is missing from requirements.txt (the google-cloud-iam package on line 8 is separate and does not include this module).

Please address these issues to ensure the sample remains functional.

PyJWT~=2.12.0
google-cloud-iam-credentials~=2.17.0