Skip to content

Toniof 1191 add cryptography#1199

Merged
TonioF merged 6 commits intomainfrom
toniof-1191-add_cryptography
Feb 10, 2026
Merged

Toniof 1191 add cryptography#1199
TonioF merged 6 commits intomainfrom
toniof-1191-add_cryptography

Conversation

@TonioF
Copy link
Contributor

@TonioF TonioF commented Jan 28, 2026

Fixes #1191 . The issue was that the cryptography package is declared an optional dependency of pyjwt (which is a required xcube package) and a required dependency of moto (which is a dev only dependency of xcube). In consequence, all xcube developers had this package installed and did not stumble across this issue.
I added cryptography as xcube dependency, because apparently so far we relied in the code on its presence. However, I also removed the explicit call of a specific algorithm from xcubeto prevent such situations. If I see it correctly, the code would also work with other (i.e., non-RSA) algorithms, but I did not test this.

Checklist:

* [ ] Add unit tests and/or doctests in docstrings
* [ ] Add docstrings and API docs for any new/modified user-facing classes and functions
* [ ] New/modified features documented in docs/source/*

  • Changes documented in CHANGES.md
  • GitHub CI passes
  • AppVeyor CI passes
  • Test coverage remains or increases (target 100%)

@TonioF TonioF requested review from clarasb, forman and pont-us January 28, 2026 16:06
@TonioF TonioF self-assigned this Jan 28, 2026
@TonioF TonioF added the bug Something isn't working label Jan 28, 2026
Copy link
Member

@pont-us pont-us left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I just added some comments and additional version restrictions as suggestions. I haven't tested with non-RSA algorithms either, but evidently this was not needed so far anyway. Either way, get_algorithm_by_name seems like a cleaner way to implement the current functionality.

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.54%. Comparing base (3e65d5d) to head (3f6f313).

Files with missing lines Patch % Lines
xcube/webapi/auth/context.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1199      +/-   ##
==========================================
- Coverage   89.55%   89.54%   -0.01%     
==========================================
  Files         280      280              
  Lines       21653    21655       +2     
==========================================
  Hits        19391    19391              
- Misses       2262     2264       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@clarasb clarasb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @TonioF! Looks good to me.

Copy link
Member

@forman forman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, thanks! Please apply @pont-us' suggestions.

TonioF and others added 2 commits February 9, 2026 12:31
Co-authored-by: Pontus Lurcock <pontus.lurcock@brockmann-consult.de>
@TonioF TonioF merged commit ab6fff4 into main Feb 10, 2026
2 of 3 checks passed
@TonioF TonioF deleted the toniof-1191-add_cryptography branch February 10, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Authentication setup, missing cryptography

4 participants