Skip to content

fix(google-auth): raise rsa extra lower bound to 4.0#17652

Merged
ohmayr merged 1 commit into
mainfrom
fix-rsa-lower-bound
Jul 7, 2026
Merged

fix(google-auth): raise rsa extra lower bound to 4.0#17652
ohmayr merged 1 commit into
mainfrom
fix-rsa-lower-bound

Conversation

@ohmayr

@ohmayr ohmayr commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  1. setup.py:
    • Updated rsa_extra_require from "rsa>=3.1.4,<5" to "rsa>=4.0.0,<5".
  2. testing/constraints-3.10.txt:
    • Added rsa==4.0.0 to lower-bound test constraints.

Technical Rationale

Python 3.8+ Standard Library Removal (base64.decodestring):

  • In Python 3.8, the deprecated base64.decodestring() function was completely removed from Python's standard library in favor of base64.b64decode().
  • rsa < 4.0.0 (such as rsa 3.1.4 / 3.4.2) called base64.decodestring() internally in rsa/pem.py:92 during PEM certificate and key decoding.
  • When running google-auth unit tests or loading PEM keys on supported Python versions (Python 3.10+), rsa==3.1.4 fails with:
    E   AttributeError: module 'base64' has no attribute 'decodestring'
    ../../../site-packages/rsa/pem.py:92: AttributeError
    
    Impact & Backward Compatibility
    

Non-breaking: rsa 4.0.0 was released in 2018. Virtually all active Python environments using google-auth[rsa] or google-auth[testing] already use rsa 4.x.
Primary Auth Flow Unaffected: google-auth uses cryptography as its primary required dependency for RSA/EC signing; rsa is only an optional extra (google-auth[rsa]).

@ohmayr ohmayr requested review from a team as code owners July 7, 2026 19:35

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the minimum version of the rsa dependency in packages/google-auth/setup.py from 3.1.4 to 4.8. There are no review comments, and I have no additional feedback to provide.

@ohmayr ohmayr force-pushed the fix-rsa-lower-bound branch 2 times, most recently from 1842257 to 371c0ac Compare July 7, 2026 21:02
@ohmayr ohmayr force-pushed the fix-rsa-lower-bound branch from 371c0ac to 8d19f96 Compare July 7, 2026 21:09
@ohmayr ohmayr changed the title fix(google-auth): raise rsa extra lower bound to 4.8 fix(google-auth): raise rsa extra lower bound to 4.0 Jul 7, 2026
@ohmayr ohmayr merged commit 4087828 into main Jul 7, 2026
30 checks passed
@ohmayr ohmayr deleted the fix-rsa-lower-bound branch July 7, 2026 21:51
@release-please release-please Bot mentioned this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants