Closed utku-ozturk closed 9 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
dcicutils/redis_tools.py | 12 | 13 | 92.31% | ||
<!-- | Total: | 13 | 14 | 92.86% | --> |
Totals | |
---|---|
Change from base Build 6736812910: | 0.004% |
Covered Lines: | 9346 |
Relevant Lines: | 11891 |
This PR extends the
value
that is stored as Redis(key, value)
pair:Old format:
jwtToken
New format:jwtToken:email
(since jwtToken is base64 encoded, :(colon as the separator makes sense.ToDo
From Researcher Auth Service (RAS) Project Partner Developer Guide:
To comply with GA4GH, only the following signing algorithm is supported: RS256.
While the data portals' Auth0 implementation works with HS256, RAS only uses RS256. Current JWT encoding/decoding functions throw the exception below since RS256 requires public/private keys to sign tokens. We bypassed the decoding's verify_signature by setting False for now, which should be True in production.
ValueError: ('Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [_OpenSSLErrorWithText(code=75497580, lib=9, reason=108, reason_text=b'error:0480006C:PEM routines::no start line')])
Related PRs: