Conversation
…ical non-general flask validation. more tests
…n be passed from config)
|
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
Coverage Report for CI Build 32497763219Coverage increased (+20.0%) to 80.286%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions34 previously-covered lines in 4 files lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New Features
Breaking Changes
core.validate_jwt:issuersrenamed toallowed_issuers, now required andrejected when empty - there is no way to skip the issuer check.
audandscoperemain required, as before. Newpurposeanddenylist_callbackparams.core.validate_jwtpositional slots past 5 shifted: slot 6 wasoptions, nowpurpose; slot 7 waslogger, nowoptions. Move those to keywords.token.validate.validate_jwtnow raisesValueErrorwhen none ofOIDC_ISSUER/USER_API/BASE_URLis configured, instead of failing every tokenwith
JWTError.JWTAudienceErrorreportsgot unknown;JWTExpiredError→"token has expired"). Don't match on text.kidthe issuer does not publish is an error ratherthan falling back to another key.
Bug Fixes
token/fastapi.py: the issuer derived from the first request leaked into everylater request, so one token with a junk
isswould 403 all subsequent validtokens for the life of the process. Now per-request.
n/eare strictly base64url-decoded. Previously a malformed JWKS silentlyproduced a junk key, so every token read as "bad signature" rather than
"issuer published a bad key".
keys.pyhandles both.well-knownJWKS and legacy Fence/jwt/keysformats;10s timeout on key discovery; the public-key cache is mutex-guarded.
Improvements
httpx(no longer developed) withhttpx2.Dependency updates
joserfc >=1.7.3(+truststore, transitive via httpx2)httpx >=0.23,<1.0→httpx2 >=2.9.1;pyjwt >=2.4.0→>=2.11.0Deployment changes
DPOP_SHARED_SECRET- required by any service that mints or verifies DPoPnonces, MUST BE THE SAME value across ALL participating services.
DPOP_NONCE_TTL- optional, seconds, default 300.