Skip to content

Allow cryptography >=45.0.0,<51.0.0 - #245

Merged
dominic-clerk merged 1 commit into
clerk:mainfrom
pouwerkerk:support-cryptography-50
Aug 11, 2026
Merged

Allow cryptography >=45.0.0,<51.0.0#245
dominic-clerk merged 1 commit into
clerk:mainfrom
pouwerkerk:support-cryptography-50

Conversation

@pouwerkerk

@pouwerkerk pouwerkerk commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Widen the supported cryptography range to >=45.0.0,<51.0.0, allowing downstream users to install the remediated 50.x release line.

Closes #244.

Why

CVE-2026-69247 affects cryptography >=44.0.0,<50.0.0. The current <49.0.0 ceiling prevents downstream users from installing the remediated cryptography 50.x release line.

PR #238 is the precedent for raising this ceiling in .speakeasy/gen.yaml. This change keeps the constraint in .speakeasy/gen.yaml, the Speakeasy source of truth, so the next SDK regeneration propagates it, matching how #238 was done. pyproject.toml is also updated because the regeneration immediately following #238 synced the previous constraint change there.

No generated SDK code is changed.

Validation

Environment setup:

$ uv venv --python 3.12 .venv
$ uv pip install --python .venv/bin/python -e . 'pytest==8.3.3' 'pytest-asyncio==0.24.0' 'cryptography==50.0.0'
...
 + cryptography==50.0.0

Installed version and full test suite:

$ ./.venv/bin/python -c 'import cryptography; print(cryptography.__version__)'
50.0.0
$ ./.venv/bin/pytest -q
.......................................ssssssssssssss................... [ 98%]
.                                                                        [100%]
59 passed, 14 skipped in 0.21s

The skipped tests are credential-gated. Additional credentialed testing found a pre-existing, order-dependent test_verify_token_invalid_secret_key failure caused by the module-global JWKS cache; it reproduces with both cryptography 48 and 50 and is therefore cryptography-independent. Resetting that cache between tests yields 71 passed, 2 skipped with either version. No test workaround is included here so this PR remains scoped to the dependency bounds. (Root cause and fix are in #246.)

The suite includes the JWT/JWKS and request-authentication coverage in test_verify_token.py, test_authenticate_request.py, and test_clerk_before_request_hook.py.

@pouwerkerk
pouwerkerk marked this pull request as ready for review August 10, 2026 23:38
@pouwerkerk pouwerkerk closed this Aug 10, 2026
@pouwerkerk
pouwerkerk deleted the support-cryptography-50 branch August 10, 2026 23:42
@pouwerkerk
pouwerkerk restored the support-cryptography-50 branch August 10, 2026 23:46
@pouwerkerk pouwerkerk reopened this Aug 10, 2026
@pouwerkerk

Copy link
Copy Markdown
Contributor Author

I had closed the PR when I misread your comments about PRs; reopening now that I understand now that you do accept PRs. Sorry for the confusion on my end!

@dominic-clerk

Copy link
Copy Markdown
Contributor

Thank you!

@dominic-clerk
dominic-clerk merged commit c3f059d into clerk:main Aug 11, 2026
1 check passed
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.

Please support cryptography>=50.0.0

2 participants